Bulk Revalue FIFO Layers
POST/api/cogs-revaluation/bulk-revalue
Revalues multiple FIFO layers in a single request.
Required scope:
inventory:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token.
Body fields:
- layerDataItems (required): Array of layer revaluation items
- layerDataItems.*.fifo_layer_id: FIFO Layer ID
- layerDataItems.*.cogs_source: Source of the cost value
- layerDataItems.*.new_unit_cost: New unit cost as float
- layerDataItems.*.effective_at (optional, date-only YYYY-MM-DD or ISO 8601 datetime): Date the cost change takes effect (per item); defaults to now(), moved to the first open day if the period is locked
- layerDataItems.*.posted_at (optional): GL posting timestamp (per item); defaults to now()
- layerDataItems.*.old_unit_cost (optional): Explicit prior per-unit cost (per item)
- layerDataItems.*.old_total_cost (optional): Explicit prior total cost (per item)
- layerDataItems.*.new_total_cost (optional): Explicit new total cost (per item)
- reason (required): Reason enum value applied to all items
- reason_notes (optional): Free-text explanation
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Content-Type
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Content-Type
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.