XM
Powered By GitBook
Retrieve Billing by Ship-to ID
Path:
1
GET https://{baseurl}/api-cart/bill-to/ship-to/{shipToId}
Copied!
Through this endpoint, your customer's can retrieve their billing addresses based on the specified shipToId.

Headers

Content-Type : application/json
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Parameters

Type : path
Name : The 24 character system-generated ship-to ID (from the Add Shipping API).
Required: true

Sample Request

1
https://{baseurl}/api-cart/bill-to/ship-to/5e99dd58fcef0314e06b64fe
Copied!

Sample Response

Response Code: 200
Message: OK
Description: You will see this message when the billing details are successfully retrieved based on the specified ship-to ID.
1
{
2
"_id": "60803976439dc70009b2b8d2",
3
"address": {
4
"street1": "10400 NE 4th St ",
5
"city": "Bellevue",
6
"state": "WA",
7
"country": "United States",
8
"zipCode": "98004",
9
"kind": "shipping",
10
"name": {
11
"first": "John",
12
"last": "Demo"
13
},
14
"email": "[email protected]",
15
"phone": {
16
"number": "123-992-9404",
17
"kind": "Mobile"
18
}
19
},
20
"pickupPerson": {
21
"name": {
22
"first": "John",
23
"last": "Doe"
24
},
25
"email": "[email protected]",
26
"phone": {
27
"number": "8087769338",
28
"kind": "Mobile"
29
}
30
},
31
"altPickupPerson": {
32
"name": {
33
"first": "Jane",
34
"last": "Doe"
35
},
36
"email": "[email protected]",
37
"phone": {
38
"number": "8087769338",
39
"kind": "Mobile"
40
}
41
},
42
"billTo": [
43
{
44
"_id": "5f5020443e62350007fe285f",
45
"address": {
46
"phone": {
47
"number": "123-992-9404",
48
"kind": "Mobile"
49
},
50
"name": {
51
"first": "John",
52
"last": "Demo"
53
},
54
"street1": "10400 NE 4th St ",
55
"city": "Bellevue",
56
"state": "WA",
57
"country": "United States",
58
"zipCode": "98004",
59
"kind": "shipping",
60
"email": "[email protected]"
61
},
62
"paymentMethod": "VISA",
63
"cardIdentifier": "4242",
64
"amount": 24,
65
"billToId": 3,
66
"cart": "5f8f0da2d4cc8e00084b9e8e",
67
"createdAt": "2020-09-02T22:44:20.211Z",
68
"updatedAt": "2020-09-02T22:44:20.211Z",
69
"__v": 0
70
}
71
],
72
"shipToType": "SHIP_TO_ADDRESS",
73
"taxCode": "FR1000",
74
"warehouseId": "123456789012345678903234",
75
"isPickup": true,
76
"cartId": "5f8f0da2d4cc8e00084b9e8e",
77
"shipToId": 749,
78
"createdAt": "2021-04-21T14:40:54.644Z",
79
"updatedAt": "2021-04-21T14:44:39.848Z",
80
"__v": 0,
81
"shipMethod": {
82
"shipMethodId": "10105",
83
"cost": {
84
"amount": 12,
85
"currency": "USD"
86
},
87
"shipmentCarrier": "FedEx"
88
},
89
"storeId": "store123456789"
90
}
Copied!
Error Code: 404
Message: Not found
Description: You will see this error when the specified ship-to ID is not found or doesn't exist in the system.
1
{
2
"code": "SHIPTO_NOT_FOUND",
3
"message": "Ship-to not found."
4
}
Copied!
Error Code: 500
Message: Internal Server Error
Description: You will see this error when the account number is incorrect in the x-site-context (for a multi-tenent client).

Change Log

    June - 2021
    July - 2020 First updated
Last modified 2mo ago
Copy link
Contents
Change Log