One version with its changes and snapshot
const url = 'https://app.currentpim.se/api/v1/products/example/versions/1';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/example/versions/1 \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The product’s identifier (SKU). It may hold slashes.
The version number.
Responses
Section titled “Responses”The version, its changes and its snapshot.
object
object
object
The automation that wrote the version or proposed the draft it merged; code and label are null once it is deleted.
object
Codes of the rules whose actions the version contains.
The paths that changed: properties, values.<code>.<channel>.<locale>, categories, associations.<type>.
Single read only: path → {old, new}, as webhooks send in data.changes.
object
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
Example
{ "data": { "reason": "manual" }}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" ] }}No such product or version.
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" ] }}