curl --request GET \
--url https://api.useaira.com/v1/invoices/by-provider-id/{providerId} \
--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>",
"emails": [
"jsmith@example.com"
],
"taxId": "<string>",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"complement": "<string>"
},
"billingAccount": {
"tradeName": "<string>",
"businessName": "<string>",
"emails": [
"jsmith@example.com"
],
"taxId": "<string>",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"complement": "<string>"
},
"lastCalculatedAt": "2023-11-07T05:31:56Z",
"invoiceNumber": "<string>",
"invoiceDate": "2023-12-25",
"memo": "<string>",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"isLocked": true,
"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",
"lineItemGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalUsage": 123,
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"metadata": {},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amount": 123
}
],
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
],
"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",
"lineItemGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalUsage": 123,
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"metadata": {},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amount": 123
}
],
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"payments": [
{
"id": "<string>",
"amount": 123,
"dueDate": "2023-12-25"
}
],
"statusHistory": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"occurredAt": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "705faf65-9c8b-4053-8c0b-2021281ce83f",
"name": "Acme Inc.",
"type": "individual",
"invoicePrefix": "ACMEI",
"parentCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
}
},
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
}
},
"artifacts": [
{
"id": "<string>",
"artifactType": "<string>",
"generatedAt": "2023-11-07T05:31:56Z"
}
]
}This endpoint allows fetching an invoice by its provider ID (e.g. ERP processor id from invoice_sync).
curl --request GET \
--url https://api.useaira.com/v1/invoices/by-provider-id/{providerId} \
--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>",
"emails": [
"jsmith@example.com"
],
"taxId": "<string>",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"complement": "<string>"
},
"billingAccount": {
"tradeName": "<string>",
"businessName": "<string>",
"emails": [
"jsmith@example.com"
],
"taxId": "<string>",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"complement": "<string>"
},
"lastCalculatedAt": "2023-11-07T05:31:56Z",
"invoiceNumber": "<string>",
"invoiceDate": "2023-12-25",
"memo": "<string>",
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"isLocked": true,
"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",
"lineItemGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalUsage": 123,
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"metadata": {},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amount": 123
}
],
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
],
"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",
"lineItemGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"totalUsage": 123,
"subtotalAmount": 123,
"adjustmentAmount": 123,
"totalAmount": 123,
"discountAmount": 123,
"metadata": {},
"subLineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"usage": 123,
"amount": 123,
"metadata": {
"fixedPrice": 123
}
}
],
"adjustments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amount": 123
}
],
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"payments": [
{
"id": "<string>",
"amount": 123,
"dueDate": "2023-12-25"
}
],
"statusHistory": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"occurredAt": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "705faf65-9c8b-4053-8c0b-2021281ce83f",
"name": "Acme Inc.",
"type": "individual",
"invoicePrefix": "ACMEI",
"parentCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
}
},
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
}
},
"artifacts": [
{
"id": "<string>",
"artifactType": "<string>",
"generatedAt": "2023-11-07T05:31:56Z"
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.useaira.com/llms.txt
Use this file to discover all available pages before exploring further.
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