Bulk create inventory revaluations

Operation ID: bulkCreateInventoryRevaluations

Group: Inventory › Inventory Revaluations

Open in the interactive reference

POST /inventory/inventory-revaluations/bulk

Retry-safe: A write that accepts Idempotency-Key: repeating a request with the same key replays the stored answer instead of executing twice.

Creates multiple inventory revaluations in one request, each as a draft. Each revaluation in inventoryRevaluations takes the same fields as POST inventory/inventory-revaluations. If any revaluation can't be created, none are. 'index' on the error is the position of that revaluation, counting from zero.

The response lists the new drafts in the order you sent them, without their lines.

Parameters

Name In Type Required Description
Api-Version header string · v1 yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.

Request body

Required, application/json: bulkCreateInventoryRevaluationsInput.

Field Type Required Description
inventoryRevaluations array<object> yes The revaluations to create. All or nothing: if any is rejected, none is written. Example: [{"costingValuationType":"revaluation","costingElementTypeId":"f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","unitId":"d5a71e93-4c08-4b26-95f7-2e6a8c30b41f","quantity":"150","currentUnitCost":"12","newUnitCost":"9"}]}].
inventoryRevaluations[].costingValuationType string yes How the value change is recorded. Accepted values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.
inventoryRevaluations[].costingElementTypeId string yes The unique identifier for the costing element type the cost breakdown rows are recorded against. Required, because the commit refuses a document without one.
inventoryRevaluations[].entityId string no The unique identifier for the legal entity. Defaults to the entity that owns the first line's warehouse. See id on GET base/entities.
inventoryRevaluations[].documentDate date no The date to date the revaluation. Defaults to today. Use format YYYY-MM-DD.
inventoryRevaluations[].capitalisationExpenseAccountId string no The unique identifier for the general ledger account the expense comes off. Required when costingValuationType is 'directCostCapitalisation'. See id on GET accounting/chart-of-accounts/:id.
inventoryRevaluations[].reasonCodeId string no The unique identifier for a reason code. See id on GET inventory/reason-codes/:id.
inventoryRevaluations[].notes string no Free text on the revaluation.
inventoryRevaluations[].lines array<object> yes The lines of the revaluation. At least one is required.
inventoryRevaluations[].lines[].itemId string yes The unique identifier for the item to revalue. See id on GET inventory/items/:id.
inventoryRevaluations[].lines[].locationId string yes The unique identifier for the warehouse whose stock is being restated. There is no document-level warehouse, so every line names its own. See id on GET inventory/warehouses/:id.
inventoryRevaluations[].lines[].unitId string yes The unique identifier for the unit the quantity is in. Required: without it the platform falls back to whichever unit is first in the tenant. See id on GET inventory/unit-of-measures/:id.
inventoryRevaluations[].lines[].quantity decimal yes How much stock this line restates. Must be greater than zero.
inventoryRevaluations[].lines[].currentUnitCost decimal yes What the stock is carried at today, in the legal entity's functional currency. Read it from GET inventory/inventory-levels for the same item and warehouse, since it is checked and never looked up, and a guess posts the wrong difference. Zero is accepted and a negative cost is not.
inventoryRevaluations[].lines[].newUnitCost decimal yes What it should be carried at after this posts, in the legal entity's functional currency.
inventoryRevaluations[].lines[].previousAfterSaleCost decimal no The accrued after-sale cost before this document. Moving-average direct cost capitalization only.
inventoryRevaluations[].lines[].newAfterSaleCost decimal no The after-sale cost to capitalize. Moving-average direct cost capitalization only.
inventoryRevaluations[].lines[].notes string no Free text on the line.
inventoryRevaluations[].lines[].batches array<object> no The batches being restated. Their quantities must add up to the line's quantity.
inventoryRevaluations[].lines[].batches[].batchNumberId string no The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required.
inventoryRevaluations[].lines[].batches[].batchNumber string no The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the line's warehouse. Given beside batchNumberId, it must be that batch's own number.
inventoryRevaluations[].lines[].batches[].quantity decimal yes How much of the line this batch accounts for.
inventoryRevaluations[].lines[].batches[].currentUnitCost decimal no What this batch is carried at today.
inventoryRevaluations[].lines[].batches[].newUnitCost decimal no What it should be carried at.
inventoryRevaluations[].lines[].serials array<object> no The serialized units being restated, one entry per unit.
inventoryRevaluations[].lines[].serials[].serialNumberId string no The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required.
inventoryRevaluations[].lines[].serials[].serialNumber string no The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the line's warehouse. Given beside serialNumberId, it must be that unit's own number.
inventoryRevaluations[].lines[].serials[].currentUnitCost decimal no What this unit is carried at today.
inventoryRevaluations[].lines[].serials[].newUnitCost decimal no What it should be carried at.
inventoryRevaluations[].lines[].serials[].previousAfterSaleCost decimal no The unit's accrued after-sale cost before this document.
inventoryRevaluations[].lines[].serials[].newAfterSaleCost decimal no The after-sale cost to capitalize on it.
{
  "inventoryRevaluations": [
    {
      "costingValuationType": "revaluation",
      "costingElementTypeId": "f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8",
      "lines": [
        {
          "itemId": "517a93e4-cbb4-4571-9e3d-2343e56cfd84",
          "locationId": "b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5",
          "unitId": "d5a71e93-4c08-4b26-95f7-2e6a8c30b41f",
          "quantity": "150",
          "currentUnitCost": "12",
          "newUnitCost": "9"
        }
      ]
    }
  ]
}

