The request product operation will request a product for the specified user.
Request
Request URI
Method | Request URI |
---|---|
POST | https://{company-name}.helloid.com/api/v1/selfservice/products/request |
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
{
"requestedProductGUID": "7dbcb07a-989c-4a38-b93c-35558c64c520",
"requestedByUserGUID": "85dbdde5-fa19-4109-8c1e-66cb03486aef",
"requestedForUserGUID": "85dbdde5-fa19-4109-8c1e-66cb03486aef",
"formData": {
"textInput": "test",
"textInput1": "test1",
"textInput2": "test2"
},
"comment": "I really want this product",
"toDate": "2020-06-17 12:00:00.000"
}
Request body parameters
Parameter | Description | Required/Optional | Default value |
---|---|---|---|
{requestedProductGUID} | Guid of the product to be requested. | Required | - |
{requestedByUserGUID} | Guid of the user that is requesting the product. | Required | - |
{requestedForUserGUID} | Guid of the user that the product is requested for. | Required | - |
{formData} | A JSON string that contains the form data for this product request. | Optional / Required if product has a form. | - |
{comment} | Who will allow/deny access to the product. | Optional / Required if comments are required by the product configuration. | - |
{toDate} | Time limit for this product request in DateTime string format. | Optional / Required if time limit is enabled | - |
{durationInSeconds} | Time limit for this product request in seconds. | Optional / Required if time limit is enabled | - |
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. The content type was incorrect or the request body was malformed. |
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. |
409(CONFLICT) | Indicates that the operation was not successful. If there were validation errors, the response will include an error result. |
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
{
"requestedForUserGUID": "85dbdde5-fa19-4109-8c1e-66cb03486aef",
"requestedByUserGUID": "85dbdde5-fa19-4109-8c1e-66cb03486aef",
"formData": "{ \"textInput\": \"test\", \"textInput1\": \"test1\", \"textInput2\": \"test2\"}",
"requestedProductGUID": "7dbcb07a-989c-4a38-b93c-35558c64c520",
"comment": "I really want this product",
"toDate": "2020-06-17T12:00:00",
"durationInSeconds": null,
"formGUID": null
}
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/products/request -H "Content-Type:application/json" -d
'{
[request body here]
}'