• No results found

Below is an example of a request for creating a Shipping Order resource for the following use case:

In document Shipping Order API REST Specification (Page 65-100)

• 1 Product Order

• 3 items in the order (1 phone, 1 headset, 1 simcard)

• 1 Recipient (role: recipient)

• all items delivered to the same recipient at one address

• Logistic Partner can decide on shipments level

Request

POST /tmf-api/shippingOrder/v4.0/shippingOrder Content-Type: application/json

{

"productOrder": { "id": "7800",

"href": "http://host/productOrderingManagement/v4/productOrder/7800"

},

"relatedParty": [ {

"name": "John Doe", "role": "Recepient",

"@referredType": "Individual", "contactMedium": [

{

"mediumType": "Phone", "preferred": true,

"characteristic": {

"receiptConfirmation": "SignatureRequired", "shippingType": "largePackage",

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "100",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/100"

},

"productOffering": { "id": "4500",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4500"

},

"quantity": "1"

}, {

"id": "2", "action": "add", "productOrderItem": { "id": "2",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"productOffering": { "id": "4600",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4600"

},

"product": { "id": "200",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/200"

},

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "300", "name": "Red 75",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/300"

},

"productOffering": { "id": "4700",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4700"

},

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "@baseType": "Place",

"@referredType": "GeographicAddress", "streetNr": "23",

"stateOrProvince": "Oxfordshire",

"country": "United Kingdom", "role": "Recipient"

},

"shippingOrderOffering": { "id": "8000",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/8000"

},

"href": "http://host/productOrderingManagement/v4/productOrder/7800"

},

"city": "Oxford",

"receiptConfirmation": "SignatureRequired", "shippingType": "largePackage",

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "100",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/100"

},

"productOffering": { "id": "4500",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4500"

},

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"productOffering": { "id": "4600",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4600"

},

"product": { "id": "200",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/200"

},

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "300", "name": "Red 75",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/300"

},

"productOffering": { "id": "4700",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4700"

},

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"@baseType": "Place",

"@referredType": "GeographicAddress", "streetNr": "23",

"stateOrProvince": "Oxfordshire", "country": "United Kingdom"

},

"shippingOrderOffering": { "id": "8000",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/8000"

},

"shippingOrderPrice": {

"priceType": "Dicounted 10%", "price": {

"dutyFreeAmount": { "unit": "EUR", "value": 5 },

"taxIncludedAmount": { "unit": "EUR", "value": 10 }

} } }

Below is an example of a request for creating a Shipping Order resource for the following use case:

• 1 Product Order

• 3 items in the order (1 phone, 1 headset, 1 simcard)

• 2 Recipient (role: recipient), 1 paying customer (John Doe)

• 2 items (Phone & simcard) to be delivered to 1 address, headset to be delivered to another address

• Logistic Partner can decide on shipments level

Request

POST /tmf-api/shippingOrder/v4.0/shippingOrder Content-Type: application/json

{

"productOrder": { "id": "7800",

"href": "http://host/productOrderingManagement/v4/productOrder/7800"

},

"relatedParty": [ {

"name": "John Doe", "role": "Customer",

"@referredType": "Individual", "contactMedium": [

{

"mediumType": "Phone", "preferred": true, "characteristic": {

"phoneNumber": "00447766000111"

} }, {

"characteristic": {

"receiptConfirmation": "SignatureRequired", "shippingType": "largePackage",

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "100",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/100"

},

"productOffering": { "id": "4500",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4500"

},

"preferred": true,

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"productOffering": { "id": "4600",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4600"

},

"product": { "id": "200",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/200"

},

"phoneNumber": "00447766323987"

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "300", "name": "Red 75",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/300"

},

"productOffering": { "id": "4700", "name": "Red 75",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4700"

},

}

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/8000"

},

"href": "http://host/productOrderingManagement/v4/productOrder/7800"

},

"receiptConfirmation": "SignatureRequired", "shippingType": "largePackage",

"href": "https://localhost/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "100",

"name": "Maker XPhone",

"href": "https://localhost/tmf-api/productInventoryManagement/v4/product/100"

},

"productOffering": { "id": "4500",

"name": "Maker XPhone",

"href": "https://localhost/tmf-api/productCatalogManagement/v4/productOffering/4500"

},

"href": "https://localhost/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"href": "https://localhost/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"productOffering": { "id": "4600",

"name": "Headset XQuevy",

"href": "https://localhost/tmf-api/productCatalogManagement/v4/productOffering/4600"

},

"product": { "id": "200",

"name": "Headset XQuevy",

"href": "https://localhost/tmf-api/productInventoryManagement/v4/product/200"

},

"href": "https://localhost/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"href": "https://localhost/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "300", "name": "Red 75",

"href": "https://localhost/tmf-api/productInventoryManagement/v4/product/300"

},

"productOffering": { "id": "4700",

"name": "Headset XQuevy",

"href": "https://localhost/tmf-api/productCatalogManagement/v4/productOffering/4700"

},

"href": "https://localhost/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"href": "https://localhost/tmf-api/productCatalogManagement/v4/productOffering/8000"

},

}

Below is an example of a request for creating a Shipping Order resource for the following use case:

• 1 Product Order

• 3 items in the order (1 phone, 1 headset, 1 simcard)

• 1 Recipient (role: recipient)

• 2 items (Phone & simcard) to be shipped using the NextDay delivery, carrier Alfa

• 1 item (headset) to be shipped using a cheaper rate carrier, carrier Beta

• Logistic Partner can decide on shipments level

Request

POST /tmf-api/shippingOrder/v4.0/shippingOrder Content-Type: application/json

