Skip to content

upsertTool

WRITE

Upsert tool.

POST /api/v1/items/upsertTool
curl -X POST '<your-host>/api/v1/items/upsertTool' \
  -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",
    "revision": "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
min length 1
min 0
> 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"
    },
    "revision": {
      "type": "string",
      "minLength": 1
    },
    "lotSize": {
      "type": "number",
      "minimum": 0
    },
    "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",
    "revision",
    "_operation"
  ]
}