Skip to content

Create or update many catalogue items

POST
/api/v1/items/batch
curl --request POST \
--url https://dashboard.azimea.com/api/v1/items/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "items": [ { "id": "plan-pro", "kind": "plan", "name": "Pro plan", "description": "Unlimited projects and priority support.", "url": "https://example.com/pricing#pro", "imageUrl": "https://example.com/img/pro.png", "price": 49, "comparePrice": 59, "currency": "EUR", "inStock": true, "stockQuantity": null, "categories": [ "plans" ], "attributes": { "billing": "monthly", "seats": 5 }, "active": true } ] }'

The same as POST /items for up to 1,000 items in one call, which counts as a single call for the rate limit. Each item is written or refused on its own: the answer counts the created, updated and failed items and gives one result per item, by its position in the request, with the reasons as catalog.* codes. More than 1,000 items refuses the whole call with catalog.batch_too_large. Needs the items:write permission.

Media typeapplication/json
object
items
Array<object>
nullable
object
id
string
nullable
Example
plan-pro
kind
string
nullable
Example
plan
name
string
nullable
Example
Pro plan
description
string
nullable
Example
Unlimited projects and priority support.
url
string
nullable
Example
https://example.com/pricing#pro
imageUrl
string
nullable
Example
https://example.com/img/pro.png
price
number format: decimal
nullable
Example
49
comparePrice
number format: decimal
nullable
Example
59
currency
string
nullable
Example
EUR
inStock
boolean
nullable
Example
true
stockQuantity
integer format: int32
nullable
Example
null
categories
Array<string>
nullable
Example
[
"plans"
]
attributes
object
key
additional properties
Example
{
"billing": "monthly",
"seats": 5
}
active
boolean
nullable
Example
true
Example
{
"id": "plan-pro",
"kind": "plan",
"name": "Pro plan",
"description": "Unlimited projects and priority support.",
"url": "https://example.com/pricing#pro",
"imageUrl": "https://example.com/img/pro.png",
"price": 49,
"comparePrice": 59,
"currency": "EUR",
"inStock": true,
"stockQuantity": null,
"categories": [
"plans"
],
"attributes": {
"billing": "monthly",
"seats": 5
},
"active": true
}
Example
[
{
"id": "plan-pro",
"kind": "plan",
"name": "Pro plan",
"description": "Unlimited projects and priority support.",
"url": "https://example.com/pricing#pro",
"imageUrl": "https://example.com/img/pro.png",
"price": 49,
"comparePrice": 59,
"currency": "EUR",
"inStock": true,
"stockQuantity": null,
"categories": [
"plans"
],
"attributes": {
"billing": "monthly",
"seats": 5
},
"active": true
}
]
Example
{
"items": [
{
"id": "plan-pro",
"kind": "plan",
"name": "Pro plan",
"description": "Unlimited projects and priority support.",
"url": "https://example.com/pricing#pro",
"imageUrl": "https://example.com/img/pro.png",
"price": 49,
"comparePrice": 59,
"currency": "EUR",
"inStock": true,
"stockQuantity": null,
"categories": [
"plans"
],
"attributes": {
"billing": "monthly",
"seats": 5
},
"active": true
}
]
}

What happened to each item

Media typeapplication/json
object
isSuccess
boolean
value
One of:
object
created
integer format: int32
updated
integer format: int32
failed
integer format: int32
results
Array<object>
object
index
integer format: int32
status
string
id
string format: guid
nullable
errors
Array<object>
nullable
object
code
string
field
string
nullable
params
object
key
additional properties
status
integer format: int32
errors
Array<object>
object
code
string
message
string
params
object
key
additional properties
fieldErrors
object
key
additional properties
Array<object>
object
code
string
message
string
params
object
key
additional properties
Example
{
"isSuccess": true,
"value": {
"created": 0,
"updated": 1,
"failed": 0,
"results": [
{
"index": 0,
"status": "updated",
"id": "01a10900-0000-7000-8000-000000000001",
"errors": null
}
]
},
"status": 0,
"errors": [],
"fieldErrors": null
}

Missing or invalid API key

The key lacks the items:write permission