Table of Contents

API : Config GetProductDetails

Introduction

This request will get the reseller specific product details for a customer and master product. The product returned is the reseller's variant of the master product named by the configuration key — the variant belonging to the customer's reseller — or the master product itself when the reseller has no variant.

Request

URL https://api.telecomx.dk/config/product/CUSTOMER/MASTERPRODUCT
Method GET
Access level VIEWER, MANAGER, OWNER, RESELLER, RESELLER_ADMIN or ADMIN.
Param CUSTOMER Id of the customer to resolve the product for (24 hex-char string)
Param MASTERPRODUCT Configuration key naming the master product, e.g. DslInstallServiceProduct (see API : Config List for the known keys)

Query example

https://api.telecomx.dk/config/product/650000000000000000000001/DslInstallServiceProduct

Response

The full product document, see API : Product Get for the product object fields. Two fields are role-gated:

JSON object
wholesale Number Reseller price. Only returned to RESELLER, RESELLER_ADMIN or ADMIN.
cost Number Cost price. Only returned to ADMIN.

Example

Example as seen by an ADMIN (includes cost and wholesale):

{
  "_id": "650000000000000000000002",
  "start": null,
  "end": null,
  "type": "OTHER",
  "productCode": "DSL-INSTALL",
  "name": "DSL installation with technician visit",
  "unitType": "UNITS",
  "recurrence": "NONE",
  "recurrenceFullMonth": false,
  "cost": 850,
  "wholesale": 950,
  "price": 1050,
  "reseller": "650000000000000000000003",
  "inheritFrom": "650000000000000000000004",
  "applyByResellerOnly": false,
  "destinations": null
}

Errors

Error code Message Description
403 access_denied Insufficient access level
422 customer Customer id is not valid
500 internal_error <Unspecified> — also returned when the customer or configuration key does not exist