Preview. This site is still being built. Features, prices and terms may change, and nothing here is a binding offer. Read the preview notice

Preview. Still being built; nothing here is a binding offer. Details

Orders

8 routes. Paths are relative to https://api.intersink.com/v1.

All groups

My orders (as buyer), paged

GET/orders

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
statusstring, queryOne of: "pending", "processing", "shipped", "delivered", "cancelled".
sortstring, queryOne of: "date_created", "-date_created", "total", "-total".
pagenumber, queryMinimum 1, maximum 10000.
limitnumber, queryMinimum 1, maximum 100.

Response

200. The payload in data is not described in the spec yet.

Place an order in the token's channel

POST/orders

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
Idempotency-Keystring, headerOptional client-generated key (8-128 chars, [A-Za-z0-9_-]). A retry with the same key and body replays the first response (Idempotent-Replayed: true); 409 while the first is in flight; 422 if the body differs.

Request body application/json

FieldTypeDescription
itemsrequiredobject[]
items[].product_idrequiredstringproduct.id (uuid)
items[].quantityrequirednumberMinimum 1, maximum 100.
firstnamestringAt most 100 characters.
lastnamestringAt most 100 characters.
emailstringAt most 255 characters.
mobilestringAt most 30 characters.
payment_methodstringOne of: "COD". At most 50 characters.
address_idstringOne of the caller's own personal addresses (ship-to)
notestringAt most 1000 characters.
coupon_codestringA store coupon code; the discount is computed server-side At most 40 characters.

Response

201. The payload in data is of type object.

Find one

GET/orders/{id}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Response

200. The payload in data is of type object.

Buyer cancels a pending / processing order

PATCH/orders/{id}/cancel

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Request body application/json

FieldTypeDescription
reasonstringAt most 1000 characters.

Response

200. The payload in data is not described in the spec yet.

Seller moves an order along the state machine

PATCH/orders/{id}/status

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Request body application/json

FieldTypeDescription
statusrequiredstringOne of: "pending", "processing", "shipped", "delivered", "cancelled".
commentstringAt most 1000 characters.
notifybooleanNotify the buyer

Response

200. The payload in data is not described in the spec yet.

Track

GET/orders/{id}/track

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Response

200. The payload in data is not described in the spec yet.

Orders received by a channel I manage / my business

GET/orders/seller

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
statusstring, queryOne of: "pending", "processing", "shipped", "delivered", "cancelled".
sortstring, queryOne of: "date_created", "-date_created", "total", "-total".
pagenumber, queryMinimum 1, maximum 10000.
limitnumber, queryMinimum 1, maximum 100.
channel_idstring, querySeller channel (defaults to the token's channel)

Response

200. The payload in data is not described in the spec yet.

Customers of a channel I manage (from its orders)

GET/orders/seller/customers

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channel_idstring, querySeller channel (defaults to the token's channel)
qstring, querySearch name, email or mobile At most 100 characters.
pagenumber, queryMinimum 1.
limitnumber, queryMinimum 1, maximum 100.

Response

200. The payload in data is not described in the spec yet.