Skip to main content
PUT
/
v1
/
customers
/
{id}
Update customer
curl --request PUT \
  --url https://api.useaira.com/v1/customers/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "Acme Inc.",
  "externalId": "705faf65-9c8b-4053-8c0b-2021281ce83f",
  "customFields": {
    "customField1": "value1",
    "customField2": [
      "value2",
      "value3"
    ]
  }
}
'
{
  "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.

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

id
string<uuid>
required

The unique identifier of the customer in our system.

Body

application/json

Schema representing a customer.

name
string
required

The name of the customer.

Example:

"Acme Inc."

externalId
string

An optional external identifier of the customer from the external system, used throughout the system to identify the customer.

Pattern: ^[a-zA-Z0-9_-]+$
Example:

"705faf65-9c8b-4053-8c0b-2021281ce83f"

customFields
object

Custom fields that can be associated with the entity. The fields must be previously created in the system before they can be used.

Example:
{
"customField1": "value1",
"customField2": ["value2", "value3"]
}

Response

Schema representing a customer.

id
string<uuid>
required

The unique identifier of the customer in our system.

externalId
string
required

An optional external identifier of the customer from the external system, used throughout the system to identify the customer.

Pattern: ^[a-zA-Z0-9_-]+$
Example:

"705faf65-9c8b-4053-8c0b-2021281ce83f"

name
string
required

The name of the customer.

Example:

"Acme Inc."

type
enum<string>
required

Customer type in organizations hierarchy.

Available options:
individual,
organization,
subsidiary
Example:

"individual"

invoicePrefix
string

The prefix of the customer's invoices. This is generated by the system and cannot be updated.

Example:

"ACMEI"

parentCustomerId
null | string<uuid>

Parent customer ID when customer is a subsidiary.

archivedAt
null | string<date-time>

Archive timestamp for customers that were archived.

customFields
object

Custom fields that can be associated with the entity. The fields must be previously created in the system before they can be used.

Example:
{
"customField1": "value1",
"customField2": ["value2", "value3"]
}