This endpoint allows fetching an invoice by id.
curl --request GET \
--url https://api.useaira.com/v1/invoices/{id} \
--header 'X-API-KEY: <api-key>'{
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issuingAccount": {
"tradeName": "<string>",
"businessName": "<string>",
"email": "<string>",
"taxId": "<string>",
"taxIdType": "cnpj",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
},
"billingAccount": {
"tradeName": "<string>",
"businessName": "<string>",
"email": "<string>",
"taxId": "<string>",
"taxIdType": "cnpj",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
},
"lastCalculatedAt": "2023-11-07T05:31:56Z",
"invoiceNumber": "<string>",
"invoiceDate": "2023-12-25",
"memo": "<string>",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"status": "open",
"isLocked": true,
"failureReason": "unknown",
"source": "contract",
"autoIssue": true,
"amountDue": 123,
"dueDate": "2023-12-25",
"lineItemGroups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"lineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scope": "credit_purchase",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalUsage": 123,
"usageFormat": "unit",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"metadata": {
"type": "metric",
"billingModel": "in_full",
"priceTierDivision": "unique_tier"
},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fixed_price",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"type": "fixed_price",
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "monetary_discount",
"amount": 123
}
]
}
]
}
],
"standaloneLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scope": "credit_purchase",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalUsage": 123,
"usageFormat": "unit",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"metadata": {
"type": "metric",
"billingModel": "in_full",
"priceTierDivision": "unique_tier"
},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fixed_price",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"type": "fixed_price",
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "monetary_discount",
"amount": 123
}
]
}
]
},
"payments": [
{
"id": "<string>",
"amount": 123,
"dueDate": "2023-12-25",
"paymentMethod": "bolepix",
"status": "created"
}
],
"statusHistory": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previousStatus": "open",
"newStatus": "open",
"reason": "invoice_created",
"occurredAt": "2023-11-07T05:31:56Z"
}
],
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "705faf65-9c8b-4053-8c0b-2021281ce83f",
"name": "Acme Inc.",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"invoicePrefix": "ACMEI"
},
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "<unknown>",
"billingEndDay": 16,
"status": "active",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
}
},
"artifacts": [
{
"id": "<string>",
"artifactType": "<string>",
"fileExtension": "pdf",
"generatedAt": "2023-11-07T05:31:56Z"
}
]
}API Key Authentication.
Default Response
Show child attributes
Show child attributes
Show child attributes
Schema representing a customer.
Show child attributes
Schema representing a contract summary.
Show child attributes
Show child attributes
curl --request GET \
--url https://api.useaira.com/v1/invoices/{id} \
--header 'X-API-KEY: <api-key>'{
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issuingAccount": {
"tradeName": "<string>",
"businessName": "<string>",
"email": "<string>",
"taxId": "<string>",
"taxIdType": "cnpj",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
},
"billingAccount": {
"tradeName": "<string>",
"businessName": "<string>",
"email": "<string>",
"taxId": "<string>",
"taxIdType": "cnpj",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
},
"lastCalculatedAt": "2023-11-07T05:31:56Z",
"invoiceNumber": "<string>",
"invoiceDate": "2023-12-25",
"memo": "<string>",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"status": "open",
"isLocked": true,
"failureReason": "unknown",
"source": "contract",
"autoIssue": true,
"amountDue": 123,
"dueDate": "2023-12-25",
"lineItemGroups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"lineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scope": "credit_purchase",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalUsage": 123,
"usageFormat": "unit",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"metadata": {
"type": "metric",
"billingModel": "in_full",
"priceTierDivision": "unique_tier"
},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fixed_price",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"type": "fixed_price",
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "monetary_discount",
"amount": 123
}
]
}
]
}
],
"standaloneLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scope": "credit_purchase",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalUsage": 123,
"usageFormat": "unit",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"metadata": {
"type": "metric",
"billingModel": "in_full",
"priceTierDivision": "unique_tier"
},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fixed_price",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"type": "fixed_price",
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "monetary_discount",
"amount": 123
}
]
}
]
},
"payments": [
{
"id": "<string>",
"amount": 123,
"dueDate": "2023-12-25",
"paymentMethod": "bolepix",
"status": "created"
}
],
"statusHistory": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previousStatus": "open",
"newStatus": "open",
"reason": "invoice_created",
"occurredAt": "2023-11-07T05:31:56Z"
}
],
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "705faf65-9c8b-4053-8c0b-2021281ce83f",
"name": "Acme Inc.",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"invoicePrefix": "ACMEI"
},
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "<unknown>",
"billingEndDay": 16,
"status": "active",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
}
},
"artifacts": [
{
"id": "<string>",
"artifactType": "<string>",
"fileExtension": "pdf",
"generatedAt": "2023-11-07T05:31:56Z"
}
]
}