Skip to content

upsertItemCost

WRITE

Upsert item cost.

POST /api/v1/items/upsertItemCost
curl -X POST '<your-host>/api/v1/items/upsertItemCost' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "itemId": "string",
    "costingMethod": "Standard",
    "unitCost": 0
  }'

Parameters

ParameterType
"Standard""Average""FIFO""LIFO"
min length 1
min 0

Input schema

schema
{
  "type": "object",
  "properties": {
    "itemId": {
      "type": "string",
      "minLength": 1
    },
    "itemPostingGroupId": {
      "type": "string"
    },
    "costingMethod": {
      "type": "string",
      "enum": [
        "Standard",
        "Average",
        "FIFO",
        "LIFO"
      ]
    },
    "unitCost": {
      "type": "number",
      "minimum": 0
    },
    "customFields": {}
  },
  "required": [
    "itemId",
    "costingMethod",
    "unitCost"
  ]
}