List products for syncing
const url = 'https://app.currentpim.se/api/v1/products?view=current&variants=all';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.currentpim.se/api/v1/products?view=current&variants=all' \ --header 'Authorization: Bearer <token>'Pages in id order by cursor, within the account’s scopes. Needs products:read and products.view. Values and completeness in filters are compared in channel and locale (the workspace’s defaults unless given).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The meta.next_cursor of the previous page; leave out for the first page.
Rows per page: 100 unless given, at most 500.
The grid’s text search, among the values the account may view.
A JSON list of the grid’s conditions: {"field", "operator", "value"} plus currency for prices and unit for measurements. Fields: identifier, family, categories, enabled, is_bundle, workflow_state, completeness, quality, created_at, updated_at, values.<code>. No condition matches a value the account may not view, not even empty.
Channel code for scoped values.
Locale code for localized values.
Only products changed at or after this time (ISO 8601); variants whose inherited values changed included.
Also products deleted since updated_since, as tombstones.
current (the latest version, the default) or published (only products with a published version, as that version).
all (models and variants, the default), variants (sellable products) or models (one root model per tree).
Responses
Section titled “Responses”A page of products, tombstones among them when asked for.
object
A product as its version’s snapshot (what webhooks send as data.product), plus id, version numbers and timestamps. Cells outside the account’s scopes are left out.
object
Left out unless true. Its components are in associations.bundle_components, each with data.quantity.
Channel code => where and when the product is sold; left out when every channel sells it every day.
object
object
False: the channel doesn’t sell the product.
First day it is sold.
Last day it is sold.
A variant’s model, by identifier.
0 for products outside trees and root models.
Attribute code → channel code or _ → locale code or _ → value, in the stored shape (see docs/api.md, Product values). On writes a value of null clears the cell.
object
object
object
Association type code → links in order.
object
object
The linked product’s identifier.
The linked product’s id (reads only).
The type’s custom link fields.
object
A deleted product in the change feed (include_deleted).
object
object
Pass back as cursor for the next page; null on the last page.
object
The URL of the next page, or null.
Example
{ "data": [ { "deleted": true } ]}No valid token (missing, revoked, expired, or the account is deactivated).
object
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}The token lacks the ability or the account the permission.
object
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}An invalid cursor, limit or filter condition (filters.<index>).
object
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}More than the allowed requests a minute for this token; Retry-After says when to try again.
object
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}