Customer
Access customer information in the Amili system. Customers represent individuals or organizations associated with cases and invoices, including their contact details and address information.
Customer endpoints
GET /customers- List all customers (paginated)GET /customers/{customerId}- Get a specific customer
See Case Registration and Invoice Registration for creating customers.
Example Request
Below is an example of retrieving a specific customer.
URL: GET /customers/cust_123456789
Headers:
x-api-key: {your_access_token}
Content-Type: application/jsonRequest Body: None (GET request)
Response Code: 200 OK
Response Body:
json
{
"_id": "cust_123456789",
"name": "Jane Doe",
"id_number": "202501012385",
"is_person": true,
"customer_number": "12345",
"address": {
"address_line_1": "Business Street 456",
"zip_code": "54321",
"city": "Gothenburg",
"country": "SE"
},
"mobile_number": "+46709876543",
"email": "jane.doe@domain.se",
"is_active": true,
"_created": "2025-01-01T10:00:00Z",
"_updated": "2025-01-01T10:00:00Z"
}Parameters
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | The unique identifier of the customer |
Query Parameters (Search)
| Name | Type | Required | Description |
|---|---|---|---|
id_number | string | No | Search by personal ID or organization number |
name | string | No | Search by customer name |
email | string | No | Search by email address |
Response Properties
| Property | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | Unique identifier for the customer |
_created | string | Yes | Creation timestamp |
_updated | string | Yes | Last update timestamp |
name | string | Yes | Customer's full name |
id_number | string | Yes | Personal ID or organization number |
is_person | boolean | Yes | Whether the customer is an individual |
customer_number | string | No | Customer's reference number |
address | object | Yes | Customer's address information |
mobile_number | string | No | Contact phone number |
email | string | No | Contact email address |
is_active | boolean | Yes | Whether the customer is active |
Address Properties
| Property | Type | Required | Description |
|---|---|---|---|
address_line_1 | string | Yes | Primary address line |
zip_code | string | Yes | Postal code |
city | string | Yes | City name |
country | string | Yes | Country code in ISO 3166-1 alpha-2 format (e.g. "SE")* |
*) For complete list of values and details, please see Customer
