uuid hace idempotente la operación. La base de datos descuenta el stock del establecimiento y del lote y genera el asiento contable cuando la empresa lleva contabilidad.STOCK_WRITE_OFF:CREATEcurl --location 'https://mock.apidog.com/m1/1388340-0-default/api/v1/stock-write-offs' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"establishmentId": 239,
"date": "2019-08-24",
"reason": "string",
"accountingAccountId": 3482,
"details": [
{
"productId": 181854,
"quantity": 0,
"lotNumber": "L-01",
"detail": "string"
}
]
}'{
"id": 0,
"number": 0,
"establishmentId": 0,
"establishmentName": "string",
"date": "2019-08-24",
"reason": "string",
"status": "ENTERED",
"accountingAccountId": 0,
"total": 0,
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22.123Z",
"updatedBy": "string",
"updatedAt": "2019-08-24T14:15:22.123Z",
"details": [
{
"id": 0,
"productId": 0,
"productReference": "string",
"productName": "string",
"quantity": 0,
"cost": 0,
"previousCost": 0,
"total": 0,
"lotNumber": "string",
"detail": "string"
}
]
}