Skip to main content
POST
/
consumers
/
{consumer_id}
/
commerce
/
orders
Create an order
curl --request POST \
  --url https://api.chift.eu/consumers/{consumer_id}/commerce/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer": {
    "first_name": "<string>",
    "last_name": "<string>",
    "phone": "<string>",
    "internal_notes": "<string>",
    "email": "<string>"
  },
  "billing_address": {
    "first_name": "<string>",
    "last_name": "<string>",
    "street": "<string>",
    "number": "<string>",
    "box": "<string>",
    "city": "<string>",
    "postal_code": "<string>",
    "country": "<string>",
    "phone": "<string>",
    "email": "<string>"
  },
  "shipping_address": {
    "first_name": "<string>",
    "last_name": "<string>",
    "street": "<string>",
    "number": "<string>",
    "box": "<string>",
    "city": "<string>",
    "postal_code": "<string>",
    "country": "<string>",
    "phone": "<string>",
    "email": "<string>"
  },
  "currency": "<string>",
  "note": "<string>",
  "lines": [
    {
      "variant_id": "<string>",
      "quantity": 123,
      "tax_rate": 123,
      "unit_price": 123
    }
  ],
  "payment_method": "<string>"
}'
{
  "id": "<string>",
  "source_ref": {
    "id": "<string>",
    "model": "<string>"
  },
  "order_number": "<string>",
  "customer": {
    "first_name": "<string>",
    "last_name": "<string>",
    "phone": "<string>",
    "internal_notes": "<string>",
    "email": "<string>",
    "id": "<string>"
  },
  "billing_address": {
    "address_type": "main",
    "company_name": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "street": "<string>",
    "number": "<string>",
    "box": "<string>",
    "city": "<string>",
    "postal_code": "<string>",
    "country": "<string>",
    "phone": "<string>",
    "email": "<string>"
  },
  "shipping_address": {
    "address_type": "main",
    "company_name": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "street": "<string>",
    "number": "<string>",
    "box": "<string>",
    "city": "<string>",
    "postal_code": "<string>",
    "country": "<string>",
    "phone": "<string>",
    "email": "<string>"
  },
  "created_on": "2023-11-07T05:31:56Z",
  "last_updated_on": "2023-11-07T05:31:56Z",
  "confirmed_on": "2023-11-07T05:31:56Z",
  "delivery_date": "2023-11-07T05:31:56Z",
  "cancelled_on": "2023-11-07T05:31:56Z",
  "status": "cancelled_unpaid",
  "discount_amount": 123,
  "untaxed_amount_without_fees": 123,
  "tax_amount_without_fees": 123,
  "total_without_fees": 123,
  "current_untaxed_amount": 123,
  "current_tax_amount": 123,
  "current_total": 123,
  "untaxed_amount": 123,
  "tax_amount": 123,
  "total": 123,
  "refunded_amount": 123,
  "currency": "<string>",
  "note": "<string>",
  "tags": [
    "<string>"
  ],
  "lines": [
    {
      "id": "<string>",
      "source_ref": {
        "id": "<string>",
        "model": "<string>"
      },
      "created_on": "2023-11-07T05:31:56Z",
      "variant": {
        "id": "<string>",
        "sku": "<string>",
        "name": "<string>",
        "categories": [
          "<any>"
        ]
      },
      "quantity": 123,
      "current_quantity": 123,
      "unit_price": 123,
      "description": "<string>",
      "tax_id": "<string>",
      "tax_rate": 123,
      "untaxed_amount": 123,
      "tax_amount": 123,
      "total": 123,
      "discounts": [
        {
          "name": "<string>",
          "description": "<string>",
          "amount": 123
        }
      ],
      "gift_card": true,
      "is_gift": true
    }
  ],
  "other_fees": [
    {
      "id": "<string>",
      "source_ref": {
        "id": "<string>",
        "model": "<string>"
      },
      "created_on": "2023-11-07T05:31:56Z",
      "type": "shipping",
      "removed": true,
      "tax_rate": 123,
      "tax_id": "<string>",
      "discounts": [
        {
          "name": "<string>",
          "description": "<string>",
          "amount": 123
        }
      ],
      "untaxed_amount": 123,
      "tax_amount": 123,
      "total": 123
    }
  ],
  "payment_method_id": "<string>",
  "transactions": [
    {
      "id": "<string>",
      "created_on": "2023-11-07T05:31:56Z",
      "payment_method_id": "<string>",
      "payment_method_name": "<string>",
      "amount": 123,
      "status": "failed"
    }
  ],
  "payment_methods": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "detailed_refunds": [
    {
      "id": "<string>",
      "source_ref": {
        "id": "<string>",
        "model": "<string>"
      },
      "created_on": "2023-11-07T05:31:56Z",
      "total": 123,
      "reason": "<string>",
      "order_lines": [
        {
          "id": "<string>",
          "variant": {
            "id": "<string>",
            "sku": "<string>",
            "name": "<string>",
            "categories": [
              "<any>"
            ]
          },
          "quantity": 123,
          "untaxed_amount": 123,
          "tax_amount": 123,
          "total": 123
        }
      ],
      "other": 123,
      "shipping_refunds": [
        {
          "id": "<string>",
          "source_ref": {
            "id": "<string>",
            "model": "<string>"
          },
          "untaxed_amount": 123,
          "tax_amount": 123,
          "total": 123
        }
      ],
      "other_fees": [
        {
          "id": "<string>",
          "source_ref": {
            "id": "<string>",
            "model": "<string>"
          },
          "type": "shipping",
          "untaxed_amount": 123,
          "tax_amount": 123,
          "total": 123
        }
      ],
      "transactions": [
        {
          "id": "<string>",
          "created_on": "2023-11-07T05:31:56Z",
          "payment_method_id": "<string>",
          "payment_method_name": "<string>",
          "amount": 123,
          "status": "failed"
        }
      ]
    }
  ],
  "returns": [
    {
      "id": "<string>",
      "source_ref": {
        "id": "<string>",
        "model": "<string>"
      },
      "created_on": "2023-11-07T05:31:56Z",
      "order_lines": [
        {
          "id": "<string>",
          "variant": {
            "id": "<string>",
            "sku": "<string>",
            "name": "<string>",
            "categories": [
              "<any>"
            ]
          },
          "quantity": 123,
          "untaxed_amount": 123,
          "tax_amount": 123,
          "total": 123
        }
      ],
      "new_lines": [
        {
          "id": "<string>",
          "variant": {
            "id": "<string>",
            "sku": "<string>",
            "name": "<string>",
            "categories": [
              "<any>"
            ]
          },
          "quantity": 123,
          "untaxed_amount": 123,
          "tax_amount": 123,
          "total": 123
        }
      ],
      "linked_fees": [
        {
          "id": "<string>",
          "source_ref": {
            "id": "<string>",
            "model": "<string>"
          },
          "type": "shipping",
          "untaxed_amount": 123,
          "tax_amount": 123,
          "total": 123
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

This access token needs to be included in each of your request to the Chift API.

Path Parameters

consumer_id
string<uuid>
required

Body

application/json
customer
object
required
billing_address
object
required
shipping_address
object
required
currency
string
required

Indicates the currency of the order (e.g. EUR).

lines
OrderLineItemIn · object[]
required
Minimum length: 1
note
string | null
payment_method
string | null

If filled in the order will be marked as paid and processed by this payment method.

Response

Successful Response

id
string
required

Technical id in Chift

source_ref
object
required

Technical id in the target software

status
enum<string>
required
Available options:
cancelled_unpaid,
cancelled,
draft,
confirmed,
shipped,
refunded
discount_amount
number
required
untaxed_amount_without_fees
number
required

Untaxed amount without fees (e.g. shipping) but with discout. Refunds and returns are not included.

tax_amount_without_fees
number
required

Total taxes applied to the order without taxes linked to fees (e.g. shipping).

total_without_fees
number
required

Total of the order without fees (e.g. shipping) but with discount. Refunds and returns are not included.

current_untaxed_amount
number
required

Untaxed amount with discout and any kind of fee (e.g. shipping). After returns, removes and returns.

current_tax_amount
number
required

Total taxes applied to the order. After returns, removes and returns.

current_total
number
required

Current total of the order with discount. After returns, removes and returns.

untaxed_amount
number
required

Untaxed amount with discout and any kind of fee (e.g. shipping). Refunds and returns are not included.

tax_amount
number
required

Total taxes applied to the order. Refunds and returns are not included.

total
number
required

Total of the order with discount. Refunds and returns are not included.

currency
string
required

Indicates the currency of the order (e.g. EUR).

lines
OrderLineItemOut · object[]
required
order_number
string | null
customer
object | null
billing_address
object | null
shipping_address
object | null
created_on
string<date-time> | null
last_updated_on
string<date-time> | null
confirmed_on
string<date-time> | null
delivery_date
string<date-time> | null
cancelled_on
string<date-time> | null
refunded_amount
number | null
default:0
note
string | null
tags
string[] | null
other_fees
FeesItem · object[] | null
payment_method_id
string | null

Technical id of the payment method in the eCommerce

transactions
OrderTransactions · object[] | null
payment_methods
OrderPaymentMethods · object[] | null
detailed_refunds
OrderRefundItem · object[] | null
returns
OrderReturnItem · object[] | null
I