Create Customer

This REST API is used to create customer(s) in Uniware. This is generally useful for B2B channels as they have limited and regular customers. This is also useful in cases where a store/fulfillment center caters to the orders from a particular customer only. In such cases the store/fulfillment center is mapped to that customer and all the orders from that customer are then auto-assigned to the respective store/fulfillment centre.

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/oms/customer/create
Request Type: POST
Level: Tenant
Scheme: HTTPS
Header (Content-Type): application/json
Header (Authorization): bearer {access-token}, Eg.: bearer b30f3aea-7978-49bb-9ea7-33eddfc80afa

Request Payload

{
   "customer": {
      "name": "string",
      "code": "string",
      "alternateCode": "string",
      "pan": "string",
      "tin": "string",
      "cinNumber": "string",
      "cstNumber": "string",
      "stNumber": "string",
      "gstNumber": "string",
      "enabled": true,
      "taxExempted": true,
      "website": "string",
      "registeredDealer": true,
      "binaryObjectId": 0,
      "signatureBinaryObjectId": 0,
      "uniwareAccessUrl": "string",
      "uniwareApiUser": "string",
      "uniwareApiPassword": "string",
      "billingAddress": {
         "addressLine1": "string",
         "addressLine2": "string",
         "city": "string",
         "stateCode": "string",
         "countryCode": "string",
         "partyCode": "string",
         "addressType": "string",
         "pincode": "string",
         "phone": "string"
      },
      "shippingAddress": {
         "addressLine1": "string",
         "addressLine2": "string",
         "city": "string",
         "stateCode": "string",
         "countryCode": "string",
         "partyCode": "string",
         "addressType": "string",
         "pincode": "string",
         "phone": "string"
      },
      "partyContacts": [
         {
            "contactType": "string",
            "partyCode": "string",
            "name": "string",
            "email": "string",
            "phone": "string",
            "fax": "string"
         }
      ],
      "providesCform": true,
      "dualCompanyRetail": true
   }
}

Request Payload Details

