Skip to content

Create or update one product

PUT
/products/{identifier}
curl --request PUT \
--url https://app.currentpim.se/api/v1/products/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "family": "example", "variant_structure": "example", "parent": "example", "enabled": true, "is_bundle": true, "availability": { "additionalProperty": { "enabled": true, "from": "2026-04-15", "until": "2026-04-15" } }, "categories": [ "example" ], "associations": { "additionalProperty": [ { "target": "example", "data": { "additionalProperty": "example" } } ] }, "values": { "additionalProperty": { "additionalProperty": { "additionalProperty": "example" } } }, "version": 1 }'

Needs products:write and products.publish.

identifier
required
string

The product’s identifier (SKU). It may hold slashes.

Media typeapplication/json

Keys left out stay as they are; values is a sparse delta (null clears a cell); categories and each association type sent replace what the product has.

object
family
string | null
variant_structure

Makes a new product a root model of this structure.

string | null
parent

Makes a new product a variant of this model.

string | null
enabled
boolean
is_bundle

Makes a simple product a bundle; false takes its components away too. Set components with associations.bundle_components: {target, data: {quantity}}, a whole number from 1 to 9999.

boolean
availability

Channel code => its new entry, or null to clear it; channels left out keep theirs.

object
key
additional properties
One of:
object
enabled

False: the channel doesn’t sell the product.

boolean
from

First day it is sold.

string format: date
until

Last day it is sold.

string format: date
categories
Array<string>
associations
object
key
additional properties
Array<object>
object
target
required
string
data
object
key
additional properties
values

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
key
additional properties
object
key
additional properties
object
key
additional properties
version

The product version the item was made against. When the product is no longer at it, the item fails alone with a version error instead of writing on top of the newer state.

integer | null

Example generated

{
"family": "example",
"variant_structure": "example",
"parent": "example",
"enabled": true,
"is_bundle": true,
"availability": {
"additionalProperty": {
"enabled": true,
"from": "2026-04-15",
"until": "2026-04-15"
}
},
"categories": [
"example"
],
"associations": {
"additionalProperty": [
{
"target": "example",
"data": {
"additionalProperty": "example"
}
}
]
},
"values": {
"additionalProperty": {
"additionalProperty": {
"additionalProperty": "example"
}
}
},
"version": 1
}

Updated or unchanged.

Media typeapplication/json
object
data
required

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
id
string
identifier
string
family
string | null
enabled
boolean
is_bundle

Left out unless true. Its components are in associations.bundle_components, each with data.quantity.

boolean
availability

Channel code => where and when the product is sold; left out when every channel sells it every day.

object
key
additional properties
object
enabled

False: the channel doesn’t sell the product.

boolean
from

First day it is sold.

string format: date
until

Last day it is sold.

string format: date
variant_structure
string | null
parent

A variant’s model, by identifier.

string | null
parent_id
string | null
variant_level

0 for products outside trees and root models.

integer
values

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
key
additional properties
object
key
additional properties
object
key
additional properties
categories
Array<string>
associations

Association type code → links in order.

object
key
additional properties
Array<object>
object
target
required

The linked product’s identifier.

string
target_id

The linked product’s id (reads only).

string
data

The type’s custom link fields.

object
key
additional properties
version
integer
published_version
integer | null
created_at
string | null format: date-time
updated_at
string | null format: date-time
status
string
Allowed values: updated unchanged

Example

{
"status": "updated"
}

Created.

Media typeapplication/json
object
data
required

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
id
string
identifier
string
family
string | null
enabled
boolean
is_bundle

Left out unless true. Its components are in associations.bundle_components, each with data.quantity.

boolean
availability

Channel code => where and when the product is sold; left out when every channel sells it every day.

object
key
additional properties
object
enabled

False: the channel doesn’t sell the product.

boolean
from

First day it is sold.

string format: date
until

Last day it is sold.

string format: date
variant_structure
string | null
parent

A variant’s model, by identifier.

string | null
parent_id
string | null
variant_level

0 for products outside trees and root models.

integer
values

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
key
additional properties
object
key
additional properties
object
key
additional properties
categories
Array<string>
associations

Association type code → links in order.

object
key
additional properties
Array<object>
object
target
required

The linked product’s identifier.

string
target_id

The linked product’s id (reads only).

string
data

The type’s custom link fields.

object
key
additional properties
version
integer
published_version
integer | null
created_at
string | null format: date-time
updated_at
string | null format: date-time
status
string
Allowed value: created

Example

{
"status": "created"
}

No valid token (missing, revoked, expired, or the account is deactivated).

Media typeapplication/json
object
message
required
string
errors

Problems by field, e.g. values.price._._ or items.0.identifier (422 only).

object
key
additional properties
Array<string>

Example generated

{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

The token lacks the ability or the account the permission.

Media typeapplication/json
object
message
required
string
errors

Problems by field, e.g. values.price._._ or items.0.identifier (422 only).

object
key
additional properties
Array<string>

Example generated

{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

The product could not be saved; errors names each field’s reasons.

Media typeapplication/json
object
message
required
string
errors

Problems by field, e.g. values.price._._ or items.0.identifier (422 only).

object
key
additional properties
Array<string>

Example generated

{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

More than the allowed requests a minute for this token; Retry-After says when to try again.

Media typeapplication/json
object
message
required
string
errors

Problems by field, e.g. values.price._._ or items.0.identifier (422 only).

object
key
additional properties
Array<string>

Example generated

{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}