Create Partner Company

POST http://<environment url>/ws/rest/service/v1/admin/company

Purpose

Creates a partner company based on information provided.

Request Format

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 Request

{

"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,

}

}

Response Format

A JSON object is returned in the following format.

{

"data": [],

"message": [],

"status": <REST status code value>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

Sample Success Response

{

"data":[],

"message":["The partner company has been created"'],

"status":200

}

Sample Failed Response

{

"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.