curl --request POST \
--url https://api.useaira.com/v1/invoices/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"idempotencyKey": "<string>",
"invoiceDate": "2023-12-25",
"memo": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalCustomerId": "<string>",
"paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"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>",
"taxIdType": "cnpj",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
},
"billingAccount": {
"tradeName": "<string>",
"businessName": "<string>",
"emails": [
"jsmith@example.com"
],
"taxId": "<string>",
"taxIdType": "cnpj",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
},
"invoiceAllocationStrategy": "single",
"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": "erp_provider_not_supported",
"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",
"lineItemGroupId": "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
}
],
"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>",
"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
}
],
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}Creates a one-off invoice in open status. Provide exactly one of customerId or externalCustomerId. When paymentAccountId is omitted or null, one of the customer’s payment accounts is used.
curl --request POST \
--url https://api.useaira.com/v1/invoices/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"idempotencyKey": "<string>",
"invoiceDate": "2023-12-25",
"memo": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalCustomerId": "<string>",
"paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"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>",
"taxIdType": "cnpj",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
},
"billingAccount": {
"tradeName": "<string>",
"businessName": "<string>",
"emails": [
"jsmith@example.com"
],
"taxId": "<string>",
"taxIdType": "cnpj",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
},
"invoiceAllocationStrategy": "single",
"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": "erp_provider_not_supported",
"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",
"lineItemGroupId": "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
}
],
"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>",
"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
}
],
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}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.
Schema for creating a one-off invoice. Exactly one of customerId or externalCustomerId must be provided. When paymentAccountId is omitted or null, one of the customer payment accounts is used.
A unique idempotency key associated with the invoice.
1^[a-zA-Z0-9_-]+$The closing date of the invoice. It represents the end date of the period covered by the invoice.
The memo to attach to the invoice.
The unique identifier of the customer in our system that this invoice will be associated with.
The external identifier of the customer that this invoice will be associated with.
^[a-zA-Z0-9_-]+$The unique identifier of the payment account that will be used as the billing account. When omitted or null, one of the customer payment accounts is used.
Default Response
Show child attributes
Show child attributes
single, percent_split open, in_review, issued, synced, pending, paid, overdue, canceled, failed erp_provider_not_supported, omie_settings_not_found, no_contract_found_in_omie_for_contract_number, contract_sync_not_found, contract_without_processor_id, omie_mapping_basis_invalid, unexpected_error_on_invoice_sync, omie_service_mapping_not_found, omie_service_mappings_not_found_on_omie, omie_service_mapping_invalid, invoice_not_found, invoice_has_no_contract, unknown, payment_invoice_not_found, invoice_account_not_found, payment_account_not_found, insufficient_payment_amount, failed_to_upload_bank_slip, payment_unknown, null contract, one_off, import Show child attributes
Show child attributes