Edara API v3

Edara API v3: Customers

Read the guide first: authentication, paging, errors, rate limits and the shared PagedResult, BatchResult and *Reference shapes.

Endpoints

GET /v3/customers: Lists customers.

Operation GetCustomers · permission read:customer

Query string: GetCustomersQuery

field type default validation description
offset int? 0 >= 0 Number of items to skip before returning results. Defaults to 0.
limit int? 100 1..1000 (out of range → 400) Maximum number of items to return. Defaults to 100, maximum 1000.
code string MaximumLength(50) CONTAINS filter on code.
name string MaximumLength(250) CONTAINS filter on name.
phone string MaximumLength(50) CONTAINS filter on primary phone.
mobile string MaximumLength(50) CONTAINS filter on mobile.
email string MaximumLength(250) CONTAINS filter on email.
externalId string MaximumLength(50) CONTAINS filter on external id.
updateDate DateTime? Returns records modified on or after this date (UTC, inclusive).
search string Free-text search across name/code/phone/mobile/email. Takes precedence over individual filters.

Responses: OK PagedResult<CustomerResponse>: Paged list of customers.

Notes


GET /v3/customers/{id}: Gets a customer by id.

Operation GetCustomerById · permission read:customer

Parameters

name in type default description
id route int The customer id.

Responses: OK CustomerResponse: The customer.

Notes


GET /v3/customers/{id}/addresses: Gets customer addresses by id.

Operation GetCustomerAddresses · permission read:customer

Parameters

name in type default description
id route int The customer id.

Responses: OK IReadOnlyCollection<CustomerAddressWithLocationResponse>: Customer addresses.

Notes


GET /v3/customers/{id}/balance: Gets a customer balance by id.

Operation GetCustomerBalance · permission read:customer

Parameters

name in type default description
id route int The customer id.

Responses: OK decimal: Customer balance.

Notes


GET /v3/customers/{id}/invoiceable-documents: Lists invoiceable source documents for a customer.

Operation GetInvoiceableDocuments · permission read:customer

Parameters

name in type default description
id route int The customer id.

Query string: GetInvoiceableDocumentsQuery

field type default validation description
offset int? 0 >= 0 Number of items to skip before returning results. Defaults to 0.
limit int? 100 1..1000 (out of range → 400); NotNull(); InclusiveBetween(1, 20) .When(x => x.Limit.HasValue) Maximum number of items to return. Defaults to 100, maximum 1000.
documentTypes List<string> new List() NotEmpty(); each: Must(type => SupportedDocumentTypes.Contains(type ?? string.Empty)) The source document types to include. Supported values: SO, SR, IO, RR.
(object rule) private static readonly HashSet SupportedDocumentTypes = new HashSet(StringComparer.OrdinalIgnoreCase) { "SO", "SR", "IO", "RR" }

Responses: OK PagedResult<InvoiceableDocumentResponse>: Paged list of invoiceable documents.

Notes


POST /v3/customers: Creates a customer.

Operation CreateCustomer · permission create:customer

Body: CustomerUpsertRequest

