Cancel a sale in full
The sale being cancelled is the path's `sale_id`. The body carries no lines or totals: Fiskaliza copies that sale's lines, payments, tax groups, currency, and totals to build the exact reversal. `pos_id` is the POS that issues the cancellation. The cancellation coupon is issued immediately in the requested locale and returned as receipt_document.
/v1/pos/{pos_id}/sales/{sale_id}/cancelThe sale being cancelled is the path's sale_id. The body carries no lines or totals: Fiskaliza copies that sale's lines, payments, tax groups, currency, and totals to build the exact reversal. pos_id is the POS that issues the cancellation. The cancellation coupon is issued immediately in the requested locale and returned as receipt_document.
Authorization
fiskalizaKey fiskaliza:commands:writeAn opaque Fiskaliza API key. Each operation lists the capabilities required on that key.
In: header
Scope: fiskaliza:commands:write
Path Parameters
^nj_pos_The issued sale command being reversed.
1 <= lengthQuery Parameters
Language of the server-rendered coupon. Defaults to Albanian.
"sq"Value in
- "sq"
- "sr-Latn"
- "en"
Header Parameters
Reuse with the same request to replay the result. Changed input returns idempotency_conflict. Scoped to the business for POS onboarding and receipt documents, and to the POS for commands. Command creation also deduplicates by external_id within that POS; a matching request replays the existing command even with a different idempotency key.
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Carries no lines, payments, or totals — the reversal is built from the path's sale_id, so it always reverses that sale exactly. A sale that is already cancelled, or that has been partially returned, cannot be cancelled; reverse the remainder with a return instead.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/pos/string/sales/string/cancel" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "external_id": "cancel_123", "reason": "Entered by mistake", "occurred_at": "2026-08-25T11:00:00+02:00" }'{ "success": true, "warnings": [ "string" ], "data": { "command": { "id": "string", "pos_id": "string", "external_id": "string", "type": "SALE", "sale_type": "STANDARD", "status": "PENDING", "issuance_mode": "ONLINE", "attempt_count": 0, "last_error": "string", "next_retry_at": "2019-08-24T14:15:22Z", "receipt_ready": true, "created_at": "2019-08-24T14:15:22Z", "coupon": { "coupon_id": 0, "daily_receipt_no": 0, "reference_no": 0, "verification_no": "string", "qr_payload": "string", "transaction_no": "string", "atk_message": "string", "issued_at": "2019-08-24T14:15:22Z", "transmitted_at": "2019-08-24T14:15:22Z" } }, "receipt_document": { "id": "string", "command_id": "string", "locale": "sq", "kind": "ORIGINAL", "pdf_url": "/v1/receipt-documents/{id}/pdf", "pdf_sha256": "string", "issued_at": "2019-08-24T14:15:22Z" } }}Return part or all of a sale POST
The sale being reversed is the path's `sale_id`, not a body field. Lines reference it by `original_line_id`; Fiskaliza takes the product name, unit, type, unit price, currency, and tax category from the issued sale. It must be an issued sale this key can see — anything else is a 404. `pos_id` is the POS that issues the return, and need not be the POS that issued the sale. The fiscal return coupon is issued immediately in the requested locale and returned as receipt_document.
Read a command GET
Faqja tjetër