XM

Retrieve Billing by Bill-to ID

Path:

GET https://{baseurl}/api-cart/bill-to/{billTo-ID}

Through this endpoint, your customer's can retrieve their billing details, easily, based on the specified BilltoID.

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 bill-to ID (from the Add Billing API).

Required: true

Sample Request

GET https://{baseurl}/api-cart/bill-to/60803ab6880a2e0009bc5250

Sampple Response

Response Code: 200

Message: OK

Description: You will see this message when the billing details are successfully retrieved for the specified bill-to ID.

{
"_id": "60803ab6880a2e0009bc5250",
"address": {
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
},
"name": {
"first": "John",
"last": "Demo"
},
"street1": "10400 NE 4th St ",
"city": "Bellevue",
"state": "WA",
"country": "United States",
"zipCode": "98004",
"kind": "shipping",
"email": "[email protected]"
},
"paymentMethod": "VISA",
"cardIdentifier": "4242",
"amount": 24,
"billToId": 345,
"cart": "5f8f0da2d4cc8e00084b9e8e",
"createdAt": "2021-04-21T14:46:14.676Z",
"updatedAt": "2021-04-21T14:46:14.676Z",
"__v": 0
}

Error Code: 404

Message: Not found

Description: You will see this error when the specified bill-to ID is not found or doesn't exist in the system.

{
"code": "BILLTO_NOT_FOUND",
"message": "Bill-to not found."
}

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