field type default validation description
id int? Customer id. Required for batch update; ignored on create.
code string MaximumLength(50) Business code (max 50). Required on create.
name string NotEmpty().MaximumLength(250) Display name (max 250). Required on create.
customerType CustomerType? Customer classification. Defaults to Consumer on create.
pricingType CustomerPricingType? Pricing strategy.
priceListId int? NotNull() .GreaterThan(0) .When(x => x.PricingType == CustomerPricingType.Custom) Price list id, used when PricingType is PriceList.
taxRegistrationId string MaximumLength(20) Tax registration id (max 20). May be required for business customers.
nationalId string MaximumLength(14) National identifier (max 14). May be required for consumer customers.
shippingTerm string Shipping terms (e.g. "FOB", "CIF").
insurance string Insurance terms or notes.
guarantee decimal? GreaterThanOrEqualTo(0) .When(x => x.Guarantee.HasValue) Optional guarantee amount.
creditLimit decimal? GreaterThanOrEqualTo(0) .When(x => x.CreditLimit.HasValue) Optional credit limit.
hasDiscount bool? Whether line discounts are allowed.
discountMandatory bool? Whether discount is mandatory.
discountFrom decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountFrom.HasValue) Minimum allowed discount percentage.
discountTo decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountTo.HasValue) Maximum allowed discount percentage.
paymentType CustomerPaymentType? Default payment type.
paymentMaxDueDays int? GreaterThanOrEqualTo(0) .When(x => x.PaymentMaxDueDays.HasValue) Maximum credit days allowed.
relatedAccountId int? Existing receivable account id. Mutually exclusive with RelatedAccountParentId.
relatedAccountParentId int? AR parent CoA node under which a new related account is created. Only used when "create AR with new customer" is on.
salesPersonId int? Optional sales person id assigned to the customer.
defaultForeignCurrencyId int? Default foreign-currency id.
externalId string MaximumLength(50) Optional external id (max 50). Must be unique across customers.
active bool? Whether the customer is active. Defaults to true on create.
contactPerson string MaximumLength(250) Primary contact person name.
contactCountryId int? Primary contact country id.
contactCityId int? Primary contact city id.
contactDistrictId int? Primary contact district id.
postalZipCode string MaximumLength(50) Primary contact postal / ZIP code.
phone string MaximumLength(50) Primary contact phone (max 50).
phone2 string MaximumLength(50) Secondary contact phone (max 50).
fax string MaximumLength(50) Fax number (max 50).
mobile string MaximumLength(50) Primary contact mobile (max 50). May be required (CustomerMobileRequired).
email string MaximumLength(250) Primary contact email (max 250). May be required (CustomerEmailRequired).
tags List<string> Customer tags.
addresses List<CustomerAddressUpsertRequest> each: SetValidator(new CustomerAddressUpsertRequestValidator()) Customer addresses to create or update.

Responses: Created CustomerResponse: Customer created.

Business errors (HTTP 409, match on errorCode):

Notes


POST /v3/customers/batch: Creates customers in batch.

Operation CreateCustomersBatch · permission create:customer

See CreateCustomer for the list of business errors that can be reported per item.

Body: IEnumerable<CustomerUpsertRequest> (JSON array)

field type default validation description
id int? Customer id. Required for batch update; ignored on create.
code string MaximumLength(50) Business code (max 50). Required on create.
name string NotEmpty().MaximumLength(250) Display name (max 250). Required on create.
customerType CustomerType? Customer classification. Defaults to Consumer on create.
pricingType CustomerPricingType? Pricing strategy.
priceListId int? NotNull() .GreaterThan(0) .When(x => x.PricingType == CustomerPricingType.Custom) Price list id, used when PricingType is PriceList.
taxRegistrationId string MaximumLength(20) Tax registration id (max 20). May be required for business customers.
nationalId string MaximumLength(14) National identifier (max 14). May be required for consumer customers.
shippingTerm string Shipping terms (e.g. "FOB", "CIF").
insurance string Insurance terms or notes.
guarantee decimal? GreaterThanOrEqualTo(0) .When(x => x.Guarantee.HasValue) Optional guarantee amount.
creditLimit decimal? GreaterThanOrEqualTo(0) .When(x => x.CreditLimit.HasValue) Optional credit limit.
hasDiscount bool? Whether line discounts are allowed.
discountMandatory bool? Whether discount is mandatory.
discountFrom decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountFrom.HasValue) Minimum allowed discount percentage.
discountTo decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountTo.HasValue) Maximum allowed discount percentage.
paymentType CustomerPaymentType? Default payment type.
paymentMaxDueDays int? GreaterThanOrEqualTo(0) .When(x => x.PaymentMaxDueDays.HasValue) Maximum credit days allowed.
relatedAccountId int? Existing receivable account id. Mutually exclusive with RelatedAccountParentId.
relatedAccountParentId int? AR parent CoA node under which a new related account is created. Only used when "create AR with new customer" is on.
salesPersonId int? Optional sales person id assigned to the customer.
defaultForeignCurrencyId int? Default foreign-currency id.
externalId string MaximumLength(50) Optional external id (max 50). Must be unique across customers.
active bool? Whether the customer is active. Defaults to true on create.
contactPerson string MaximumLength(250) Primary contact person name.
contactCountryId int? Primary contact country id.
contactCityId int? Primary contact city id.
contactDistrictId int? Primary contact district id.
postalZipCode string MaximumLength(50) Primary contact postal / ZIP code.
phone string MaximumLength(50) Primary contact phone (max 50).
phone2 string MaximumLength(50) Secondary contact phone (max 50).
fax string MaximumLength(50) Fax number (max 50).
mobile string MaximumLength(50) Primary contact mobile (max 50). May be required (CustomerMobileRequired).
email string MaximumLength(250) Primary contact email (max 250). May be required (CustomerEmailRequired).
tags List<string> Customer tags.
addresses List<CustomerAddressUpsertRequest> each: SetValidator(new CustomerAddressUpsertRequestValidator()) Customer addresses to create or update.

