Create an order
curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/commerce/orders \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+32 2 000 00 00",
"internal_notes": "Preferred contact: accounts payable team."
},
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"city": "Brussels",
"country": "BE",
"box": "A",
"postal_code": "1000",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com"
},
"shipping_address": {
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"city": "Brussels",
"country": "BE",
"box": "A",
"postal_code": "1000",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com"
},
"currency": "EUR",
"lines": [
{
"variant_id": "<commerce-variant-id>",
"quantity": 2,
"tax_rate": 21,
"unit_price": 100
}
],
"note": "Please leave at the front door.",
"payment_method": "Credit card"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/commerce/orders"
payload = {
"customer": {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+32 2 000 00 00",
"internal_notes": "Preferred contact: accounts payable team."
},
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"city": "Brussels",
"country": "BE",
"box": "A",
"postal_code": "1000",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com"
},
"shipping_address": {
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"city": "Brussels",
"country": "BE",
"box": "A",
"postal_code": "1000",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com"
},
"currency": "EUR",
"lines": [
{
"variant_id": "<commerce-variant-id>",
"quantity": 2,
"tax_rate": 21,
"unit_price": 100
}
],
"note": "Please leave at the front door.",
"payment_method": "Credit card"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
customer: {
email: 'john.doe@example.com',
first_name: 'John',
last_name: 'Doe',
phone: '+32 2 000 00 00',
internal_notes: 'Preferred contact: accounts payable team.'
},
billing_address: {
first_name: 'John',
last_name: 'Doe',
street: 'Example Street',
number: '123',
city: 'Brussels',
country: 'BE',
box: 'A',
postal_code: '1000',
phone: '+32 2 000 00 00',
email: 'john.doe@example.com'
},
shipping_address: {
first_name: 'John',
last_name: 'Doe',
street: 'Example Street',
number: '123',
city: 'Brussels',
country: 'BE',
box: 'A',
postal_code: '1000',
phone: '+32 2 000 00 00',
email: 'john.doe@example.com'
},
currency: 'EUR',
lines: [
{
variant_id: '<commerce-variant-id>',
quantity: 2,
tax_rate: 21,
unit_price: 100
}
],
note: 'Please leave at the front door.',
payment_method: 'Credit card'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/commerce/orders', 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.chift.eu/consumers/{consumer_id}/commerce/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer' => [
'email' => 'john.doe@example.com',
'first_name' => 'John',
'last_name' => 'Doe',
'phone' => '+32 2 000 00 00',
'internal_notes' => 'Preferred contact: accounts payable team.'
],
'billing_address' => [
'first_name' => 'John',
'last_name' => 'Doe',
'street' => 'Example Street',
'number' => '123',
'city' => 'Brussels',
'country' => 'BE',
'box' => 'A',
'postal_code' => '1000',
'phone' => '+32 2 000 00 00',
'email' => 'john.doe@example.com'
],
'shipping_address' => [
'first_name' => 'John',
'last_name' => 'Doe',
'street' => 'Example Street',
'number' => '123',
'city' => 'Brussels',
'country' => 'BE',
'box' => 'A',
'postal_code' => '1000',
'phone' => '+32 2 000 00 00',
'email' => 'john.doe@example.com'
],
'currency' => 'EUR',
'lines' => [
[
'variant_id' => '<commerce-variant-id>',
'quantity' => 2,
'tax_rate' => 21,
'unit_price' => 100
]
],
'note' => 'Please leave at the front door.',
'payment_method' => 'Credit card'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.chift.eu/consumers/{consumer_id}/commerce/orders"
payload := strings.NewReader("{\n \"customer\": {\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+32 2 000 00 00\",\n \"internal_notes\": \"Preferred contact: accounts payable team.\"\n },\n \"billing_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"shipping_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"currency\": \"EUR\",\n \"lines\": [\n {\n \"variant_id\": \"<commerce-variant-id>\",\n \"quantity\": 2,\n \"tax_rate\": 21,\n \"unit_price\": 100\n }\n ],\n \"note\": \"Please leave at the front door.\",\n \"payment_method\": \"Credit card\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.chift.eu/consumers/{consumer_id}/commerce/orders")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+32 2 000 00 00\",\n \"internal_notes\": \"Preferred contact: accounts payable team.\"\n },\n \"billing_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"shipping_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"currency\": \"EUR\",\n \"lines\": [\n {\n \"variant_id\": \"<commerce-variant-id>\",\n \"quantity\": 2,\n \"tax_rate\": 21,\n \"unit_price\": 100\n }\n ],\n \"note\": \"Please leave at the front door.\",\n \"payment_method\": \"Credit card\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/commerce/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+32 2 000 00 00\",\n \"internal_notes\": \"Preferred contact: accounts payable team.\"\n },\n \"billing_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"shipping_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"currency\": \"EUR\",\n \"lines\": [\n {\n \"variant_id\": \"<commerce-variant-id>\",\n \"quantity\": 2,\n \"tax_rate\": 21,\n \"unit_price\": 100\n }\n ],\n \"note\": \"Please leave at the front door.\",\n \"payment_method\": \"Credit card\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<this-id>",
"source_ref": {
"id": "<target-software-id>",
"model": "invoice"
},
"status": "cancelled_unpaid",
"discount_amount": 0,
"untaxed_amount_without_fees": 200,
"tax_amount_without_fees": 42,
"total_without_fees": 242,
"current_untaxed_amount": 200,
"current_tax_amount": 42,
"current_total": 242,
"untaxed_amount": 200,
"tax_amount": 42,
"total": 242,
"currency": "EUR",
"lines": [
{
"id": "<this-id>",
"source_ref": {
"id": "<target-software-id>",
"model": "invoice"
},
"quantity": 2,
"current_quantity": 2,
"unit_price": 100,
"description": "T-Shirt - M",
"tax_rate": 21,
"untaxed_amount": 200,
"tax_amount": 42,
"total": 242,
"created_on": "2026-01-15T10:30:00Z",
"variant": {
"id": "<commerce-variant-id>",
"name": "T-Shirt - M",
"sku": "TSHIRT-M",
"categories": []
},
"tax_id": "<commerce-tax-id>",
"discounts": [],
"gift_card": false,
"is_gift": false
}
],
"order_number": "1001",
"channel": "Online store",
"customer": {
"id": "<this-customer-id>",
"first_name": "John",
"last_name": "Doe",
"phone": "+32 2 000 00 00",
"internal_notes": "Preferred contact: accounts payable team.",
"email": "john.doe@example.com"
},
"billing_address": {
"address_type": "main",
"company_name": "Example Company S.A.",
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"box": "A",
"city": "Brussels",
"postal_code": "1000",
"country": "BE",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com",
"vat": "BE0000000000"
},
"shipping_address": {
"address_type": "main",
"company_name": "Example Company S.A.",
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"box": "A",
"city": "Brussels",
"postal_code": "1000",
"country": "BE",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com",
"vat": "BE0000000000"
},
"created_on": "2026-01-15T10:30:00Z",
"last_updated_on": "2026-01-15T10:30:00Z",
"confirmed_on": "2026-01-15T10:30:00Z",
"delivery_date": "2026-02-14T10:30:00Z",
"cancelled_on": "2026-01-20T10:30:00Z",
"fulfillment": {
"fulfillment_type": "FBA",
"shipping_from_address": {
"address_type": "main",
"name": "<string>",
"number": "<string>",
"box": "<string>",
"phone": "<string>",
"mobile": "<string>",
"email": "<string>",
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country": "<string>"
}
},
"refunded_amount": 0,
"note": "Please leave at the front door.",
"tags": [
"vip"
],
"other_fees": [],
"payment_method_id": "<commerce-payment-method-id>",
"transactions": [],
"payment_methods": [],
"detailed_refunds": [
{
"id": "<this-id>",
"source_ref": {
"id": "<target-software-id>",
"model": "invoice"
},
"total": 121,
"created_on": "2026-01-15T10:30:00Z",
"reason": "Damaged item",
"order_lines": [],
"other": 0,
"shipping_refunds": [],
"other_fees": [],
"transactions": []
}
],
"returns": []
}Orders
Create an order
Creates a new customer order in the e-commerce system and returns the created order record.
POST
/
consumers
/
{consumer_id}
/
commerce
/
orders
Create an order
curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/commerce/orders \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+32 2 000 00 00",
"internal_notes": "Preferred contact: accounts payable team."
},
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"city": "Brussels",
"country": "BE",
"box": "A",
"postal_code": "1000",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com"
},
"shipping_address": {
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"city": "Brussels",
"country": "BE",
"box": "A",
"postal_code": "1000",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com"
},
"currency": "EUR",
"lines": [
{
"variant_id": "<commerce-variant-id>",
"quantity": 2,
"tax_rate": 21,
"unit_price": 100
}
],
"note": "Please leave at the front door.",
"payment_method": "Credit card"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/commerce/orders"
payload = {
"customer": {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+32 2 000 00 00",
"internal_notes": "Preferred contact: accounts payable team."
},
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"city": "Brussels",
"country": "BE",
"box": "A",
"postal_code": "1000",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com"
},
"shipping_address": {
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"city": "Brussels",
"country": "BE",
"box": "A",
"postal_code": "1000",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com"
},
"currency": "EUR",
"lines": [
{
"variant_id": "<commerce-variant-id>",
"quantity": 2,
"tax_rate": 21,
"unit_price": 100
}
],
"note": "Please leave at the front door.",
"payment_method": "Credit card"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
customer: {
email: 'john.doe@example.com',
first_name: 'John',
last_name: 'Doe',
phone: '+32 2 000 00 00',
internal_notes: 'Preferred contact: accounts payable team.'
},
billing_address: {
first_name: 'John',
last_name: 'Doe',
street: 'Example Street',
number: '123',
city: 'Brussels',
country: 'BE',
box: 'A',
postal_code: '1000',
phone: '+32 2 000 00 00',
email: 'john.doe@example.com'
},
shipping_address: {
first_name: 'John',
last_name: 'Doe',
street: 'Example Street',
number: '123',
city: 'Brussels',
country: 'BE',
box: 'A',
postal_code: '1000',
phone: '+32 2 000 00 00',
email: 'john.doe@example.com'
},
currency: 'EUR',
lines: [
{
variant_id: '<commerce-variant-id>',
quantity: 2,
tax_rate: 21,
unit_price: 100
}
],
note: 'Please leave at the front door.',
payment_method: 'Credit card'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/commerce/orders', 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.chift.eu/consumers/{consumer_id}/commerce/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer' => [
'email' => 'john.doe@example.com',
'first_name' => 'John',
'last_name' => 'Doe',
'phone' => '+32 2 000 00 00',
'internal_notes' => 'Preferred contact: accounts payable team.'
],
'billing_address' => [
'first_name' => 'John',
'last_name' => 'Doe',
'street' => 'Example Street',
'number' => '123',
'city' => 'Brussels',
'country' => 'BE',
'box' => 'A',
'postal_code' => '1000',
'phone' => '+32 2 000 00 00',
'email' => 'john.doe@example.com'
],
'shipping_address' => [
'first_name' => 'John',
'last_name' => 'Doe',
'street' => 'Example Street',
'number' => '123',
'city' => 'Brussels',
'country' => 'BE',
'box' => 'A',
'postal_code' => '1000',
'phone' => '+32 2 000 00 00',
'email' => 'john.doe@example.com'
],
'currency' => 'EUR',
'lines' => [
[
'variant_id' => '<commerce-variant-id>',
'quantity' => 2,
'tax_rate' => 21,
'unit_price' => 100
]
],
'note' => 'Please leave at the front door.',
'payment_method' => 'Credit card'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.chift.eu/consumers/{consumer_id}/commerce/orders"
payload := strings.NewReader("{\n \"customer\": {\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+32 2 000 00 00\",\n \"internal_notes\": \"Preferred contact: accounts payable team.\"\n },\n \"billing_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"shipping_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"currency\": \"EUR\",\n \"lines\": [\n {\n \"variant_id\": \"<commerce-variant-id>\",\n \"quantity\": 2,\n \"tax_rate\": 21,\n \"unit_price\": 100\n }\n ],\n \"note\": \"Please leave at the front door.\",\n \"payment_method\": \"Credit card\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.chift.eu/consumers/{consumer_id}/commerce/orders")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+32 2 000 00 00\",\n \"internal_notes\": \"Preferred contact: accounts payable team.\"\n },\n \"billing_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"shipping_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"currency\": \"EUR\",\n \"lines\": [\n {\n \"variant_id\": \"<commerce-variant-id>\",\n \"quantity\": 2,\n \"tax_rate\": 21,\n \"unit_price\": 100\n }\n ],\n \"note\": \"Please leave at the front door.\",\n \"payment_method\": \"Credit card\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/commerce/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+32 2 000 00 00\",\n \"internal_notes\": \"Preferred contact: accounts payable team.\"\n },\n \"billing_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"shipping_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"street\": \"Example Street\",\n \"number\": \"123\",\n \"city\": \"Brussels\",\n \"country\": \"BE\",\n \"box\": \"A\",\n \"postal_code\": \"1000\",\n \"phone\": \"+32 2 000 00 00\",\n \"email\": \"john.doe@example.com\"\n },\n \"currency\": \"EUR\",\n \"lines\": [\n {\n \"variant_id\": \"<commerce-variant-id>\",\n \"quantity\": 2,\n \"tax_rate\": 21,\n \"unit_price\": 100\n }\n ],\n \"note\": \"Please leave at the front door.\",\n \"payment_method\": \"Credit card\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<this-id>",
"source_ref": {
"id": "<target-software-id>",
"model": "invoice"
},
"status": "cancelled_unpaid",
"discount_amount": 0,
"untaxed_amount_without_fees": 200,
"tax_amount_without_fees": 42,
"total_without_fees": 242,
"current_untaxed_amount": 200,
"current_tax_amount": 42,
"current_total": 242,
"untaxed_amount": 200,
"tax_amount": 42,
"total": 242,
"currency": "EUR",
"lines": [
{
"id": "<this-id>",
"source_ref": {
"id": "<target-software-id>",
"model": "invoice"
},
"quantity": 2,
"current_quantity": 2,
"unit_price": 100,
"description": "T-Shirt - M",
"tax_rate": 21,
"untaxed_amount": 200,
"tax_amount": 42,
"total": 242,
"created_on": "2026-01-15T10:30:00Z",
"variant": {
"id": "<commerce-variant-id>",
"name": "T-Shirt - M",
"sku": "TSHIRT-M",
"categories": []
},
"tax_id": "<commerce-tax-id>",
"discounts": [],
"gift_card": false,
"is_gift": false
}
],
"order_number": "1001",
"channel": "Online store",
"customer": {
"id": "<this-customer-id>",
"first_name": "John",
"last_name": "Doe",
"phone": "+32 2 000 00 00",
"internal_notes": "Preferred contact: accounts payable team.",
"email": "john.doe@example.com"
},
"billing_address": {
"address_type": "main",
"company_name": "Example Company S.A.",
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"box": "A",
"city": "Brussels",
"postal_code": "1000",
"country": "BE",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com",
"vat": "BE0000000000"
},
"shipping_address": {
"address_type": "main",
"company_name": "Example Company S.A.",
"first_name": "John",
"last_name": "Doe",
"street": "Example Street",
"number": "123",
"box": "A",
"city": "Brussels",
"postal_code": "1000",
"country": "BE",
"phone": "+32 2 000 00 00",
"email": "john.doe@example.com",
"vat": "BE0000000000"
},
"created_on": "2026-01-15T10:30:00Z",
"last_updated_on": "2026-01-15T10:30:00Z",
"confirmed_on": "2026-01-15T10:30:00Z",
"delivery_date": "2026-02-14T10:30:00Z",
"cancelled_on": "2026-01-20T10:30:00Z",
"fulfillment": {
"fulfillment_type": "FBA",
"shipping_from_address": {
"address_type": "main",
"name": "<string>",
"number": "<string>",
"box": "<string>",
"phone": "<string>",
"mobile": "<string>",
"email": "<string>",
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country": "<string>"
}
},
"refunded_amount": 0,
"note": "Please leave at the front door.",
"tags": [
"vip"
],
"other_fees": [],
"payment_method_id": "<commerce-payment-method-id>",
"transactions": [],
"payment_methods": [],
"detailed_refunds": [
{
"id": "<this-id>",
"source_ref": {
"id": "<target-software-id>",
"model": "invoice"
},
"total": 121,
"created_on": "2026-01-15T10:30:00Z",
"reason": "Damaged item",
"order_lines": [],
"other": 0,
"shipping_refunds": [],
"other_fees": [],
"transactions": []
}
],
"returns": []
}Learn more:
Body
application/json
Response
Successful Response