...
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.
Anchor |
---|
| _Toc405209650 |
---|
| _Toc405209650 |
---|
|
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 :
...
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" }] |
Anchor |
---|
| _Toc405209651 |
---|
| _Toc405209651 |
---|
|
PUT inventoryApi/product/{ID}This Uniform Contract operation is used to completely update the representation of a product.
Description :
...
- 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 } |
Anchor |
---|
| _Toc405209652 |
---|
| _Toc405209652 |
---|
|
Anchor |
---|
| _Ref234978967 |
---|
| _Ref234978967 |
---|
|
Anchor |
---|
| _Toc235288517 |
---|
| _Toc235288517 |
---|
|
Anchor |
---|
| _Toc236554611 |
---|
| _Toc236554611 |
---|
|
Anchor |
---|
| _Toc236554912 |
---|
| _Toc236554912 |
---|
|
Anchor |
---|
| _Toc236555375 |
---|
| _Toc236555375 |
---|
|
Anchor |
---|
| _Toc225613455 |
---|
| _Toc225613455 |
---|
|
Anchor |
---|
| _Toc225603244 |
---|
| _Toc225603244 |
---|
|
Anchor |
---|
| _Ref226733430 |
---|
| _Ref226733430 |
---|
|
Anchor |
---|
| _Ref230885009 |
---|
| _Ref230885009 |
---|
|
Anchor |
---|
| _Ref231980155 |
---|
| _Ref231980155 |
---|
|
Anchor |
---|
| _Ref232940733 |
---|
| _Ref232940733 |
---|
|
Anchor |
---|
| _Ref232940829 |
---|
| _Ref232940829 |
---|
|
PATCH inventoryAPI/product/{ID}Description :
- Partially updates a product entry in the inventory
- The resource is a managed entity
...
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 } |
Anchor |
---|
| _Toc405209653 |
---|
| _Toc405209653 |
---|
|
POST inventoryAPI/productDescription :
- Allows to create a new product entry in the inventory
- The resource is a managed entity
...
- 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 } |
Anchor |
---|
| _Toc405209654 |
---|
| _Toc405209654 |
---|
|
DELETE inventoryApi/product/{ID}Description :
- Delete a product in the inventory
...
- 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.