import CheckoutIntents from 'checkout-intents';
const client = new CheckoutIntents({
apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const shipment of client.checkoutIntents.shipments.list('id')) {
console.log(shipment);
}{
"pageInfo": {
"hasPreviousPage": true,
"hasNextPage": true,
"endCursor": "<string>",
"startCursor": "<string>"
},
"data": [
{
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"checkoutIntentId": "<string>",
"id": "<string>",
"trackingEvents": [
{
"location": {
"country": "<string>",
"province": "<string>",
"city": "<string>"
},
"displayTime": "<string>",
"displayDate": "<string>",
"description": "<string>"
}
],
"shippedAt": "2023-11-07T05:31:56Z",
"tracking": {
"number": "<string>",
"carrierName": "<string>",
"estimatedDeliveryDate": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"externalId": "<string>",
"status": "shipped"
}
]
}List shipments for a checkout intent
import CheckoutIntents from 'checkout-intents';
const client = new CheckoutIntents({
apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const shipment of client.checkoutIntents.shipments.list('id')) {
console.log(shipment);
}{
"pageInfo": {
"hasPreviousPage": true,
"hasNextPage": true,
"endCursor": "<string>",
"startCursor": "<string>"
},
"data": [
{
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"checkoutIntentId": "<string>",
"id": "<string>",
"trackingEvents": [
{
"location": {
"country": "<string>",
"province": "<string>",
"city": "<string>"
},
"displayTime": "<string>",
"displayDate": "<string>",
"description": "<string>"
}
],
"shippedAt": "2023-11-07T05:31:56Z",
"tracking": {
"number": "<string>",
"carrierName": "<string>",
"estimatedDeliveryDate": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"externalId": "<string>",
"status": "shipped"
}
]
}Rye API key
The id of the checkout intent
Was this page helpful?