The create self service category operation will create a new self service category or update an existing category with the specified request body.
Request
Request URI
Method | Request URI |
---|---|
POST | https://{company-name}.helloid.com/api/v1/selfservice/categories/ |
Request parameters
Parameter | Description |
---|---|
{company-name} | The company name of the target company |
Request headers
Header | Description |
---|---|
Content-Type | Required. Must be set to application/json. |
Sample request body
{
"Name": "APITest_Category",
"IsEnabled": true
}
Request body parameters
Parameter | Description | Required/Optional | Default value |
---|---|---|---|
{Name} | Name of the category | Required | - |
{SelfServiceCategoryGUID} | The GUID of the category. If specified, it will check if the GUID belongs to an existing category. If so, it will update that category. | Optional | - |
{IsEnabled} | A boolean value indicating if the category is enabled or disabled. | Optional | false |
Generated fields
The GUID field will be auto-generated by HelloID
Response
Response status
Code | Description |
---|---|
200(OK) | Indicates that the operation was successful and the resource is created. |
400(BAD REQUEST) | Indicates that the operation was not successful. There were validation errors or the request body was malformed.If there were validation errors, the response will include a error result. |
401(UNAUTHORIZED) | Indicates that no authentication header was given or the api key and secret were invalid. If the api key and secret were valid check the configuration in your portal, it is possibilty these were IP restricted or are disabled. |
415(UNSUPPORTEDMEDIATYPE) | Indicates that the operation was not successful. The content type was incorrect or the request body was malformed. |
Please also see error result.
Please also see common HTTP status codes.
Sample response body
{
"selfServiceCategoryGUID": "0272b2a9-0fb5-4845-977e-ce76c28a1762",
"name": "APITest_Category",
"isEnabled": true
}
Example request with cURL
Replace placeholder values surrounded by {
}
with the actual values.
curl -u {api-key}:{api-secret} -X POST https://{company-name}.helloid.com/api/v1/selfservice/categories/ -H "Content-Type:application/json" -d
"{
"selfServiceCategoryGUID": "0272b2a9-0fb5-4845-977e-ce76c28a1762",
"name": "APITest_Category",
"isEnabled": true
}"