Get an order
curl --request GET \
--url https://api.spacebring.com/shop/orders/v1/{orderId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.spacebring.com/shop/orders/v1/{orderId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.spacebring.com/shop/orders/v1/{orderId}', 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 => "https://api.spacebring.com/shop/orders/v1/{orderId}",
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: Basic <encoded-value>"
],
]);
$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 := "https://api.spacebring.com/shop/orders/v1/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spacebring.com/shop/orders/v1/{orderId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spacebring.com/shop/orders/v1/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"order": {
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product": {
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media": [
{
"key": "<string>",
"url": "<string>"
}
],
"title": "<string>",
"option": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
},
"quantity": 0,
"altCurrencyPriceDetails": {
"money": {
"currencyCode": "<string>",
"unitAmount": 123,
"tax": {
"inclusive": true,
"rate": 123
}
},
"type": "money"
},
"priceDetails": {
"credits": {
"unitAmount": 123
},
"money": {
"currencyCode": "<string>",
"unitAmount": 123,
"tax": {
"inclusive": true,
"rate": 123
}
}
}
}
],
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 123,
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"about": "<string>",
"email": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"comment": "<string>",
"deleteDate": "2023-11-07T05:31:56Z",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRefDeletedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment": {
"discounts": [
{
"coupon": {
"amountOff": 123,
"currencyCode": "<string>",
"id": "<string>",
"percentOff": 123,
"productTypes": [
"<string>"
],
"type": "<string>"
},
"promocode": {
"code": "<string>",
"id": "<string>",
"expiration": {
"enabled": true,
"date": "<string>"
},
"limitByFirstPurchase": true
},
"subscriptionId": "<string>"
}
],
"method": {
"credits": {
"customer": {
"id": "<string>",
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"name": "<string>",
"surname": "<string>",
"title": "<string>"
}
},
"invoice": {
"customer": {
"id": "<string>",
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"name": "<string>",
"surname": "<string>",
"title": "<string>"
},
"invoiceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentGateway": {
"customer": {
"id": "<string>",
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"name": "<string>",
"surname": "<string>",
"title": "<string>"
},
"label": "<string>",
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"mask": "<string>",
"title": "<string>"
}
},
"price": {
"credits": {
"expiringAmount": 123,
"permanentAmount": 123
},
"money": {
"currencyCode": "<string>",
"grossAmount": 123
}
},
"refundable": true,
"createDate": "2023-11-07T05:31:56Z",
"dispute": {
"createDate": "2023-11-07T05:31:56Z"
},
"refund": {
"credits": {
"amountExpiring": 123,
"amountPermanent": 123,
"amountTotal": 123,
"createDate": "2023-11-07T05:31:56Z"
},
"money": {
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"grossAmount": 123
},
"transactionRef": "<string>"
},
"refunds": {
"credits": [
{
"amountExpiring": 123,
"amountPermanent": 123,
"amountTotal": 123,
"createDate": "2023-11-07T05:31:56Z",
"id": "<string>"
}
],
"money": [
{
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"grossAmount": 123,
"id": "<string>"
}
]
},
"request": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
},
"status": "<string>",
"surcharge": {
"money": {
"amount": 123,
"currencyCode": "<string>",
"percentage": 123,
"rate": 123
},
"type": "money"
},
"transactionRef": "<string>",
"type": "<string>"
},
"userDeletedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"surname": "<string>"
}
}
}{
"message": "<string>",
"type": "<string>"
}Shop
Get an order
Get a certain order.
OAuth
Required scopes:shop.readonly or shopGET
/
shop
/
orders
/
v1
/
{orderId}
Get an order
curl --request GET \
--url https://api.spacebring.com/shop/orders/v1/{orderId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.spacebring.com/shop/orders/v1/{orderId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.spacebring.com/shop/orders/v1/{orderId}', 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 => "https://api.spacebring.com/shop/orders/v1/{orderId}",
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: Basic <encoded-value>"
],
]);
$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 := "https://api.spacebring.com/shop/orders/v1/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spacebring.com/shop/orders/v1/{orderId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spacebring.com/shop/orders/v1/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"order": {
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product": {
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media": [
{
"key": "<string>",
"url": "<string>"
}
],
"title": "<string>",
"option": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
},
"quantity": 0,
"altCurrencyPriceDetails": {
"money": {
"currencyCode": "<string>",
"unitAmount": 123,
"tax": {
"inclusive": true,
"rate": 123
}
},
"type": "money"
},
"priceDetails": {
"credits": {
"unitAmount": 123
},
"money": {
"currencyCode": "<string>",
"unitAmount": 123,
"tax": {
"inclusive": true,
"rate": 123
}
}
}
}
],
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 123,
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"about": "<string>",
"email": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"comment": "<string>",
"deleteDate": "2023-11-07T05:31:56Z",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRefDeletedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment": {
"discounts": [
{
"coupon": {
"amountOff": 123,
"currencyCode": "<string>",
"id": "<string>",
"percentOff": 123,
"productTypes": [
"<string>"
],
"type": "<string>"
},
"promocode": {
"code": "<string>",
"id": "<string>",
"expiration": {
"enabled": true,
"date": "<string>"
},
"limitByFirstPurchase": true
},
"subscriptionId": "<string>"
}
],
"method": {
"credits": {
"customer": {
"id": "<string>",
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"name": "<string>",
"surname": "<string>",
"title": "<string>"
}
},
"invoice": {
"customer": {
"id": "<string>",
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"name": "<string>",
"surname": "<string>",
"title": "<string>"
},
"invoiceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentGateway": {
"customer": {
"id": "<string>",
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"name": "<string>",
"surname": "<string>",
"title": "<string>"
},
"label": "<string>",
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"mask": "<string>",
"title": "<string>"
}
},
"price": {
"credits": {
"expiringAmount": 123,
"permanentAmount": 123
},
"money": {
"currencyCode": "<string>",
"grossAmount": 123
}
},
"refundable": true,
"createDate": "2023-11-07T05:31:56Z",
"dispute": {
"createDate": "2023-11-07T05:31:56Z"
},
"refund": {
"credits": {
"amountExpiring": 123,
"amountPermanent": 123,
"amountTotal": 123,
"createDate": "2023-11-07T05:31:56Z"
},
"money": {
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"grossAmount": 123
},
"transactionRef": "<string>"
},
"refunds": {
"credits": [
{
"amountExpiring": 123,
"amountPermanent": 123,
"amountTotal": 123,
"createDate": "2023-11-07T05:31:56Z",
"id": "<string>"
}
],
"money": [
{
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"grossAmount": 123,
"id": "<string>"
}
]
},
"request": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
},
"status": "<string>",
"surcharge": {
"money": {
"amount": 123,
"currencyCode": "<string>",
"percentage": 123,
"rate": 123
},
"type": "money"
},
"transactionRef": "<string>",
"type": "<string>"
},
"userDeletedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"surname": "<string>"
}
}
}{
"message": "<string>",
"type": "<string>"
}Authorizations
BasicAuthOAuth2
See our authentication documentation for how to authorize your requests
Headers
The id of the network. Required when using bearer token authentication
Path Parameters
The id of the order.
Response
OK
The order.
Show child attributes
Show child attributes
Was this page helpful?
⌘I