Response

200 Success

Under data (bulkCreateInventoryRevaluationsOutput):

Field Type Required Description
inventoryRevaluations array<object> yes The created revaluations, in input order, headers only. Read one in full on its own endpoint. Example: [{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"DRAFT","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}].
inventoryRevaluations[].id string yes The unique identifier for the revaluation.
inventoryRevaluations[].documentNumber string no The revaluation's document number, for example 'REV-1187'.
inventoryRevaluations[].documentStatus string yes The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.
inventoryRevaluations[].documentDate date no The date the revaluation is dated. Format YYYY-MM-DD.
inventoryRevaluations[].entityId string no The unique identifier for the legal entity whose books this moves. See id on GET base/entities.
inventoryRevaluations[].entityName string no The display name of that legal entity.
inventoryRevaluations[].costingValuationType string no How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.
inventoryRevaluations[].capitalisationExpenseAccountId string no The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id.
inventoryRevaluations[].costingElementTypeId string no The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit.
inventoryRevaluations[].reasonCodeId string no The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.
inventoryRevaluations[].reasonCode string no The code of that reason code.
inventoryRevaluations[].reasonCodeDescription string no The description of that reason code.
inventoryRevaluations[].currency string no The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.
inventoryRevaluations[].totalRevaluationAmount decimal no The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet.
inventoryRevaluations[].active boolean no Whether the document is active.
inventoryRevaluations[].notes string no Free text on the revaluation.
inventoryRevaluations[].lineCount number no How many lines the revaluation has.
inventoryRevaluations[].createdDate date-time no The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
inventoryRevaluations[].lastModifiedDate date-time no The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
{
  "data": {
    "inventoryRevaluations": [
      {
        "id": "8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4",
        "documentNumber": "REV-1187",
        "documentStatus": "DRAFT",
        "currency": "EUR",
        "totalRevaluationAmount": "-450",
        "lineCount": 1,
        "lastModifiedDate": "2026-08-18T09:14:22.517Z"
      }
    ]
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Response headers

Errors

Code Status
NOTHING_TO_CREATE 400
REFERENCE_NOT_FOUND 400
NO_LINES 400
INVALID_QUANTITY 400
MISSING_CAPITALISATION_ACCOUNT 400
TRACKING_MISMATCH 400
POSTING_REJECTED 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses