Create or update many catalogue items
POST
/api/v1/items/batch
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://dashboard.azimea.com/api/v1/items/batch"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"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 } ] }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://dashboard.azimea.com/api/v1/items/batch';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
items
Array<object>
object
id
string
Example
plan-prokind
string
Example
planname
string
Example
Pro plandescription
string
Example
Unlimited projects and priority support.url
string
Example
https://example.com/pricing#proimageUrl
string
Example
https://example.com/img/pro.pngprice
number format: decimal
Example
49comparePrice
number format: decimal
Example
59currency
string
Example
EURinStock
boolean
Example
truestockQuantity
integer format: int32
Example
nullcategories
Array<string>
Example
[ "plans"]attributes
object
key
additional properties
Example
{ "billing": "monthly", "seats": 5}active
boolean
Example
trueExample
{ "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 } ]}Responses
Section titled “Responses”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
errors
Array<object>
object
code
string
field
string
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