Remember the following Uniform Contract:
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 |
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 |
Execute an Action on an Entity |
POST on TASK Resource |
POST must be used to execute Task Resources |
Other Request Methods |
POST on TASK Resource |
GET and POST must not be used to tunnel other request methods. |
Filtering and attribute selection rules are described in the TMF REST Design Guidelines.
Notifications are also described in a subsequent section.
Note that collections can be retrieved via GET /orderManagement/productOrder with no {ID}
Description :
This operation is used to retrieve order information using the ID
Attribute selection is enabled on all first level attributes but not on inner classes.
Attribute selection may optionally be enabled on all attributes and inner classes.
Behavior :
Use case : Get a specific order based on its ID
REQUEST |
GET /orderManagement/productOrder/42 |
RESPONSE |
200 |
Description :
This operation is used to retrieve order information using filter criteria.
Filtering selection is enabled on all first level attributes but not on inner classes with the exception of relatedParties.
Filtering may optionally be enabled on all attributes and inner classes.
Attribute selection is enabled on all first level attributes but not on inner classes.
Attribute selection may optionally be enabled on all attributes and inner classes.
Behavior :
Use case : Get all the orders for a given customer that were completed before a specified date
REQUEST |
GET /orderManagement/productOrder?relatedParty.role=customer& relatedParty.id=345221&completionDate.lt=2013-09-10 T00:00:00 -04:00 |
RESPONSE |
200 |
Description :
This operation is used to modify orders and/or their items.
Behavior :
Attribute name |
Patchable |
Rule |
id |
No |
|
href |
No |
|
externalID |
No |
|
state |
Yes |
To manage the order delivery process : InProgress (start process), Held / Pending (suspend process) |
priority |
Yes |
|
category |
Yes |
|
orderDate |
No |
|
requestedStartDate |
Yes |
Only when order is in "Acknowledged" state – delivery process not started |
completionDate |
No |
|
requestedCompletionDate |
Yes |
Only when order is in "Acknowledged" state – delivery process not started |
expectedCompletionDate |
Yes |
|
notificationContact |
Yes |
|
note |
Yes |
|
relatedParty |
Yes |
Only when order is in "Acknowledged" state – delivery process not started |
orderItem.id |
No |
|
orderItem.action |
No |
|
orderItem.state |
Yes |
To manage the order item delivery process : InProgress (start sub process), Held / Pending (suspend sub process) |
orderItem.billingAccount |
Yes |
Only when order is in "Acknowledged" state – delivery process not started |
orderItem.productOffering |
Yes |
Only when order is in "Acknowledged" state – delivery process not started |
orderItem.product |
Yes |
Only when order item is in "Acknowledged" or "Pending" state – delivery process not started or suspended |
orderItem.product.place |
Yes |
Only when order item is in "Acknowledged" or "Pending" state – delivery process not started or suspended |
orderItem.appointment |
Yes |
Only when order item is in "Acknowledged" or "Pending" state – delivery process not started or suspended |
Further document any rules that must be implemented when patching attributes.
Rule name |
Rule/Pre Condition/Side Effects/Post Conditons |
State patches |
When patching an order state to :
|
Use case : Resume order
Note : Suspend would be the same request using the "Pending" state.
REQUEST |
PATCH orderManagement/productOrder/42 |
RESPONSE |
201 |
Description:
This operation is used to create a new order.
The mandatory attributes for the creation are :
Behavior :
ID Management :
POST should be used without specifying the id and the href, the OM system is in charge of generating the id + href for the ProductOrder.
When performing a POST, these are the allowed attributes (all Product Order attributes that are not in that list MUST NOT be used during POST, they are calculated/defined by the OM system) :
Attribute name |
Mandatory |
Default |
Rule |
externalID |
N |
N/A |
|
state |
N |
"Acknowledged" |
|
priority |
N |
4 (the lowest) |
|
Description |
N |
N/A |
|
category |
N |
"uncategorized" |
|
requestedStartDate |
N |
No specified default value |
|
requestedCompletionDate |
N |
No specified default value |
|
notificationContact |
N |
No specified default value |
|
note |
N |
No specified default value |
|
relatedParty |
Y |
|
They must be at least a defined party linked to the order (Customer, …) |
orderItem.id |
Y |
|
|
orderItem.action |
Y |
|
|
orderItem.state |
N |
"Acknowledged" |
|
orderItem.billingAccount |
Y |
|
|
orderItem.productOffering |
N |
|
The productOffering may not be useful when doing a "modify" or "delete" on an owned product |
orderItem.product |
Y |
|
|
orderItem.product.place |
N |
|
|
orderItem.appointment |
N |
|
|
Rule name |
Rule |
POST Mandatory attributes within product Order |
|
POST Mandatory attributes within product Order item |
|
POST Mandatory attributes within product (in each order item) |
|
REQUEST |
POST /orderManagement/productOrder |
RESPONSE |
201 |
REQUEST |
DELETE /orderManagement/productOrder/5868839 |
RESPONSE |
200 |