Responses: OK BatchResult<CustomerResponse>: Batch insert result.

Business errors (HTTP 409, match on errorCode):

Notes


POST /v3/customers/find-by-ids: Finds customers by ids.

Operation FindCustomersByIds · permission read:customer

Body: IEnumerable<int> (JSON array)

Responses: OK IReadOnlyCollection<CustomerResponse>: Matched customers.

Notes


POST /v3/customers/find-by-external-ids: Finds customers by external ids.

Operation FindCustomersByExternalIds · permission read:customer

Body: IEnumerable<string> (JSON array)

Responses: OK IReadOnlyCollection<CustomerResponse>: Matched customers.

Notes


PUT /v3/customers/{id}: Updates a customer by id.

Operation UpdateCustomerById · permission update:customer

Parameters

name in type default description
id route int The customer id.

Body: CustomerUpsertRequest

field type default validation description
id int? Customer id. Required for batch update; ignored on create.
code string MaximumLength(50) Business code (max 50). Required on create.
name string NotEmpty().MaximumLength(250) Display name (max 250). Required on create.
customerType CustomerType? Customer classification. Defaults to Consumer on create.
pricingType CustomerPricingType? Pricing strategy.
priceListId int? NotNull() .GreaterThan(0) .When(x => x.PricingType == CustomerPricingType.Custom) Price list id, used when PricingType is PriceList.
taxRegistrationId string MaximumLength(20) Tax registration id (max 20). May be required for business customers.
nationalId string MaximumLength(14) National identifier (max 14). May be required for consumer customers.
shippingTerm string Shipping terms (e.g. "FOB", "CIF").
insurance string Insurance terms or notes.
guarantee decimal? GreaterThanOrEqualTo(0) .When(x => x.Guarantee.HasValue) Optional guarantee amount.
creditLimit decimal? GreaterThanOrEqualTo(0) .When(x => x.CreditLimit.HasValue) Optional credit limit.
hasDiscount bool? Whether line discounts are allowed.
discountMandatory bool? Whether discount is mandatory.
discountFrom decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountFrom.HasValue) Minimum allowed discount percentage.
discountTo decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountTo.HasValue) Maximum allowed discount percentage.
paymentType CustomerPaymentType? Default payment type.
paymentMaxDueDays int? GreaterThanOrEqualTo(0) .When(x => x.PaymentMaxDueDays.HasValue) Maximum credit days allowed.
relatedAccountId int? Existing receivable account id. Mutually exclusive with RelatedAccountParentId.
relatedAccountParentId int? AR parent CoA node under which a new related account is created. Only used when "create AR with new customer" is on.
salesPersonId int? Optional sales person id assigned to the customer.
defaultForeignCurrencyId int? Default foreign-currency id.
externalId string MaximumLength(50) Optional external id (max 50). Must be unique across customers.
active bool? Whether the customer is active. Defaults to true on create.
contactPerson string MaximumLength(250) Primary contact person name.
contactCountryId int? Primary contact country id.
contactCityId int? Primary contact city id.
contactDistrictId int? Primary contact district id.
postalZipCode string MaximumLength(50) Primary contact postal / ZIP code.
phone string MaximumLength(50) Primary contact phone (max 50).
phone2 string MaximumLength(50) Secondary contact phone (max 50).
fax string MaximumLength(50) Fax number (max 50).
mobile string MaximumLength(50) Primary contact mobile (max 50). May be required (CustomerMobileRequired).
email string MaximumLength(250) Primary contact email (max 250). May be required (CustomerEmailRequired).
tags List<string> Customer tags.
addresses List<CustomerAddressUpsertRequest> each: SetValidator(new CustomerAddressUpsertRequestValidator()) Customer addresses to create or update.

