This endpoint allows fetching an invoice by id. It also returns, if available, a pix
and bank_slip
URL for each invoice, which expires after 15 minutes.
curl --request GET \
--url https://api.useaira.com/v1/invoices/{id} \
--header 'X-API-KEY: <api-key>'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayId": "<string>",
"customer": {
"id": "<string>",
"externalId": "cust_1234567890abcdef",
"name": "Acme Inc.",
"customFields": {
"custom_field_1": "value1",
"custom_field_2": "value2"
}
},
"paymentAccount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"businessName": "<string>",
"tradeName": "<string>",
"taxId": "<string>",
"email": "jsmith@example.com",
"address": {
"zipCode": "<string>",
"number": "<string>",
"street": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
}
},
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"billingEndDay": 16,
"status": "active",
"paymentSettings": {
"scheduledPaymentDay": 16,
"dueOffsetDays": 6
},
"billingSettings": {
"billingCycleMinimumAmount": 1
},
"customFields": {}
},
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalAmount": 1,
"closedReason": "end_of_cycle",
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"dueDate": "2023-12-25",
"createdAt": "2023-11-07T05:31:56Z",
"processedAt": "2023-11-07T05:31:56Z",
"paymentMethod": "bolepix",
"status": "created",
"pixLink": "<string>",
"bankSlipLink": "<string>"
}
],
"status": "open",
"plans": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"planSettings": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fixedAmount": 1,
"minimumAmount": 1
},
"metrics": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currencyUnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"billingModel": "in_full",
"priceTierDivision": "unique_tier",
"fixedAmount": 1,
"minimumAmount": 1,
"resourceName": "<string>",
"resourceType": "unit",
"currencyUnit": {
"id": "<string>",
"name": "<string>",
"code": "<string>"
},
"priceTiers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billingType": "unit",
"from": 2,
"to": 2,
"packageSize": 2,
"price": "<string>",
"fixedPrice": "<string>",
"basisPoints": 1,
"totalAmount": 1,
"usage": 1
}
],
"totalAmount": 1
}
],
"totalAmount": 1
}
],
"additionalItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"amount": 2,
"type": "discount"
}
]
}
API Key Authentication.
The invoice id.
The request was successfully processed and the invoice is returned.
curl --request GET \
--url https://api.useaira.com/v1/invoices/{id} \
--header 'X-API-KEY: <api-key>'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayId": "<string>",
"customer": {
"id": "<string>",
"externalId": "cust_1234567890abcdef",
"name": "Acme Inc.",
"customFields": {
"custom_field_1": "value1",
"custom_field_2": "value2"
}
},
"paymentAccount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"businessName": "<string>",
"tradeName": "<string>",
"taxId": "<string>",
"email": "jsmith@example.com",
"address": {
"zipCode": "<string>",
"number": "<string>",
"street": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
}
},
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"billingEndDay": 16,
"status": "active",
"paymentSettings": {
"scheduledPaymentDay": 16,
"dueOffsetDays": 6
},
"billingSettings": {
"billingCycleMinimumAmount": 1
},
"customFields": {}
},
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalAmount": 1,
"closedReason": "end_of_cycle",
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"dueDate": "2023-12-25",
"createdAt": "2023-11-07T05:31:56Z",
"processedAt": "2023-11-07T05:31:56Z",
"paymentMethod": "bolepix",
"status": "created",
"pixLink": "<string>",
"bankSlipLink": "<string>"
}
],
"status": "open",
"plans": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"planSettings": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fixedAmount": 1,
"minimumAmount": 1
},
"metrics": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currencyUnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"billingModel": "in_full",
"priceTierDivision": "unique_tier",
"fixedAmount": 1,
"minimumAmount": 1,
"resourceName": "<string>",
"resourceType": "unit",
"currencyUnit": {
"id": "<string>",
"name": "<string>",
"code": "<string>"
},
"priceTiers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billingType": "unit",
"from": 2,
"to": 2,
"packageSize": 2,
"price": "<string>",
"fixedPrice": "<string>",
"basisPoints": 1,
"totalAmount": 1,
"usage": 1
}
],
"totalAmount": 1
}
],
"totalAmount": 1
}
],
"additionalItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"amount": 2,
"type": "discount"
}
]
}