XPM

Ship To - Create

Path:

POST /ship-to/cart/{cartId}

Once the digital shopping cart is finalized, the next step is to add the shipping details. Users can go ahead to select the shipping carrier and add the associated shipping details, through this endpoint.

Headers

Content-Type : application/json

x-site-context: {"channel":"com","date":"2019-06-19"}

Consumes

  • application/json

Produces

  • application/json

Parameters

Type: path

Name: cartId

Required: true

Type: body

Name: Shipping details

Required: true

Sample Request

Path

https://{baseurl}/api-cart/ship-to/cart/5eea4b75b253d4000858c8fe

Body:

{
"billTo": ["5e99dba9fcef0314e06b64fd"],
"address": {
"address1":"10400 NE 4th St ",
"city":"Bellevue",
"state":"WA",
"country": "United States",
"zipCode":"98004",
"kind":"shipping",
"name":{
"first":"John",
"last":"Smith"
},
"email": "johnsmith@fabric.inc",
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
}
},
"shipToType": "SHIP_TO_ADDRESS",
"shipMethod": {
"shipMethodId": 10002,
"cost": {
"currency": "USD",
"amount": 10
}
},
"storeId": "store123456789",
"pickupPerson": {
"name": {
"first": "John",
"last": "Smith"
},
"email": "johnsmith@fabric.inc",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
},
"altPickupPerson": {
"name": {
"first": "Jane",
"last": "Smith"
},
"email": "janesmith@fabric.inc",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
}
}

Response

Response Code: 200

Message: OK

Description: You will see this message when the shipping details are successfully created.

Sample

{
"shipMethod": {
"cost": {
"currency": "USD",
"amount": 10
},
"shipMethodId": "10002"
},
"address": {
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
},
"name": {
"first": "John",
"last": "Smith"
},
"address1": "10400 NE 4th St ",
"city": "Bellevue",
"state": "WA",
"country": "United States",
"zipCode": "98004",
"kind": "shipping",
"email": "johnsmith@fabric.inc"
},
"pickupPerson": {
"name": {
"first": "John",
"last": "Smith"
},
"phone": {
"number": "8087769338",
"kind": "Mobile"
},
"email": "johnsmith@fabric.inc"
},
"altPickupPerson": {
"name": {
"first": "Jane",
"last": "Smith"
},
"phone": {
"number": "8087769338",
"kind": "Mobile"
},
"email": "janesmith@fabric.inc"
},
"billTo": [
"5e99dba9fcef0314e06b64fd"
],
"_id": "5e99dd58fcef0314e06b64fe",
"shipToType": "SHIP_TO_ADDRESS",
"storeId": "store123456789",
"cartId": "5e99d75cfcef0314e06b64b8",
"shipToId": 16,
"createdAt": "2020-04-17T16:46:16.352Z",
"updatedAt": "2020-04-17T16:46:16.352Z"
}

Changelog

  • Last updated - July 2020