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.
/api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines- API
- Management
- OpenAPI
- management-api
- 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.
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):
{
"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):
{
"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):
{
"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):
{
"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):
{
"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):
{
"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