curl --request POST \
--url https://api.useaira.com/v1/customers/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"externalId": "705faf65-9c8b-4053-8c0b-2021281ce83f",
"name": "Acme Inc.",
"parentCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"type": "individual"
}
'{
"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"
]
}
}Creates a new customer. Handles individual customers, organizations and subsidiaries (filiais) via the type field — subsidiaries require parentCustomerId pointing to an organization. Optionally accepts a paymentAccount payload to create the associated legal entity and payment account in the same transaction.
curl --request POST \
--url https://api.useaira.com/v1/customers/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"externalId": "705faf65-9c8b-4053-8c0b-2021281ce83f",
"name": "Acme Inc.",
"parentCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"type": "individual"
}
'{
"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"
]
}
}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 representing a customer.
An optional external identifier of the customer from the external system, used throughout the system to identify the customer. This field can not be updated.
^[a-zA-Z0-9_-]+$"705faf65-9c8b-4053-8c0b-2021281ce83f"
The name of the customer.
"Acme Inc."
Parent customer ID when customer is a subsidiary.
Custom fields that can be associated with the entity. The fields must be previously created in the system before they can be used.
Show child attributes
{
"customField1": "value1",
"customField2": ["value2", "value3"]
}Customer type in organizations hierarchy.
individual, organization, subsidiary "individual"
Optional payment account to create together with the customer. When provided, a legal entity is created and linked to the customer in the same transaction.
Show child attributes
Schema representing a customer.
The unique identifier of the customer in our system.
An optional external identifier of the customer from the external system, used throughout the system to identify the customer. This field can not be updated.
^[a-zA-Z0-9_-]+$"705faf65-9c8b-4053-8c0b-2021281ce83f"
The name of the customer.
"Acme Inc."
Customer type in organizations hierarchy.
individual, organization, subsidiary "individual"
The prefix of the customer's invoices. This is generated by the system and cannot be updated.
"ACMEI"
Parent customer ID when customer is a subsidiary.
Archive timestamp for customers that were archived.
Custom fields that can be associated with the entity. The fields must be previously created in the system before they can be used.
Show child attributes
{
"customField1": "value1",
"customField2": ["value2", "value3"]
}