question

kmahoney avatar image
kmahoney asked chanel Deactivated answered

Inventory Item Creation question

Working in sandbox and sending over an inventory item post request like the one below. Everything works except the category and tag are not getting set when create the inventory item (the category and tag ID do exist in the sandbox). Any suggestions as to what may be wrong? Thank you.

https://apisandbox.dev.clover.com/v3/merchants/mid/items?access_token=token
Accept application/json
{
"id": "",
"itemGroup": {
"id": "3M6M9N6E5E3XY"
},
"name": "Product Name",
"code": "UPC",
"sku": "sku",
"price": 1009.0,
"priceType": "PER_UNIT",
"defaultTaxRates": true,
"unitName": "Item",
"cost": 807.0,
"isRevenue": true,
"categories": [
{
"id": "ZNJE4CCB6EDN2",
"name": "Category1"
}
],
"tags": [
{
"id": "WY447NQ0BR2Y8",
"name": "Tag1"
}
],
"itemStock": {
"quantity": 10
}
}

Inventory
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

chanel avatar image
chanel Deactivated answered
For certain associations, you'll need to use a separate endpoint to associate an inventory item to a category and to associate an inventory item to a tag. Details can be found here: https://docs.clover.com/clover-platform/docs/using-object-associations
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community