Receipt

Create a new electronic receipt

Create a new electronic receipt

SecurityBearer
Request
Request Body schema: application/json

The new Receipt resource

fiscal_id
required
string

The VAT number of the company that issued the receipt without the country prefix.

lottery_code
string

"Codice Lotteria del cliente". Provide this field in case the customer wants to partecipate in the "Lotteria degli scontrini" lottery.

required
Array of objects (ReceiptItem)

"Elementi contabili". Receipt items.

invoice_issuing
boolean

"Flag Emissione Fattura". In case of uncollected amount, set this field to true in case for services invoiced at the end of the period. This use case is generally called "Credito - segue fattura".

services_uncollected_amount
number

"Credito Non Riscosso - Prestazioni Servizi". Uncollected Amount in EUR in case of services.

goods_uncollected_amount
number

"Credito Non Riscosso - Bene Consegnato". Uncollected Amount in EUR in case of delivered goods.

cash_payment_amount
number

"Pagamento In Contanti". Cash payment amount in EUR.

electronic_payment_amount
number

"Pagamento Elettronico". Electronic payment amount in EUR.

ticket_restaurant_payment_amount
number

"Pagamento Ticket Restaurant". Ticket restaurant payment amount in EUR.

ticket_restaurant_quantity
integer

"Numero Ticket Restaurant". Number of Ticket Restaurants used.

discount
number

"Sconto A Pagare". This discount, applied in EUR, does not change the taxable amount of the receipt that is sent to the Agenzia delle Entrate. It is just a not paid amount, usually a rounding up, that is applied at payment time.

linked_receipt
string

"Documento Commerciale Collegato".Linked receipt.

email
string

This optional will receive the final PDF of the receipt.

Responses
201

Receipt resource created

400

Invalid input

404

Resource not found

post/receipts
Request samples
application/json
{
  • "fiscal_id": "string",
  • "lottery_code": "string",
  • "items": [
    ],
  • "invoice_issuing": true,
  • "services_uncollected_amount": 0,
  • "goods_uncollected_amount": 0,
  • "cash_payment_amount": 0,
  • "electronic_payment_amount": 0,
  • "ticket_restaurant_payment_amount": 0,
  • "ticket_restaurant_quantity": 0,
  • "discount": 0,
  • "linked_receipt": "string",
  • "email": "string"
}
Response samples
application/json
{
  • "return_receipts": [
    ],
  • "voiding_receipt": {
    },
  • "returned_receipt": {
    },
  • "voided_receipt": {
    },
  • "error_message": "string",
  • "error_code": "string",
  • "uuid": "string",
  • "type": "sale",
  • "status": "new",
  • "fiscal_id": "string",
  • "created_at": "2024-10-08 16:19:42",
  • "total_amount": 11.42,
  • "transaction_id": "string",
  • "document_number": "string",
  • "document_date": "2024-10-08 16:19:42"
}

Get a list of electronic receipts

Get a list of electronic receipts. Notes on fields. return_receipts can contain a list of receipts that retrurn items from the current one, i.e. this is a 'parent' receipt and return_receipts are its 'children' that return items from it. returned_receipt could be the 'parent' receipt the current one is returning item from; in this case the type of the current receipt will be return. The same holds for voiding_receipt that is the receipt that voids the current one and voided_receipt that is the receipt voided by the current one; in this case the type of the current receipt will be void.

SecurityBearer
Request
query Parameters
business_registry_configuration.fiscal_id
string
business_registry_configuration.fiscal_id[]
Array of strings
document_number
string
document_number[]
Array of strings
status
string
status[]
Array of strings
type
string
type[]
Array of strings
created_at[before]
string
created_at[strictly_before]
string
created_at[after]
string
created_at[strictly_after]
string
document_date[before]
string
document_date[strictly_before]
string
document_date[after]
string
document_date[strictly_after]
string
page
integer

The collection page number

Responses
200

ReceiptOutput collection response

get/receipts
Request samples
Response samples
[
  • {
    }
]

Get an electronic receipt

Get an electronic receipt. See notes above related to the API for getting a list of electronic receipts for more details on the results.

SecurityBearer
Request
path Parameters
id
required
string

The uuid that A-Cube assigned to the receipt

Responses
200

ReceiptOutput resource response

404

Resource not found

get/receipts/{id}
Request samples
Response samples
application/json
{
  • "return_receipts": [
    ],
  • "voiding_receipt": {
    },
  • "returned_receipt": {
    },
  • "voided_receipt": {
    },
  • "error_message": "string",
  • "error_code": "string",
  • "uuid": "string",
  • "type": "sale",
  • "status": "new",
  • "fiscal_id": "string",
  • "created_at": "2024-10-08 16:19:42",
  • "total_amount": 11.42,
  • "transaction_id": "string",
  • "document_number": "string",
  • "document_date": "2024-10-08 16:19:42"
}

Void an electronic receipt

Void an electronic receipt. Only receipts in submitted and ready status can be voided.

SecurityBearer
Request
path Parameters
id
required
string

The uuid that A-Cube assigned to the receipt

Responses
204

Receipt resource deleted

404

Resource not found

delete/receipts/{id}
Request samples

Get the details or the PDF of an electronic receipt

Get the details of an electronic receipt, or the receipt PDF itself if the Accept: application/pdf header is sent

SecurityBearer
Request
path Parameters
id
required
string

The uuid that A-Cube assigned to the receipt

Responses
200

ReceiptDetailsOutput resource response

404

Resource not found

409

Document still being processed, please retry later

get/receipts/{id}/details
Request samples
Response samples
{
  • "total_taxable_amount": 7.23,
  • "total_uncollected_amount": 7.23,
  • "deductible_amount": 7.23,
  • "total_vat_amount": 7.23,
  • "total_discount": 7.23,
  • "total_gross_discount": 7.23,
  • "discount": 7.23,
  • "items": [
    ],
  • "uuid": "string",
  • "type": "sale",
  • "status": "new",
  • "fiscal_id": "string",
  • "created_at": "2024-10-08 16:19:42",
  • "total_amount": 11.42,
  • "transaction_id": "string",
  • "document_number": "string",
  • "document_date": "2024-10-08 16:19:42"
}

Return items an electronic receipt

Return items an electronic receipt

SecurityBearer
Request
path Parameters
id
required
string

The uuid that A-Cube assigned to the receipt

Request Body schema: application/json

The new Receipt resource

required
Array of objects (ReceiptReturnItem)

"Elementi contabili".

Responses
201

Receipt resource created

400

Invalid input

404

Resource not found

post/receipts/{id}/return
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "return_receipts": [
    ],
  • "voiding_receipt": {
    },
  • "returned_receipt": {
    },
  • "voided_receipt": {
    },
  • "error_message": "string",
  • "error_code": "string",
  • "uuid": "string",
  • "type": "sale",
  • "status": "new",
  • "fiscal_id": "string",
  • "created_at": "2024-10-08 16:19:42",
  • "total_amount": 11.42,
  • "transaction_id": "string",
  • "document_number": "string",
  • "document_date": "2024-10-08 16:19:42"
}