Skip to main content
POST
/
api
/
v1
/
orders
Create order
curl --request POST \
  --url https://shelfforce.ai/api/v1/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "supplierName": "<string>",
  "orderDate": "2023-12-25",
  "status": "draft",
  "currency": "<string>",
  "storeId": "<string>",
  "notes": "<string>",
  "items": [
    {
      "quantity": 123,
      "inventoryItemId": "<string>",
      "sku": "<string>",
      "name": "<string>",
      "unitPrice": 123
    }
  ]
}
'
{
  "data": {
    "id": "<string>",
    "orderNumber": "<string>",
    "status": "<string>",
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API key with sf_live_ prefix. Pass as Authorization: Bearer sf_live_...

Headers

Idempotency-Key
string

Unique key for idempotent requests. If a request with the same key was already processed within the last 24 hours, the cached response is returned with X-Idempotent-Replayed: true.

Example:

"idk_550e8400-e29b-41d4-a716-446655440000"

Body

application/json
supplierName
string
required

Supplier or vendor name

orderDate
string<date>
required

Order date (ISO 8601)

status
enum<string>
default:draft
Available options:
draft,
pending,
confirmed
currency
string

ISO 4217 currency code

storeId
string

Associated store ID

notes
string
items
object[]

Line items

Response

Order created.

data
object