api:product:move
Table of Contents
API : Product Move
Introduction
This request will find all the places that a product is being used and update that to another product.
This is used when a product needs to be terminated or multiple products are reduced to a single product. It can only be performed on reseller products, and both products must belong to the same reseller and be of the same type.
Only products of type SIP_RATEPLAN, MVNO_RATEPLAN, DSL and FIBER are supported: for any other product type the request never returns a response (current invoice lines are still moved before the request stalls). For DSL and FIBER products only current invoice lines are moved — the internet accounts keep the old product and changed is always 0.
Request
| URL | https://api.telecomx.dk/product/PRODUCT_ID/move/NEW_PRODUCT_ID | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER if both products belong to the reseller. RESELLER_ADMIN or ADMIN for any reseller product. |
|
| Param | PRODUCT_ID | Id of the product to move usage from (24-char hex string) |
| Param | NEW_PRODUCT_ID | Id of the product to move usage to (24-char hex string) |
Query example
GET https://api.telecomx.dk/product/650000000000000000000001/move/650000000000000000000002
Response
| Json object | ||
|---|---|---|
| success | Boolean | True on success |
| changed | Integer | Number of uses moved |
Example
{ "success": true, "changed": 117 }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Id not found in request URI |
| 400 | bad_request | New Id not found in request URI |
| 404 | product | Product not found |
| 403 | access_denied | Insufficient access level |
| 409 | inheritFrom | Cannot move usage for master product |
| 409 | inheritFrom | Cannot move usage to master product |
| 409 | reseller | Reseller is not the same on both products |
| 409 | type | Type is not the same on both products |
| 500 | internal_error | <Unspecified> |
api/product/move.txt · Last modified: by Mikkel Meerwaldt Jørgensen