This product operation will create a new product or update an existing product with the specified request body.
Important note: When creating, but especially when updating an existing product, usage of categories over category is recommended. Else all the linked categories are replaced with the single category you have provided via the attribute category.
Request
Request URI
Method | Request URI |
---|---|
POST | https://{company-name}.helloid.com/api/v1/selfservice/products/ |
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": "ExampleProduct",
"description": "Example description",
"code": "ABCD1234",
"managedByGroupGUID": "2dd10d56-c8a7-4766-8675-cace73e3cf52",
"categories": [
"Applications",
"Design Software",
"Subscription"
],
"agentPoolGUID": null,
"icon": null,
"faIcon": "fa-rocket",
"useFaIcon": true,
"isEnabled": true,
"isAutoApprove": false,
"isAutoDeny": false,
"isCommentable": true,
"hasTimeLimit": false,
"limitType": "Fixed",
"managerCanOverrideDuration": true,
"multipleRequestOption": 1,
"reminderTimeout": 30,
"ownershipMaxDurationInMinutes": 90,
"createDefaultEmailActions": true,
"hasRiskFactor": true,
"riskFactor": 7,
"maxCount": null,
"showPrice": false,
"price": 50,
"formName": "Default Form",
"approvalWorkflowName": "ExampleApprovalWorkflow"
}
Request body parameters
Parameter | Description | Required/Optional | Default value |
---|---|---|---|
{SelfServiceProductGUID} | The GUID of the product. If specified, it will check if the GUID belongs to an existing product. If so, it will update that product. If not, it will add a new product with the specified GUID. | Optional | - |
{Name} | Name of the product. | Required | - |
{Description} | Description of the product. | Optional | - |
{Code} | Main part of the product SKU ( unique). For example: "20170616FGENSFWJAK". | Optional | random |
{ManagedByGroupGUID} | The GUID of the group whose direct members will allow/deny access to the product. | Optional | - |
{Category} | In which category will the product fall. | Required | Deprecated Either category or categories should be supplied |
{Categories} | In which categories will the product fall | Required | Either category or categories should be supplied |
{IsEnabled} | Indicates if the product is enabled | Optional | true |
{IsAutoApprove} | Indicates if the product is automatically approved | Optional | false |
{IsAutoDeny} | Indicates if the product is automatically denied | Optional | false |
{IsCommentable} | Indicates if comments can be added when requesting the product | Optional | false |
{Icon} | The hash of a custom icon. | Optional | |
{FaIcon} | The name of a font-awesome icon. For example: "fa-globe". | Optional | |
{UseFaIcon} | A boolean value indicating if the specified font-awesome icon should be used. | Optional | false |
{MultipleRequestOption} | A value indicating how often a product can be requested. Possible values: 1: Once 3: Always |
Optional | 1 |
{ReminderTimeout} | The timeout duration of the reminders in days, where 0 means never. | Optional | 0 |
{HasTimeLimit} | Can there be a maximum duration of product ownership | Optional | false |
{LimitType} | What type is the duration limit. Options: Fixed / Maximum | Optional | Maximum |
{ManagerCanOverrideDuration} | Can the duration as requested by a user be overridden when approving. | Optional | false |
{OwnershipMaxDuration} | The duration that that can be requested for this product in days, where 0 means indefinitely. | Optional | 0 |
{OwnershipMaxDurationInMinutes} | The duration that that can be requested for this product in minutes, where 0 means indefinitely. Overrides OwnershipMaxDuration. | Optional | 0 |
{CreateDefaultEmailActions} | Create the default email actions associated with the self service product. These actions are: 1. Email resource owner when the user requests the product. 2. Email requester when the request has been denied. Note that this option is only usable when creating a new product. Setting this option when performing an update will not add the default email actions. |
Optional | false |
{HasRiskFactor} | Indicates if a product has a risk factor. | optional | false |
{RiskFactor} | The risk factor of the product. This must be a value between 1 an 10. | optional | 1 |
{maxCount} | The maximum times a product can be requested. | optional | - |
{showPrice} | Show the price of the product to the end user. | optional | false |
{price} | The price of a product. Can be a number with decimals, divided by a comma or point. | optional |
- |
{formName} | The name of the form you want to assign to this product | optional |
- |
{approvalWorkflowName} | The name of the approval workflow you want to assign to this product | optional |
- |
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
{
"actions": [
{
"actionGUID": "a61cd49a-ca13-46af-abf3-47d490f8721a",
"name": "Send email",
"options": 1,
"objectGUID": "b19b597f-2438-48eb-9a79-3ffc43041758",
"executeOnState": 1,
"automationStoreTaskId": "4768fd73-622c-4cc6-bece-5ccba5bac8c2",
"automationStoreTaskVersion": "1.0.0",
"executionType": "native",
"executionEntry": "send-email",
"executionEnvironment": "helloid",
"executionMinimumVersion": "1.1.0",
"variables": [
{
"id": "8c7f8096-d554-4822-9dd1-d260c60b8b1e",
"name": "content",
"value": null,
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "62830014-4165-4ab3-a19c-2ccfd0284892",
"name": "from",
"value": "{{requester.ContactEmail}}",
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "d5eb3f83-0eea-4ecc-b360-066b89595664",
"name": "isHtmlContent",
"value": "true",
"typeConstraint": "boolean",
"secure": false,
"isScriptVariable": false
},
{
"id": "ad9dee4c-6b22-4049-ae08-8d259e0abb3f",
"name": "subject",
"value": null,
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "4bcb9220-233e-4ab2-9cee-72dc7415c816",
"name": "template",
"value": "sendrequestemail",
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "a4283a6e-10bd-4a64-871a-1144a0ccfb3e",
"name": "to",
"value": "{{resourceOwner.ContactEmail}}",
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "058642e5-fec6-4a21-87bd-bffa07a71a18",
"name": "useTemplate",
"value": "true",
"typeConstraint": "boolean",
"secure": false,
"isScriptVariable": false
}
]
},
{
"actionGUID": "c7e0411d-0ea5-484a-b9a4-a0f946242a28",
"name": "Send email",
"options": 1,
"objectGUID": "b19b597f-2438-48eb-9a79-3ffc43041758",
"executeOnState": 5,
"automationStoreTaskId": "4768fd73-622c-4cc6-bece-5ccba5bac8c2",
"automationStoreTaskVersion": "1.0.0",
"executionType": "native",
"executionEntry": "send-email",
"executionEnvironment": "helloid",
"executionMinimumVersion": "1.1.0",
"variables": [
{
"id": "f437a78b-de27-4bc5-a3ae-0c0bc1ccc666",
"name": "content",
"value": null,
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "df43eed2-3491-4bfc-bb56-a7aa4f03a57d",
"name": "from",
"value": "{{handler.ContactEmail}}",
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "d65a8902-8940-480b-8f1b-b97fe44d0d0f",
"name": "isHtmlContent",
"value": "true",
"typeConstraint": "boolean",
"secure": false,
"isScriptVariable": false
},
{
"id": "2a706675-bab8-428f-bfa3-5d6742b07cc0",
"name": "subject",
"value": null,
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "e72534ec-98d7-4d32-bcaa-6f0062680a42",
"name": "template",
"value": "senddeniedemail",
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "0e196323-4f89-43b9-ae47-135eb7778d66",
"name": "to",
"value": "{{requester.ContactEmail}}",
"typeConstraint": "string",
"secure": false,
"isScriptVariable": false
},
{
"id": "2f863dbf-7c60-4f94-8979-baef9c68132e",
"name": "useTemplate",
"value": "true",
"typeConstraint": "boolean",
"secure": false,
"isScriptVariable": false
}
]
}
],
"selfServiceProductGUID": "b19b597f-2438-48eb-9a79-3ffc43041758",
"agentPoolGUID": null,
"name": "ExampleProduct",
"description": "Example description",
"managedByUserName": "Administrator",
"category": "Applications",
"categories": [
"Applications",
"Design Software",
"Subscription"
],
"code": "ABCD1234",
"approvalWorkflow": "ExampleApprovalWorkflow",
"isEnabled": true,
"isAutoApprove": false,
"isAutoDeny": false,
"isCommentable": true,
"hasTimeLimit": false,
"managerCanOverrideDuration": true,
"limitType": "Fixed",
"icon": null,
"faIcon": "fa-rocket",
"useFaIcon": true,
"multipleRequestOption": 1,
"reminderTimeout": 30,
"ownershipMaxDurationInMinutes": 90,
"hasRiskFactor": true,
"riskFactor": 7,
"maxCount": null,
"showPrice": false,
"price": 50,
"formName": "Default Form"
}
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/ -H "Content-Type:application/json" -d
'{
[request body here]
}'