{

"productOrder": { "id": "7800",

"href": "http://host/productOrderingManagement/v4/productOrder/7800"

},

"relatedParty": [ {

"name": "John Doe", "role": "Customer",

"@referredType": "Individual", "contactMedium": [

{

"mediumType": "Phone", "preferred": true, "characteristic": {

"phoneNumber": "00447766000111"

} }, {

"mediumType": "Address", "characteristic": {

"postCode": "OX11 6TR", "city": "Oxford",

"street1": "23 Borney Road"

} } ] } ],

"placeTo": {

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"@baseType": "Place",

"@referredType": "GeographicAddress", "streetNr": "23",

"stateOrProvince": "Oxfordshire", "country": "United Kingdom"

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "100",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/100"

},

"productOffering": { "id": "4500",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4500"

},

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9000"

},

}

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"productOffering": { "id": "4600",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4600"

},

"product": { "id": "200",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/200"

},

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9000"

},

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "300", "name": "Red 75",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/300"

},

"productOffering": { "id": "4700",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4700"

},

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/8001"

},

Response

"href": "http://host/productOrderingManagement/v4/productOrder/7800"

},

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"@baseType": "Place",

"@referredType": "GeographicAddress", "streetNr": "23",

"stateOrProvince": "Oxfordshire", "country": "United Kingdom"

},

"shippingOrderItem": [

{

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "100",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/100"

},

"productOffering": { "id": "4500",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4500"

},

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9000"

},

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"productOffering": { "id": "4600",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4600"

},

"product": { "id": "200",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/200"

},

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9000"

},

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "300", "name": "Red 75",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/300"

},

"productOffering": { "id": "4700",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4700"

},

"quantity": "1", "shippingInstruction": { "carrierName": "Beta",

"carrierId": "333",

"carrierServiceCode": "BT200",

"deliverySpeed": "BusinessDeliverySpeed", "signatureRequired": true,

"signatureRequiredBy": "adult"

},

"shippingOrderItemOffering": { "id": "8001",

"name": "Beta Business Day Delivery",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/8001"

},

"shippingOrderItemPrice": { "priceType": "one-off", "price": {

"taxIncludedAmount": { "unit": "EUR", "value": 2 }

} } } ],

"shippingOrderPrice": {

"priceType": "Dicounted 10%", "price": {

"dutyFreeAmount": { "unit": "EUR", "value": 5 },

"taxIncludedAmount": { "unit": "EUR", "value": 10 }

} } }

Below is an example of a request for creating a Shipping Order resource for the following use case:

• 1 Product Order

• 3 items in the order (1 phone, 1 headset, 1 simcard)

• 2 Recipients (role: recipient), 1 customer

• 2 locations (phone&headset to one address and simcard to another address)

• shipping price is provided for each item

• shipping offering ref is provided for each item

• each item has a ProductOrderItemRef - points to the product order

• each item has a ProductRef - points to the product inventory

• shipping instructions specified at the item level

Request

"href": "http://host/productOrderingManagement/v4/productOrder/7800"

},

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "100",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/100"

},

"productOffering": { "id": "4500",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4500"

},

"shippingOrderItemOffering": { "id": "9000",

"name": "Next Day Delivery",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9000"

},

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

},

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"productOffering": { "id": "4600",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4600"

},

"product": { "id": "200",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/200"

},

"shippingOrderItemOffering": { "id": "9000",

"name": "Next Day Delivery",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9000"

},

"placeTo": { "id": "9979",

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

}

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "300", "name": "Red 75",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/300"

},

"productOffering": { "id": "4700",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4700"

},

"shippingOrderItemOffering": { "id": "9100",

"name": "Business Day Delivery",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9100"

},

"endDateTime": "2021-04-11T20:00:00.00Z"

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/10000", "role": "DeliveryAddress",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/8000"

"href": "http://host/productOrderingManagement/v4/productOrder/7800"

},

}

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "100",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/100"

},

"productOffering": { "id": "4500",

"name": "Maker XPhone",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4500"

},

"shippingOrderItemOffering": { "id": "9000",

"name": "Next Day Delivery",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9000"

},

},

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"productOffering": { "id": "4600",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4600"

},

"product": { "id": "200",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/200"

},

"shippingOrderItemOffering": { "id": "9000",

"name": "Next Day Delivery",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9000"

},

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/9979", "role": "DeliveryAddress",

}

"href": "https://host/tmf-api/productOrder/v4/productOrder/7800", "productOrderId": "7800"

},

"product": { "id": "300", "name": "Red 75",

"href": "https://host/tmf-api/productInventoryManagement/v4/product/300"

},

"productOffering": { "id": "4700",

"name": "Headset XQuevy",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/4700"

},

"shippingOrderItemOffering": { "id": "9100",

"name": "Business Day Delivery",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/9100"

},

"shippingOrderItemPrice": {

"href": "https://host/tmf-api/geographicAddressManagement/v4/geographicAddress/10000", "role": "DeliveryAddress",

"phoneNumber": "00447766000111"

} }, {

"mediumType": "Address", "characteristic": {

"postCode": "OX11 6TR", "city": "Oxford",

"street1": "23 Borney Road"

} } ] } ],

"shipment": {

"requestedDeliveryDate": "2021-04-11T16:00:00.00Z"

} } ],

"shippingOrderOffering": { "id": "8000",

"href": "https://host/tmf-api/productCatalogManagement/v4/productOffering/8000"

},

"shippingOrderPrice": { "priceType": "Dicounted", "price": {

"dutyFreeAmount": { "unit": "EUR", "value": 5 },

"taxIncludedAmount": { "unit": "EUR", "value": 10 }

} } }

In document Shipping Order API REST Specification (Page 65-100)

Related documents