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

Format

Description


systemId

string

uuid


non-editable

number

string 

max 20

Field “No.”, the unique id of vendor.

Record ID

primary key

name

string

max 100


mandatory

name2

string

max 50


optional

addressLine1

string

max 100


optional

addressLine2

string

max 50


optional

postalCode

string

max 20


optional

city

string

max 30


optional

state

string

max 30

Field “County”

optional

country

string

max 20

(ISO Code)

optional

contact

string

max 100


optional

email

string

max 80


optional

purchaserCode

string

max 20


optional

genBusPostingGroup

string

max 10


mandatory

vendorPostingGroup

string

max 20


mandatory

currencyCode

string

max 10

(ISO 4217)

optional

payToVendorId

string

uuid


optional

payToVendorNo

string

max 20


optional

pricesIncludingVat

boolean



optional

blocked

string

enum


optional

paymentMethodCode

string

max 10


recommended

paymentTermsCode

string

max 10


recommended

vendorType

string

enum

Options: (blank), Carrier, Producer, Trader

optional

bcTiInvoicing

bolean

max 10


optional

socialSecurityNumber

string

max 10


optional

certificationProcess

string

enum

Options:


optional

lastModified

string

date-time


non-editable


Example Object

An example of one object :

JSON
{
    "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)",
}