Skip to main content
POST
/
accounts
/
{aid}
/
shopping
/
draft_orders
aid_draft_orders_post
curl --request POST \
  --url https://api.dintero.com/v1/accounts/{aid}/shopping/draft_orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "order": {
    "currency": "NOK",
    "customer": {
      "first_name": "John",
      "last_name": "Doe",
      "id": "<string>",
      "gender": "male",
      "email": "customer@example.com",
      "metadata": {
        "dob_year": 1985
      },
      "phone_number": "+4799999999",
      "addresses": [
        {
          "address_line": "Sommerkroveien 34",
          "postal_place": "Oslo",
          "country": "NO",
          "address_line_2": "PB 123",
          "postal_code": "0349",
          "latitude": 59.942112,
          "longitude": 10.716991,
          "type": "<string>",
          "custom_type": "<string>"
        }
      ],
      "pays_tax": false,
      "date_of_birth": "1990-09-20",
      "favorite_store": "<string>",
      "marketing_consent": {
        "sms": {
          "consent": true
        },
        "email": {
          "consent": true
        }
      },
      "status": "<string>",
      "term": {
        "id": "<string>"
      }
    },
    "metadata": {},
    "comment": "<string>",
    "salesperson_id": "<string>",
    "salesperson_name": "<string>",
    "delivery_at": "2023-11-07T05:31:56Z",
    "pickup_at": "2023-11-07T05:31:56Z",
    "courier_id": "<string>",
    "pre_order": true,
    "time_to_live": 94672800,
    "itinerary": [
      {
        "id": "<string>",
        "operator": "<string>",
        "arrival_address": {
          "id": "<string>",
          "name": "<string>",
          "address_line": "Sommerkroveien 34",
          "address_line_2": "PB 123",
          "postal_code": "0349",
          "postal_place": "Oslo",
          "latitude": 59.942112,
          "longitude": 10.716991,
          "country": "NO",
          "external_ids": [
            {
              "id": "<string>",
              "source": "<string>",
              "description": "<string>"
            }
          ]
        },
        "arrival_at": "<string>",
        "departure_address": {
          "id": "<string>",
          "name": "<string>",
          "address_line": "Sommerkroveien 34",
          "address_line_2": "PB 123",
          "postal_code": "0349",
          "postal_place": "Oslo",
          "latitude": 59.942112,
          "longitude": 10.716991,
          "country": "NO",
          "external_ids": [
            {
              "id": "<string>",
              "source": "<string>",
              "description": "<string>"
            }
          ]
        },
        "departure_at": "<string>",
        "route_id": "<string>",
        "vehicle_id": "<string>",
        "summary": "<string>",
        "tickets": [
          {
            "class": "<string>",
            "line": "<string>",
            "seat": "<string>",
            "zone": "<string>",
            "passenger_id": [
              "<string>"
            ]
          }
        ],
        "line_ids": [
          123
        ],
        "waypoints": [
          {
            "latitude": 123,
            "longitude": 123,
            "display_name": "<string>",
            "arrival_schedule_at": "<string>",
            "departure_schedule_at": "<string>"
          }
        ]
      }
    ],
    "external_ids": [
      {
        "id": "<string>",
        "source": "<string>",
        "description": "<string>"
      }
    ],
    "items": [
      {
        "gross_amount": 39800,
        "tax_lines": [
          {
            "amount": 5584,
            "amount_dwh": "5584.0440",
            "exempt": false,
            "included_in_price": true,
            "percentage": 25,
            "tax_basis": 27920,
            "tax_basis_dwh": "27920.22",
            "tax_code": "3",
            "tax_group": "Vmva-høy"
          }
        ],
        "status": "<string>",
        "id": "175938",
        "metadata": {},
        "groups": [
          {
            "id": "B234",
            "name": "Stol"
          },
          {
            "id": "B1",
            "name": "Møbel"
          }
        ],
        "line_id": 1,
        "quantity": 2,
        "description": "Stablestol for utendørsbruk",
        "description_alias": "Staplestol",
        "eligible_for_discount": true,
        "dimension": {
          "color": "<string>",
          "size": "<string>",
          "style": "<string>",
          "config": "<string>",
          "variant": "<string>"
        },
        "discount_lines": [
          {
            "amount": 23130,
            "percentage": 10,
            "discount_subtype": "campaign-periode-q3",
            "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
            "description": "<string>",
            "line_id": 1
          }
        ],
        "additions": [
          {
            "id": "C1203",
            "description": "Extra Cheese",
            "quantity": 1,
            "gross_amount": 1000,
            "groups": [
              {
                "id": "B234",
                "name": "Stol"
              },
              {
                "id": "B1",
                "name": "Møbel"
              }
            ]
          }
        ],
        "external_id": "SL02-94821948",
        "salesperson_id": "<string>",
        "salesperson_name": "<string>",
        "comment": "<string>",
        "reversed_reason": "<string>",
        "original_currency": "SEK",
        "original_gross_amount": 39800,
        "conversion_rate_ppm": 1099000,
        "conversion_rate_timestamp": "2023-11-07T05:31:56Z",
        "conversion_rate_source": "ecb"
      }
    ],
    "type": "delivery",
    "order_number": "order123456",
    "order_id": "<string>",
    "time_to_live_expires_at": "<string>",
    "multiple_authorizations": true,
    "external_links": [
      {
        "text": "Order Receipt",
        "href": "https://example.dintero.com/receipts/234CC019-8BA9-4DDB-9A40-8C9EE0BB943C?type=pdf",
        "public": true
      }
    ],
    "attachments": [
      {
        "id": "<string>",
        "bus_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "car_reservation": {
          "booking_id": "TV 347794",
          "line_ids": [
            123
          ],
          "itinerary": [
            {
              "rental_company": "Avis",
              "drivers_id": [
                "<string>"
              ],
              "pick_up_at": "2023-11-07T05:31:56Z",
              "drop_off_at": "2023-11-07T05:31:56Z",
              "class": "<string>"
            }
          ],
          "drivers": [
            "<string>"
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "ferry_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "metro_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "taxi_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "train_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "tram_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        }
      }
    ]
  }
}
'
import requests

url = "https://api.dintero.com/v1/accounts/{aid}/shopping/draft_orders"

