Breadcrumbs

API - Vendors


Overview

The list page that contains the Vendors. Similar API does exist in the standard BC, but since there are some added Wisefish fields in the table, a new API was created.

Endpoint name

vendors

Source table

Vendor

Fixed view


Requests allowed

GET, POST, PATCH, DELETE

Primary key

“No.”

Record ID

vendorNo

Procedures



Data

Field List

Property

Type

Max Len

Description


systemId

string (UUID)



non-editable

vendorNo

string 

20

The unique id of this entry.

Record ID

primary key

name

string

100


mandatory

name2

string

50


optional

addressLine1

string

100


optional

addressLine2

string

50


optional

postalCode

string

20


optional

city

string

30


optional

state

string

30

Field “County”

optional

country

string (ISO code)

20


optional

contact

string

100


optional

email

string

80


optional

purchaserCode

string

20


optional

genBusPostingGroup

string

10


mandatory

vendorPostingGroup

string

20


mandatory

currencyCode

string (ISO 4217)

10


optional

payToVendorId

string (UUID)



optional

payToVendorNo

string

20


optional

pricesIncludingVat

boolean



optional

blocked

enum



optional

paymentMethodCode

string

10


recommended

paymentTermsCode

string

10


recommended

vendorType

enum


Options: (blank), Carrier, Producer, Trader

optional

bcTiInvoicing

bolean

10


optional

socialSecurityNumber

string

10


optional

certificationProcess

enum


Options:


optional

lastModified

string (datetime)



non-editable


Example Object

An example of one object :

JSON
{
    "@odata.etag": "W/\"JzIwOzE1ODYzOTkzOTc3MjUxMzk4ODg4MTswMDsn\"",
    "vendorNo": "01254796",
    "systemId": "44e719a5-dd11-ef11-9f8b-6045bde9cc61",
    "name": "Progressive Home Furnishings",
    "name2": "",
    "addressLine1": "222 Reagan Drive",
    "addressLine2": "",
    "postalCode": "US-SC 27136",
    "city": "Colombia",
    "state": "",
    "country": "US",
    "contact": "Mr. Michael Sean Ray",
    "email": "",
    "purchaserCode": "RB",
    "genBusPostingGroup": "EXPORT",
    "vendorPostingGroup": "FOREIGN",
    "currencyCode": "USD",
    "payToVendorId": "00000000-0000-0000-0000-000000000000",
    "payToVendorNo": "",
    "pricesIncludingVat": false,
    "blocked": "_x0020_",
    "paymentMethodCode": "",
    "paymentTermsCode": "CM",
    "vendorType": " ",
    "bcTiInvoicing": false,
    "socialSecurityNumber": "",
    "certificationProcess": "From Vendor's Stock Center",
    "lastModified": "2024-05-14T10:35:16.083Z"
}


Usage

Read all entries

GET
.../vendors

Read a specific entry

To read vendor number ‘01254796’:

GET
.../vendors('01254796')

 

Insert a Vendor

The API allows inserting, modifying and deleting entries. All same error handling applies as when the same is done within Business Central. Note that the fields marked “MANDATORY” in the list above are the fields that must be populated in order to post purchases on the vendor.

Example:

POST
.../vendors

Body:
{
    "vendorNo": "HL",
    "name": "Hannibal Lechter",
    "purchaserCode": "OF",
    "genBusPostingGroup": "EXPORT",
    "vendorPostingGroup": "FOREIGN",
    "currencyCode": "USD"
    "paymentTermsCode": "1M(8D)",
}