Responses: OK CustomerResponse: The updated customer.

Business errors (HTTP 409, match on errorCode):

Notes


PUT /v3/customers/code/{code}: Updates a customer by code.

Operation UpdateCustomerByCode · permission update:customer

Parameters

name in type default description
code route string The customer code.

Body: CustomerUpsertRequest

field type default validation description
id int? Customer id. Required for batch update; ignored on create.
code string MaximumLength(50) Business code (max 50). Required on create.
name string NotEmpty().MaximumLength(250) Display name (max 250). Required on create.
customerType CustomerType? Customer classification. Defaults to Consumer on create.
pricingType CustomerPricingType? Pricing strategy.
priceListId int? NotNull() .GreaterThan(0) .When(x => x.PricingType == CustomerPricingType.Custom) Price list id, used when PricingType is PriceList.
taxRegistrationId string MaximumLength(20) Tax registration id (max 20). May be required for business customers.
nationalId string MaximumLength(14) National identifier (max 14). May be required for consumer customers.
shippingTerm string Shipping terms (e.g. "FOB", "CIF").
insurance string Insurance terms or notes.
guarantee decimal? GreaterThanOrEqualTo(0) .When(x => x.Guarantee.HasValue) Optional guarantee amount.
creditLimit decimal? GreaterThanOrEqualTo(0) .When(x => x.CreditLimit.HasValue) Optional credit limit.
hasDiscount bool? Whether line discounts are allowed.
discountMandatory bool? Whether discount is mandatory.
discountFrom decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountFrom.HasValue) Minimum allowed discount percentage.
discountTo decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountTo.HasValue) Maximum allowed discount percentage.
paymentType CustomerPaymentType? Default payment type.
paymentMaxDueDays int? GreaterThanOrEqualTo(0) .When(x => x.PaymentMaxDueDays.HasValue) Maximum credit days allowed.
relatedAccountId int? Existing receivable account id. Mutually exclusive with RelatedAccountParentId.
relatedAccountParentId int? AR parent CoA node under which a new related account is created. Only used when "create AR with new customer" is on.
salesPersonId int? Optional sales person id assigned to the customer.
defaultForeignCurrencyId int? Default foreign-currency id.
externalId string MaximumLength(50) Optional external id (max 50). Must be unique across customers.
active bool? Whether the customer is active. Defaults to true on create.
contactPerson string MaximumLength(250) Primary contact person name.
contactCountryId int? Primary contact country id.
contactCityId int? Primary contact city id.
contactDistrictId int? Primary contact district id.
postalZipCode string MaximumLength(50) Primary contact postal / ZIP code.
phone string MaximumLength(50) Primary contact phone (max 50).
phone2 string MaximumLength(50) Secondary contact phone (max 50).
fax string MaximumLength(50) Fax number (max 50).
mobile string MaximumLength(50) Primary contact mobile (max 50). May be required (CustomerMobileRequired).
email string MaximumLength(250) Primary contact email (max 250). May be required (CustomerEmailRequired).
tags List<string> Customer tags.
addresses List<CustomerAddressUpsertRequest> each: SetValidator(new CustomerAddressUpsertRequestValidator()) Customer addresses to create or update.

