See the Queries page for a presentation of this resource.
CreateCustomer
CreateCustomerCreates a new customer record.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | CustomerInput! | All customer data. |
Example Query:
mutation CreateCustomer($input: CustomerInput!) {
CreateCustomer(input: $input) {
id
label
email
active
}
}UpdateCustomer
UpdateCustomerUpdates an existing customer record.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the customer. |
input | CustomerInput! | Updated fields. |
DeleteCustomer
DeleteCustomerDeletes a single customer.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | Customer ID. |
DeleteCustomers
DeleteCustomersDeletes multiple customers.
Parameters:
| Parameter | Type | Description |
|---|---|---|
ids | [ID!]! | List of customer IDs. |
DisableCustomer
DisableCustomerDeactivates a single customer (hidden from active lists).
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | Customer ID. |
DisableCustomers
DisableCustomersDeactivates multiple customers.
Parameters:
| Parameter | Type | Description |
|---|---|---|
ids | [ID!]! | List of customer IDs. |
EnableCustomer
EnableCustomerRe-activates a single customer.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | Customer ID. |
EnableCustomers
EnableCustomersRe-activates multiple customers.
Parameters:
| Parameter | Type | Description |
|---|---|---|
ids | [ID!]! | List of customer IDs. |
DuplicateCustomer
DuplicateCustomerCreates a copy of an existing customer.
ConvertCustomerType
ConvertCustomerTypeChanges the type of a single customer (Entreprise or Particulier).
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | Customer ID. |
customer_type | customerType! | New type: company or individual. |
ConvertCustomersType
ConvertCustomersTypeChanges the type of multiple customers at once.
Parameters:
| Parameter | Type | Description |
|---|---|---|
ids | [ID!]! | List of customer IDs. |
customer_type | customerType! | New type: company or individual. |
GenerateCustomerNumber
GenerateCustomerNumberGenerates the next available sequence number for a new customer.
CreateCustomerAddresses
CreateCustomerAddressesAdds one or several addresses to a customer. Each AddressInput must reference the customer through addressable_id; the addressable_type is automatically forced to Customer.
| Parameter | Type | Description |
|---|---|---|
input | [AddressInput]! | List of addresses to add. |
Example Query:
mutation CreateCustomerAddresses($input: [AddressInput!]!) {
CreateCustomerAddresses(input: $input) {
id
label
country
address_1
postal_code
city
type
default
}
}Example Variables:
{
"input": [
{
"label": "Paris Office",
"addressable_id": 123,
"country": "FR",
"address_1": "10 Rivoli Street",
"postal_code": "75001",
"city": "Paris",
"type": "billing",
"default": true
},
{
"label": "Lyon Warehouse",
"addressable_id": 123,
"country": "FR",
"address_1": "25 Foch Avenue",
"postal_code": "69006",
"city": "Lyon",
"type": "shipping"
}
]
}UpdateCustomerAddress
UpdateCustomerAddressUpdates an existing address linked to a customer. The resolver validates that the linked entity is a customer before updating.
| Parameter | Type | Description |
|---|---|---|
id | ID! | ID of the address to update. |
input | AddressInput! | Updated fields. |
Example Query:
mutation UpdateCustomerAddress($id: ID!, $input: AddressInput!) {
UpdateCustomerAddress(id: $id, input: $input) {
id
label
country
address_1
postal_code
city
type
default
}
}Example Variables:
{
"id": 501,
"input": {
"label": "Paris HQ",
"address_1": "12 Rivoli Street",
"postal_code": "75001",
"city": "Paris"
}
}DeleteCustomerAddress
DeleteCustomerAddressDeletes an address linked to a customer.
| Parameter | Type | Description |
|---|---|---|
id | ID! | ID of the address to delete. |
Example Query:
mutation DeleteCustomerAddress($id: ID!) {
DeleteCustomerAddress(id: $id)
}Example Variables:
{
"id": 501
}Input Data Types
CustomerInput
CustomerInput| Field | Type | Description |
|---|---|---|
id | Int | ID for updates. |
label | String | Customer name or company name. |
first_name | String | Primary contact first name. |
last_name | String | Primary contact last name. |
email | String | Primary email address. |
addresses | CustomerAddressInput | Initial addresses list. |
customer_number | String | Reference number. |
customer_type | CustomerType | Individual or Company. |
website | String | Website URL. |
phone | String | Phone number. |
status | String | Lifecycle status. |
notes | String | Public notes. |
private_message | String | Private internal notes. |
currency | CurrencyInput | Preferred currency. |
location_id | Int | Primary location ID. |
location | LocationInput | Location details. |
price_level_id | Int | Price level ID. |
price_level | PriceLevelInput | Price level data. |
account_representative_id | Int | Rep ID. |
account_representative | AccountRepresentativeInput | Rep data. |
tax_number | String | VAT/Tax ID. |
company_registration_number | String | Registration ID. |
payment_information_id | Int | Payment details link ID. |
payment_information | PaymentInformationInput | Payment details. |
discount | Float | Default discount %. |
minimum_order_amount | Float | Minimum order value. |
term_of_payment_days | Int | Payment term days. |
term_of_payment_type | TermModel | Term calculation logic. |
credit_limit | Float | Maximum allowed credit. |
location_id | Int | Default location ID. |
location | LocationInput | Default location data. |
language | String | Preferred language code. |
tax_type | TaxType | "exclusive" or "inclusive". |
tax_codes | [TaxCodeInput] | List of applied tax codes. |
customer_tags | [CustomerTagInput] | Segmentation labels. |
files | [FileInput] | Attachments. |
order_template | PdfTemplateInput | Default Order PDF design. |
shipping_order_template | PdfTemplateInput | Default Shipping PDF design. |
invoice_template | PdfTemplateInput | Default Invoice PDF design. |
product_return_template | PdfTemplateInput | Default Return PDF design. |
credit_note_template | PdfTemplateInput | Default Credit Note PDF design. |
refund_template | PdfTemplateInput | Default Refund PDF design. |
picking_list_template | PdfTemplateInput | Default Picking PDF design. |
estimate_template | PdfTemplateInput | Default Estimate PDF design. |
custom_fields | [EntityCustomFieldInput] | Custom fields for this entity. |
CustomerAddressInput
CustomerAddressInput| Field | Type | Description |
|---|---|---|
data | [AddressInput] | Array of initial addresses. |
Enums
CustomerType
CustomerType| Value |
|---|
company |
individual |
TermModel
TermModel| Value | Description |
|---|---|
net | Due after X days from document date. |
eom | Due at End of Month after X days. |
eom_first | Due at End of Month (first day focus). |
TaxType
TaxType| Value | Description |
|---|---|
exclusive | Tax calculated on top of the net price. |
inclusive | Tax included in the displayed price. |