payload = { "order": {
"currency": "NOK",
"customer": {
"first_name": "John",
"last_name": "Doe",
"id": "<string>",
"gender": "male",
"email": "customer@example.com",
"metadata": { "dob_year": 1985 },
"phone_number": "+4799999999",
"addresses": [
{
"address_line": "Sommerkroveien 34",
"postal_place": "Oslo",
"country": "NO",
"address_line_2": "PB 123",
"postal_code": "0349",
"latitude": 59.942112,
"longitude": 10.716991,
"type": "<string>",
"custom_type": "<string>"
}
],
"pays_tax": False,
"date_of_birth": "1990-09-20",
"favorite_store": "<string>",
"marketing_consent": {
"sms": { "consent": True },
"email": { "consent": True }
},
"status": "<string>",
"term": { "id": "<string>" }
},
"metadata": {},
"comment": "<string>",
"salesperson_id": "<string>",
"salesperson_name": "<string>",
"delivery_at": "2023-11-07T05:31:56Z",
"pickup_at": "2023-11-07T05:31:56Z",
"courier_id": "<string>",
"pre_order": True,
"time_to_live": 94672800,
"itinerary": [
{
"id": "<string>",
"operator": "<string>",
"arrival_address": {
"id": "<string>",
"name": "<string>",
"address_line": "Sommerkroveien 34",
"address_line_2": "PB 123",
"postal_code": "0349",
"postal_place": "Oslo",
"latitude": 59.942112,
"longitude": 10.716991,
"country": "NO",
"external_ids": [
{
"id": "<string>",
"source": "<string>",
"description": "<string>"
}
]
},
"arrival_at": "<string>",
"departure_address": {
"id": "<string>",
"name": "<string>",
"address_line": "Sommerkroveien 34",
"address_line_2": "PB 123",
"postal_code": "0349",
"postal_place": "Oslo",
"latitude": 59.942112,
"longitude": 10.716991,
"country": "NO",
"external_ids": [
{
"id": "<string>",
"source": "<string>",
"description": "<string>"
}
]
},
"departure_at": "<string>",
"route_id": "<string>",
"vehicle_id": "<string>",
"summary": "<string>",
"tickets": [
{
"class": "<string>",
"line": "<string>",
"seat": "<string>",
"zone": "<string>",
"passenger_id": ["<string>"]
}
],
"line_ids": [123],
"waypoints": [
{
"latitude": 123,
"longitude": 123,
"display_name": "<string>",
"arrival_schedule_at": "<string>",
"departure_schedule_at": "<string>"
}
]
}
],
"external_ids": [
{
"id": "<string>",
"source": "<string>",
"description": "<string>"
}
],
"items": [
{
"gross_amount": 39800,
"tax_lines": [
{
"amount": 5584,
"amount_dwh": "5584.0440",
"exempt": False,
"included_in_price": True,
"percentage": 25,
"tax_basis": 27920,
"tax_basis_dwh": "27920.22",
"tax_code": "3",
"tax_group": "Vmva-høy"
}
],
"status": "<string>",
"id": "175938",
"metadata": {},
"groups": [
{
"id": "B234",
"name": "Stol"
},
{
"id": "B1",
"name": "Møbel"
}
],
"line_id": 1,
"quantity": 2,
"description": "Stablestol for utendørsbruk",
"description_alias": "Staplestol",
"eligible_for_discount": True,
"dimension": {
"color": "<string>",
"size": "<string>",
"style": "<string>",
"config": "<string>",
"variant": "<string>"
},
"discount_lines": [
{
"amount": 23130,
"percentage": 10,
"discount_subtype": "campaign-periode-q3",
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"additions": [
{
"id": "C1203",
"description": "Extra Cheese",
"quantity": 1,
"gross_amount": 1000,
"groups": [
{
"id": "B234",
"name": "Stol"
},
{
"id": "B1",
"name": "Møbel"
}
]
}
],
"external_id": "SL02-94821948",
"salesperson_id": "<string>",
"salesperson_name": "<string>",
"comment": "<string>",
"reversed_reason": "<string>",
"original_currency": "SEK",
"original_gross_amount": 39800,
"conversion_rate_ppm": 1099000,
"conversion_rate_timestamp": "2023-11-07T05:31:56Z",
"conversion_rate_source": "ecb"
}
],
"type": "delivery",
"order_number": "order123456",
"order_id": "<string>",
"time_to_live_expires_at": "<string>",
"multiple_authorizations": True,
"external_links": [
{
"text": "Order Receipt",
"href": "https://example.dintero.com/receipts/234CC019-8BA9-4DDB-9A40-8C9EE0BB943C?type=pdf",
"public": True
}
],
"attachments": [
{
"id": "<string>",
"bus_reservation": {
"booking_id": "NE 138 47794",
"line_ids": [123],
"passengers": [
{
"id": "<string>",
"title": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"itinerary": [
{
"departure_at": "2023-11-07T05:31:56Z",
"arrival_at": "2023-11-07T05:31:56Z",
"operator": "SAS",
"class": "<string>",
"line": "<string>",
"seat": "<string>",
"zone": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"activates_at": "2023-11-07T05:31:56Z",
"passenger_id": ["<string>"]
}
],
"insurance": [
{
"insurance_company": "<string>",
"insurance_type": "<string>"
}
]
},
"car_reservation": {
"booking_id": "TV 347794",
"line_ids": [123],
"itinerary": [
{
"rental_company": "Avis",
"drivers_id": ["<string>"],
"pick_up_at": "2023-11-07T05:31:56Z",
"drop_off_at": "2023-11-07T05:31:56Z",
"class": "<string>"
}
],
"drivers": ["<string>"],
"insurance": [
{
"insurance_company": "<string>",
"insurance_type": "<string>"
}
]
},
"ferry_reservation": {
"booking_id": "NE 138 47794",
"line_ids": [123],
"passengers": [
{
"id": "<string>",
"title": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"itinerary": [
{
"departure_at": "2023-11-07T05:31:56Z",
"arrival_at": "2023-11-07T05:31:56Z",
"operator": "SAS",
"class": "<string>",
"line": "<string>",
"seat": "<string>",
"zone": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"activates_at": "2023-11-07T05:31:56Z",
"passenger_id": ["<string>"]
}
],
"insurance": [
{
"insurance_company": "<string>",
"insurance_type": "<string>"
}
]
},
"metro_reservation": {
"booking_id": "NE 138 47794",
"line_ids": [123],
"passengers": [
{
"id": "<string>",
"title": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"itinerary": [
{
"departure_at": "2023-11-07T05:31:56Z",
"arrival_at": "2023-11-07T05:31:56Z",
"operator": "SAS",
"class": "<string>",
"line": "<string>",
"seat": "<string>",
"zone": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"activates_at": "2023-11-07T05:31:56Z",
"passenger_id": ["<string>"]
}
],
"insurance": [
{
"insurance_company": "<string>",
"insurance_type": "<string>"
}
]
},
"taxi_reservation": {
"booking_id": "NE 138 47794",
"line_ids": [123],
"passengers": [
{
"id": "<string>",
"title": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"itinerary": [
{
"departure_at": "2023-11-07T05:31:56Z",
"arrival_at": "2023-11-07T05:31:56Z",
"operator": "SAS",
"class": "<string>",
"line": "<string>",
"seat": "<string>",
"zone": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"activates_at": "2023-11-07T05:31:56Z",
"passenger_id": ["<string>"]
}
],
"insurance": [
{
"insurance_company": "<string>",
"insurance_type": "<string>"
}
]
},
"train_reservation": {
"booking_id": "NE 138 47794",
"line_ids": [123],
"passengers": [
{
"id": "<string>",
"title": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"itinerary": [
{
"departure_at": "2023-11-07T05:31:56Z",
"arrival_at": "2023-11-07T05:31:56Z",
"operator": "SAS",
"class": "<string>",
"line": "<string>",
"seat": "<string>",
"zone": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"activates_at": "2023-11-07T05:31:56Z",
"passenger_id": ["<string>"]
}
],
"insurance": [
{
"insurance_company": "<string>",
"insurance_type": "<string>"
}
]
},
"tram_reservation": {
"booking_id": "NE 138 47794",
"line_ids": [123],
"passengers": [
{
"id": "<string>",
"title": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"itinerary": [
{
"departure_at": "2023-11-07T05:31:56Z",
"arrival_at": "2023-11-07T05:31:56Z",
"operator": "SAS",
"class": "<string>",
"line": "<string>",
"seat": "<string>",
"zone": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"activates_at": "2023-11-07T05:31:56Z",
"passenger_id": ["<string>"]
}
],
"insurance": [
{
"insurance_company": "<string>",
"insurance_type": "<string>"
}
]
}
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
order: {
currency: 'NOK',
customer: {
first_name: 'John',
last_name: 'Doe',
id: '<string>',
gender: 'male',
email: 'customer@example.com',
metadata: {dob_year: 1985},
phone_number: '+4799999999',
addresses: [
{
address_line: 'Sommerkroveien 34',
postal_place: 'Oslo',
country: 'NO',
address_line_2: 'PB 123',
postal_code: '0349',
latitude: 59.942112,
longitude: 10.716991,
type: '<string>',
custom_type: '<string>'
}
],
pays_tax: false,
date_of_birth: '1990-09-20',
favorite_store: '<string>',
marketing_consent: {sms: {consent: true}, email: {consent: true}},
status: '<string>',
term: {id: '<string>'}
},
metadata: {},
comment: '<string>',
salesperson_id: '<string>',
salesperson_name: '<string>',
delivery_at: '2023-11-07T05:31:56Z',
pickup_at: '2023-11-07T05:31:56Z',
courier_id: '<string>',
pre_order: true,
time_to_live: 94672800,
itinerary: [
{
id: '<string>',
operator: '<string>',
arrival_address: {
id: '<string>',
name: '<string>',
address_line: 'Sommerkroveien 34',
address_line_2: 'PB 123',
postal_code: '0349',
postal_place: 'Oslo',
latitude: 59.942112,
longitude: 10.716991,
country: 'NO',
external_ids: [{id: '<string>', source: '<string>', description: '<string>'}]
},
arrival_at: '<string>',
departure_address: {
id: '<string>',
name: '<string>',
address_line: 'Sommerkroveien 34',
address_line_2: 'PB 123',
postal_code: '0349',
postal_place: 'Oslo',
latitude: 59.942112,
longitude: 10.716991,
country: 'NO',
external_ids: [{id: '<string>', source: '<string>', description: '<string>'}]
},
departure_at: '<string>',
route_id: '<string>',
vehicle_id: '<string>',
summary: '<string>',
tickets: [
{
class: '<string>',
line: '<string>',
seat: '<string>',
zone: '<string>',
passenger_id: ['<string>']
}
],
line_ids: [123],
waypoints: [
{
latitude: 123,
longitude: 123,
display_name: '<string>',
arrival_schedule_at: '<string>',
departure_schedule_at: '<string>'
}
]
}
],
external_ids: [{id: '<string>', source: '<string>', description: '<string>'}],
items: [
{
gross_amount: 39800,
tax_lines: [
{
amount: 5584,
amount_dwh: '5584.0440',
exempt: false,
included_in_price: true,
percentage: 25,
tax_basis: 27920,
tax_basis_dwh: '27920.22',
tax_code: '3',
tax_group: 'Vmva-høy'
}
],
status: '<string>',
id: '175938',
metadata: {},
groups: [{id: 'B234', name: 'Stol'}, {id: 'B1', name: 'Møbel'}],
line_id: 1,
quantity: 2,
description: 'Stablestol for utendørsbruk',
description_alias: 'Staplestol',
eligible_for_discount: true,
dimension: {
color: '<string>',
size: '<string>',
style: '<string>',
config: '<string>',
variant: '<string>'
},
discount_lines: [
{
amount: 23130,
percentage: 10,
discount_subtype: 'campaign-periode-q3',
discount_id: '766da0ef-9283-42bd-b012-0582344ec53c',
description: '<string>',
line_id: 1
}
],
additions: [
{
id: 'C1203',
description: 'Extra Cheese',
quantity: 1,
gross_amount: 1000,
groups: [{id: 'B234', name: 'Stol'}, {id: 'B1', name: 'Møbel'}]
}
],
external_id: 'SL02-94821948',
salesperson_id: '<string>',
salesperson_name: '<string>',
comment: '<string>',
reversed_reason: '<string>',
original_currency: 'SEK',
original_gross_amount: 39800,
conversion_rate_ppm: 1099000,
conversion_rate_timestamp: '2023-11-07T05:31:56Z',
conversion_rate_source: 'ecb'
}
],
type: 'delivery',
order_number: 'order123456',
order_id: '<string>',
time_to_live_expires_at: '<string>',
multiple_authorizations: true,
external_links: [
{
text: 'Order Receipt',
href: 'https://example.dintero.com/receipts/234CC019-8BA9-4DDB-9A40-8C9EE0BB943C?type=pdf',
public: true
}
],
attachments: [
{
id: '<string>',
bus_reservation: {
booking_id: 'NE 138 47794',
line_ids: [123],
passengers: [
{
id: '<string>',
title: '<string>',
first_name: '<string>',
last_name: '<string>'
}
],
itinerary: [
{
departure_at: '2023-11-07T05:31:56Z',
arrival_at: '2023-11-07T05:31:56Z',
operator: 'SAS',
class: '<string>',
line: '<string>',
seat: '<string>',
zone: '<string>',
expires_at: '2023-11-07T05:31:56Z',
activates_at: '2023-11-07T05:31:56Z',
passenger_id: ['<string>']
}
],
insurance: [{insurance_company: '<string>', insurance_type: '<string>'}]
},
car_reservation: {
booking_id: 'TV 347794',
line_ids: [123],
itinerary: [
{
rental_company: 'Avis',
drivers_id: ['<string>'],
pick_up_at: '2023-11-07T05:31:56Z',
drop_off_at: '2023-11-07T05:31:56Z',
class: '<string>'
}
],
drivers: ['<string>'],
insurance: [{insurance_company: '<string>', insurance_type: '<string>'}]
},
ferry_reservation: {
booking_id: 'NE 138 47794',
line_ids: [123],
passengers: [
{
id: '<string>',
title: '<string>',
first_name: '<string>',
last_name: '<string>'
}
],
itinerary: [
{
departure_at: '2023-11-07T05:31:56Z',
arrival_at: '2023-11-07T05:31:56Z',
operator: 'SAS',
class: '<string>',
line: '<string>',
seat: '<string>',
zone: '<string>',
expires_at: '2023-11-07T05:31:56Z',
activates_at: '2023-11-07T05:31:56Z',
passenger_id: ['<string>']
}
],
insurance: [{insurance_company: '<string>', insurance_type: '<string>'}]
},
metro_reservation: {
booking_id: 'NE 138 47794',
line_ids: [123],
passengers: [
{
id: '<string>',
title: '<string>',
first_name: '<string>',
last_name: '<string>'
}
],
itinerary: [
{
departure_at: '2023-11-07T05:31:56Z',
arrival_at: '2023-11-07T05:31:56Z',
operator: 'SAS',
class: '<string>',
line: '<string>',
seat: '<string>',
zone: '<string>',
expires_at: '2023-11-07T05:31:56Z',
activates_at: '2023-11-07T05:31:56Z',
passenger_id: ['<string>']
}
],
insurance: [{insurance_company: '<string>', insurance_type: '<string>'}]
},
taxi_reservation: {
booking_id: 'NE 138 47794',
line_ids: [123],
passengers: [
{
id: '<string>',
title: '<string>',
first_name: '<string>',
last_name: '<string>'
}
],
itinerary: [
{
departure_at: '2023-11-07T05:31:56Z',
arrival_at: '2023-11-07T05:31:56Z',
operator: 'SAS',
class: '<string>',
line: '<string>',
seat: '<string>',
zone: '<string>',
expires_at: '2023-11-07T05:31:56Z',
activates_at: '2023-11-07T05:31:56Z',
passenger_id: ['<string>']
}
],
insurance: [{insurance_company: '<string>', insurance_type: '<string>'}]
},
train_reservation: {
booking_id: 'NE 138 47794',
line_ids: [123],
passengers: [
{
id: '<string>',
title: '<string>',
first_name: '<string>',
last_name: '<string>'
}
],
itinerary: [
{
departure_at: '2023-11-07T05:31:56Z',
arrival_at: '2023-11-07T05:31:56Z',
operator: 'SAS',
class: '<string>',
line: '<string>',
seat: '<string>',
zone: '<string>',
expires_at: '2023-11-07T05:31:56Z',
activates_at: '2023-11-07T05:31:56Z',
passenger_id: ['<string>']
}
],
insurance: [{insurance_company: '<string>', insurance_type: '<string>'}]
},
tram_reservation: {
booking_id: 'NE 138 47794',
line_ids: [123],
passengers: [
{
id: '<string>',
title: '<string>',
first_name: '<string>',
last_name: '<string>'
}
],
itinerary: [
{
departure_at: '2023-11-07T05:31:56Z',
arrival_at: '2023-11-07T05:31:56Z',
operator: 'SAS',
class: '<string>',
line: '<string>',
seat: '<string>',
zone: '<string>',
expires_at: '2023-11-07T05:31:56Z',
activates_at: '2023-11-07T05:31:56Z',
passenger_id: ['<string>']
}
],
insurance: [{insurance_company: '<string>', insurance_type: '<string>'}]
}
}
]
}
})
};

fetch('https://api.dintero.com/v1/accounts/{aid}/shopping/draft_orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.dintero.com/v1/accounts/{aid}/shopping/draft_orders"

payload := strings.NewReader("{\n \"order\": {\n \"currency\": \"NOK\",\n \"customer\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"id\": \"<string>\",\n \"gender\": \"male\",\n \"email\": \"customer@example.com\",\n \"metadata\": {\n \"dob_year\": 1985\n },\n \"phone_number\": \"+4799999999\",\n \"addresses\": [\n {\n \"address_line\": \"Sommerkroveien 34\",\n \"postal_place\": \"Oslo\",\n \"country\": \"NO\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"latitude\": 59.942112,\n \"longitude\": 10.716991,\n \"type\": \"<string>\",\n \"custom_type\": \"<string>\"\n }\n ],\n \"pays_tax\": false,\n \"date_of_birth\": \"1990-09-20\",\n \"favorite_store\": \"<string>\",\n \"marketing_consent\": {\n \"sms\": {\n \"consent\": true\n },\n \"email\": {\n \"consent\": true\n }\n },\n \"status\": \"<string>\",\n \"term\": {\n \"id\": \"<string>\"\n }\n },\n \"metadata\": {},\n \"comment\": \"<string>\",\n \"salesperson_id\": \"<string>\",\n \"salesperson_name\": \"<string>\",\n \"delivery_at\": \"2023-11-07T05:31:56Z\",\n \"pickup_at\": \"2023-11-07T05:31:56Z\",\n \"courier_id\": \"<string>\",\n \"pre_order\": true,\n \"time_to_live\": 94672800,\n \"itinerary\": [\n {\n \"id\": \"<string>\",\n \"operator\": \"<string>\",\n \"arrival_address\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"address_line\": \"Sommerkroveien 34\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"postal_place\": \"Oslo\",\n \"latitude\": 59.942112,\n \"longitude\": 10.716991,\n \"country\": \"NO\",\n \"external_ids\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"arrival_at\": \"<string>\",\n \"departure_address\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"address_line\": \"Sommerkroveien 34\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"postal_place\": \"Oslo\",\n \"latitude\": 59.942112,\n \"longitude\": 10.716991,\n \"country\": \"NO\",\n \"external_ids\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"departure_at\": \"<string>\",\n \"route_id\": \"<string>\",\n \"vehicle_id\": \"<string>\",\n \"summary\": \"<string>\",\n \"tickets\": [\n {\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"line_ids\": [\n 123\n ],\n \"waypoints\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"display_name\": \"<string>\",\n \"arrival_schedule_at\": \"<string>\",\n \"departure_schedule_at\": \"<string>\"\n }\n ]\n }\n ],\n \"external_ids\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"items\": [\n {\n \"gross_amount\": 39800,\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"status\": \"<string>\",\n \"id\": \"175938\",\n \"metadata\": {},\n \"groups\": [\n {\n \"id\": \"B234\",\n \"name\": \"Stol\"\n },\n {\n \"id\": \"B1\",\n \"name\": \"Møbel\"\n }\n ],\n \"line_id\": 1,\n \"quantity\": 2,\n \"description\": \"Stablestol for utendørsbruk\",\n \"description_alias\": \"Staplestol\",\n \"eligible_for_discount\": true,\n \"dimension\": {\n \"color\": \"<string>\",\n \"size\": \"<string>\",\n \"style\": \"<string>\",\n \"config\": \"<string>\",\n \"variant\": \"<string>\"\n },\n \"discount_lines\": [\n {\n \"amount\": 23130,\n \"percentage\": 10,\n \"discount_subtype\": \"campaign-periode-q3\",\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"additions\": [\n {\n \"id\": \"C1203\",\n \"description\": \"Extra Cheese\",\n \"quantity\": 1,\n \"gross_amount\": 1000,\n \"groups\": [\n {\n \"id\": \"B234\",\n \"name\": \"Stol\"\n },\n {\n \"id\": \"B1\",\n \"name\": \"Møbel\"\n }\n ]\n }\n ],\n \"external_id\": \"SL02-94821948\",\n \"salesperson_id\": \"<string>\",\n \"salesperson_name\": \"<string>\",\n \"comment\": \"<string>\",\n \"reversed_reason\": \"<string>\",\n \"original_currency\": \"SEK\",\n \"original_gross_amount\": 39800,\n \"conversion_rate_ppm\": 1099000,\n \"conversion_rate_timestamp\": \"2023-11-07T05:31:56Z\",\n \"conversion_rate_source\": \"ecb\"\n }\n ],\n \"type\": \"delivery\",\n \"order_number\": \"order123456\",\n \"order_id\": \"<string>\",\n \"time_to_live_expires_at\": \"<string>\",\n \"multiple_authorizations\": true,\n \"external_links\": [\n {\n \"text\": \"Order Receipt\",\n \"href\": \"https://example.dintero.com/receipts/234CC019-8BA9-4DDB-9A40-8C9EE0BB943C?type=pdf\",\n \"public\": true\n }\n ],\n \"attachments\": [\n {\n \"id\": \"<string>\",\n \"bus_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"car_reservation\": {\n \"booking_id\": \"TV 347794\",\n \"line_ids\": [\n 123\n ],\n \"itinerary\": [\n {\n \"rental_company\": \"Avis\",\n \"drivers_id\": [\n \"<string>\"\n ],\n \"pick_up_at\": \"2023-11-07T05:31:56Z\",\n \"drop_off_at\": \"2023-11-07T05:31:56Z\",\n \"class\": \"<string>\"\n }\n ],\n \"drivers\": [\n \"<string>\"\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"ferry_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"metro_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"taxi_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"train_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"tram_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n }\n }\n ]\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.dintero.com/v1/accounts/{aid}/shopping/draft_orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order\": {\n \"currency\": \"NOK\",\n \"customer\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"id\": \"<string>\",\n \"gender\": \"male\",\n \"email\": \"customer@example.com\",\n \"metadata\": {\n \"dob_year\": 1985\n },\n \"phone_number\": \"+4799999999\",\n \"addresses\": [\n {\n \"address_line\": \"Sommerkroveien 34\",\n \"postal_place\": \"Oslo\",\n \"country\": \"NO\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"latitude\": 59.942112,\n \"longitude\": 10.716991,\n \"type\": \"<string>\",\n \"custom_type\": \"<string>\"\n }\n ],\n \"pays_tax\": false,\n \"date_of_birth\": \"1990-09-20\",\n \"favorite_store\": \"<string>\",\n \"marketing_consent\": {\n \"sms\": {\n \"consent\": true\n },\n \"email\": {\n \"consent\": true\n }\n },\n \"status\": \"<string>\",\n \"term\": {\n \"id\": \"<string>\"\n }\n },\n \"metadata\": {},\n \"comment\": \"<string>\",\n \"salesperson_id\": \"<string>\",\n \"salesperson_name\": \"<string>\",\n \"delivery_at\": \"2023-11-07T05:31:56Z\",\n \"pickup_at\": \"2023-11-07T05:31:56Z\",\n \"courier_id\": \"<string>\",\n \"pre_order\": true,\n \"time_to_live\": 94672800,\n \"itinerary\": [\n {\n \"id\": \"<string>\",\n \"operator\": \"<string>\",\n \"arrival_address\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"address_line\": \"Sommerkroveien 34\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"postal_place\": \"Oslo\",\n \"latitude\": 59.942112,\n \"longitude\": 10.716991,\n \"country\": \"NO\",\n \"external_ids\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"arrival_at\": \"<string>\",\n \"departure_address\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"address_line\": \"Sommerkroveien 34\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"postal_place\": \"Oslo\",\n \"latitude\": 59.942112,\n \"longitude\": 10.716991,\n \"country\": \"NO\",\n \"external_ids\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"departure_at\": \"<string>\",\n \"route_id\": \"<string>\",\n \"vehicle_id\": \"<string>\",\n \"summary\": \"<string>\",\n \"tickets\": [\n {\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"line_ids\": [\n 123\n ],\n \"waypoints\": [\n {\n \"latitude\": 123,\n \"longitude\": 123,\n \"display_name\": \"<string>\",\n \"arrival_schedule_at\": \"<string>\",\n \"departure_schedule_at\": \"<string>\"\n }\n ]\n }\n ],\n \"external_ids\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"items\": [\n {\n \"gross_amount\": 39800,\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"status\": \"<string>\",\n \"id\": \"175938\",\n \"metadata\": {},\n \"groups\": [\n {\n \"id\": \"B234\",\n \"name\": \"Stol\"\n },\n {\n \"id\": \"B1\",\n \"name\": \"Møbel\"\n }\n ],\n \"line_id\": 1,\n \"quantity\": 2,\n \"description\": \"Stablestol for utendørsbruk\",\n \"description_alias\": \"Staplestol\",\n \"eligible_for_discount\": true,\n \"dimension\": {\n \"color\": \"<string>\",\n \"size\": \"<string>\",\n \"style\": \"<string>\",\n \"config\": \"<string>\",\n \"variant\": \"<string>\"\n },\n \"discount_lines\": [\n {\n \"amount\": 23130,\n \"percentage\": 10,\n \"discount_subtype\": \"campaign-periode-q3\",\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"additions\": [\n {\n \"id\": \"C1203\",\n \"description\": \"Extra Cheese\",\n \"quantity\": 1,\n \"gross_amount\": 1000,\n \"groups\": [\n {\n \"id\": \"B234\",\n \"name\": \"Stol\"\n },\n {\n \"id\": \"B1\",\n \"name\": \"Møbel\"\n }\n ]\n }\n ],\n \"external_id\": \"SL02-94821948\",\n \"salesperson_id\": \"<string>\",\n \"salesperson_name\": \"<string>\",\n \"comment\": \"<string>\",\n \"reversed_reason\": \"<string>\",\n \"original_currency\": \"SEK\",\n \"original_gross_amount\": 39800,\n \"conversion_rate_ppm\": 1099000,\n \"conversion_rate_timestamp\": \"2023-11-07T05:31:56Z\",\n \"conversion_rate_source\": \"ecb\"\n }\n ],\n \"type\": \"delivery\",\n \"order_number\": \"order123456\",\n \"order_id\": \"<string>\",\n \"time_to_live_expires_at\": \"<string>\",\n \"multiple_authorizations\": true,\n \"external_links\": [\n {\n \"text\": \"Order Receipt\",\n \"href\": \"https://example.dintero.com/receipts/234CC019-8BA9-4DDB-9A40-8C9EE0BB943C?type=pdf\",\n \"public\": true\n }\n ],\n \"attachments\": [\n {\n \"id\": \"<string>\",\n \"bus_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"car_reservation\": {\n \"booking_id\": \"TV 347794\",\n \"line_ids\": [\n 123\n ],\n \"itinerary\": [\n {\n \"rental_company\": \"Avis\",\n \"drivers_id\": [\n \"<string>\"\n ],\n \"pick_up_at\": \"2023-11-07T05:31:56Z\",\n \"drop_off_at\": \"2023-11-07T05:31:56Z\",\n \"class\": \"<string>\"\n }\n ],\n \"drivers\": [\n \"<string>\"\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"ferry_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"metro_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"taxi_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"train_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n },\n \"tram_reservation\": {\n \"booking_id\": \"NE 138 47794\",\n \"line_ids\": [\n 123\n ],\n \"passengers\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"itinerary\": [\n {\n \"departure_at\": \"2023-11-07T05:31:56Z\",\n \"arrival_at\": \"2023-11-07T05:31:56Z\",\n \"operator\": \"SAS\",\n \"class\": \"<string>\",\n \"line\": \"<string>\",\n \"seat\": \"<string>\",\n \"zone\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"activates_at\": \"2023-11-07T05:31:56Z\",\n \"passenger_id\": [\n \"<string>\"\n ]\n }\n ],\n \"insurance\": [\n {\n \"insurance_company\": \"<string>\",\n \"insurance_type\": \"<string>\"\n }\n ]\n }\n }\n ]\n }\n}")
.asString();
{
  "order": {
    "currency": "NOK",
    "customer": {
      "first_name": "John",
      "last_name": "Doe",
      "id": "<string>",
      "gender": "male",
      "email": "customer@example.com",
      "metadata": {
        "dob_year": 1985
      },
      "phone_number": "+4799999999",
      "addresses": [
        {
          "address_line": "Sommerkroveien 34",
          "postal_place": "Oslo",
          "country": "NO",
          "address_line_2": "PB 123",
          "postal_code": "0349",
          "latitude": 59.942112,
          "longitude": 10.716991,
          "type": "<string>",
          "custom_type": "<string>"
        }
      ],
      "pays_tax": false,
      "date_of_birth": "1990-09-20",
      "enrolled_by": {
        "value": "https://facebook.com",
        "type": "url"
      },
      "favorite_store": "<string>",
      "company": {
        "bussiness_name": "TKP tech AS",
        "organization_number": "123456789MVA",
        "department": "sales department",
        "industry": "computer industry",
        "website": "<string>",
        "number_of_employees": "<string>"
      },
      "marketing_consent": {
        "sms": {
          "consent": true,
          "updated_at": "2018-01-12T13:42:00Z"
        },
        "email": {
          "consent": true,
          "updated_at": "2018-01-12T13:42:00Z"
        }
      },
      "status": "<string>",
      "term": {
        "id": "<string>"
      }
    },
    "gross_amount": 59800,
    "net_amount": 47840,
    "total_discount": 23130,
    "total_manual_discount_amount": 0,
    "shipping_address": {
      "address_line": "Sommerkroveien 34",
      "postal_place": "Oslo",
      "country": "NO",
      "address_line_2": "PB 123",
      "postal_code": "0349",
      "latitude": 59.942112,
      "longitude": 10.716991,
      "first_name": "John",
      "last_name": "Doe",
      "comment": "5th floor, use doorbell."
    },
    "billing_address": {
      "address_line": "Sommerkroveien 34",
      "postal_place": "Oslo",
      "country": "NO",
      "address_line_2": "PB 123",
      "postal_code": "0349",
      "latitude": 59.942112,
      "longitude": 10.716991,
      "first_name": "John",
      "last_name": "Doe",
      "comment": "5th floor, use doorbell."
    },
    "metadata": {},
    "comment": "<string>",
    "salesperson_id": "<string>",
    "salesperson_name": "<string>",
    "delivery_at": "2023-11-07T05:31:56Z",
    "pickup_at": "2023-11-07T05:31:56Z",
    "courier_id": "<string>",
    "pre_order": true,
    "time_to_live": 94672800,
    "itinerary": [
      {
        "id": "<string>",
        "operator": "<string>",
        "arrival_address": {
          "id": "<string>",
          "name": "<string>",
          "address_line": "Sommerkroveien 34",
          "address_line_2": "PB 123",
          "postal_code": "0349",
          "postal_place": "Oslo",
          "latitude": 59.942112,
          "longitude": 10.716991,
          "country": "NO",
          "external_ids": [
            {
              "id": "<string>",
              "source": "<string>",
              "description": "<string>"
            }
          ]
        },
        "arrival_at": "<string>",
        "departure_address": {
          "id": "<string>",
          "name": "<string>",
          "address_line": "Sommerkroveien 34",
          "address_line_2": "PB 123",
          "postal_code": "0349",
          "postal_place": "Oslo",
          "latitude": 59.942112,
          "longitude": 10.716991,
          "country": "NO",
          "external_ids": [
            {
              "id": "<string>",
              "source": "<string>",
              "description": "<string>"
            }
          ]
        },
        "departure_at": "<string>",
        "route_id": "<string>",
        "vehicle_id": "<string>",
        "summary": "<string>",
        "distance": {
          "value": 123
        },
        "duration": {
          "value": 123
        },
        "tickets": [
          {
            "class": "<string>",
            "line": "<string>",
            "seat": "<string>",
            "zone": "<string>",
            "passenger_id": [
              "<string>"
            ]
          }
        ],
        "line_ids": [
          123
        ],
        "waypoints": [
          {
            "latitude": 123,
            "longitude": 123,
            "display_name": "<string>",
            "arrival_schedule_at": "<string>",
            "departure_schedule_at": "<string>"
          }
        ]
      }
    ],
    "external_ids": [
      {
        "id": "<string>",
        "source": "<string>",
        "description": "<string>"
      }
    ],
    "items": [
      {
        "gross_amount": 39800,
        "tax_lines": [
          {
            "amount": 5584,
            "amount_dwh": "5584.0440",
            "exempt": false,
            "included_in_price": true,
            "percentage": 25,
            "tax_basis": 27920,
            "tax_basis_dwh": "27920.22",
            "tax_code": "3",
            "tax_group": "Vmva-høy"
          }
        ],
        "status": "<string>",
        "id": "175938",
        "metadata": {},
        "groups": [
          {
            "id": "B234",
            "name": "Stol"
          },
          {
            "id": "B1",
            "name": "Møbel"
          }
        ],
        "line_id": 1,
        "quantity": 2,
        "net_amount": 27840,
        "description": "Stablestol for utendørsbruk",
        "description_alias": "Staplestol",
        "is_changed": false,
        "eligible_for_discount": true,
        "dimension": {
          "color": "<string>",
          "size": "<string>",
          "style": "<string>",
          "config": "<string>",
          "variant": "<string>"
        },
        "discount_lines": [
          {
            "amount": 23130,
            "percentage": 10,
            "discount_subtype": "campaign-periode-q3",
            "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
            "description": "<string>",
            "line_id": 1
          }
        ],
        "additions": [
          {
            "id": "C1203",
            "description": "Extra Cheese",
            "quantity": 1,
            "gross_amount": 1000,
            "groups": [
              {
                "id": "B234",
                "name": "Stol"
              },
              {
                "id": "B1",
                "name": "Møbel"
              }
            ]
          }
        ],
        "store": {
          "id": "SL02",
          "organization_number": "123456789MVA",
          "name": "SC Oslo",
          "business_name": "SC Oslo AS",
          "comment": "<string>"
        },
        "external_id": "SL02-94821948",
        "related_item": {
          "line_id": 123
        },
        "salesperson_id": "<string>",
        "salesperson_name": "<string>",
        "comment": "<string>",
        "version": 123,
        "reversed_reason": "<string>",
        "dynamic_payout": {
          "rule_type": "<string>",
          "rule_id": "<string>"
        },
        "payout": {
          "destinations": [
            {
              "type": "percentage",
              "value": "10",
              "amount": 4000,
              "destinations": [
                {
                  "amount": 500
                },
                {
                  "destinations": [
                    {
                      "amount": 3500
                    }
                  ]
                }
              ]
            },
            {
              "amount": 500
            },
            {
              "destinations": [
                {
                  "amount": 192
                },
                {
                  "amount": 38308
                }
              ]
            }
          ]
        },
        "original_currency": "SEK",
        "original_gross_amount": 39800,
        "conversion_rate_ppm": 1099000,
        "conversion_rate_timestamp": "2023-11-07T05:31:56Z",
        "conversion_rate_source": "ecb"
      }
    ],
    "version": 123,
    "type": "delivery",
    "order_number": "order123456",
    "order_id": "<string>",
    "time_to_live_expires_at": "<string>",
    "multiple_authorizations": true,
    "discounts": [
      {
        "id": "<string>",
        "refs": [
          {
            "id": "<string>",
            "amount": 123,
            "statistics": {
              "amount": 123,
              "stamp": 123,
              "usage": 123
            },
            "stamp": 123,
            "usages": 123,
            "items": [
              {
                "line_id": 123,
                "amount": 123
              }
            ]
          }
        ]
      }
    ],
    "store": {
      "id": "SL02",
      "organization_number": "123456789MVA",
      "name": "SC Oslo",
      "business_name": "SC Oslo AS",
      "comments": [
        "<string>"
      ]
    },
    "external_links": [
      {
        "text": "Order Receipt",
        "href": "https://example.dintero.com/receipts/234CC019-8BA9-4DDB-9A40-8C9EE0BB943C?type=pdf",
        "public": true
      }
    ],
    "attachments": [
      {
        "id": "<string>",
        "bus_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "car_reservation": {
          "booking_id": "TV 347794",
          "line_ids": [
            123
          ],
          "itinerary": [
            {
              "rental_company": "Avis",
              "drivers_id": [
                "<string>"
              ],
              "pick_up_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "pick_up_at": "2023-11-07T05:31:56Z",
              "drop_off_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "drop_off_at": "2023-11-07T05:31:56Z",
              "class": "<string>"
            }
          ],
          "drivers": [
            "<string>"
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "ferry_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "metro_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "taxi_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "train_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        },
        "tram_reservation": {
          "booking_id": "NE 138 47794",
          "line_ids": [
            123
          ],
          "passengers": [
            {
              "id": "<string>",
              "title": "<string>",
              "first_name": "<string>",
              "last_name": "<string>"
            }
          ],
          "itinerary": [
            {
              "departure_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "departure_at": "2023-11-07T05:31:56Z",
              "arrival_address": {
                "address_line": "Sommerkroveien 34",
                "postal_place": "Oslo",
                "country": "NO",
                "address_line_2": "PB 123",
                "postal_code": "0349",
                "latitude": 59.942112,
                "longitude": 10.716991
              },
              "arrival_at": "2023-11-07T05:31:56Z",
              "operator": "SAS",
              "class": "<string>",
              "line": "<string>",
              "seat": "<string>",
              "zone": "<string>",
              "expires_at": "2023-11-07T05:31:56Z",
              "activates_at": "2023-11-07T05:31:56Z",
              "passenger_id": [
                "<string>"
              ]
            }
          ],
          "insurance": [
            {
              "insurance_company": "<string>",
              "insurance_type": "<string>"
            }
          ]
        }
      }
    ],
    "stores": [
      {
        "id": "SL02",
        "organization_number": "123456789MVA",
        "name": "SC Oslo",
        "business_name": "SC Oslo AS",
        "comments": [
          "<string>"
        ]
      }
    ]
  },
  "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  "updated_at": "2023-11-07T05:31:56Z",
  "deleted_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  "deleted_at": "2023-11-07T05:31:56Z",
  "status": "open",
  "_links": [
    {
      "href": "<string>"
    }
  ],
  "version": 123,
  "events": [
    {
      "event_type": "api-event",
      "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
      "created_at": "2023-11-07T05:31:56Z",
      "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
      "version": 123,
      "request": {
        "path": "<string>",
        "method": "<string>",
        "body": "<string>"
      },
      "draft_id": "<string>"
    }
  ],
  "options": {
    "order_time_to_live": 94672800,
    "generate_order_id": "UUID",
    "order_id": "<string>",
    "replace": "order",
    "payout": {
      "resolve_rule_id": "order.items.store.id",
      "resolve_rule_type": "<string>",
      "rules": [
        {
          "rule_type": "order.items.store.id",
          "rule_id": "sc029",
          "destinations": [
            {
              "type": "percentage",
              "value": 10,
              "destinations": [
                {
                  "type": "flat_amount",
                  "value": "500",
                  "destination": "account-a"
                },
                {
                  "type": "remaining_amount",
                  "destinations": [
                    {
                      "type": "percentage",
                      "value": "5.0",
                      "destination": "account-b"
                    }
                  ]
                }
              ]
            },
            {
              "type": "flat_amount",
              "value": "500",
              "destination": "account-a"
            },
            {
              "type": "remaining_amount",
              "destinations": [
                {
                  "type": "percentage",
                  "value": "5",
                  "destination": "account-b"
                },
                {
                  "type": "percentage",
                  "value": "95.0",
                  "destination": "account-c"
                }
              ]
            }
          ],
          "account_id": "<string>",
          "rule_version": 1,
          "metadata": {}
        }
      ]
    },
    "split_draft": false,
    "serial_order_number_suffix": false,
    "multiple_authorizations": false
  }
}
{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}
{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}
{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}
{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}

Authorizations

Authorization
string
header
required

Bearer authentication (token authentication) should be used for accessing the API.

Use Get Token to get an access token for client credentials. Pass the token in the request header:

Authorization: Bearer {access_token}

where the access_token is JSON Web Tokens (JWT).

Path Parameters

aid
string<^[PT]{1}\d{8}$>
required

An id that uniquely identifies the account.

Required string length: 9

Query Parameters

apply_discounts
boolean
default:false

Calculate available discounts and apply them to the order.

Requires additional scope for accessing the DealEngine, one of

  • admin:discounts
  • write:discounts
  • write:discounts:/available_for_receipt

The tax_lines will be updated if apply_discount results in new net_amount.

  • net_amount = gross_amount - Σ discount_lines.amount

tax_line.amount will be calculated from tax_line.percentage and net_amount.

Body

application/json

draft order resource

order
object
required
options
object

Response

draft order

order
object
required
id
string

The resource ID. Defaults to UUID v4

Maximum string length: 40
Example:

"bd04c959-d159-49b4-a096-2d84e014a8da"

created_at
string<date-time>
read-only

The date-time when the resource was created

created_by
string

The ID of the user/client created the resource

Maximum string length: 40
Example:

"bd04c959-d159-49b4-a096-2d84e014a8da"

updated_at
string<date-time>
read-only

The date-time when the resource was last updated

deleted_by
string

The ID of the user/client created the resource

Maximum string length: 40
Example:

"bd04c959-d159-49b4-a096-2d84e014a8da"

deleted_at
string<date-time>
read-only

Read-only timestamp, automatically assigned on back-end.

status
enum<string>
default:open
read-only

The status of the DraftOrder as it transitions into an Order.

Status is set to completed when the DraftOrder is completed and an Order is created

After a DraftOrder is set to completed the only further modification that can be made are adding notes or metadata fields

Available options:
open,
completed,
deleted

The links related to resource

Minimum array length: 1
version
integer
read-only

The version of the draft. Incremented when the draft is updated.

events
api-event · object[]
read-only
options
object
Last modified on July 7, 2026