Supplier

This section covers the API endpoints to create, fetch, update the Supplier details.


POST/api/v1/supplier

Create Supplier

This endpoint is used to create a new supplier.

Request Parameters

NameTypeDescription
recordIdGuidId of the supplier to be updated
codestringCode of the supplier
namestringName of the supplier
emailstringEmail of the supplier
phoneNostringPhone number of the supplier
defaultLeadDaysintTime taken by the supplier to fulfill the product(in days)
typeintSupplier Types
currencyCodestringTrading currency for the transactions with Supplier
taxRegNostringTax registration number of the supplier
countryCodestringCountry code of the supplier
countrystringCountry of the supplier
taxInclusivebooleanWhether tax inclusive flag is true or false
statusbooleanWhether the supplier status is active or not
dropshipbooleanWhether the supplier offers dropship service or not
paymentTermCodestringPayment term code of the supplier
shipmentTermCodestringShipment term code of the supplier

Sample Request

Request

POST
/api/v1/supplier
curl --location --request POST '<api_url>/api/v1/supplier' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'\
--data '{
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"name": "string",
"email": "string",
"phoneNo": "string",
"defaultLeadDays": 0,
"type": 1,
"currencyCode": "string",
"taxRegNo": "string",
"countryCode": "string",
"country": "string",
"taxInclusive": true,
"status": true,
"dropship": true,
"paymentTermCode": "string",
"shipmentTermCode": "string"
}'

Response Model

Response

{
"statusCode": 200,
"status": "OK",
"error": null,
"errorId": null,
"message": null,
"messageCode": "OK",
"result": [
  {
    "isValid": "true",
    "message": "",
    "messageCode": "string",
    "recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
]
}
NameTypeDescription
ResponseWrapper ModelThe global response wrapper object model
resultobjectContains the result object can be array of objects or specific object
result.isValidboolWhether the transaction was successful or failure, true - success, false - Failure
result.messagestringMessage to display on front end (if any) in case of errors/success
result.messageCodestringResponse message code
result.recordIdGuidRecord ID of the object updated / created


PUT/api/v1/supplier

Update Supplier

This endpoint is used to Update supplier details.

Request Parameters

NameTypeDescription
recordIdGuidId of the supplier to be updated
codestringCode of the supplier
namestringName of the supplier
emailstringEmail of the supplier
phoneNostringPhone number of the supplier
defaultLeadDaysintDefault lead days for product fulfillment by the supplier
typeintSupplier Types
currencyCodestringCurrency of supplier
taxRegNostringTax registration of the supplier
countryCodestringCountry code of Supplier
countrystringCountry of Supplier
taxInclusiveboolWhether tax inclusive flag is true or false
statusbooleanWhether the supplier status is active or not
dropshipbooleanWhether the supplier offers dropship service or not
paymentTermCodestringPayment term code of the supplier
shipmentTermCodestringShipment term code of the supplier
faxstringFax number of the supplier
websitestringWebsite of the supplier
poCreateTypeintType of PO Consolidation Process for the supplier
accountManagerIdGuidAccount manager Id of the supplier
accountManagerEmailstringAccount manager Email of the supplier
accountManagerstringAccount manager name of the supplier

Sample Request

Request

PUT
/api/v1/supplier
curl --location --request PUT '<api_url>/api/v1/supplier' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{api-key}}'\
--data '{
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"name": "string",
"email": "string",
"phoneNo": "string",
"defaultLeadDays": 0,
"type": 1,
"currencyCode": "string",
"taxRegNo": "string",
"countryCode": "string",
"country": "string",
"taxInclusive": true,
"status": true,
"dropship": true,
"paymentTermCode": "string",
"shipmentTermCode": "string",
"fax": "string",
"website": "string",
"poCreateType": 0,
"accountManagerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"accountManagerEmail": "string",
"accountManager": "string"
}'

Response Model

Response

{
    "statusCode": 200,
    "status": "OK",
    "error": null,
    "errorId": null,
    "message": null,
    "messageCode": "OK",
    "result": [
      {
        "isValid": "true",
        "message": "",
        "messageCode": "string",
        "recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      }
    ]
}
NameTypeDescription
statusstringHolds the status name related to the status code
errorstringDetails of the error, if any
errorIdstringError code, if any
messagestringError Message ,if any
messageCodestringResponse message code
totalRecordsintTotal Number of products in result set
resultobjectContains the result object can be array of objects or specific object
result.isValidboolWhether the transaction was successful or failure, true - success, false - Failure
result.messagestringMessage to display on front end (if any) in case of errors/success
result.messageCodestringResponse message code
result.recordIdGuidRecord ID of the object updated / created