Error
A valid request URL is required to generate request examples{
"id": "writeoff-8f2b1c4a-0e5d-4a2b-9c3f-1a2b3c4d5e6f",
"storeId": "store-rivoli",
"reasonCode": "damaged",
"note": "Water damage batch B-2291",
"lines": [
{
"skuId": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"quantity": 3,
"unitCostCents": 1500
}
],
"status": "pending",
"actorId": "user-42",
"createdAt": "2026-07-28T10:15:30.000Z",
"decidedAt": null,
"decidedBy": null
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123,
"fieldErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}Inventory
Record a stock write-off (démarque)
Records a pending stock write-off (démarque: a reason code plus valued lines) for later approval. reasonCode is a closed set — theft (vol), damaged (casse), expired (périmé), lost (perte / démarque inconnue), sample (échantillon), other (autre). The server mints the record id — do not send one. Recording emits NO stock movement; on-hand is only touched once the write-off is approved.
POST
/
v1
/
inventory
/
write-offs
Error
A valid request URL is required to generate request examples{
"id": "writeoff-8f2b1c4a-0e5d-4a2b-9c3f-1a2b3c4d5e6f",
"storeId": "store-rivoli",
"reasonCode": "damaged",
"note": "Water damage batch B-2291",
"lines": [
{
"skuId": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"quantity": 3,
"unitCostCents": 1500
}
],
"status": "pending",
"actorId": "user-42",
"createdAt": "2026-07-28T10:15:30.000Z",
"decidedAt": null,
"decidedBy": null
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123,
"fieldErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}Authorizations
Authorization: Bearer <token>. Accepts EITHER a Keycloak access token (scopes-in-token) OR an opaque POS session token; both resolve to the same pos.* scope vocabulary the route guards enforce.
Body
application/json
Response
The recorded write-off (status pending, decision fields null).
The recorded write-off (status pending, decision fields null).
Minimum string length:
1Minimum string length:
1Available options:
damaged, expired, lost, theft, sample, other Minimum string length:
1Minimum array length:
1Show child attributes
Show child attributes
Available options:
pending, approved, rejected Minimum string length:
1Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Minimum string length:
1
