Skip to main content
POST
/
api
/
sync
/
v1
/
orders
Create Order From Ai
curl --request POST \
  --url https://api.example.com/api/sync/v1/orders \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "jsmith@example.com",
  "line_items": [
    {
      "quantity": 123,
      "variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "size": "<string>",
      "color": "<string>",
      "name": "<string>",
      "price": 123,
      "image_url": "<string>"
    }
  ],
  "shipping_address": {
    "first_name": "<string>",
    "last_name": "<string>",
    "company": "<string>",
    "address1": "<string>",
    "address2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postal_code": "<string>",
    "country": "<string>",
    "phone": "<string>"
  },
  "payment_method": "<string>",
  "phone": "<string>",
  "billing_address": {
    "first_name": "<string>",
    "last_name": "<string>",
    "company": "<string>",
    "address1": "<string>",
    "address2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postal_code": "<string>",
    "country": "<string>",
    "phone": "<string>"
  },
  "payment_intent_id": "<string>",
  "note": "<string>",
  "subtotal": 123,
  "total": 123,
  "currency": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "order_number": "<string>",
  "email": "<string>",
  "total": "<string>",
  "currency": "<string>",
  "status": "<string>",
  "payment_status": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.stella-commerce.com/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string | null
X-Stella-Site-Id
string | null
X-Sync-Secret
string | null
X-Site-ID
string | null
Idempotency-Key
string | null

Body

application/json

Schema for creating order from AI widget.

email
string<email>
required
line_items
SyncOrderLineItem · object[]
required
shipping_address
AddressSchema · object
required

Schema for address. Fields are optional to support simpler address formats from AI widget.

payment_method
string
required
phone
string | null
billing_address
AddressSchema · object

Schema for address. Fields are optional to support simpler address formats from AI widget.

payment_intent_id
string | null
note
string | null
subtotal
number | null
total
number | null
currency
string | null

Response

Successful Response

Response for order created from AI.

id
string<uuid>
required
order_number
string
required
email
string
required
total
string
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
currency
string
required
status
string
required
payment_status
string
required
created_at
string<date-time>
required