For each call, you can find a description, technical details, and sample requests and responses.
Use the Order Management API to check the details of an order.
To check the order details, send a GET request to the following endpoint:
{apiUrl}/ordermanagement/v1/orders/{order_id}Path Parameter:
order_id: The identifier received in a successful response when placing a new order.
Success Response:
{
"order_id": "7849fd84-47dc-4919-a7ce-xxxxxxxxxx",
"status": "CAPTURED",
"fraud_status": "ACCEPTED",
"order_amount": 200,
"original_order_amount": 200,
"captured_amount": 200,
"refunded_amount": 0,
"remaining_authorized_amount": 0,
"purchase_currency": "PLN"
}Error Response:
{
"correlation_id": "66782175-ae05-44fc-9eb3-eeceadbad271",
"error_code": "NOT_ALLOWED",
"error_messages": [
"string"
]
}Use the Order Management API to update the total amount of an order before it is captured, canceled, or expired.
Send a PATCH request to:
{apiUrl}/ordermanagement/v1/orders/{order_id}/authorizationRequest Body:
{
"order_amount": 6000,
"description": "",
"order_lines": [
{
"type": "physical",
"reference": "123050",
"name": "Tomatoes",
"quantity": 10,
"quantity_unit": "kg"
}
]
}Error Response:
{
"error_code": "NOT_ALLOWED",
"error_messages": ["Update not allowed."],
"correlation_id": "a3183112-74bc-44ac-9453-51af2577d717"
}Use this API to update the merchant order ID.
Send a PATCH request to:
{apiUrl}/ordermanagement/v1/orders/{order_id}/merchant-referencesRequest Body:
{
"merchant_reference1": "15632423",
"merchant_reference2": "special order"
}Error Response:
{
"error_code": "NO_SUCH_ORDER",
"error_messages": [
"Order cannot be found. Merchant references cannot be updated."
],
"correlation_id": "17c50e6c-c79d-4174-9369-4b58bca2d2ab"
}Use the Kustom Order Management API to update your customer's shipping address.
Send a PATCH request to:
{apiUrl}/ordermanagement/v1/orders/{order_id}/customer-detailsRequest Body:
{
"shipping_address": {
"street_address": "123 Fake St",
"postal_code": "12345",
"city": "New York",
"region": "NY",
"country": "US"
}
}Error Response:
{
"error_code": "NOT_ALLOWED",
"error_messages": [
"Billing address cannot be updated for user account order. Customer details cannot be updated."
],
"correlation_id": "b1fbf280-ea6e-4aee-a6ea-58b4b458ef47"
}Use this API to add shipping details to an order for tracking.
Send a POST request to:
{apiUrl}/ordermanagement/v1/orders/{order_id}/shipping-infoRequest Body:
{
"shipping_info": [
{
"return_shipping_company": "DHL US",
"return_tracking_number": "93456415674545679888",
"return_tracking_uri": "http://shipping.example/findmypackage?93456415674545679888",
"shipping_company": "DHL US",
"shipping_method": "Home",
"tracking_number": "63456415674545679874",
"tracking_uri": "http://shipping.example/findmypackage?63456415674545679874"
}
]
}Error Response:
{
"error_code": "NO_SUCH_ORDER",
"error_messages": [
"Order 7849fd84-47dc-4919-a7ce-47b9f46156f cannot be found. Shipping info cannot be added to order."
],
"correlation_id": "f072554f-ef99-4b21-85da-633355aab998"
}Use the Order Management API to cancel an uncaptured order.
Send a POST request to:
{apiUrl}/ordermanagement/v1/orders/{order_id}/cancelError Response:
{
"error_code": "CANCEL_NOT_ALLOWED",
"error_messages": ["Order has previous captures. Cancel not possible."],
"correlation_id": "95ccbcb1-8963-4569-b721-1a354"
}Use the Order Management API to acknowledge Kustom Checkout orders.
Send a POST request to:
{apiUrl}/ordermanagement/v1/orders/{order_id}/acknowledgeError Response:
{
"error_code": "NO_SUCH_ORDER",
"error_messages": ["Order cannot be found. Acknowledgement not possible."],
"correlation_id": "c56002ca-81ee-436a-b213-093e5afe75d3"
}Ready to send these requests? See the API reference for further details.