Create or Update Vendor

This REST API is used to create new or update the existing vendor details in Uniware.

Tip

It is recommended to check out Notes for the reader. You might find this helpful as it contains Guidelines for using API references and Terminologies used here.

Basic Information

NAME DETAILS
Endpoint: /services/rest/v1/purchase/vendor/create Or /edit
Request Type: POST
Level: Facility
Scheme: HTTPS
Header (Content-Type): application/json
Header (Authorization): bearer {access-token}, Eg.: bearer b30f3aea-7978-49bb-9ea7-33eddfc80afa
Header (Facility): facility code as in Uniware (refer FAQs

Request Payload

{
   "vendor": {
      "code": "string",
      "name": "string",
      "pan": "string",
      "tin": "string",
      "cstNumber": "string",
      "stNumber": "string",
      "gstNumber": "string",
      "website": "string",
      "purchaseExpiryPeriod": 0,
      "acceptsCForm": true,
      "taxExempted": true,
      "enabled": true,
      "registeredDealer": true,
      "billingAddress":{
         "addressLine1":"fwa",
         "addressLine2":"r32",
         "countryCode":"IN",
         "pincode":"132132",
         "latitude": "string",
         "longitude": "string",
         "stateCode":"HR",
         "city":"ald",
         "phone":"3121321323"
      },
      "shippingAddress":{
         "addressLine1":"fwa",
         "addressLine2":"r32",
         "countryCode":"IN",
         "pincode":"132132",
         "latitude": "string",
         "longitude": "string",
         "stateCode":"HR",
         "city":"ald",
         "phone":"3121321323"
      },
      "partyContacts": [
   {
        "contactType": "PRIMARY",
        "name": "jojd doasj",
        "email": "fas@gmail.com",
        "phone": "142142424"
   }
    ],
      "customFieldValues": [
         {
            "name": "string",
            "value": "string"
         }
      ]
   }
}

Request Payload Details

LEVEL PARAMETER TYPE DESCRIPTION MANDATORY NOTES
1 vendor object Vendor details Yes -
1.1 code string Vendor code Yes Max chars: 45
1.2 name string Vendor name Yes Max chars: 100
1.3 pan string PAN no. No Max chars: 45
1.4 tin string TIN no. No Max chars: 45
1.5 cstNumber string CST no. No Max chars: 45
1.6 stNumber string ST no. No Max chars: 45
1.7 gstNumber string GST no. No Max chars: 15
1.8 website string website link No Max chars: 256
1.9 purchaseExpiryPeriod integer Purchase expiry period No -
1.10 acceptsCForm boolean true- if vendor accepts cform No -
1.11 taxExempted boolean true- if tax exempted No -
1.12 enabled boolean true- if enabled No -
1.13 registeredDealer boolean true- if a registered dealer No -
1.14 billingAddress object Billing address details Yes -
1.14.1 addressLine1 string Precise address of the customer Yes Max chars: 500
1.14.2 addressLine2 string Additional address information No Max chars: 500
1.14.3 city string City name Yes -
1.14.4 stateCode string State code Yes State Codes
1.14.5 countryCode string Country code not name No Country Codes
1.14.6 pincode string Area pincode Yes -
1.14.7 latitude string Additional address information No Eg: 4.40338,-2.7403
1.14.8 longitude string Additional address information No Eg: 4.40338,-2.7403
1.14.9 phone string Contact no. Yes -
1.15 shippingAddress object Shipping address details Yes -
1.15.1 addressLine1 string Precise address Yes Max chars: 500
1.15.2 addressLine2 string Additional address information No Max chars: 500
1.15.3 city string City name Yes -
1.15.4 stateCode string State code Yes State Codes
1.15.5 countryCode string Country code not name No Country Codes
1.15.6 pincode string Area pincode Yes -
1.15.7 latitude string Additional address information No Eg: 4.40338,-2.7403
1.15.8 longitude string Additional address information No Eg: 4.40338,-2.7403
1.15.9 phone string Contact no. Yes -
1.16 partyContacts object Party contact details No -
1.16.1 contactType string Contact type Yes PRIMARY
1.16.2 name string Party name Yes Max chars: 100
1.16.3 email string Party email ID Yes Max chars: 200
1.16.4 phone string Party Contact no. No -
1.17 customFieldValues list Custom field details No -
1.17.1 name string Custom field name Yes -
1.17.2 value string Custom field value No -

Response Payload

{
   "successful": true,
   "message": "string",
   "errors": [
      {
         "code": 0,
         "fieldName": "string",
         "description": "string",
         "message": "string",
         "errorParams": {
            "additionalProp1": {},
            "additionalProp2": {},
            "additionalProp3": {}
         }
      }
   ],
   "warnings": [
      {
         "code": 0,
         "message": "string",
         "description": "string"
      }
   ]
}

Response Payload Details

LEVEL PARAMETER TYPE DESCRIPTION NOTES
1 successful true Request success status -
2 message string Response message -
3 errors list List of errors (if any) -
3.1 code number Error code -
3.2 fieldName string Field with error -
3.3 description string Error description -
3.4 message string Error message -
3.5 errorParams object Parameters with error -
3.5.1 additionalProp1 object Parameter 1 with error -
3.5.2 additionalProp2 object Parameter 2 with error -
3.5.3 additionalProp3 object Parameter 3 with error -
4 warnings list List of warnings (if any) -
4.1 code number Warning code -
4.2 message string Warning message -
4.3 description string Warning description -

Error Codes

Refer Response Codes section to know about specific errors codes.

Unicommerce Website

Copyright © 2024 Unicommerce eSolutions Pvt. Ltd.