Products
Products are any combination of technical resources supported by the platform that can be limited in allowed quantities. Products are identified by their SKU (Stock Keeping Unit ID) and define a list of Fusion licenses or number entitlements.
Get the list of product items
List all license types and entitlements available for building a product.
Request
Endpoint
GET
/api/v01/draas/{draas_instance}/public/products/items
Authorization
Required role
Available for all authenticated users
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
URL/Query parameters
Parameter | Type | Description | Required? |
---|---|---|---|
parent | string | Specify a group UUID | yes |
Note
Deprecated
This endpoint is deprecated. Use instead the equivalent endpoint with groups structure.
Endpoint
GET
/api/v01/draas/{draas_instance}/groups/{uuid}/products/items
Authorization
Required role
groups.instance.products.items.read
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group managing the subscription |
URL/Query parameters
N/A
Response
Status codes
Parameter | Description |
---|---|
200 | One or more product items found |
400 | Error while processing the request |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
items | array | List containing all product items objects available in the system | no |
Product Item Object
Parameter | Type | Description | Conditional? |
---|---|---|---|
type | string | Type of product item, may be license for Fusion specific licenses or entitlement for number entitlement | no |
subType | string | In case the type is a license, sub-type may take msTeamsUsers or sipTrunkChannels values | yes |
id | string | In case the type is an entitlement, this ID points to the right reference in our numbers management system | yes |
name | string | Name of the product item | no |
Example
{
"items": [
{
"type": "license",
"subType": "msTeamsUsers",
"name": "MS Teams User"
},
{
"type": "license",
"subType": "sipTrunkChannels",
"name": "SIP Trunk Channel"
},
{
"type": "entitlement",
"id": 2,
"name": "Belgium - tollfree numbers"
},
{
"type": "entitlement",
"id": 8,
"name": "France - geo"
},
{
"type": "entitlement",
"id": 14,
"name": "NL - Real numbers"
}
]
}
Get the list of products
List all products that have been defined for the group.
Request
Endpoint
GET
/api/v01/draas/{draas_instance}/public/products
Authorization
Required role
Available for all authenticated users
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
URL/Query parameters
Parameter | Type | Description | Required? |
---|---|---|---|
search | string | Used to perform a search through all searchable properties of a product that look like the string passed | no |
sort | string | Allows to specify one searchable property of a product to apply a sorting operation | no |
dir | string | When performing a sort operation, specifies the type. Allowed values are asc for ascending (default) or desc for descending | no |
parent | string | Specify a group UUID. Only products defined for this specific UUID parent group are returned | yes / no |
page_size | integer | Used for pagination, determines the maximum number of records on one page of results (defaults to 10) | no |
next | string | A token used to get the next records in the list. This token is taken back from the results of the previous call | no |
Use of parent query parameter
If logged as a system administrator the API consumer has to provide a parent UUID, otherwise the system doesn't know to which parent entity the request reports to.
Response
Status codes
Parameter | Description |
---|---|
200 | One or more products found |
400 | Error while processing the request |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
results | integer | Total number of results from the query | no |
pages | integer | Total number of pages according to pagination settings | no |
page | integer | Current displayed page from the set of pages | no |
next | string | A token used for infinite scrolling, to be used in the next call to retrieve subsequent records. Only present if the list of products has to be continued | yes |
products | array | List containing all product objects for the group | no |
Product Object
Parameter | Type | Description | Conditional? |
---|---|---|---|
id | integer | ID of the product in database | no |
name | string | Name of the product | no |
description | string | Description of the product | yes |
sku | string | Stock keeping unit uniquely identifying the product | no |
status | string | Status of the product | no |
Example
{
"results": 2,
"pages": 2,
"page": 1,
"next": "c2VhcmNoPVBDODM4OSZzb3J0PXN0YXR1cyZkaXI9ZGVzYyZwYWdlX3NpemU9MSZwYWdlPTI=",
"products": [
{
"id": 25,
"name": "NL Calling Plan",
"sku": "PC83890",
"status": "enabled"
}
]
}
Get the details of a product
Returns a product details with its associated product items and allowed quantities.
Request
Endpoint
GET
/api/v01/draas/{draas_instance}/public/products/{product_id}
Authorization
Required role
Available for all authenticated users
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
product_id | integer | ID of the product in database as returned by this API |
URL/Query parameters
|Parameter|Type|Description|Required?| |parent
|string
|Specify a group UUID. Only products defined for this specific UUID parent group are returned|yes / no|
Use of parent query parameter
If logged as a system administrator the API consumer has to provide a parent UUID, otherwise the system doesn't know to which parent entity the request reports to.
Response
Status codes
Parameter | Description |
---|---|
200 | Details of the product |
400 | Error while processing the request |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
name | string | Name of the product | no |
description | string | Description of the product | yes |
sku | string | Stock keeping unit uniquely identifying the product | no |
status | string | Status of the product | no |
items | array | List containing all product items quantities defining the product | no |
Example
{
"name": "NL Calling Plan",
"description": "blablabla",
"sku": "PC83895",
"status": "disabled",
"items": [
{
"type": "license",
"subType": "msTeamsUsers",
"quantity": 0
},
{
"type": "entitlement",
"id": 14,
"quantity": 1
}
]
}
Define a new product
This endpoint allows to add a new product with its items list and allowed quantity.
Request
Endpoint
POST
/api/v01/draas/{draas_instance}/groups/{uuid}/products
Authorization
Required role
groups.instance.product.create (only allowed to system or group administrators)
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | System generated universal unique ID (UUID) identifying the group for which you want to add a new product |
URL/Query parameters
N/A
Body
Parameter | Type | Description | Required |
---|---|---|---|
name | string | Name of the product | yes |
description | string | Description of the product | no |
sku | string | Stock keeping unit uniquely identifying the product | yes |
status | string | Status of the product. Possible values are:
| no |
items | array | List containing all product items quantities defining the product | no |
Product Item Quantity Object
Parameter | Type | Description | Conditional? |
---|---|---|---|
type | string | Type of product item, may be license for Fusion specific licenses or entitlement for number entitlement | no |
subType | string | In case the type is a license, Possible values are:
| yes |
id | string | In case the type is an entitlement, this ID points to the right reference in our numbers management system | yes |
quantity | integer | The allowed quantity of the specified product item | yes |
Example
{
"name": "NL Calling Plan",
"description": "blablabla",
"sku": "PC83892",
"status": "enabled",
"items": [
{
"type": "license",
"subType": "msTeamsUsers",
"quantity": 1
},
{
"type": "entitlement",
"id": 14,
"quantity": 1
}
]
}
Response
Status codes
Parameter | Description |
---|---|
200 | The product was correctly created |
400 | Error while creating the product |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
id | integer | ID of the product in database | no |
Example
{
"id": 29
}
Modify an existing product
This endpoint allows to modify an existing product together with its items list and allowed quantity.
Request
Endpoint
PUT
/api/v01/draas/{draas_instance}/groups/{uuid}/products/{product_id}
Authorization
Required role
groups.instance.product.instance.update (only allowed to system or group administrators)
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | System generated universal unique ID (UUID) identifying the group for which you want to modify an existing product |
product_id | integer | ID of the product in database as returned by this API |
URL/Query parameters
N/A
Body
Parameter | Type | Description | Required |
---|---|---|---|
name | string | Name of the product | no |
description | string or null | Description of the product. Set to null to remove an existing description | no |
status | string | Status of the product, allowed values are enabled or disabled | no |
items | array | List containing all product items quantities defining the product | no |
Product items modification
You should always pass the complete new product items list when calling this API. New items will be added to the product, existing items will be modified, missing items will be removed. Do not use the item
request parameter if you don't need to modify the list.
Example
{
"name": "NL New Calling Plan",
"description": null,
"status": "enabled",
"items": [
{
"type": "license",
"subType": "sipTrunkChannels",
"quantity": 10
},
{
"type": "entitlement",
"id": 15,
"quantity": 10
}
]
}
Response
Status codes
Parameter | Description |
---|---|
204 | The product was correctly modified |
400 | Error while modifying the product |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
N/A