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