Commerce

Create order

Place an order.

The server prices every line; a price sent is ignored. Tracked stock is taken now.

Header Parameters

X-Request-Id?string

Your id for this request; it becomes the request_id of any error. Without it the server makes one.

Request Body

application/json
  1. body
items*array<>
Items1 <= items <= 100
customer_name?string
Lengthlength <= 255
customer_phone?string
Lengthlength <= 32
note?string
Lengthlength <= 1000
curl -X POST 'https://v3.ghala.io/v1/commerce/shop/orders' \  -H 'Content-Type: application/json' \  -d '{  "items": [    {      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1"    }  ]}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "PENDING",  "payment_status": "UNPAID",  "currency": "string",  "total": "1500.00",  "customer_name": "string",  "customer_phone": "string",  "channel": "string",  "notes": "string",  "credential_id": "string",  "contact_id": "f245e2a3-e141-4d41-912c-b1c1f5bd5598",  "items": [    {      "name": "string",      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",      "image": "string",      "digital": true,      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",      "variant_label": "string",      "quantity": 0,      "unit": "PIECE",      "unit_price": "1500.00",      "line_total": "1500.00"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "paid_at": "2019-08-24T14:15:22Z",  "receipts": [    {      "provider": "ghala",      "url": "http://example.com",      "issued_at": "2019-08-24T14:15:22Z",      "kind": "payment"    }  ]}