// api
The receipt goes in.
The decision comes out, product by product.
REST API with a key. Your application sends the receipt photo or PDF, or we fetch the new receipts from the brand’s system. The decision arrives by webhook, with the status of each product.
- Authentication
- Key in the
X-Api-Keyheader - Sending a receipt
POST /v1/receipts- Importing receipts
- We fetch the new receipts from the brand’s system, at the interval we agree.
- Documentation
- The full documentation comes with the API key.
SACO PAPEL: doesn’t count
Sample receipt, with fictitious data.
{
"eventType": "ReceiptApproved",
"sentAt": "2026-09-12T15:58:04Z",
"receiptId": "00000000-0000-4000-8000-000000001234",
"externalReference": "EXEMPLO-000123",
"decision": "Approved",
"decidedBy": "automatic",
"approvedEans": [
"5600000000014",
"5600000000021",
"5600000000038"
],
"rejectionReason": null,
"expectedEans": [
{ "ean": "5600000000014", "approved": true,
"status": "Found", "matchMethod": "ean_in_line",
"detectedName": "SERUM NOITE 30ML", "lineIndex": 0 },
{ "ean": "5600000000021", "approved": true,
"status": "Found", "matchMethod": "name_match_ean",
"detectedName": "SI CONC 13", "lineIndex": 1 },
{ "ean": "5600000000038", "approved": true,
"status": "Found", "matchMethod": "store_code",
"detectedName": "0104772", "lineIndex": 2 }
]
}
expectedEans, with the receipt line and the method: by printed EAN, by abbreviated name, by store code. SACO PAPEL does not count and has no product in the notification.// request
One receipt per request.
The request is multipart/form-data, with the API key in the X-Api-Key header. It carries the receipt, your reference and, if the campaign asks for them, the expected EANs.
- The receipt
file - The photo or PDF, just as the consumer sent it: JPEG, PNG, HEIC or PDF.
- Your reference
externalReference - The receipt’s identifier in your system. It comes back in the response and in every notification, to link the result to the request.
- The expected EANs (optional)
expectedEans - The products the campaign asks for on this receipt, one EAN per unit: three units of the same product means the same EAN three times. In a campaign without expected EANs, the platform finds the brand’s catalogue products on the receipt.
The same receipt can be sent again for other products: a product that has already counted in one submission does not count again in another.
curl https://api.example.com/v1/receipts \
-H "X-Api-Key: <KEY>" \
-F "file=@talao-fs-a-1234.jpg" \
-F "externalReference=EXEMPLO-000123" \
-F "expectedEans=5600000000014" \
-F "expectedEans=5600000000021" \
-F "expectedEans=5600000000038"
HTTP/1.1 202 Accepted
{
"receiptId": "00000000-0000-4000-8000-000000001234",
"status": "pending"
}
// queue
Send the receipt, the decision arrives by notification.
The call answers straight away and closes. The receipt waits in the queue, is validated, and the decision goes out by webhook.
/v1/receipts responds straight away with 202 and the receiptId. When there is a decision, the platform sends it by webhook to the address you give us.
A receipt Under review does not trigger a notification yet. A person from our team reviews it within 1 working day, and the webhook goes out with the decision.
Queued
POST /v1/receipts
Send the receipt
and the call opens
Get the
receiptId202, and the call closes
Verification runs
the receipt waits in the queue
Get the notification
by webhook
Acknowledge it
with a 2xx
// result
The status of the receipt and of each product.
The webhook notification carries the decision, the overall status and the EANs that count, one for each approved unit. For each expected product you get its status and the receipt line where it was found; for a rejected receipt, the reason.
| Status | overallStatus |
decision |
decidedBy |
Webhook notification |
|---|---|---|---|---|
| Approved | Accepted |
Approved |
automatic or human |
ReceiptApproved |
| Partially approved | PartiallyAccepted |
Approved |
human: always a person |
ReceiptPartiallyAccepted |
| Under review | ManualReview |
ManualReview |
Not yet decided | None, until a person decides |
| Rejected | Rejected |
Rejected |
automatic or human |
ReceiptRejected, with the reason in rejectionReason |
Each product, with its line
expectedEans holds one object per expected product, even if its EAN was repeated in the request: whether it counts (approved), the detection status (status), how it was found (matchMethod) and the receipt line (detectedName and lineIndex). The list never contradicts approvedEans.
The confidence score
confidenceScore carries a score from 0 to 100, for information only. The decision is decision: do not make your logic depend on the score.
The rejection reason
For a Rejected receipt, rejectionReason carries a stable code for your logic (code), the text in Portuguese to show the consumer (label) and a note, when there is one (note). Some codes: duplicate, illegible, store_not_authorized, products_missing. The full list is in the documentation.
// acknowledgement
Acknowledged, or sent again.
- Delivery acknowledgement
- Your endpoint responds 2xx with the
deliveryId, which arrives in theX-Receipt-Delivery-Idheader, and an echo of what it received. If the echo does not match what was sent, the delivery is flagged as mismatched. - Retries
- Without a 2xx, the notification goes out again, up to 5 attempts, at intervals of 1, 5, 30, 120 and 720 minutes. It carries the same
deliveryId: if you have already processed it, reply with the same acknowledgement. - Decisions by our team
- They go out 5 minutes after they are made. Until then they can still be undone, in which case nothing arrives.
- More than one notification per receipt
- If the receipt is revalidated or the decision changes, a new notification arrives. The most recent one applies, by
sentAt. - Signature
- Each notification is signed with HMAC-SHA256 and a shared secret, to confirm that it comes from the platform.
HTTP/1.1 200 OK
Content-Type: application/json
{
"received": true,
"deliveryId": "00000000-0000-4000-8000-000000005678",
"externalReference": "EXEMPLO-000123",
"decision": "Approved",
"approvedEans": [
"5600000000014",
"5600000000021",
"5600000000038"
]
}
// included
What comes ready-made.
Automatic import
If the brand already receives the receipts in another system, the platform fetches the new ones from there every few minutes, at the interval we agree. For each one it brings the photo or PDF, the reference, the requested products (when the campaign specifies them) and the classification that system gave it. It validates them without writing anything to that system. It can run alongside it without stopping it, and the monthly report compares the two decisions.
Catalogue
- 5600000000014Night serum
- 5600000000021Concealer
- 5600000000038Hand cream
Authorised stores
- Perfumaria Exemplo
- Perfumaria Modelo
The catalogue and the stores, via integration
To get started, we need two lists: the catalogue (the EAN and the name of each product) and the authorised stores. We fetch them from the brand’s system and keep them up to date; we can also receive them as a file. The campaign rules are agreed with the brand, and we are the ones who set them up. When a store, a product or a rule changes, the change reaches us through the integration or the brand lets us know, and we apply it. The brand’s technical team does not have to build a single screen.
The fiscal QR code fields
The platform is ready to validate the fiscal QR code in countries whose receipts carry one, and in any country that adopts one in the future. When a receipt has one, the platform checks the code’s fields: the seller’s tax number, the date, the document number and the total. The QR total must match the lines on the receipt. On the sample receipt:
- Tax number
- 500000000
- Date
- 12-09-2026
- Document
- FS A/1234
- Total
- €70.40