Create order line

Adds a new order line to an existing order with quantity, pricing, and tax information. Validates that the product and variant exist. Publishes an order updated event.

POST/api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines
API
Management
Updated
Apr 26, 2026

management-api:POST:/api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines

Adds a new order line to an existing order with quantity, pricing, and tax information. Validates that the product and variant exist. Publishes an order updated event.

API ownership

  • API family: Management API
  • Best for: Trusted back-office workflows that create, update, organize, or delete merchant-owned data.
  • Do not use from: Browser-only storefront code or public clients.
  • Guide route: /apis/management/latest

The OpenAPI contract defines the method, path, parameters, request body, and responses for this operation.

Operation

  • Method: POST
  • Path: /api/v1/\{team_slug\}/\{app_slug\}/orders/\{order_id\}/lines
  • Summary: Create order line
  • Description: Adds a new order line to an existing order with quantity, pricing, and tax information. Validates that the product and variant exist. Publishes an order updated event.
  • OpenAPI contract: management-api
  • Operation ID: Not documented in the OpenAPI contract.

Operation key uses API family, method, and path because this OpenAPI contract does not publish an operation ID.

Parameters3 parameters
NameInRequiredTypeDescription
app_slugpathYesstringApp slug
team_slugpathYesstringTeam slug
order_idpathYesstringOrder ID (UUID)
Request bodyDocumented body
  • Required: Yes
  • Description: Order line data
  • Content: application/json (object)

Input Order Line

PropertyTypeRequiredDetails
base_price_amountnumberYesmin: 0
currency_codestringYes-
product_idstringYes-
quantityintegerYesmin: 1
tax_group_idstringNo-
total_discount_amountnumberNomin: 0
total_price_amountnumberYesmin: 0
total_tax_amountnumberNomin: 0
variant_idstringYes-

Generated example (synthetic):

{
  "base_price_amount": 0,
  "currency_code": "string",
  "product_id": "string",
  "quantity": 1,
  "tax_group_id": "string",
  "total_discount_amount": 0,
  "total_price_amount": 0,
  "total_tax_amount": 0,
  "variant_id": "string"
}
Responses5 statuses
StatusDescriptionContent
201Order line created successfullyapplication/json (object)
400Invalid request (validation error, product/variant not found)application/json (object)
401Unauthorized accessapplication/json (object)
404Order not foundapplication/json (object)
500Internal server errorapplication/json (object)

201 - object

Order Line Response

PropertyTypeRequiredDetails
dataobjectNo-
detailsstring[]NoAdditional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes
successbooleanNo-
Order Line
PropertyTypeRequiredDetails
base_price_amountnumberNo-
created_atstringNo-
currency_codestringNo-
first_image_pathstringNo-
idstringNo-
order_idstringNo-
product_idstringNo-
product_namestringNo-
product_numberstringNo-
quantityintegerNo-
short_descriptionstringNo-
tax_group_idstringNo-
total_discount_amountnumberNo-
total_price_amountnumberNo-
total_sale_pricenumberNo-
total_tax_amountnumberNo-
updated_atstringNo-
variant_idstringNo-
variant_namestringNo-
variant_numberstringNo-

Generated example (synthetic):

{
  "data": {
    "base_price_amount": 0,
    "created_at": "string",
    "currency_code": "string",
    "first_image_path": "string",
    "id": "string",
    "order_id": "string",
    "product_id": "string",
    "product_name": "string",
    "product_number": "string",
    "quantity": 0,
    "short_description": "string",
    "tax_group_id": "string",
    "total_discount_amount": 0,
    "total_price_amount": 0,
    "total_sale_price": 0,
    "total_tax_amount": 0,
    "updated_at": "string",
    "variant_id": "string",
    "variant_name": "string",
    "variant_number": "string"
  },
  "details": [
    "string"
  ],
  "success": false
}

400 - object

Error Message

PropertyTypeRequiredDetails
detailsstring[]No-
messagestringNo-
successbooleanNo-

Generated example (synthetic):

{
  "details": [
    "string"
  ],
  "message": "string",
  "success": false
}

401 - object

Error Message

PropertyTypeRequiredDetails
detailsstring[]No-
messagestringNo-
successbooleanNo-

Generated example (synthetic):

{
  "details": [
    "string"
  ],
  "message": "string",
  "success": false
}

404 - object

Error Message

PropertyTypeRequiredDetails
detailsstring[]No-
messagestringNo-
successbooleanNo-

Generated example (synthetic):

{
  "details": [
    "string"
  ],
  "message": "string",
  "success": false
}

500 - object

Error Message

PropertyTypeRequiredDetails
detailsstring[]No-
messagestringNo-
successbooleanNo-

Generated example (synthetic):

{
  "details": [
    "string"
  ],
  "message": "string",
  "success": false
}

Contract identity

Use these fields to confirm you are implementing the intended endpoint contract.

  • API family: Management API
  • Method: POST
  • Path: /api/v1/\{team_slug\}/\{app_slug\}/orders/\{order_id\}/lines
  • Operation ID: Not documented in the OpenAPI contract.
  • OpenAPI tag: Orders
  • OpenAPI summary: Create order line

Create order line

# Create order line Adds a new order line to an existing order with quantity, pricing, and tax information. Validates that the product and variant exist. Publishes an order updated event.
POST /api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines
Purpose

Adds a new order line to an existing order with quantity, pricing, and tax information.

