Products
12 routes. Paths are relative to https://api.intersink.com/v1.
- GET/productsPublished products of a channel (paged)
- POST/productsCreate
- GET/products/{id}Find one
- PATCH/products/{id}Update
- DELETE/products/{id}Remove
- POST/products/{id}/imagesAdd up to 10 pictures to a product's gallery (multipart field `images`)
- DELETE/products/{id}/images/{imageId}Remove one picture from a product's gallery
- PATCH/products/{id}/images/orderReorder a product's gallery: { order: [imageId, …] }
- GET/products/manageAll products of a channel the caller manages
- GET/products/searchSearch published products of a channel
- GET/products/slug/{slug}Find by slug
- GET/products/trendingNewest 4 published products of a channel
Published products of a channel (paged)
GET/products
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| q | string, query | At most 100 characters. |
| type | string, query | At most 100 characters. |
| sort | string, query | One of: "date_created", "-date_created", "name", "-name". |
| page | number, query | Minimum 1, maximum 10000. |
| limit | number, query | Minimum 1, maximum 100. |
| x-ref | string, header |
Response
200. The payload in data is not described in the spec yet.
Create
POST/products
Needs a signed-in user (Bearer token or access_token cookie).
Request body application/json or multipart/form-data
| Field | Type | Description |
|---|---|---|
| channel_id | string | Channel to list the product in (defaults to the token's channel). The caller must manage it. |
| namerequired | string | At most 255 characters. |
| slug | string | At most 255 characters. Example: "blue-mug" |
| sku | string | At most 100 characters. |
| description | string | At most 20000 characters. |
| short_description | string | At most 2000 characters. |
| price | string | Unit price, major units, max 2 decimals, below 1000000 Example: "249.50" |
| quantity | number | Units in stock. Omit / null = stock not tracked (unlimited). Minimum 0, maximum 1000000. |
| status | string | Requested status; moderation may override it (never auto-publishes flagged text). One of: "draft", "published", "sold", "archived". |
| type | string | At most 100 characters. |
| cod | boolean | |
| shipping | boolean | |
| model | string | At most 255 characters. |
| keywords | string | At most 2000 characters. |
Response
201. The payload in data is of type object.
Find one
GET/products/{id}
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path | |
| x-ref | string, header |
Response
200. The payload in data is of type object.
Update
PATCH/products/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Request body application/json or multipart/form-data
| Field | Type | Description |
|---|---|---|
| name | string | At most 255 characters. |
| slug | string | At most 255 characters. Example: "blue-mug" |
| sku | string | At most 100 characters. |
| description | string | At most 20000 characters. |
| short_description | string | At most 2000 characters. |
| price | string | Unit price, major units, max 2 decimals, below 1000000 Example: "249.50" |
| quantity | number | Units in stock. Omit / null = stock not tracked (unlimited). Minimum 0, maximum 1000000. |
| status | string | Requested status; moderation may override it (never auto-publishes flagged text). One of: "draft", "published", "sold", "archived". |
| type | string | At most 100 characters. |
| cod | boolean | |
| shipping | boolean | |
| model | string | At most 255 characters. |
| keywords | string | At most 2000 characters. |
Response
200. The payload in data is of type object.
Remove
DELETE/products/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Add up to 10 pictures to a product's gallery (multipart field `images`)
POST/products/{id}/images
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Response
201. The payload in data is not described in the spec yet.
Remove one picture from a product's gallery
DELETE/products/{id}/images/{imageId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path | |
| imageIdrequired | number, path |
Response
200. The payload in data is not described in the spec yet.
Reorder a product's gallery: { order: [imageId, …] }
PATCH/products/{id}/images/order
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
All products of a channel the caller manages
GET/products/manage
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| q | string, query | At most 100 characters. |
| type | string, query | At most 100 characters. |
| sort | string, query | One of: "date_created", "-date_created", "name", "-name". |
| page | number, query | Minimum 1, maximum 10000. |
| limit | number, query | Minimum 1, maximum 100. |
| channel_id | string, query | Defaults to the token's channel |
| status | string, query | One of: "draft", "published", "sold", "archived", "under_review", "rejected". |
Response
200. The payload in data is not described in the spec yet.
Search published products of a channel
GET/products/search
Public: no sign-in needed.
Kept for older clients; same as GET /products?q=…
Parameters
| Name | Type | Description |
|---|---|---|
| q | string, query | At most 100 characters. |
| type | string, query | At most 100 characters. |
| sort | string, query | One of: "date_created", "-date_created", "name", "-name". |
| page | number, query | Minimum 1, maximum 10000. |
| limit | number, query | Minimum 1, maximum 100. |
| x-ref | string, header |
Response
200. The payload in data is not described in the spec yet.
Find by slug
GET/products/slug/{slug}
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| slugrequired | string, path | |
| x-ref | string, header |
Response
200. The payload in data is of type object.
Newest 4 published products of a channel
GET/products/trending
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| x-ref | string, header |
Response
200. data is object[].