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 reduces to a single product. It can only be performed on reseller products.
Request
| URL | https://api.telecomx.dk/product/PRODUCT_ID/move/NEW_PRODUCT_ID | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER if product belongs to the reseller. ADMIN for any reseller product. |
|
| Param | PRODUCT_ID | Id of the product (24-char hex string) |
| Param | NEW_PRODUCT_ID | Id of the product (24-char hex string) |
Query example
GET https://api.telecomx.dk/product/123457890ABCDEF12345678/move/1234567890ABCDEF12345679
Response
| Json object | ||
|---|---|---|
| success | Boolean | True on success |
| changed | Integer | Number of uses moved |
Example
{ success: true, changed: 0 }
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 | Canot 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: 2014/06/03 14:40 by Per Møller