Skip to content

POST/orders

Create order

Create a new order. Fields `id`, `createdAt`, `updatedAt` are auto-generated. Triggers `orders.created` webhook.

ReturnsOrder

AcceptsOrderInput

Bearer token required

Response examples

201Order created

application/json example derived from schema

{
  "id": 1,
  "userId": 1,
  "items": [
    {
      "productId": 37,
      "quantity": 2,
      "price": 416.97
    },
    {
      "productId": 16,
      "quantity": 2,
      "price": 478.87
    }
  ],
  "subtotal": 1791.68,
  "tax": 143.33,
  "shipping": 0,
  "total": 1935.01,
  "currency": "USD",
  "status": "pending",
  "paymentMethod": "credit_card",
  "shippingAddress": {
    "street": "6620 Maple Dr",
    "city": "Fort Worth",
    "state": "MI",
    "zipCode": "16372",
    "country": "US"
  },
  "trackingNumber": "TRK442765071",
  "notes": null,
  "createdAt": "2026-04-19T12:16:46.226Z",
  "updatedAt": "2025-01-30T04:10:54.855Z"
}
400400 — invalid input or malformed JSON

application/json

{
  "error": {
    "status": 400,
    "message": "Request body required"
  }
}
413413 — body exceeds 64 KB

application/json

{
  "error": {
    "status": 413,
    "message": "Request body too large",
    "details": {
      "maxSize": "64 KB"
    }
  }
}
429429 — rate limit exceeded (120/60s)

application/json

{
  "error": {
    "status": 429,
    "message": "Too many requests",
    "details": {
      "retryAfter": 45
    }
  }
}

Released under the MIT License.