Reverse a customer receipt
POST
Reverses a receipt by writing a linked reversal receipt, with an optional reason. The original is never edited or deleted, and a receipt can only be reversed once.
How to use it
- Find the POSTED receipt with List customer receipts.
- Send an optional reason, e.g. cheque bounced.
- A linked REVERSAL receipt with negative amounts is created and returned, and the original becomes REVERSED; the money is owed again on the same sales.
- A receipt can be reversed only once, and a reversal itself cannot be reversed.
BearerAuthheader
AuthorizationBearer <JWT>id*stringID of the record (UUID).
Format
uuidX-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
application/json- body
reason?|Why the receipt is being reversed, e.g. cheque bounced. Optional; stored on the reversal receipt.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request was processed; otherwise an error status.
message*stringShort human-readable message describing the outcome, e.g. which record was saved or why the call failed.
data?The customer receipt with its allocations.
Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/receivables/receipts/497f6eca-6276-4993-bfeb-53cbbbba6f08/reverse' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "status": "string", "message": "string", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "receiptNumber": "string", "customerNumber": "string", "amount": 0, "allocatedAmount": 0, "unallocatedAmount": 0, "mode": "CASH", "status": "POSTED", "reference": "string", "receivedOn": "2019-08-24", "notes": "string", "dayCycleId": "bbed7a30-80be-4ccf-810d-a33c370a67d1", "collectedBy": "string", "reversalOfId": "91205805-6131-4e22-87c1-99e3bbb30d9b", "reversalReason": "string", "allocations": [ { "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc", "invoiceNumber": "string", "amount": 0 } ], "createdAt": "2019-08-24T14:15:22Z", "createdBy": "string" }}