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
| Name | Type | Description |
|---|---|---|
| recordId | Guid | Id of the supplier to be updated |
| code | string | Code of the supplier |
| name | string | Name of the supplier |
| string | Email of the supplier | |
| phoneNo | string | Phone number of the supplier |
| defaultLeadDays | int | Time taken by the supplier to fulfill the product(in days) |
| type | int | Supplier Types |
| currencyCode | string | Trading currency for the transactions with Supplier |
| taxRegNo | string | Tax registration number of the supplier |
| countryCode | string | Country code of the supplier |
| country | string | Country of the supplier |
| taxInclusive | boolean | Whether tax inclusive flag is true or false |
| status | boolean | Whether the supplier status is active or not |
| dropship | boolean | Whether the supplier offers dropship service or not |
| paymentTermCode | string | Payment term code of the supplier |
| shipmentTermCode | string | Shipment term code of the supplier |
Sample Request
Request
POST
/api/v1/suppliercurl --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"
}
]
}
| Name | Type | Description |
|---|---|---|
| Response | Wrapper Model | The global response wrapper object model |
| result | object | Contains the result object can be array of objects or specific object |
| result.isValid | bool | Whether the transaction was successful or failure, true - success, false - Failure |
| result.message | string | Message to display on front end (if any) in case of errors/success |
| result.messageCode | string | Response message code |
| result.recordId | Guid | Record ID of the object updated / created |
PUT/api/v1/supplier
Update Supplier
This endpoint is used to Update supplier details.
Request Parameters
| Name | Type | Description |
|---|---|---|
| recordId | Guid | Id of the supplier to be updated |
| code | string | Code of the supplier |
| name | string | Name of the supplier |
| string | Email of the supplier | |
| phoneNo | string | Phone number of the supplier |
| defaultLeadDays | int | Default lead days for product fulfillment by the supplier |
| type | int | Supplier Types |
| currencyCode | string | Currency of supplier |
| taxRegNo | string | Tax registration of the supplier |
| countryCode | string | Country code of Supplier |
| country | string | Country of Supplier |
| taxInclusive | bool | Whether tax inclusive flag is true or false |
| status | boolean | Whether the supplier status is active or not |
| dropship | boolean | Whether the supplier offers dropship service or not |
| paymentTermCode | string | Payment term code of the supplier |
| shipmentTermCode | string | Shipment term code of the supplier |
| fax | string | Fax number of the supplier |
| website | string | Website of the supplier |
| poCreateType | int | Type of PO Consolidation Process for the supplier |
| accountManagerId | Guid | Account manager Id of the supplier |
| accountManagerEmail | string | Account manager Email of the supplier |
| accountManager | string | Account manager name of the supplier |
Sample Request
Request
PUT
/api/v1/suppliercurl --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"
}
]
}
| Name | Type | Description |
|---|---|---|
| status | string | Holds the status name related to the status code |
| error | string | Details of the error, if any |
| errorId | string | Error code, if any |
| message | string | Error Message ,if any |
| messageCode | string | Response message code |
| totalRecords | int | Total Number of products in result set |
| result | object | Contains the result object can be array of objects or specific object |
| result.isValid | bool | Whether the transaction was successful or failure, true - success, false - Failure |
| result.message | string | Message to display on front end (if any) in case of errors/success |
| result.messageCode | string | Response message code |
| result.recordId | Guid | Record ID of the object updated / created |