b2bsoft-ux
GET-productOrderbyId-TMF622
Unit test case for happy path.
URL
https://esb-cloud-dev.lla.com/dev/b2bsoft-ux/b2bsoft-ux/v1/PR/productOrder/{id}
url Param
name | type | description | required |
---|---|---|---|
id | string | Order Number of the request | Y |
Header
name | type | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. Minimum characters: 5 | Y |
client_secret | string | Password associated with the client_id. Minimum characters: 5 | Y |
Query Param
name | type | description | required |
---|---|---|---|
Y or N |
cURL request
curl --location --request POST 'https://esb-cloud-dev.lla.com/dev/b2bsoft-ux/b2bsoft-ux/v1/PR/productOrder/123456789' \
--header 'client_id: f1656529ab2a401d9ff9c225db9e02b3' \
--header 'client_secret: 1aeB97DD6400466b96d3bbebAd11E803' \
--header 'Content-Type: application/json'
Response
{
"billingAccount": {
"id": "1",
"relatedParty": [
{
"id": "streetAddress1",
"name": "33 Calle Bolivia"
},
{
"id": "postalCode",
"name": "00917"
},
{
"id": "mainDivision",
"name": "PR"
},
{
"id": "country",
"name": "US"
},
{
"id": "city",
"name": "San Juan"
}
]
},
"orderTotalPrice": [
{
"price": {
"taxIncludedAmount": {
"value": 0
},
"@type": "orderAmount"
},
"priceAlteration": [
{
"price": {
"priceType": "tradeIn",
"taxIncludedAmount": {
"value": 0
},
"@type": "tradeIn"
}
}
]
}
],
"productOrderItem": [
{
"quantity": 0,
"product": {
"id": "SKU Value",
"name": "ProductName",
"productSerialNumber": "IMEI_SerialNumber",
"productCharacteristic": [
{
"name": "promotionName",
"valueType": "string",
"value": "Haloween Offer"
},
{
"name": "promotion",
"valueType": "string",
"value": "-10"
},
{
"name": "isPhysical",
"valueType": "string",
"value": "NA"
},
{
"name": "isTaxable",
"valueType": "string",
"value": "True"
},
{
"name": "installmentAmount",
"valueType": "string",
"value": "500"
},
{
"name": "devicePayOff",
"valueType": "string",
"value": "200"
},
{
"name": "warrantyDP",
"valueType": "string",
"value": "888"
},
{
"name": "warrantyRefund",
"valueType": "string",
"value": "8787"
},
{
"name": "warrantyAPay",
"valueType": "string",
"value": "2333"
},
{
"name": "InstallmentId",
"valueType": "string",
"value": "6565656565"
},
{
"name": "tradeInId",
"valueType": "string",
"value": "LCTI777777"
},
{
"name": "promotionName",
"valueType": "string",
"value": "Premium Devices Offer"
}
],
"productPrice": [
{
"price": {
"taxIncludedAmount": {
"value": 0
},
"@type": "RetailPrice"
}
}
],
"productOrderItem": [
{
"productCharacteristic": [
{
"name": "discountName",
"valueType": "string",
"value": "Seasonal discount"
},
{
"name": "discountAmount",
"valueType": "string",
"value": "-15"
}
],
"@type": "Installment"
}
],
"@type": "device"
}
},
{
"quantity": 0,
"product": {
"id": "SKU###",
"name": "ProductName###",
"productSerialNumber": "IMEI_SerialNumber###",
"productPrice": [
{
"price": {
"taxIncludedAmount": {
"value": 0
},
"@type": "RetailPrice"
}
}
],
"@type": "SIMCard"
}
},
{
"quantity": 0,
"product": {
"id": "SKU###",
"name": "ProductName###",
"productSerialNumber": "IMEI_SerialNumber###",
"productPrice": [
{
"price": {
"taxIncludedAmount": {
"value": 0
},
"@type": "RetailPrice"
}
}
],
"@type": "Plan"
}
},
{
"quantity": 0,
"product": {
"id": "SKU###",
"name": "ProductName###",
"productSerialNumber": "IMEI_SerialNumber###",
"productPrice": [
{
"price": {
"taxIncludedAmount": {
"value": 0
},
"@type": "RetailPrice"
}
}
],
"@type": "Fees"
}
}
],
"relatedParty": [
{
"id": "36PR",
"role": "StoreId"
},
{
"id": "customer",
"name": "Prepaid",
"role": "customer"
}
],
"state": "acknowledged",
"@type": "orderLineItem"
}
Definitions
Each of the request parameters is detailed.
name | type | description | required |
---|---|---|---|
billingAccount | array | N | |
billingAccount.id | String | Unique identifier Id of the EntityRef | N |
relatedParty | array | Related Entity reference. A related party defines party or party role linked to a specific entity. | N |
relatedParty.id | String | Unique identifier Id of the related entity. | N |
relatedParty.name | String | Name of the related entity.. | N |
relatedParty.value | String | value of the related entity.. | N |
orderTotalPrice | array | An amount, usually of money, that represents the actual price paid by the Customer for this item or this order | N |
orderTotalPrice.price | object | A structure used to define price amount. | N |
orderTotalPrice.price.taxIncludedAmount | object | All taxes included amount (expressed in the given currency). | N |
orderTotalPrice.price.@type | String | When sub-classing, this defines the sub-class entity name | N |
orderTotalPrice.priceAlteration | object | A structure used to describe a price alteration. | N |
orderTotalPrice.priceAlteration.price | object | A structure used to define price amount. | N |
orderTotalPrice.priceType | string | A category that describes the price, such as recurring, discount, allowance, penalty, and so forth | N |
orderTotalPrice.priceAlteration.price.taxIncludedAmount | object | All taxes included amount (expressed in the given currency). | N |
orderTotalPrice.priceAlteration.price.@type | String | When sub-classing, this defines the sub-class entity name | N |
productOrderItem | Object Array | An identified part of the order. A product order is decomposed into one or more order items. | N |
productOrderItem.id | String | Unique identifier of the product. which will be orderitemId | N |
productOrderItem.action | String | The action to be carried out on the Product. Can be: add, modify, delete, noChange. | N |
productOrderItem.quantity | Int32 | Quantity ordered. | N |
productOrderItem.itemPrice | orderTotalPrice | An amount, usually of money, that represents the actual price paid by the Customer for this item or this order. | N |
productOrderItem.itemPrice.priceType | string | A category that describes the price, such as recurring, discount, allowance, penalty, and so forth | N |
productOrderItem.itemPrice.price | Object Array | A structure used to define price amount. | N |
productOrderItem.itemPrice.price.taxIncludedAmount | Object Array | All taxes included amount (expressed in the given currency). | N |
productOrderItem.itemPrice.price.@type | String | When sub-classing, this defines the sub-class entity name | N |
productOrderItem.product | Object Array | A product to be created defined by value or existing defined by reference. | N |
productOrderItem.product.id | String | Unique identifier of the product. | N |
productOrderItem.product.name | String | Name of the product. It could be the same as the name of the product offering. | N |
productOrderItem.product.productSerialNumber | String | Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router | N |
productOrderItem.itemTotalPrice | Array | An amount, usually of money, that represents the actual price paid by the Customer for this item or this order. | N |
productOrderItem.itemTotalPrice.OrderPrice | Object Array | An amount, usually of money, that represents the actual price paid by the Customer for this item or this order. | N |
productOrderItem.itemTotalPrice.OrderPrice.price | Object Array | A structure used to define price amount. | N |
productOrderItem.itemTotalPrice.OrderPrice.price.taxIncludedAmount | Object Array | All taxes included amount (expressed in the given currency). | N |
productOrderItem.itemTotalPrice.OrderPrice.price.@type | String | When sub-classing, this defines the sub-class entity name | N |
productOrderItem.product.productCharacteristic | Object Array | Describes a given characteristic of an object or entity through a name/value pair. | N |
productOrderItem.product.productCharacteristic.name | String | Name of the characteristic | N |
productOrderItem.product.productCharacteristic.valueType | String | Data type of the value of the characteristic | N |
productOrderItem.product.productCharacteristic.value | any | The value of the characteristic | N |
productOrderItem.product.productPrice | orderTotalPrice | An amount, usually of money, that represents the actual price paid by a Customer for a purchase, a rent or a lease of a Product. The price is valid for a defined period of time. | N |
productOrderItem.product.productPrice.price | object | A structure used to define price amount. | N |
productOrderItem.product.productPrice.taxIncludedAmount | object | All taxes included amount (expressed in the given currency). | N |
productOrderItem.product.productPrice.@type | String | When sub-classing, this defines the sub-class entity name | N |
productOrderItem.product.productOrderItem | object Array | An identified part of the order. A product order is decomposed into one or more order items. | N |
productOrderItem.product.productOrderItem.productCharacteristic | Object Array | Describes a given characteristic of an object or entity through a name/value pair. | N |
productOrderItem.product.productOrderItem.productCharacteristic.name | String | Name of the characteristic | N |
productOrderItem.product.productOrderItem.productCharacteristic.valueType | String | Data type of the value of the characteristic | N |
productOrderItem.product.productOrderItem.productCharacteristic.value | any | The value of the characteristic | N |
productOrderItem.product.productOrderItem.@type | String | When sub-classing, this defines the sub-class entity name | N |
productOrderItem.product.@type | String | When sub-classing, this defines the sub-class entity name | N |
relatedParty | array | Related Entity reference. A related party defines party or party role linked to a specific entity. | N |
relatedParty.id | String | Unique identifier Id of the related entity. | N |
relatedParty.name | String | Name of the related entity.. | N |
relatedParty.role | String | Role played by the related party | N |
state | string | enum: - acknowledged - rejected - pending - held - inProgress - cancelled - completed - failed - partial - assessingCancellation - pendingCancellation | N |
@type | String | When sub-classing, this defines the sub-class entity name | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors" : [{
"code" : 400,
"message" : "The request is invalid or not properly formed.",
"description" : "The client sent too many requests and server is not able to serve them all at the moment"
}]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
}]
}
[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "The request is invalid or not properly formed.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method post not allowed for : /{businessId}/method"
}]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "The request failed due to an internal error.",
"description": ""
}]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation GET /xxxx/xxxxxx for Business Id: xxxx not implemented"
}]
}