Skip to content

Create or update up to 500 products

POST
/products/batch
curl --request POST \
--url https://app.currentpim.se/api/v1/products/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "items": [ { "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, "identifier": "example" } ] }'

Needs products:write and products.publish. Each item succeeds or fails on its own; models and their variants may come in one batch, in any order, and links may name products further down the batch.

Media typeapplication/json
object
items
required
Array
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
identifier
required
string

Example generated

{
"items": [
{
"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,
"identifier": "example"
}
]
}

One result per item, in order, and a summary.

Media typeapplication/json
object
data
Array<object>
object
identifier
string
status
string
Allowed values: created updated unchanged failed
id
string | null
version
integer | null
errors
object
key
additional properties
Array<string>
summary
object
created
integer
updated
integer
unchanged
integer
failed
integer

Example

{
"data": [
{
"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 request’s shape is invalid (items.<index>.<field>).

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"
]
}
}