Skip to main content
This guide covers the end-to-end workflow for managing orders from cart platforms (e.g. Shopify, Amazon, Etsy) using the Trackstar Cart API.

Overview

The cart order fulfillment workflow typically involves:
  1. Syncing your product catalog
  2. Pulling in orders as they arrive
  3. Pushing back shipment and tracking information after fulfillment
  4. Adjusting inventory levels in the cart platform

1. Sync Products

Use the Get Products endpoint to pull the product catalog from your customer’s cart platform.
Every variant and parent product are listed in this endpoint. A variant will have a parent_product_id pointing to its parent. Parent products are indicated by having their parent_product_id set to the same value as their id. The source of truth for price and inventory levels is on the variants, not the parent product.
curl -X GET https://production.trackstarhq.com/cart/products \
  -H "x-trackstar-api-key: YOUR_API_KEY" \
  -H "x-trackstar-access-token: YOUR_ACCESS_TOKEN"

2. Pull Orders

Use the Get Orders endpoint to pull orders as they come in. You can filter by date to get only recent orders. For real-time notifications, subscribe to the cart-order.created webhook event.
curl -X GET "https://production.trackstarhq.com/cart/orders?created_date[gte]=2026-04-01T00:00:00Z" \
  -H "x-trackstar-api-key: YOUR_API_KEY" \
  -H "x-trackstar-access-token: YOUR_ACCESS_TOKEN"

Order Statuses

StatusDefinition
openOrder has been placed.
confirmedOrder has been confirmed by the cart system.
processingOrder is being processed by the warehouse.
partially_fulfilledOrder has been partially fulfilled.
fulfilledOrder has been fulfilled and shipped.
backorderedOrder cannot be fulfilled due to lack of inventory.
exceptionThere is an issue with the order.
cancelledOrder has been cancelled.

3. Create Order Shipment

After fulfilling an order, use the Create Shipment endpoint to push tracking information back to the cart platform.
curl -X POST https://production.trackstarhq.com/cart/orders/ORDER_ID/shipments \
  -H "Content-Type: application/json" \
  -H "x-trackstar-api-key: YOUR_API_KEY" \
  -H "x-trackstar-access-token: YOUR_ACCESS_TOKEN" \
  -d '{
    "tracking_number": "1Z999AA1234567890",
    "tracking_url": "https://www.fedex.com/apps/fedextrack/?tracknumbers=1Z999AA1234567890",
    "carrier_name": "FedEx",
    "shipping_method_name": "FedEx Ground"
  }'

4. Adjust Inventory

Use the Adjust Inventory endpoint to update inventory levels in the cart platform. This is useful for syncing stock changes that happen outside the cart (e.g. warehouse adjustments, returns processing). The adjustment_type field controls how the quantity value is applied:
  • "increase" — add to the current stock level
  • "decrease" — subtract from the current stock level
  • "exact" — set the stock level to this exact quantity
Inventory can only be adjusted on variant products, not parent products. Use the parent_product_id field to identify variants (see Step 1).
curl -X PUT https://production.trackstarhq.com/cart/products/PRODUCT_ID/adjust-inventory \
  -H "Content-Type: application/json" \
  -H "x-trackstar-api-key: YOUR_API_KEY" \
  -H "x-trackstar-access-token: YOUR_ACCESS_TOKEN" \
  -d '{
    "quantity": 50,
    "adjustment_type": "exact",
    "warehouse_id": "warehouse_main"
  }'

Real-Time Updates

Use webhooks to get notified in real time:
EventDescription
cart-order.createdA new order has been placed.
cart-order.updatedAn order has been updated (status change, etc.).
cart-order.shipment.createdA shipment has been created for an order.
cart-product.createdA new product has been added to the catalog.
cart-product.updatedA product has been updated (price, inventory, etc.).