Create Partner Company
Method: POST
Objective: Create partner company based on information provided.
Usage:
This will be the POST request.
The service URL to be used will be http://<environment url>/ws/rest/service/v1/admin/company
Input:
The user will be required to enter the company information in JSON format.
Minimum data requirements are the mandatory fields when creating partner company or you can specify detailed data, similar to output of GET request.
Sample JSON to create Partner company
{
"companyname":"Partner Company - 01",
"shortname":"partner01",
"addresses": [{
"addresstype": 1,
"addressline1":"San Jose CA",
"city":"San Jose",
"state":"CA",
"zip":"95110",
"country":“US”
}],
"passwordpolicy":{
"min_length": 3,
"max_length": 7,
}
}
Output:
The output will consist of Status, message.
Sample Output
Sample output JSON
{
"data":
[
],
"message":
[
"The partner company has been created"'
],
"status":200
}
Error Handling
{
"data": [
"companyname is mandatory to create partner company",
"passwordpolicy is mandatory to create partner company",
"addresses is mandatory to create partner company"
],
"message": [
"One or more records contain errors."
],
"status": 5555
}
The mandatory existing validations that exist for creating partner company will be applicable in REST service as well.
Validations for creating partner company
Status | Condition | Message |
---|---|---|
200 | Success | The partner company has been created. |
900 | Mandatory field not specified | <data_element> is mandatory to create partner company |
500 | Server Error | Server Error, contact the system administrator. |
901 | Invalid data value | Invalid data for <data_element>. |
5555 | One or more records contain errors. | One or more records contain errors. |
Related Topics
Update Partner Company Shortname
Add (Update) Partner Company Shell Membership
Remove (Update) Partner Company Shell Membership
Last Published Friday, December 13, 2024