Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Create order lines

Bulk-creates lines for an order. Successful entities are returned in data; per-item failures in errors.

POST/api/v2/{team_slug}/{app_slug}/orders/{order_id}/lines
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
team_slugstringrequired
app_slugstringrequired
order_idstring<uuid>required
Request body
requiredapplication/json
linesCreateOrderLineItem[]required
min items 1 · max items 20
Show properties
Array of CreateOrderLineItem
variant_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
product_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
tax_group_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
currency_codestring
quantityinteger
base_price_amountnumber
total_discount_amountnumber
total_sale_pricenumber
total_tax_amountnumber
total_price_amountnumber
Responses
201

Created (partial success possible)

dataOrderLineBase[]required
Show properties
Array of OrderLineBase
idUUIDrequired
order_idUUIDrequired
variant_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
product_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
tax_group_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
currency_codestring | null
quantityinteger | null
base_price_amountnumber | null
total_discount_amountnumber | null
total_sale_pricenumber | null
total_tax_amountnumber | null
total_price_amountnumber | null
product_namestring | null
product_numberstring | null
variant_namestring | null
variant_numberstring | null
short_descriptionstring | null
first_image_pathstring | null
created_atstring<date-time>required
updated_atstring<date-time> | null
errorsOrderLineError[]required
Show properties
Array of OrderLineError
order_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
line_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
messagestringrequired
400

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
401

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
403

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
404

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
500

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.enad.io/api/v2/string/string/orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/lines' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "lines": [
    {
      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",
      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
      "tax_group_id": "4496f79f-aa1a-4128-84f5-5c1c0836a341",
      "currency_code": "string",
      "quantity": 0,
      "base_price_amount": 0,
      "total_discount_amount": 0,
      "total_sale_price": 0,
      "total_tax_amount": 0,
      "total_price_amount": 0
    }
  ]
}'
Response
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",
      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
      "tax_group_id": "4496f79f-aa1a-4128-84f5-5c1c0836a341",
      "currency_code": "string",
      "quantity": 0,
      "base_price_amount": 0,
      "total_discount_amount": 0,
      "total_sale_price": 0,
      "total_tax_amount": 0,
      "total_price_amount": 0,
      "product_name": "string",
      "product_number": "string",
      "variant_name": "string",
      "variant_number": "string",
      "short_description": "string",
      "first_image_path": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "errors": [
    {
      "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
      "line_id": "6cb02bfb-65d4-467b-864d-461e923db664",
      "message": "string"
    }
  ]
}