GET
/
v1
/
asns
curl --location --request GET 'https://api.stateset.com/v1/asns?status=in_transit&warehouse_id=wh_001&limit=10' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
  "object": "list",
  "data": [
    {
      "id": "asn_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
      "object": "asn",
      "asn_number": "ASN-2024-00001",
      "status": "in_transit",
      "created_at": "2024-01-15T14:30:00Z",
      "updated_at": "2024-01-16T08:00:00Z",
      "purchase_order_id": "po_123456789",
      "purchase_order_number": "PO-2024-00123",
      "supplier": {
        "id": "sup_abc123",
        "name": "AudioTech Suppliers Inc."
      },
      "warehouse": {
        "id": "wh_001",
        "name": "Main Distribution Center"
      },
      "shipment_date": "2024-01-15T14:00:00Z",
      "expected_arrival_date": "2024-01-18T10:00:00Z",
      "tracking_info": {
        "carrier": "UPS",
        "tracking_number": "1Z999AA10123456784",
        "current_status": "In Transit",
        "last_update": "2024-01-16T08:00:00Z"
      },
      "item_summary": {
        "total_items": 2,
        "total_quantity": 1500,
        "total_value": {
          "amount": 4200000,
          "currency": "USD"
        }
      }
    },
    {
      "id": "asn_xyz789def456",
      "object": "asn",
      "asn_number": "ASN-2024-00002",
      "status": "in_transit",
      "created_at": "2024-01-16T09:00:00Z",
      "updated_at": "2024-01-16T15:00:00Z",
      "purchase_order_id": "po_987654321",
      "purchase_order_number": "PO-2024-00124",
      "supplier": {
        "id": "sup_def456",
        "name": "TechConnect Wholesale"
      },
      "warehouse": {
        "id": "wh_001",
        "name": "Main Distribution Center"
      },
      "shipment_date": "2024-01-16T08:00:00Z",
      "expected_arrival_date": "2024-01-19T14:00:00Z",
      "tracking_info": {
        "carrier": "FedEx",
        "tracking_number": "123456789012",
        "current_status": "In Transit",
        "last_update": "2024-01-16T15:00:00Z"
      },
      "item_summary": {
        "total_items": 5,
        "total_quantity": 2500,
        "total_value": {
          "amount": 1875000,
          "currency": "USD"
        }
      }
    }
  ],
  "has_more": true,
  "total_count": 15,
  "next_cursor": "eyJpZCI6ImFzbl94eXo3ODlkZWY0NTYifQ=="
}

Query Parameters

limit
integer
Number of ASNs to return (default: 20, max: 100)
offset
integer
Number of ASNs to skip (for pagination)
cursor
string
Cursor for pagination (alternative to offset)
status
string
Filter by status: “pending”, “in_transit”, “delivered”, “received”, “partially_received”, “cancelled”
purchase_order_id
string
Filter by purchase order ID
supplier_id
string
Filter by supplier ID
warehouse_id
string
Filter by destination warehouse ID
carrier
string
Filter by shipping carrier
expected_arrival_after
string
Filter ASNs with expected arrival after this date (ISO 8601)
expected_arrival_before
string
Filter ASNs with expected arrival before this date (ISO 8601)
created_after
string
Filter ASNs created after this date (ISO 8601)
created_before
string
Filter ASNs created before this date (ISO 8601)
has_discrepancies
boolean
Filter ASNs with receiving discrepancies
Search by ASN number, tracking number, or supplier name
sort_by
string
Sort field: “created_at”, “expected_arrival_date”, “asn_number”, “status” (default: “created_at”)
sort_order
string
Sort order: “asc” or “desc” (default: “desc”)

Response

object
string
Always “list”
data
array
Array of ASN objects
has_more
boolean
Whether there are more ASNs to retrieve
total_count
integer
Total number of ASNs matching the filters
next_cursor
string
Cursor for retrieving the next page
curl --location --request GET 'https://api.stateset.com/v1/asns?status=in_transit&warehouse_id=wh_001&limit=10' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
  "object": "list",
  "data": [
    {
      "id": "asn_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
      "object": "asn",
      "asn_number": "ASN-2024-00001",
      "status": "in_transit",
      "created_at": "2024-01-15T14:30:00Z",
      "updated_at": "2024-01-16T08:00:00Z",
      "purchase_order_id": "po_123456789",
      "purchase_order_number": "PO-2024-00123",
      "supplier": {
        "id": "sup_abc123",
        "name": "AudioTech Suppliers Inc."
      },
      "warehouse": {
        "id": "wh_001",
        "name": "Main Distribution Center"
      },
      "shipment_date": "2024-01-15T14:00:00Z",
      "expected_arrival_date": "2024-01-18T10:00:00Z",
      "tracking_info": {
        "carrier": "UPS",
        "tracking_number": "1Z999AA10123456784",
        "current_status": "In Transit",
        "last_update": "2024-01-16T08:00:00Z"
      },
      "item_summary": {
        "total_items": 2,
        "total_quantity": 1500,
        "total_value": {
          "amount": 4200000,
          "currency": "USD"
        }
      }
    },
    {
      "id": "asn_xyz789def456",
      "object": "asn",
      "asn_number": "ASN-2024-00002",
      "status": "in_transit",
      "created_at": "2024-01-16T09:00:00Z",
      "updated_at": "2024-01-16T15:00:00Z",
      "purchase_order_id": "po_987654321",
      "purchase_order_number": "PO-2024-00124",
      "supplier": {
        "id": "sup_def456",
        "name": "TechConnect Wholesale"
      },
      "warehouse": {
        "id": "wh_001",
        "name": "Main Distribution Center"
      },
      "shipment_date": "2024-01-16T08:00:00Z",
      "expected_arrival_date": "2024-01-19T14:00:00Z",
      "tracking_info": {
        "carrier": "FedEx",
        "tracking_number": "123456789012",
        "current_status": "In Transit",
        "last_update": "2024-01-16T15:00:00Z"
      },
      "item_summary": {
        "total_items": 5,
        "total_quantity": 2500,
        "total_value": {
          "amount": 1875000,
          "currency": "USD"
        }
      }
    }
  ],
  "has_more": true,
  "total_count": 15,
  "next_cursor": "eyJpZCI6ImFzbl94eXo3ODlkZWY0NTYifQ=="
}