upsertConsumable
WRITEUpsert consumable.
POST /api/v1/items/upsertConsumable
curl -X POST '<your-host>/api/v1/items/upsertConsumable' \
-H 'Authorization: Bearer <api-key>' \
-H 'Content-Type: application/json' \
-d '{
"id": "string",
"name": "string",
"replenishmentSystem": "Buy",
"defaultMethodType": "Purchase to Order",
"itemTrackingType": "Inventory",
"unitOfMeasureCode": "string",
"_operation": "create"
}'Parameters
ParameterType
Required. 'create' inserts a new record, 'update' modifies the existing record with this id.
"create""update"
"Purchase to Order""Pull from Inventory""Make to Order"
min length 1max length 255
"Inventory""Non-Inventory""Serial""Batch"
min length 1max length 255
"Buy""Make""Buy and Make"
min length 1
> 0
"NotManaged""Fixed Duration""Calculated""Set on Receipt"
"Before""After"
min 0
Input schema
schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"readableId": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"description": {
"type": "string"
},
"mpn": {
"type": "string"
},
"replenishmentSystem": {
"type": "string",
"enum": [
"Buy",
"Make",
"Buy and Make"
]
},
"defaultMethodType": {
"type": "string",
"enum": [
"Purchase to Order",
"Pull from Inventory",
"Make to Order"
]
},
"itemTrackingType": {
"type": "string",
"enum": [
"Inventory",
"Non-Inventory",
"Serial",
"Batch"
]
},
"postingGroupId": {
"type": "string"
},
"unitOfMeasureCode": {
"type": "string",
"minLength": 1
},
"unitCost": {
"type": "number",
"minimum": 0
},
"defaultStorageUnitId": {
"type": "string"
},
"shelfLifeMode": {
"type": "string",
"enum": [
"NotManaged",
"Fixed Duration",
"Calculated",
"Set on Receipt"
]
},
"shelfLifeDays": {
"type": "number",
"exclusiveMinimum": 0
},
"shelfLifeTriggerProcessId": {
"type": "string"
},
"shelfLifeTriggerTiming": {
"type": "string",
"enum": [
"Before",
"After"
]
},
"shelfLifeCalculateFromBom": {
"type": "boolean"
},
"customFields": {},
"_operation": {
"type": "string",
"enum": [
"create",
"update"
],
"description": "Required. 'create' inserts a new record, 'update' modifies the existing record with this id."
}
},
"required": [
"id",
"name",
"replenishmentSystem",
"defaultMethodType",
"itemTrackingType",
"unitOfMeasureCode",
"_operation"
]
}