b2bsoft-ux

(0 reviews)

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
nametypedescriptionrequired
idstringOrder Number of the requestY
nametypedescriptionrequired
client_idstringThe client_id identifying the channel. Minimum characters: 5Y
client_secretstringPassword associated with the client_id. Minimum characters: 5Y
Query Param
nametypedescriptionrequired
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.

nametypedescriptionrequired
billingAccountarrayN
billingAccount.idStringUnique identifier Id of the EntityRefN
relatedPartyarrayRelated Entity reference. A related party defines party or party role linked to a specific entity.N
relatedParty.idStringUnique identifier Id of the related entity.N
relatedParty.nameStringName of the related entity..N
relatedParty.valueStringvalue of the related entity..N
orderTotalPricearrayAn amount, usually of money, that represents the actual price paid by the Customer for this item or this orderN
orderTotalPrice.priceobjectA structure used to define price amount.N
orderTotalPrice.price.taxIncludedAmountobjectAll taxes included amount (expressed in the given currency).N
orderTotalPrice.price.@typeStringWhen sub-classing, this defines the sub-class entity nameN
orderTotalPrice.priceAlterationobjectA structure used to describe a price alteration.N
orderTotalPrice.priceAlteration.priceobjectA structure used to define price amount.N
orderTotalPrice.priceTypestringA category that describes the price, such as recurring, discount, allowance, penalty, and so forthN
orderTotalPrice.priceAlteration.price.taxIncludedAmountobjectAll taxes included amount (expressed in the given currency).N
orderTotalPrice.priceAlteration.price.@typeStringWhen sub-classing, this defines the sub-class entity nameN
productOrderItemObject ArrayAn identified part of the order. A product order is decomposed into one or more order items.N
productOrderItem.idStringUnique identifier of the product. which will be orderitemIdN
productOrderItem.actionStringThe action to be carried out on the Product. Can be: add, modify, delete, noChange.N
productOrderItem.quantityInt32Quantity ordered.N
productOrderItem.itemPriceorderTotalPriceAn amount, usually of money, that represents the actual price paid by the Customer for this item or this order.N
productOrderItem.itemPrice.priceTypestringA category that describes the price, such as recurring, discount, allowance, penalty, and so forthN
productOrderItem.itemPrice.priceObject ArrayA structure used to define price amount.N
productOrderItem.itemPrice.price.taxIncludedAmountObject ArrayAll taxes included amount (expressed in the given currency).N
productOrderItem.itemPrice.price.@typeStringWhen sub-classing, this defines the sub-class entity nameN
productOrderItem.productObject ArrayA product to be created defined by value or existing defined by reference.N
productOrderItem.product.idStringUnique identifier of the product.N
productOrderItem.product.nameStringName of the product. It could be the same as the name of the product offering.N
productOrderItem.product.productSerialNumberStringIs the serial number for the product. This is typically applicable to tangible products e.g. Broadband RouterN
productOrderItem.itemTotalPriceArrayAn amount, usually of money, that represents the actual price paid by the Customer for this item or this order.N
productOrderItem.itemTotalPrice.OrderPriceObject ArrayAn amount, usually of money, that represents the actual price paid by the Customer for this item or this order.N
productOrderItem.itemTotalPrice.OrderPrice.priceObject ArrayA structure used to define price amount.N
productOrderItem.itemTotalPrice.OrderPrice.price.taxIncludedAmountObject ArrayAll taxes included amount (expressed in the given currency).N
productOrderItem.itemTotalPrice.OrderPrice.price.@typeStringWhen sub-classing, this defines the sub-class entity nameN
productOrderItem.product.productCharacteristicObject ArrayDescribes a given characteristic of an object or entity through a name/value pair.N
productOrderItem.product.productCharacteristic.nameStringName of the characteristicN
productOrderItem.product.productCharacteristic.valueTypeStringData type of the value of the characteristicN
productOrderItem.product.productCharacteristic.valueanyThe value of the characteristicN
productOrderItem.product.productPriceorderTotalPriceAn 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.priceobjectA structure used to define price amount.N
productOrderItem.product.productPrice.taxIncludedAmountobjectAll taxes included amount (expressed in the given currency).N
productOrderItem.product.productPrice.@typeStringWhen sub-classing, this defines the sub-class entity nameN
productOrderItem.product.productOrderItemobject ArrayAn identified part of the order. A product order is decomposed into one or more order items.N
productOrderItem.product.productOrderItem.productCharacteristicObject ArrayDescribes a given characteristic of an object or entity through a name/value pair.N
productOrderItem.product.productOrderItem.productCharacteristic.nameStringName of the characteristicN
productOrderItem.product.productOrderItem.productCharacteristic.valueTypeStringData type of the value of the characteristicN
productOrderItem.product.productOrderItem.productCharacteristic.valueanyThe value of the characteristicN
productOrderItem.product.productOrderItem.@typeStringWhen sub-classing, this defines the sub-class entity nameN
productOrderItem.product.@typeStringWhen sub-classing, this defines the sub-class entity nameN
relatedPartyarrayRelated Entity reference. A related party defines party or party role linked to a specific entity.N
relatedParty.idStringUnique identifier Id of the related entity.N
relatedParty.nameStringName of the related entity..N
relatedParty.roleStringRole played by the related partyN
statestringenum: - acknowledged - rejected - pending - held - inProgress - cancelled - completed - failed - partial - assessingCancellation - pendingCancellationN
@typeStringWhen sub-classing, this defines the sub-class entity nameN

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"
    }]
  }

Reviews