curl --request GET \
--url {schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id} \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "completed",
"owner": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": {
"country": "<string>",
"name_line": "<string>",
"premise": "<string>",
"sub_premise": "<string>",
"thoroughfare": "<string>",
"administrative_area": "<string>",
"sub_administrative_area": "<string>",
"locality": "<string>",
"dependent_locality": "<string>",
"postal_code": "<string>"
},
"company": "<string>",
"vat_number": "<string>",
"billing_period_start": "2023-11-07T05:31:56Z",
"billing_period_end": "2023-11-07T05:31:56Z",
"billing_period_label": {
"formatted": "<string>",
"month": "<string>",
"year": "<string>",
"next_month": "<string>"
},
"billing_period_duration": 123,
"paid_on": "2023-11-07T05:31:56Z",
"total": 123,
"total_formatted": 123,
"components": {
"voucher/vat/baseprice": {}
},
"currency": "<string>",
"invoice_url": "<string>",
"last_refreshed": "2023-11-07T05:31:56Z",
"invoiced": true,
"line_items": [
{
"type": "project_plan",
"license_id": 123,
"project_id": "<string>",
"product": "<string>",
"sku": "<string>",
"total": 123,
"total_formatted": "<string>",
"components": {},
"exclude_from_invoice": true
}
],
"_links": {
"invoices": {
"href": "<string>"
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Get order
Retrieves an order for the specified organization.
curl --request GET \
--url {schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id} \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/organizations/{organization_id}/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "completed",
"owner": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": {
"country": "<string>",
"name_line": "<string>",
"premise": "<string>",
"sub_premise": "<string>",
"thoroughfare": "<string>",
"administrative_area": "<string>",
"sub_administrative_area": "<string>",
"locality": "<string>",
"dependent_locality": "<string>",
"postal_code": "<string>"
},
"company": "<string>",
"vat_number": "<string>",
"billing_period_start": "2023-11-07T05:31:56Z",
"billing_period_end": "2023-11-07T05:31:56Z",
"billing_period_label": {
"formatted": "<string>",
"month": "<string>",
"year": "<string>",
"next_month": "<string>"
},
"billing_period_duration": 123,
"paid_on": "2023-11-07T05:31:56Z",
"total": 123,
"total_formatted": 123,
"components": {
"voucher/vat/baseprice": {}
},
"currency": "<string>",
"invoice_url": "<string>",
"last_refreshed": "2023-11-07T05:31:56Z",
"invoiced": true,
"line_items": [
{
"type": "project_plan",
"license_id": 123,
"project_id": "<string>",
"product": "<string>",
"sku": "<string>",
"total": 123,
"total_formatted": "<string>",
"components": {},
"exclude_from_invoice": true
}
],
"_links": {
"invoices": {
"href": "<string>"
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the organization.
Prefix with name= to retrieve the organization by name instead.
The ID of the order.
Query Parameters
The output mode.
details Response
OK
The order object.
The ID of the order.
The status of the subscription.
completed, past_due, pending, canceled, payment_failed_soft_decline, payment_failed_hard_decline The UUID of the owner.
The address of the user.
Show child attributes
Show child attributes
The company name.
An identifier used in many countries for value added tax purposes.
The time when the billing period of the order started.
The time when the billing period of the order ended.
Descriptive information about the billing cycle.
Show child attributes
Show child attributes
The duration of the billing period of the order in seconds.
The time when the order was successfully charged.
The total of the order.
The total of the order, formatted with currency.
The components of the project
Show child attributes
Show child attributes
The order currency code.
A link to the PDF invoice.
The time when the order was last refreshed.
The customer is invoiced.
The line items that comprise the order.
Show child attributes
Show child attributes
Links to related API endpoints.
Show child attributes
Show child attributes
Was this page helpful?