Skip to main content

BatchProductInput

Input for batch product create and update

input BatchProductInput {
id: String!
name: [LocalizedStringInput!]
description: BatchProductDescriptionInput
stock: Int
stockAdjustment: Int
ean: String
brand: BatchBrandInput
categories: [BatchProductCategoryInput]
properties: [BatchProductPropertyInput]
images: [BatchProductImageInput]
variantData: BatchProductVariantDataInput
variantGroup: BatchProductVariantGroupInput
productType: BatchProductType
prices: [BatchProductPriceInput]
campaignActive: Boolean
active: Boolean
availability: BatchProductAvailabilityInput
shelfLocation: String
measurements: BatchProductMeasurementsInput
shippingClassId: Int
accessories: [BatchProductAccessoriesListInput]
}

Fields​

id ● String!​

name ● [LocalizedStringInput!]​

description ● BatchProductDescriptionInput​

stock ● Int​

stockAdjustment ● Int​

Positive or negative number to adjust the current stock level by. Ignored if stock is also set

ean ● String​

brand ● BatchBrandInput​

categories ● [BatchProductCategoryInput]​

properties ● [BatchProductPropertyInput]​

images ● [BatchProductImageInput]​

variantData ● BatchProductVariantDataInput​

variantGroup ● BatchProductVariantGroupInput​

productType ● BatchProductType​

prices ● [BatchProductPriceInput]​

campaignActive ● Boolean​

active ● Boolean​

availability ● BatchProductAvailabilityInput​

shelfLocation ● String​

The shelf/bin location of the product in the default inventory. Max 20 characters

measurements ● BatchProductMeasurementsInput​

shippingClassId ● Int​

accessories ● [BatchProductAccessoriesListInput]​

Example​

{
"id": "12345",
"name": [
{
"language": "EN",
"value": "Summer T-shirt"
}
],
"description": {
"primary": [
{
"language": "EN",
"value": "<p>A lightweight summer t-shirt</p>"
}
],
"secondary": [
{
"language": "EN",
"value": "<p>Made from 100% organic cotton</p>"
}
],
"extra": [
{
"type": "additional",
"value": [
{
"language": "EN",
"value": "<p>Care instructions</p>"
}
]
}
]
},
"stock": 50,
"stockAdjustment": -5,
"ean": "7350123456789",
"brand": {},
"categories": [
{
"category": {
"id": 10
},
"isDefault": true
}
],
"properties": [
{
"language": "EN",
"value": "<strong>Cotton</strong>"
}
],
"images": [
{
"index": 1,
"url": "https://example.com/images/12345-1.jpg"
}
],
"variantData": {
"attributes": [
{
"id": 0,
"language": "EN",
"value": "Red"
}
],
"isVariantOf": "12300"
},
"variantGroup": {
"attributeIds": [
1,
2
]
},
"productType": "PRODUCT",
"prices": [
{
"currency": "SEK",
"price": 299,
"type": "REGULAR",
"pricelistId": 1
}
],
"campaignActive": false,
"active": true,
"availability": {
"whenInStockId": 1,
"whenOutOfStockId": 2
},
"shelfLocation": "A-12-3",
"measurements": {
"width": 20,
"height": 5,
"length": 30,
"weight": 250,
"volume": 3000
},
"shippingClassId": 3,
"accessories": [
{
"listId": 1,
"productIds": [
"12345",
"12346"
]
}
]
}