OVERVIEW
This REST API saves the Customer to the Orcanos system. If customer id is passed then it will update the existing customer else new customer will be created.
Method: Post
Input:
Authorization: Basic Auth token in the Request Headers
Post body:
Key | Value | Is Mandatory? | Description |
CustomerId | Integer | Yes | Enter the Existing customer-id, in case, leave 0 new customers will be created. |
ParentCustomerId |
Integer | Yes | Enter the Existing parent customer-id, in case, leave 0 a customer will be created in the root. |
CustomerName | String | No | Enter the Customer name |
Phone | String | No | Enter the Phone number of the customer |
String | No | Enter the Email of the customer | |
Country | String | No | Enter the Country of the customer |
State | String | No | Enter the State of the customer |
Address | String | No | Enter the Address of the customer |
Zipcode | String | No | Enter the Zipcode of the customer |
CustLogo | String | No | Enter the Customer logo |
GeneralDetails | String | No | Enter the General details of the customer. It is an HTML field. |
CustStatus | String | No | Enter the Customer status (empty or zero for the inactive and 1 for the active) |
{ "CustomerId": 0, "ParentCustomerId": 0, "CustomerName": "string", "Phone": "string", "Email": "string", "Country": "string", "State": "string", "Address": "string", "Zipcode": "string", "CustLogo": "string", "GeneralDetails": "string", "CustStatus": "string" }
Output:
Orcanos Output class:
{ " IsSuccess ": true, " Data ": { " CustomerId ": "44" } "Message": "", "HttpCode": 200 }
IsSuccess: if successful then true else false
Data: JSON object
CustomerId: Updated or Newly created customer id
Message: Error message in case IsSuccess is false
HttpCode: Response HttpCode
CURL Example:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' -d '{ \
"CustomerId": 0, \
"ParentCustomerId": 0, \
"CustomerName": "Customer Nikunj 06", \
"Phone": "string", \
"Email": "string", \
"Country": "string", \
"State": "string", \
"Address": "string", \
"Zipcode": "string", \
"CustLogo": "string", \
"GeneralDetails": "string", \
"CustStatus": "string" \
}' 'https://alm.orcanos.com/[ACCOUNT NAME]/API/v2/Json/QW_Save_Customer'