Skip to main content
GET
/
v1
/
invoices
/
List invoices
curl --request GET \
  --url https://api.useaira.com/v1/invoices/ \
  --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>",
      "taxIdType": "cnpj",
      "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",
      "sendNotifications": true,
      "rateAdjustmentIndex": "none",
      "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>"
      }
    ],
    "plans": [
      {
        "id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "product": {
          "id": "<string>",
          "name": "<string>"
        },
        "totalAmount": 1
      }
    ],
    "status": "open",
    "processorId": "<string>"
  }
]

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Query Parameters

startDateFrom
string<date>

Filter invoices by the start date of the billing cycle. The date must be in ISO 8601 format.

startDateTo
string<date>

Filter invoices by the end date of the billing cycle. The date must be in ISO 8601 format.

endDateFrom
string<date>

Filter invoices by the end date of the billing cycle. The date must be in ISO 8601 format.

endDateTo
string<date>

Filter invoices by the end date of the billing cycle. The date must be in ISO 8601 format.

customerId
string

The internal unique identifier of the customer.

externalCustomerId
string

The external unique identifier of the customer provided by the tenant.

processor
string

The identifier of the external processor used for this invoice.

limit
number
default:100
required
Required range: 1 <= x <= 100
offset
number
default:0
Required range: x >= 0

Response

The request was successfully processed and the list of invoices is returned.

id
string<uuid>
required

The unique identifier of the invoice.

displayId
string
required

The human-readable identifier of the invoice.

customer
object
required

The customer associated with this invoice.

paymentAccount
object
required

The payment account used for this invoice.

contract
object
required

The contract associated with this invoice.

startDate
string<date>
required

The start date of the billing period.

endDate
string<date>
required

The end date of the billing period.

totalAmount
number
required

The total amount to be paid for this invoice.

Required range: x >= 0
closedReason
enum<string> | null
required

The reason why the billing cycle was closed.

Available options:
end_of_cycle,
billing_end_day_updated
payments
object[] | null
required

List of payments associated with this invoice.

plans
object[]
required

List of basic plan information associated with this invoice.

status
enum<string>
required

The current status of the invoice.

Available options:
open,
closed,
paid,
canceled
processorId
string | null
required

The identifier of the external processor used for this invoice.