Retrieve products

Retrieves a list of products.

SecuritySecretApiKey or JWT or ApplicationJWT
Request
query Parameters
filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

sort
Array of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -.

limit
integer [ 0 .. 1000 ]

Limits the number of collection items to be returned.

offset
integer >= 0

Specifies the starting point within the collection of items to be returned.

q
string

Use this field to perform a partial search of text fields.

Responses
200

List of products retrieved.

Response Headers
Pagination-Total
integer

Total number of items.

Example: 332
Pagination-Limit
integer

Maximum number of items per page.

Example: 100
Pagination-Offset
integer

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example: 2
Response Schema: application/json
Array
name
required
string <= 255 characters

Name of the product.

id
string <= 50 characters

ID of the product.

unitLabel
string <= 50 characters
Default: "unit"

Unit label, such as per seat or per unit.

description
string or null <= 512 characters

Description of the product.

requiresShipping
boolean

Specifies if the product requires shipping. If this value is true, shipping calculations are applied.

options
Array of strings

Product options such as color, size, and so forth. Product option values are defined in plans. For more information, see Plans.

taxCategoryId
string

Tax category of the product. For a complete list of supported tax categories, see TaxJar sales tax API reference. If none of the tax categories from the list are applicable for your product, use the general tax category 00000.

accountingCode
string or null

Accounting code of the product.

object or null
debitAccountId
string or null

ID of the debit journal account.

creditAccountId
string or null

ID of the credit journal account.

customFields
object (ResourceCustomFields)
Default: {}

Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see Custom fields.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

Array of objects (SelfLink)

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

get/products
Request samples
// all parameters are optional
const firstCollection = await api.products.getAll();

// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'}; 
const secondCollection = await api.products.getAll(params);

// access the collection items, each item is a Member
secondCollection.items.forEach(product => console.log(product.fields.name));
Response samples
application/json
[
  • {
    }
]