LEVEL PARAMETER TYPE DESCRIPTION MANDATORY NOTES
1 customer object Customer details Yes -
1.1 name string Customer name No Max chars: 100
1.2 code string Customer code Yes Max chars: 45, pattern: ^[a-zA-Z0-9-_]+$
1.3 alternateCode string Customer alternate code No Max chars: 45, pattern: ^[a-zA-Z0-9-_]+$
1.4 pan string PAN no. No Max chars: 45
1.5 tin string TIN no. No Max chars: 45
1.6 cinNumber string CIN no. No Max chars: 45
1.7 cstNumber string CST no. No Max chars: 45
1.8 stNumber string ST no. No Max chars: 45
1.9 gstNumber string GST no. No Max chars: 15
1.10 enabled boolean true if enabled No -
1.11 taxExempted boolean true if tax exempted No -
1.12 website string website link No Max chars: 256
1.13 registeredDealer boolean true if a registered dealer No -
1.14 binaryObjectId integer Binary object ID No -
1.15 signatureBinaryObjectId integer Signature binary object ID No -
1.16 uniwareAccessUrl string Uniware access url No -
1.17 uniwareApiUser string Uniware api user No -
1.18 uniwareApiPassword string Uniware api password No -
1.19 billingAddress object Billing address details No -
1.19.1 addressLine1 string Precise address of the customer Yes Max chars: 500
1.19.2 addressLine2 string Additional address information No Max chars: 500
1.19.3 city string City name Yes Max chars: 100
1.19.4 stateCode string State code Yes State Codes
1.19.5 countryCode string Country code not name No Country Codes
1.19.6 partyCode string Party code Yes -
1.19.7 addressType string Address type Yes -
1.19.8 pincode string Area pincode (min. 6 digits) Yes -
1.19.9 phone string Contact no. Yes -
1.20 shippingAddress object Shipping address details No -
1.20.1 addressLine1 string Precise address Yes Max chars: 500
1.20.2 addressLine2 string Additional address information No Max chars: 500
1.20.3 city string City name Yes Max chars: 100
1.20.4 stateCode string State code Yes State Codes
1.20.5 countryCode string Country code not name No Country Codes
1.20.6 partyCode string Party code Yes -
1.20.7 addressType string Address type Yes -
1.20.8 pincode string Area pincode (min. 6 digits) Yes -
1.20.9 phone string Contact no. Yes -
1.21 partyContacts list Party contact details No -
1.21.1 contactType string Contact type Yes -
1.21.2 partyCode string Party code Yes -
1.21.3 name string Party name Yes Max chars: 45
1.21.4 email string Party email ID Yes Max chars: 200
1.21.5 phone string Party Contact no. No -
1.21.6 fax string Party fax no. No -
1.22 providesCform boolean true if provides cform No -
1.23 dualCompanyRetail boolean true if dual company retail 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"
      }
   ],
   "customer": {
      "name": "string",
      "code": "string",
      "alternateCode": "string",
      "pan": "string",
      "tin": "string",
      "cstNumber": "string",
      "cinNumber": "string",
      "gstNumber": "string",
      "stNumber": "string",
      "enabled": true,
      "taxExempted": true,
      "website": "string",
      "registeredDealer": true,
      "logoUrl": "string",
      "signatureUrl": "string",
      "uniwareAccessUrl": "string",
      "uniwareApiUser": "string",
      "uniwareApiPassword": "string",
      "billingAddress": {
         "addressType": "string",
         "addressTypeName": "string",
         "stateCode": "string",
         "stateName": "string",
         "countryCode": "string",
         "addressLine1": "string",
         "addressLine2": "string",
         "city": "string",
         "pincode": "string",
         "phone": "string",
         "enabled": true
      },
      "shippingAddress": {
         "addressType": "string",
         "addressTypeName": "string",
         "stateCode": "string",
         "stateName": "string",
         "countryCode": "string",
         "addressLine1": "string",
         "addressLine2": "string",
         "city": "string",
         "pincode": "string",
         "phone": "string",
         "enabled": true
      },
      "partyContacts": {
         "additionalProp1": {
            "contactType": "string",
            "contactTypeName": "string",
            "name": "string",
            "email": "string",
            "phone": "string",
            "fax": "string"
         },
         "additionalProp2": {
            "contactType": "string",
            "contactTypeName": "string",
            "name": "string",
            "email": "string",
            "phone": "string",
            "fax": "string"
         },
         "additionalProp3": {
            "contactType": "string",
            "contactTypeName": "string",
            "name": "string",
            "email": "string",
            "phone": "string",
            "fax": "string"
         }
      },
      "providesCform": true,
      "dualCompanyRetail": true
   }
}

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 -
5 customer object Customer details -
5.1 name string Customer name -
5.2 code string Customer code -
5.3 alternateCode string Customer alternate code -
5.4 pan string PAN no. Max chars: 45
5.5 tin string TIN no. Max chars: 45
5.6 cstNumber string CST no. Max chars: 45
5.7 cinNumber string CIN number Max chars: 45
5.8 gstNumber string GST no. Max chars: 15
5.9 stNumber string ST no. Max chars: 45
5.10 enabled boolean true if enabled -
5.11 taxExempted boolean true if tax exempted -
5.12 website string website link Max chars: 256
5.13 registeredDealer boolean true if a registered dealer -
5.14 logoUrl string Logo URL -
5.15 signatureUrl string Signature URL -
5.16 uniwareAccessUrl string Uniware access url -
5.17 uniwareApiUser string Uniware api user -
5.18 uniwareApiPassword string Uniware api password -
5.19 billingAddress object Billing address details -
5.19.1 addressType string Address type -
5.19.2 addressTypeName string Address type name -
5.19.3 stateCode string State code State Codes
5.19.4 stateName string State name -
5.19.5 countryCode string Country code not name Country Codes
5.19.6 addressLine1 string Precise address Max chars: 500
5.19.7 addressLine2 string Additional address information Max chars: 500
5.19.8 city string City name Eg: Surat, Max. chars: 100
5.19.9 pincode string Area pincode (min. 6 digits) Max chars: 45
5.19.10 phone string Contact no. -
5.19.11 enabled boolean true if enabled -
5.20 shippingAddress object Shipping address details -
5.20.1 addressType string Address type -
5.20.2 addressTypeName string Address type name -
5.20.3 stateCode string State code State Codes
5.20.4 stateName string State name -
5.20.5 countryCode string Country code not name Country Codes
5.20.6 addressLine1 string Precise address Max chars: 500
5.20.7 addressLine2 string Additional address information Max chars: 500
5.20.8 city string City name Eg: Surat, Max. chars: 100
5.20.9 pincode string Area pincode (min. 6 digits) Max chars: 45
5.20.10 phone string Contact no. -
5.20.11 enabled boolean true if enabled -
5.21 partyContacts object Party contact details -
5.21.1 additionalProp1 object Parameter 1 with error -
5.21.1.1 contactType string Contact type -
5.21.1.2 contactTypeName string Contact type name -
5.21.1.3 name string Name -
5.21.1.4 email string Email ID -
5.21.1.5 phone string Contact no. -
5.21.1.6 fax string Fax no. -
5.21.2 additionalProp2 object Parameter 2 with error -
5.21.2.1 contactType string Contact type -
5.21.2.2 contactTypeName string Contact type name -
5.21.2.3 name string Name -
5.21.2.4 email string Email ID -
5.21.2.5 phone string Contact no. -
5.21.2.6 fax string Fax no. -
5.21.3 additionalProp3 object Parameter 3 with error -
5.21.3.1 contactType string Contact type -
5.21.3.2 contactTypeName string Contact type name -
5.21.3.3 name string Name -
5.21.3.4 email string Email ID -
5.21.3.5 phone string Contact no. -
5.21.3.6 fax string Fax no. -
5.22 providesCform boolean true if provides cform -
5.23 dualCompanyRetail boolean true if dual company retail -

Error Codes

Refer Response Codes section to know about specific errors codes.

Unicommerce Website

Copyright © 2022 Unicommerce eSolutions Pvt. Ltd.