Customer API
Overview
The WMS Customers API is a Business Central API page designed to manage customer data. This API allows external systems to interact with customer records, providing functionality for creating, reading, and updating customer information.
API Details
- Publisher: smart
- API Group: wms
- API Version: v2.0
- Entity Name: customer
- Entity Set Name: customers
- Source Table: Customer
- ODataKeyFields: No
Fields
The following fields are exposed in the API:
| Field Name | Source Field | Required | Description |
|---|---|---|---|
No | Customer."No." | Yes | Unique identifier for the customer. |
Name | Customer.Name | Yes | Name of the customer. |
GenBusPostingGroup | Customer."Gen. Bus. Posting Group" | No | General business posting group. |
VatBusPostingGroup | Customer."VAT Bus. Posting Group" | No | VAT business posting group. |
CustomerPostingGroup | Customer."Customer Posting Group" | No | Customer posting group. |
Notes
- The WMS Connector Setup record must exist; otherwise, a customer cannot be created through the API.
- When a customer is created, the template from the Customer Template field of the WMS Connector Setup page fills only the posting groups that are not specified in the request. The Combine Whse. Shipments value is always taken from the template. If the template is not specified or does not exist, the customer is created without it.
- The template is not applied when a customer is updated.
Example Usage
Create a New Customer
POST host/instance/api/smart/wms/v2.0/companies(companyId)/customers
Content-Type: application/json
{
"No": "CUST001",
"Name": "Sample Customer",
"GenBusPostingGroup": "DOMESTIC",
"VatBusPostingGroup": "STANDARD",
"CustomerPostingGroup": "RETAIL"
}
Retrieve a Customer
GET host/instance/api/smart/wms/v2.0/companies(companyId)/customers('CUST001')
Update a Customer
PATCH /host/instance/api/smart/wms/v2.0/companies(companyId)/customers('CUST001')
Content-Type: application/json
{
"Name": "Updated Customer Name"
}