Retrieves fulfillment information for the most recent successful order associated with a subscription contract. This includes tracking details, shipment status, delivery estimates, and fulfillment line items from Shopify.
What This Endpoint Returns: Complete fulfillment data for the subscription’s last successfully billed order, queried in real-time from Shopify’s GraphQL API. Shows customers when and how their subscription items will be (or were) delivered.
Fulfillment Data Included:
Shipment Tracking:
Delivery Status:
Fulfillment Details:
Location Information:
Order Determination Logic:
Which Order is Retrieved:
Why This Matters:
Use Cases:
1. Customer Portal “Where’s My Order”:
2. Subscription Order Tracking:
3. Customer Support:
4. Automated Notifications:
5. Subscription Management:
Response Structure:
Returns Shopify Order object with fulfillments:
{
"id": "gid://shopify/Order/123456789",
"name": "#1001",
"fulfillmentOrders": {
"edges": [
{
"node": {
"id": "gid://shopify/FulfillmentOrder/111111",
"status": "SUCCESS",
"fulfillments": {
"edges": [
{
"node": {
"trackingInfo": [
{
"number": "1Z999AA10123456784",
"url": "https://wwwapps.ups.com/tracking/...",
"company": "UPS"
}
],
"status": "IN_TRANSIT",
"estimatedDeliveryAt": "2024-03-20T00:00:00Z",
"deliveredAt": null
}
}
]
}
}
}
]
}
}
Common Scenarios:
Scenario: Order Fulfilled & Shipped
{
"trackingInfo": [{"number": "9400...", "company": "USPS"}],
"status": "IN_TRANSIT",
"estimatedDeliveryAt": "2024-03-18T00:00:00Z"
}
Scenario: Order Delivered
{
"status": "DELIVERED",
"deliveredAt": "2024-03-15T14:23:00Z"
}
Scenario: Not Yet Fulfilled
{
"fulfillmentOrders": {
"edges": [
{
"node": {
"status": "OPEN",
"fulfillments": {"edges": []}
}
}
]
}
}
Scenario: No Order Yet (New Subscription)
Returns null or empty response
Important Considerations:
Real-Time Shopify Query:
Data Freshness:
Null Responses:
Multiple Fulfillments:
Integration Example:
Customer Portal - Track Shipment:
const order = await fetch(
`/api/external/v2/subscription-contract-details/subscription-fulfillments/${contractId}`,
{ headers: { 'X-API-Key': 'your-key' } }
).then(r => r.json());
if (!order) {
return '<p>No shipment information available yet.</p>';
}
const fulfillments = order.fulfillmentOrders?.edges || [];
fulfillments.forEach(fo => {
fo.node.fulfillments?.edges?.forEach(f => {
const tracking = f.node.trackingInfo?.[0];
if (tracking) {
console.log(`Track with ${tracking.company}: ${tracking.number}`);
console.log(`URL: ${tracking.url}`);
}
});
});
Best Practices:
Authentication: Requires valid X-API-Key header
curl --request GET \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contract-details/subscription-fulfillments/{contractId}{
"get__typename": "<string>",
"id": "<string>",
"fulfillmentOrders": {
"get__typename": "<string>",
"nodes": [
{
"get__typename": "<string>",
"fulfillAt": {},
"id": "<string>"
}
],
"pageInfo": {
"get__typename": "<string>",
"hasPreviousPage": true,
"hasNextPage": true,
"startCursor": "<string>",
"endCursor": "<string>"
}
}
}Documentation Index
Fetch the complete documentation index at: https://appstleinc-aeca3e0a.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Contract ID
API Key (Deprecated - Use Header X-API-Key instead)
curl --request GET \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contract-details/subscription-fulfillments/{contractId}{
"get__typename": "<string>",
"id": "<string>",
"fulfillmentOrders": {
"get__typename": "<string>",
"nodes": [
{
"get__typename": "<string>",
"fulfillAt": {},
"id": "<string>"
}
],
"pageInfo": {
"get__typename": "<string>",
"hasPreviousPage": true,
"hasNextPage": true,
"startCursor": "<string>",
"endCursor": "<string>"
}
}
}