Responses: OK CustomerResponse: The updated customer.

Business errors (HTTP 409, match on errorCode):

Notes


PUT /v3/customers/batch/by-id: Updates customers in batch by id.

Operation BatchUpdateCustomersById · permission update:customer

Body: IEnumerable<CustomerUpsertRequest> (JSON array)

field type default validation description
id int? Customer id. Required for batch update; ignored on create.
code string MaximumLength(50) Business code (max 50). Required on create.
name string NotEmpty().MaximumLength(250) Display name (max 250). Required on create.
customerType CustomerType? Customer classification. Defaults to Consumer on create.
pricingType CustomerPricingType? Pricing strategy.
priceListId int? NotNull() .GreaterThan(0) .When(x => x.PricingType == CustomerPricingType.Custom) Price list id, used when PricingType is PriceList.
taxRegistrationId string MaximumLength(20) Tax registration id (max 20). May be required for business customers.
nationalId string MaximumLength(14) National identifier (max 14). May be required for consumer customers.
shippingTerm string Shipping terms (e.g. "FOB", "CIF").
insurance string Insurance terms or notes.
guarantee decimal? GreaterThanOrEqualTo(0) .When(x => x.Guarantee.HasValue) Optional guarantee amount.
creditLimit decimal? GreaterThanOrEqualTo(0) .When(x => x.CreditLimit.HasValue) Optional credit limit.
hasDiscount bool? Whether line discounts are allowed.
discountMandatory bool? Whether discount is mandatory.
discountFrom decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountFrom.HasValue) Minimum allowed discount percentage.
discountTo decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountTo.HasValue) Maximum allowed discount percentage.
paymentType CustomerPaymentType? Default payment type.
paymentMaxDueDays int? GreaterThanOrEqualTo(0) .When(x => x.PaymentMaxDueDays.HasValue) Maximum credit days allowed.
relatedAccountId int? Existing receivable account id. Mutually exclusive with RelatedAccountParentId.
relatedAccountParentId int? AR parent CoA node under which a new related account is created. Only used when "create AR with new customer" is on.
salesPersonId int? Optional sales person id assigned to the customer.
defaultForeignCurrencyId int? Default foreign-currency id.
externalId string MaximumLength(50) Optional external id (max 50). Must be unique across customers.
active bool? Whether the customer is active. Defaults to true on create.
contactPerson string MaximumLength(250) Primary contact person name.
contactCountryId int? Primary contact country id.
contactCityId int? Primary contact city id.
contactDistrictId int? Primary contact district id.
postalZipCode string MaximumLength(50) Primary contact postal / ZIP code.
phone string MaximumLength(50) Primary contact phone (max 50).
phone2 string MaximumLength(50) Secondary contact phone (max 50).
fax string MaximumLength(50) Fax number (max 50).
mobile string MaximumLength(50) Primary contact mobile (max 50). May be required (CustomerMobileRequired).
email string MaximumLength(250) Primary contact email (max 250). May be required (CustomerEmailRequired).
tags List<string> Customer tags.
addresses List<CustomerAddressUpsertRequest> each: SetValidator(new CustomerAddressUpsertRequestValidator()) Customer addresses to create or update.

Responses: OK BatchResult<CustomerResponse>: Batch update result.

Business errors (HTTP 409, match on errorCode):

Notes


PUT /v3/customers/batch/by-name: Updates customers in batch by name.

Operation BatchUpdateCustomersByName · permission update:customer

Body: IEnumerable<CustomerUpsertRequest> (JSON array)

