To login with your TM Forum account please click on the Login button below

Don't have an account? You can register by clicking here:

For every single of operation on the entities use the following templates and provide sample REST requests and responses.
Remember that the following Uniform Contract rules must be used :

Operation on Entities

Uniform API Operation

Description

Query Entities

GET Resource

GET must be used to retrieve a representation of a resource.

Create Entity

POST Resource

POST must be used to create a new resource

Partial Update of an Entity

PATCH Resource

PATCH must be used to partially update a resource
For reconciliation processes

Complete Update of an Entity

PUT Resource

PUT must be used to completely update a resource identified by its resource URI

Remove an Entity

DELETE Resource

DELETE must be used to remove a resource


Filtering and attribute selection rules are described in the TMF REST Design Guidelines.
Notifications are also described in a subsequent section.

GET /inventoryApi/product/{ID}

This Uniform Contract operation is used to retrieve the representation of a product inventory.
Note that collections can be retrieved via GET /inventoryApi/product with no {ID}
Description :

  • Allows to retrieve product inventory content
  • Filtering is enabled on all attributes and field selection also
  • The resource is a managed entity.
  • The identifier is an hyperlink

Behavior :

  • Returns HTTP/1.1 status code 200 if the request was successful.


Case : Querying the product inventory to retrieve an overview of all the top level products for a given customer

REQUEST

GET /inventoryApi/product/?relatedParties.role=customer&relatedParties.reference=42&isTopLevel=true&fields=name, description, status
Accept: application/json

RESPONSE

200
Content-Type: application/json

[{
"id": "42",
"href": "http://server:port/inventoryApi/product/42",
"name": "Broadband",
"description": "Description of the instantiated broadband product",
"status": "active"
}, {
"id": "55",
"href": "http://server:port/inventoryApi/product/55",
"name": "Mobile data access",
"description": "Description of the instantiated broadband product",
"status": "active"
}]

PUT inventoryApi/product/{ID}

This Uniform Contract operation is used to completely update the representation of a product.
Description :

  • Replaces a product entry inside the inventory
  • The resource is a managed entity

Behavior :

  • Returns HTTP/1.1 status code 201 if the request was successful.
  • Standard error codes in case of errors.

 

REQUEST

PUT inventoryApi/product/42
Content-type: application/json

{
"id": "42",
"href": "http://server:port/inventoryApi/product/42",
"name": "Broadband",
"description": "Description of the instantiated broadband product",
"status": "active",
"startDate": "2013-07-21 08:16:39ZGMT+1",
"orderDate": "2013-07-21 06:16:39ZGMT+1",
"terminationDate": "",
"productOffering":
{
"id" : "4",
"href": "http://server:port/catalogApi/productOffering/4",
"name": "My Quick BB Offer"
},
"productSpecification":
{
"id": " http://server:port/catalogApi/productOffering/4"
},
"productCharacteristics":[
{
"name":"speed",
"value":"16M"
}],
"productRelationships":[
{
"type":"contains",
"product":{
"id":" http://server:port/inventoryApi/product/59"
}
}],
"billingAccount":
{
"id": "http://server:port/billingApi/billingAccount/678"
},
"relatedParties": [
{
"role":"partner",
"reference":"http://serverlocation:port/partnerManagement/partner/42"
}],
"realizingServices": [
{
"id": " 46779",
"href": "http://server:port/inventoryApi/service/46779"
}],
"productPrice" : [{
"name" : "…",
"description" : "",
"validFor":{
"startDateTime":"2013-04-19T16:42:23-04:00",
"endDateTime":"2013-06-19T00:00:00-04:00"
},
"priceType":"recurring",
"recurringChargePeriod":"monthly",
"unitOfMeasure":"",
"price":{
"amount":"12",
"currency":"$"
}
}]
}

RESPONSE

201
Content-Type: application/json

{ JSON Resource Representation with every attributes
}

PATCH inventoryAPI/product/{ID}

Description :

  • Partially updates a product entry in the inventory
  • The resource is a managed entity

Behavior :

  • Returns HTTP/1.1 status code 201 if the request was successful.
  • Standard error codes in case of an error.

Case : Patch the product inventory entry once the service delivery is fully done, thus linking the service ID to the product instance

REQUEST

PATCH inventoryApi/product/42
Content-type: application/json

{
"realizingServices": [
{
"id": "http://server:port/inventoryApi/service/46779"
}]
}

RESPONSE

201
Content-Type: application/json

{ JSON Resource Representation with every attributes
}

POST inventoryAPI/product

Description :

  • Allows to create a new product entry in the inventory
  • The resource is a managed entity

Behavior :

  • Returns HTTP/1.1 status code 201 if the request was successful.
  • Standard error codes in case of an error.

 

REQUEST

POST inventoryApi/product
Content-type: application/json

{
"name": "Samsung Galaxy S4",
"description": "Description of the instantiated handset product",
"status": "active",
"productSerialNumber": "59745034OOR030",
"startDate": "",
"orderDate": "2013-07-21 06:16:39ZGMT+1",
"terminationDate": ""
"productOffering":
{
"id": "http://server:port/catalogApi/productOffering/22",
"name": "My Quick BB Offer"
},
"productSpecification":
{
"id": " http://server:port/catalogApi/productOffering/21"
},
"productCharacteristics":[
{
"name":"color",
"value":"black"
}]
"billingAccount":
{
"id": "http://server:port/billingApi/billingAccount/678"
},
"relatedParties": [
{
"role":"partner",
"reference":"http://serverlocation:port/partnerManagement/partner/42"
}],
"place":"http://map.google.com/.../1234112GDE",
"realizingResources": [
{
"id": " http://server:port/inventoryApi/device/659394EDOD0O"
}],
"productPrice" : [{
"name" : "…",
"description" : "",
"validFor":{
"startDateTime":"2013-04-19T16:42:23-04:00",
"endDateTime":"2013-06-19T00:00:00-04:00"
},
"priceType":"non-recurring",
"price":{
"amount":"300",
"currency":"$"
}
}]
}

RESPONSE

201
Content-Type: application/json

{ JSON Resource Representation with every provided and default attributes
}

DELETE inventoryApi/product/{ID}

Description :

  • Delete a product in the inventory

Behavior :

  • Returns HTTP/1.1 status code 200 if the request was successful.
  • Standard error codes in case of an error.
  • Under certain policies, some errors may be raised when using this operation (for example if integrity violations are forbidden in the inventory).

 

REQUEST

DELETE inventoryApi/product/42

RESPONSE

200

 

© TM Forum 2015. All Rights Reserved.