Required inputs

app_slug path team_slug path order_id path

Primary response

201 ยท Order line created successfully

Operation key

management-api:POST:/api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines

## API ownership - API family: Management API - Best for: Trusted back-office workflows that create, update, organize, or delete merchant-owned data. - Do not use from: Browser-only storefront code or public clients. - Guide route: [/apis/management/latest](/apis/management/latest) The OpenAPI contract defines the method, path, parameters, request body, and responses for this operation. ## Operation - Method: `POST` - Path: `/api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines` - Summary: Create order line - Description: Adds a new order line to an existing order with quantity, pricing, and tax information. Validates that the product and variant exist. Publishes an order updated event. - OpenAPI contract: management-api - Operation ID: Not documented in the OpenAPI contract. - Stable operation key: `management-api:POST:/api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines` Operation key uses API family, method, and path because this OpenAPI contract does not publish an operation ID. ## Parameters | Name | In | Required | Type | Description | | --- | --- | --- | --- | --- | | app_slug | path | Yes | string | App slug | | team_slug | path | Yes | string | Team slug | | order_id | path | Yes | string | Order ID (UUID) | ## Request body - Required: Yes - Description: Order line data - Content: application/json (object) ### Input Order Line | Property | Type | Required | Details | | --- | --- | --- | --- | | `base_price_amount` | number | Yes | min: 0 | | `currency_code` | string | Yes | - | | `product_id` | string | Yes | - | | `quantity` | integer | Yes | min: 1 | | `tax_group_id` | string | No | - | | `total_discount_amount` | number | No | min: 0 | | `total_price_amount` | number | Yes | min: 0 | | `total_tax_amount` | number | No | min: 0 | | `variant_id` | string | Yes | - | **Generated example (synthetic):** ```json { "base_price_amount": 0, "currency_code": "string", "product_id": "string", "quantity": 1, "tax_group_id": "string", "total_discount_amount": 0, "total_price_amount": 0, "total_tax_amount": 0, "variant_id": "string" } ``` ## Responses | Status | Description | Content | | --- | --- | --- | | 201 | Order line created successfully | application/json (object) | | 400 | Invalid request (validation error, product/variant not found) | application/json (object) | | 401 | Unauthorized access | application/json (object) | | 404 | Order not found | application/json (object) | | 500 | Internal server error | application/json (object) | ### 201 - object #### Order Line Response | Property | Type | Required | Details | | --- | --- | --- | --- | | `data` | object | No | - | | `details` | string[] | No | Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes | | `success` | boolean | No | - | ##### Order Line | Property | Type | Required | Details | | --- | --- | --- | --- | | `base_price_amount` | number | No | - | | `created_at` | string | No | - | | `currency_code` | string | No | - | | `first_image_path` | string | No | - | | `id` | string | No | - | | `order_id` | string | No | - | | `product_id` | string | No | - | | `product_name` | string | No | - | | `product_number` | string | No | - | | `quantity` | integer | No | - | | `short_description` | string | No | - | | `tax_group_id` | string | No | - | | `total_discount_amount` | number | No | - | | `total_price_amount` | number | No | - | | `total_sale_price` | number | No | - | | `total_tax_amount` | number | No | - | | `updated_at` | string | No | - | | `variant_id` | string | No | - | | `variant_name` | string | No | - | | `variant_number` | string | No | - | **Generated example (synthetic):** ```json { "data": { "base_price_amount": 0, "created_at": "string", "currency_code": "string", "first_image_path": "string", "id": "string", "order_id": "string", "product_id": "string", "product_name": "string", "product_number": "string", "quantity": 0, "short_description": "string", "tax_group_id": "string", "total_discount_amount": 0, "total_price_amount": 0, "total_sale_price": 0, "total_tax_amount": 0, "updated_at": "string", "variant_id": "string", "variant_name": "string", "variant_number": "string" }, "details": [ "string" ], "success": false } ``` ### 400 - object #### Error Message | Property | Type | Required | Details | | --- | --- | --- | --- | | `details` | string[] | No | - | | `message` | string | No | - | | `success` | boolean | No | - | **Generated example (synthetic):** ```json { "details": [ "string" ], "message": "string", "success": false } ``` ### 401 - object #### Error Message | Property | Type | Required | Details | | --- | --- | --- | --- | | `details` | string[] | No | - | | `message` | string | No | - | | `success` | boolean | No | - | **Generated example (synthetic):** ```json { "details": [ "string" ], "message": "string", "success": false } ``` ### 404 - object #### Error Message | Property | Type | Required | Details | | --- | --- | --- | --- | | `details` | string[] | No | - | | `message` | string | No | - | | `success` | boolean | No | - | **Generated example (synthetic):** ```json { "details": [ "string" ], "message": "string", "success": false } ``` ### 500 - object #### Error Message | Property | Type | Required | Details | | --- | --- | --- | --- | | `details` | string[] | No | - | | `message` | string | No | - | | `success` | boolean | No | - | **Generated example (synthetic):** ```json { "details": [ "string" ], "message": "string", "success": false } ``` ## Contract identity Use these fields to confirm you are implementing the intended endpoint contract. - API family: Management API - Method: `POST` - Path: `/api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines` - Operation ID: Not documented in the OpenAPI contract. - Stable operation key: `management-api:POST:/api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines` - OpenAPI tag: Orders - OpenAPI summary: Create order line