field type default validation description
id int? Customer id. Required for batch update; ignored on create.
code string MaximumLength(50) Business code (max 50). Required on create.
name string NotEmpty().MaximumLength(250) Display name (max 250). Required on create.
customerType CustomerType? Customer classification. Defaults to Consumer on create.
pricingType CustomerPricingType? Pricing strategy.
priceListId int? NotNull() .GreaterThan(0) .When(x => x.PricingType == CustomerPricingType.Custom) Price list id, used when PricingType is PriceList.
taxRegistrationId string MaximumLength(20) Tax registration id (max 20). May be required for business customers.
nationalId string MaximumLength(14) National identifier (max 14). May be required for consumer customers.
shippingTerm string Shipping terms (e.g. "FOB", "CIF").
insurance string Insurance terms or notes.
guarantee decimal? GreaterThanOrEqualTo(0) .When(x => x.Guarantee.HasValue) Optional guarantee amount.
creditLimit decimal? GreaterThanOrEqualTo(0) .When(x => x.CreditLimit.HasValue) Optional credit limit.
hasDiscount bool? Whether line discounts are allowed.
discountMandatory bool? Whether discount is mandatory.
discountFrom decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountFrom.HasValue) Minimum allowed discount percentage.
discountTo decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountTo.HasValue) Maximum allowed discount percentage.
paymentType CustomerPaymentType? Default payment type.
paymentMaxDueDays int? GreaterThanOrEqualTo(0) .When(x => x.PaymentMaxDueDays.HasValue) Maximum credit days allowed.
relatedAccountId int? Existing receivable account id. Mutually exclusive with RelatedAccountParentId.
relatedAccountParentId int? AR parent CoA node under which a new related account is created. Only used when "create AR with new customer" is on.
salesPersonId int? Optional sales person id assigned to the customer.
defaultForeignCurrencyId int? Default foreign-currency id.
externalId string MaximumLength(50) Optional external id (max 50). Must be unique across customers.
active bool? Whether the customer is active. Defaults to true on create.
contactPerson string MaximumLength(250) Primary contact person name.
contactCountryId int? Primary contact country id.
contactCityId int? Primary contact city id.
contactDistrictId int? Primary contact district id.
postalZipCode string MaximumLength(50) Primary contact postal / ZIP code.
phone string MaximumLength(50) Primary contact phone (max 50).
phone2 string MaximumLength(50) Secondary contact phone (max 50).
fax string MaximumLength(50) Fax number (max 50).
mobile string MaximumLength(50) Primary contact mobile (max 50). May be required (CustomerMobileRequired).
email string MaximumLength(250) Primary contact email (max 250). May be required (CustomerEmailRequired).
tags List<string> Customer tags.
addresses List<CustomerAddressUpsertRequest> each: SetValidator(new CustomerAddressUpsertRequestValidator()) Customer addresses to create or update.

Responses: OK BatchResult<CustomerResponse>: Batch update result.

Business errors (HTTP 409, match on errorCode):

Notes


PUT /v3/customers/batch/by-code: Updates customers in batch by code.

Operation BatchUpdateCustomersByCode · permission update:customer

Body: IEnumerable<CustomerUpsertRequest> (JSON array)

