api:product:delete
Table of Contents
API : Product Delete
Introduction
This request will delete the specified product.
If the product is a reseller product, it can only be deleted if no customers are using it. If the product is a master product, then it can only be deleted if no reseller products inherits from it.
Request
| URL | https://api.telecomx.dk/product/PRODUCT_ID | |
|---|---|---|
| Method | DELETE | |
| Access level | RESELLER if the product is a reseller or customer product belonging to the reseller (reseller products of type OTHER require RESELLER_ADMIN). RESELLER_ADMIN or ADMIN for any reseller or customer product. RESELLER_ADMIN with FINANCE feature or ADMIN for a master product. |
|
| Param | PRODUCT_ID | Id of the product (24-char hex string) |
Query example
DELETE https://api.telecomx.dk/product/650000000000000000000001
Response
| Json object | ||
|---|---|---|
| success | Boolean | True on success |
Example
{ "success": true }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Id not found in request URI |
| 404 | not_found | Product not found |
| 403 | access_denied | Insufficient access level |
| 403 | type | You can not delete system products |
| 409 | _id | Product is used as a config product for '650000000000000000000001' and cannot be deleted |
| 409 | _id | Product is inherited by X reseller products and cannot be deleted |
| 409 | _id | Product is being used in X places and cannot be deleted |
| 409 | _id | Product is being used changerequests in X places and cannot be deleted |
| 409 | _id | Product is being used in internet requests in X places and cannot be deleted |
| 409 | includedProducts | Product is being included in X PBX_USER products and cannot be deleted |
| 500 | internal_error | <Unspecified> |
api/product/delete.txt · Last modified: by Mikkel Meerwaldt Jørgensen