No internet or myDATA down: retrying with external_id and closing the day without a Z report
Three things can stop answering during a shift, and a restaurant ordering system handles each one differently. What happens when the internet drops, when ΑΑΔΕ does not answer, how to resend without a duplicate document, and how the day closes without a Z report.
Friday night, a full room, and something stops answering: the venue's internet, the mobile network, or myDATA. A restaurant ordering system has to know in advance what it does in each case, because the three are not the same. And at the end of the night, what "closing the day" means when there is no cash register.
When the venue's internet goes down
A document is issued the moment the call reaches Wrapp. The API has no field for an offline issue time, so there is no offline issuing sent later. What keeps the shift going is a second connection, for example a 4G router that takes over when the main line drops.
What the business does legally while it has no connection at all is for its accountant to answer.
When ΑΑΔΕ does not answer
This is the reassuring case. If myDATA does not answer, the document is created with its identifier (UID) and QR code, the response is pending, and Wrapp resends it on its own once ΑΑΔΕ is back. You do not need to resend anything from your side.
Retrying without a duplicate: external_id
The hard case is the one in between: the call goes out, the response never comes, and you do not know whether the document was issued. Resend blindly and you may issue a second receipt. That is what external_id is for.
- Put your order number in it. It is unique per account and case-insensitive.
- A second call with the same
external_idis refused (422, "external_id is already used by another invoice") before it reaches myDATA, and it uses no series number. - You can read the document by its
external_idin place of the Wrapp id. If it has a ΜΑΡΚ, it was issued: do not resend it. - If myDATA rejected the call, no document was created, so the same
external_idcan be resent once corrected.
In practice, the loop after a timeout is: read by external_id. If the document exists, use it. If it does not, send again with the same external_id.
Closing the day without a Z report
When issuing runs through a provider, there is no Z report and no daily report to ΑΑΔΕ: every document is already in myDATA with its ΜΑΡΚ the moment it is issued. Nothing closes on Wrapp's side.
Closing the day is your own reconciliation, and the API gives you the two pieces you need:
| Check | Call |
|---|---|
| What was issued today | GET / for the one day, reconciled on external_id |
| Which order notes are still open | GET / |
The second check has a deadline: an order note not correlated with a receipt within 24 hours stops issuing for the whole business. What the rule says and how notes get settled is in the guide to the Catering Order Note and the 24-hour rule.
How to start
Sign up free at wrapp.ai with your VAT number and press "Try the API". On staging you can try a retry with the same external_id and the end of day, with no tax effect. The request bodies are in the JSON examples for restaurant ordering.
Frequently asked questions
Can I issue without internet and send later?
Not through the API. A document is issued the moment the call reaches Wrapp, and there is no field for an offline issue time. The venue needs a second connection, for example a 4G router. What it does legally while it has no connection is for the accountant to answer.
What happens if myDATA does not answer?
The document is created with its UID and QR code, the response is pending, and Wrapp resends it on its own once ΑΑΔΕ is back. You do not resend anything from your side.
How do I resend after a timeout without issuing a duplicate receipt?
With external_id. Put your order number in it: a second call with the same external_id is refused before it reaches myDATA, without using a series number. Read the document by its external_id first, and if it does not exist, send again.
Is there a Z report when I issue through a provider?
No. There is no Z report and no daily report to ΑΑΔΕ, because every document is already in myDATA with its ΜΑΡΚ. Closing the day is your own reconciliation, using the day's issued documents from find_all_invoices.
What should I check at the end of the day?
That everything issued matches your system, reconciled on external_id, and that no order notes are left open, from list_open_catering_order_notes. An order note has 24 hours to be correlated with a receipt.
Need help?
If you have a question about this topic or want to make sure everything is set up correctly, contact us and we will look at it together.