field type default validation description
id int? Customer id. Required for batch update; ignored on create.
code string MaximumLength(50) Business code (max 50). Required on create.
name string NotEmpty().MaximumLength(250) Display name (max 250). Required on create.
customerType CustomerType? Customer classification. Defaults to Consumer on create.
pricingType CustomerPricingType? Pricing strategy.
priceListId int? NotNull() .GreaterThan(0) .When(x => x.PricingType == CustomerPricingType.Custom) Price list id, used when PricingType is PriceList.
taxRegistrationId string MaximumLength(20) Tax registration id (max 20). May be required for business customers.
nationalId string MaximumLength(14) National identifier (max 14). May be required for consumer customers.
shippingTerm string Shipping terms (e.g. "FOB", "CIF").
insurance string Insurance terms or notes.
guarantee decimal? GreaterThanOrEqualTo(0) .When(x => x.Guarantee.HasValue) Optional guarantee amount.
creditLimit decimal? GreaterThanOrEqualTo(0) .When(x => x.CreditLimit.HasValue) Optional credit limit.
hasDiscount bool? Whether line discounts are allowed.
discountMandatory bool? Whether discount is mandatory.
discountFrom decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountFrom.HasValue) Minimum allowed discount percentage.
discountTo decimal? GreaterThanOrEqualTo(0) .When(x => x.DiscountTo.HasValue) Maximum allowed discount percentage.
paymentType CustomerPaymentType? Default payment type.
paymentMaxDueDays int? GreaterThanOrEqualTo(0) .When(x => x.PaymentMaxDueDays.HasValue) Maximum credit days allowed.
relatedAccountId int? Existing receivable account id. Mutually exclusive with RelatedAccountParentId.
relatedAccountParentId int? AR parent CoA node under which a new related account is created. Only used when "create AR with new customer" is on.
salesPersonId int? Optional sales person id assigned to the customer.
defaultForeignCurrencyId int? Default foreign-currency id.
externalId string MaximumLength(50) Optional external id (max 50). Must be unique across customers.
active bool? Whether the customer is active. Defaults to true on create.
contactPerson string MaximumLength(250) Primary contact person name.
contactCountryId int? Primary contact country id.
contactCityId int? Primary contact city id.
contactDistrictId int? Primary contact district id.
postalZipCode string MaximumLength(50) Primary contact postal / ZIP code.
phone string MaximumLength(50) Primary contact phone (max 50).
phone2 string MaximumLength(50) Secondary contact phone (max 50).
fax string MaximumLength(50) Fax number (max 50).
mobile string MaximumLength(50) Primary contact mobile (max 50). May be required (CustomerMobileRequired).
email string MaximumLength(250) Primary contact email (max 250). May be required (CustomerEmailRequired).
tags List<string> Customer tags.
addresses List<CustomerAddressUpsertRequest> each: SetValidator(new CustomerAddressUpsertRequestValidator()) Customer addresses to create or update.

Responses: OK BatchResult<CustomerResponse>: Batch update result.

Business errors (HTTP 409, match on errorCode):

Notes


DELETE /v3/customers/{id}: Deletes a customer by id.

Operation DeleteCustomerById · permission delete:customer

Parameters

name in type default description
id route int The customer id.

Responses: NoContent: (not declared; read from the method body)

Business errors (HTTP 409, match on errorCode):

Notes


DELETE /v3/customers/code/{code}: Deletes a customer by code.

Operation DeleteCustomerByCode · permission delete:customer

Parameters

name in type default description
code route string The customer code.

Responses: NoContent: (not declared; read from the method body)

Business errors (HTTP 409, match on errorCode):

Notes


PATCH /v3/customers/{id}/deactivate: Deactivates a customer by id.

Operation DeactivateCustomerById · permission update:customer-status

Parameters

name in type default description
id route int The customer id.

Responses: OK: Customer deactivated.

Notes


PATCH /v3/customers/code/{code}/deactivate: Deactivates a customer by code.

Operation DeactivateCustomerByCode · permission update:customer-status

Parameters

name in type default description
code route string The customer code.

Responses: OK: Customer deactivated.

Notes

Types

AccountReference

Lightweight account reference (id + code + name).

field type description
id int The account id.
code string The account code.
name string The account name.

CityReference

Lightweight city reference (id + name).

field type description
id int The city id.
name string The city name.

CountryReference

Lightweight country reference (id + name).

field type description
id int The country id.
name string The country name.

CurrencyReference

Lightweight currency reference (id + ISO code + name).

field type description
id int The currency id.
code string The ISO 4217 currency code.
name string The currency name.

CustomerAddressResponse

Response describing a customer address.

field type description
id int Address identifier.
customerId int Owning customer identifier.
name string Address label.
countryId int Country identifier.
cityId int City identifier.
districtId int? District identifier, if any.
streetDescription string Street description (building number, floor, etc.).
description string Full printable address description.
isDefault bool Indicates whether this is the default address.
addressPhone string Address phone number.
externalId string External identifier for the address.

