Get products

get
/products

Get product results with multiple products.

page
integer

Page number

>= 1<= 200
Default:
1
limit
integer

Number of products per page

>= 1<= 50
Default:
10
ids[]
string

Array of product ID

slugs[]
string

Array of product slug

search
string

Search term (fuzzy search in title)

published
boolean

Filter by published status

as-store-id
string
required

This value equals to store.id of Store Resource. You can obtain this id by making a GET /stores call to get existing stores or a POST /stores to create a new store.

meta
Meta

The Meta model holds the metadata of the API response, including relevant error details for debugging purposes.Show all...

Example:
{"code":20000,"type":"OK","message":"The request was successfully processed by AfterShip."}
code
number
required

Error code in integer format. For detailed information, please refer to the Request Error introduction page.

Default:
20000
Example:
20000
type
string
required

Response type string for the reference. For detailed information, please refer to the Request Error introduction page.

>= 1 characters
Example:
OK
message
string
required

Human-readable response message. For detailed information, please refer to the Request Error introduction page.

>= 1 characters
Example:
The request was successfully processed by AfterShip.
errors
array[Error]

Error detail object. Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.Show all...

data
object
products
array[Product]

The Product model represents an individual item of your store. It includes essential attributes such as product title, price, variants, SKU, and so on. This model is crucial for cataloging and managing the store's inventory effectively.

pagination
Pagination

The Pagination holds the information for the pagination when the response contains multiple objects.

Example:
{"page":1,"limit":10,"has_next_page":false}
Auth
:
Parameters
:
:
:
:
:
:
:
Response Example
{ "meta": { "code": 20000, "type": "OK", "message": "The request was successfully processed by AfterShip." }, "data": { "products": [ { "id": "product_id_1", "title": "Example Product 1", "slug": "example-product-1", "published": true }, { "id": "product_id_2", "title": "Example Product 2", "slug": "example-product-2", "published": false } ], "pagination": { "page": 1, "limit": 10, "has_next_page": true } } }