Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create an order item

Creates a new order item on an existing order. One order item represents one unit of the product, so an add of three units is three separate requests.

Creation runs through the order service, which applies the following on top of the submitted payload:

  • extra_field is overwritten. Whatever is sent is discarded and replaced with {"price_extra_field": …, "stock_extra_field": …} — a snapshot of the extra_field values of the price and stock records the item is sold from (the extra_product_price / extra_product_stock records when given, otherwise the product's own price and stock records).

  • The status may be forced. If the parent order is in status 300 (payment_waiting), the new item is stored with status 300 regardless of the submitted status.

  • The item's sold quantity is not reported at creation; that happens on the first status change away from waiting / payment_waiting.

The product must already have a price record and a stock record, because both are read to build the extra_field snapshot. This is not validated, so make sure the records exist before posting. Supplying extra_product_price / extra_product_stock covers the corresponding record, exactly as it does when the snapshot is built.

The response is the OrderItemCreated shape, which differs from the shape returned by the list and retrieve endpoints: the identifier is id rather than pk, order, created_date, modified_date and the localized_attributes pair are present, and there are no nested detail objects, no product_sku and no discounted_price.

image can be uploaded by sending the request as multipart/form-data.

post
/order_items/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Body

The payload accepted by POST /order_items/.

extra_field is accepted but discarded — the service overwrites it with the price-list and stock-list snapshot. product_sku is not part of this shape and is ignored if sent.

orderintegerRequired

The identifier of the order the item belongs to. Cannot be changed afterwards.

productintegerRequired

The identifier of the ordered product. The product must have a price record and a stock record, since both are read to build the extra_field snapshot; supplying extra_product_price / extra_product_stock covers the corresponding record instead. This is not validated, so make sure the records exist.

statusstring · enumRequired

The lifecycle status of an order. Values are numeric strings that increase as the order progresses through its lifecycle.

ValueNameDescription
50cancellation_waitingCancellation requested, pending.
100cancelledOrder cancelled.
200waitingOrder created; payment not yet confirmed.
300payment_waitingPayment initiated, awaiting confirmation.
350confirmation_waitingAwaiting manual confirmation.
400approvedPayment confirmed; order approved for fulfilment.
430waiting_for_substituteWaiting for a substitute product.
450preparingOrder being prepared / packed.
500shippedOrder dispatched to carrier.
510shipped_and_informedOrder shipped and customer notified.
520ready_for_pickupReady for in-store collection.
540attempted_deliveryDelivery attempted; recipient unavailable.
544review_startedTrade-in review started.
545review_waitingTrade-in review waiting.
546waiting_for_paymentWaiting for trade-in payment.
547paidTrade-in payment received.
550deliveredOrder delivered to customer.
600refundedOrder refunded.
700mergedAdd-on order merged into main order.
Example: 400Possible values:
price_currencystring · enumRequired

ISO 4217 currency code the order item's price is expressed in.

Example: tryPossible values:
pricestring · decimalRequired

The unit price charged for this item, tax included.

tax_ratestring · decimalRequired

The VAT rate applied to price, as a percentage.

retail_pricestring · nullableOptional

The recommended retail price.

discount_amountstring · nullableOptional

The discount applied to this item. Must be between 0 and price, inclusive.

Default: 0
parentinteger · nullableOptional

The identifier of the order item this one is derived from.

invoice_numberstring · max: 32 · nullableOptional
invoice_datestring · nullableOptional
e_archive_urlstring · max: 1024 · nullableOptional
tracking_numberstring · max: 256 · nullableOptional
shipping_companystring · enum · nullableOptional

The carrier shipping this item.

Example: arasPossible values:
defined_shipping_companystring · max: 32 · nullableOptional
defined_tracking_urlstring · max: 512 · nullableOptional
shipping_tracking_urlstring · max: 500 · nullableOptional
estimated_delivery_datestring · nullableOptional
shipped_datestring · nullableOptional
delivered_datestring · nullableOptional
imagestring · nullableOptional

The item's product image. Send the request as multipart/form-data to upload a file.

attributesobject · nullableOptional

Free-form EAV attributes of the item.

attributes_kwargsobject · nullableOptional
localized_attributesobject · nullableOptional

Per-language attribute values, keyed by language code.

localized_attributes_kwargsobject · nullableOptional
extra_fieldobject · nullableOptional

Accepted but ignored — the service replaces it with the price-list and stock-list snapshot.

extra_product_priceinteger · nullableOptional

The extra product-price record to sell the item at instead of the product's primary price.

extra_product_stockinteger · nullableOptional

The extra product-stock record to reserve the item from instead of the product's primary stock.

datasourceinteger · nullableOptional

The seller / data source fulfilling the item.

shipping_option_groupinteger · nullableOptional

The shipping option group the item is shipped under.

Responses
201

The created order item.

application/json

The order item as returned by POST /order_items/.

This shape identifies the record with id (not pk), includes order, created_date, modified_date and the localized_attributes pair, and has no nested detail objects, no product_sku and no discounted_price. Re-read the item through GET /order_items/{id}/ to get the full read shape.

idintegerRead-onlyOptional

The unique identifier of the created order item.

orderintegerOptional

The identifier of the order the item belongs to.

productintegerOptional

The identifier of the ordered product.

parentinteger · nullableOptional
statusstring · enumOptional

The lifecycle status of an order. Values are numeric strings that increase as the order progresses through its lifecycle.

ValueNameDescription
50cancellation_waitingCancellation requested, pending.
100cancelledOrder cancelled.
200waitingOrder created; payment not yet confirmed.
300payment_waitingPayment initiated, awaiting confirmation.
350confirmation_waitingAwaiting manual confirmation.
400approvedPayment confirmed; order approved for fulfilment.
430waiting_for_substituteWaiting for a substitute product.
450preparingOrder being prepared / packed.
500shippedOrder dispatched to carrier.
510shipped_and_informedOrder shipped and customer notified.
520ready_for_pickupReady for in-store collection.
540attempted_deliveryDelivery attempted; recipient unavailable.
544review_startedTrade-in review started.
545review_waitingTrade-in review waiting.
546waiting_for_paymentWaiting for trade-in payment.
547paidTrade-in payment received.
550deliveredOrder delivered to customer.
600refundedOrder refunded.
700mergedAdd-on order merged into main order.
Example: 400Possible values:
price_currencystring · enumOptional

ISO 4217 currency code the order item's price is expressed in.

Example: tryPossible values:
pricestring · decimalOptional
tax_ratestring · decimalOptional
retail_pricestring · nullableOptional
discount_amountstring · nullableOptional
created_datestring · date-timeRead-onlyOptional

When the order item was created.

modified_datestring · date-timeRead-onlyOptional

When the order item was last modified.

attributesobject · nullableOptional
attributes_kwargsobject · nullableOptional
localized_attributesobject · nullableOptional

Per-language attribute values, keyed by language code.

localized_attributes_kwargsobject · nullableOptional
invoice_numberstring · nullableOptional
invoice_datestring · nullableOptional
e_archive_urlstring · nullableOptional
tracking_numberstring · nullableOptional
defined_tracking_urlstring · nullableOptional
shipping_tracking_urlstring · nullableOptional
shipping_companystring · enum · nullableOptional

Carrier company used to ship the order.

Example: arasPossible values:
defined_shipping_companystring · nullableOptional
imagestring · nullableOptional
extra_fieldobject · nullableOptional

The price-list and stock-list snapshot written by the service, in the form {"price_extra_field": …, "stock_extra_field": …}.

estimated_delivery_datestring · nullableOptional
shipped_datestring · nullableOptional
delivered_datestring · nullableOptional
extra_product_priceinteger · nullableOptional
extra_product_stockinteger · nullableOptional
datasourceinteger · nullableOptional
shipping_option_groupinteger · nullableOptional
post/order_items/
POST /api/v1/remote/1/order_items/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 124

{
  "order": 77,
  "product": 944,
  "status": "400",
  "price": "10.00",
  "price_currency": "try",
  "tax_rate": "18.00",
  "shipping_company": "mng"
}
{
  "id": 38,
  "order": 77,
  "product": 944,
  "parent": null,
  "status": "400",
  "price_currency": "try",
  "price": "10.00",
  "tax_rate": "18.00",
  "retail_price": null,
  "discount_amount": "0.00",
  "created_date": "2026-09-09T07:51:24.743129Z",
  "modified_date": "2026-09-09T07:51:24.743142Z",
  "attributes": {},
  "attributes_kwargs": {},
  "localized_attributes": {},
  "localized_attributes_kwargs": {},
  "invoice_number": null,
  "invoice_date": null,
  "e_archive_url": null,
  "tracking_number": null,
  "defined_tracking_url": null,
  "shipping_tracking_url": null,
  "shipping_company": "mng",
  "defined_shipping_company": null,
  "image": null,
  "extra_field": {
    "price_extra_field": {},
    "stock_extra_field": {}
  },
  "estimated_delivery_date": null,
  "shipped_date": null,
  "delivered_date": null,
  "extra_product_price": null,
  "extra_product_stock": null,
  "datasource": null,
  "shipping_option_group": null
}

Last updated

Was this helpful?