CustomerAddressUpsertRequest

Request to create or update a customer address.

field type validation description
id int? Existing address id. Null on create; required on update. Addresses absent from the request are deleted.
name string MaximumLength(250) Address label. Defaults to "{Country}, {City}" when empty.
countryId int? NotNull() Country identifier. Required.
cityId int? NotNull() City identifier. Required.
districtId int? Optional district identifier.
streetDescription string MaximumLength(500) Free-form street description.
isDefault bool Whether this is the customer's default address. Only one per customer; first is promoted if none set.
addressPhone string MaximumLength(50) Optional address phone number.
externalId string MaximumLength(50) Optional external identifier.

CustomerAddressWithLocationResponse

Response describing a customer address, including resolved location names.

field type description
id int Address identifier.
customerId int Owning customer identifier.
name string Address label.
country CountryReference Country reference.
city CityReference City reference.
district DistrictReference District reference, if any.
streetDescription string Street description (building number, floor, etc.).
description string Full printable address description.
isDefault bool Indicates whether this is the default address.
addressPhone string Address phone number.
externalId string External identifier for the address.

CustomerPaymentType

Customer default payment method.

Values (sent/returned as the name): Cash=0, Credit=1

CustomerPricingType

Customer pricing tier.

Values (sent/returned as the name): EndUser=0, Dealer=1, SuperDealer=2, Custom=3

CustomerResponse

Response describing a customer.

field type description
id int Customer identifier.
code string Customer business code.
name string Customer display name.
customerType CustomerType? Customer classification (Business / Consumer).
pricingType CustomerPricingType? Pricing strategy.
priceListId int? Identifier of the price list linked to this customer.
nationalId string National identifier.
taxRegistrationId string Tax registration identifier.
shippingTerm string Shipping terms applicable to the customer.
insurance string Insurance terms or notes.
guarantee decimal? Guarantee amount.
creditLimit decimal? Credit limit value.
hasDiscount bool? Indicates whether discounts are allowed.
discountMandatory bool? Indicates whether a discount is mandatory.
discountFrom decimal? Minimum discount percentage.
discountTo decimal? Maximum discount percentage.
paymentType CustomerPaymentType? Default payment type.
paymentMaxDueDays int? Maximum number of credit days allowed.
relatedAccount AccountReference Reference to the linked receivable account.
salesPerson SalesPersonReference Reference to the assigned sales person, if any.
defaultForeignCurrency CurrencyReference Default foreign currency reference, if any.
balance decimal? Current customer balance (read-only).
active bool? Indicates whether the customer is active.
externalId string External identifier.
contactPerson string Name of the primary contact person at the customer.
contactCountryId int? Country identifier of the primary contact address.
contactCityId int? City identifier of the primary contact address.
contactDistrictId int? District identifier of the primary contact address.
postalZipCode string Postal / ZIP code for the primary contact address.
phone string Primary contact phone number.
phone2 string Secondary contact phone number.
fax string Fax number.
mobile string Primary contact mobile number.
email string Primary contact email.
tags List<string> Tags associated with the customer.
addresses List<CustomerAddressResponse> Customer addresses.

CustomerType

Customer classification type.

Values (sent/returned as the name): Consumer=0, Business=1

DistrictReference

Lightweight district reference (id + name).

field type description
id int The district id.
name string The district name.

InvoiceableDocumentResponse

Response describing an invoiceable source document header (SO/SR/IO/RR).

field type description
code string The source document code.
type string The source document type.
date DateTime The document date.
customer string The customer name.
currency string The document currency code.
netTotal decimal The document net total. For IO/RR this is computed from Warehouse.WHWorkOrderDetails (SUM(Quantity * Value)).

SalesPersonReference

Lightweight sales-person reference (id + code + name).

field type description
id int The sales-person id.
code string The sales-person code.
name string The sales-person name.