POST
/
v1
/
asns
curl --location --request POST 'https://api.stateset.com/v1/asns' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
    "purchase_order_id": "po_123456789",
    "supplier_id": "sup_abc123",
    "shipment_date": "2024-01-15T14:00:00Z",
    "expected_arrival_date": "2024-01-18T10:00:00Z",
    "warehouse_id": "wh_001",
    "tracking_info": {
        "carrier": "UPS",
        "tracking_number": "1Z999AA10123456784",
        "service_type": "Ground"
    },
    "items": [
        {
            "sku": "WBH-001",
            "quantity_shipped": 500,
            "quantity_ordered": 500,
            "unit_cost": {
                "amount": 7500,
                "currency": "USD"
            },
            "lot_number": "LOT-2024-001"
        },
        {
            "sku": "USB-C-001",
            "quantity_shipped": 1000,
            "quantity_ordered": 1000,
            "unit_cost": {
                "amount": 450,
                "currency": "USD"
            },
            "lot_number": "LOT-2024-002"
        }
    ],
    "packaging_details": {
        "total_packages": 10,
        "total_pallets": 2,
        "total_weight": {
            "value": 250,
            "unit": "lb"
        }
    },
    "notes": "Please schedule receiving appointment. Fragile electronics."
}'
{
  "id": "asn_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
  "object": "asn",
  "asn_number": "ASN-2024-00001",
  "status": "pending",
  "created_at": "2024-01-15T14:30:00Z",
  "updated_at": "2024-01-15T14:30:00Z",
  "purchase_order_id": "po_123456789",
  "supplier_id": "sup_abc123",
  "warehouse_id": "wh_001",
  "shipment_date": "2024-01-15T14:00:00Z",
  "expected_arrival_date": "2024-01-18T10:00:00Z",
  "actual_arrival_date": null,
  "tracking_info": {
    "carrier": "UPS",
    "tracking_number": "1Z999AA10123456784",
    "service_type": "Ground",
    "tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784"
  },
  "items": [
    {
      "id": "asn_item_123",
      "sku": "WBH-001",
      "product_name": "Wireless Bluetooth Headphones",
      "quantity_shipped": 500,
      "quantity_ordered": 500,
      "quantity_received": 0,
      "unit_cost": {
        "amount": 7500,
        "currency": "USD"
      },
      "lot_number": "LOT-2024-001",
      "status": "pending"
    },
    {
      "id": "asn_item_124",
      "sku": "USB-C-001",
      "product_name": "USB-C Charging Cable",
      "quantity_shipped": 1000,
      "quantity_ordered": 1000,
      "quantity_received": 0,
      "unit_cost": {
        "amount": 450,
        "currency": "USD"
      },
      "lot_number": "LOT-2024-002",
      "status": "pending"
    }
  ],
  "packaging_details": {
    "total_packages": 10,
    "total_pallets": 2,
    "total_weight": {
      "value": 250,
      "unit": "lb"
    }
  },
  "notes": "Please schedule receiving appointment. Fragile electronics.",
  "metadata": {}
}
This endpoint creates a new ASN (Advanced Shipping Notice) to notify about incoming shipments from suppliers. ASNs help warehouses prepare for receiving inventory and automate the receiving process.

Authentication

This endpoint requires a valid API key with asns:write permissions.
Authorization: Bearer YOUR_API_KEY

Request Body

purchase_order_id
string
required
The purchase order ID this ASN is associated with
supplier_id
string
required
The supplier ID sending the shipment
shipment_date
string
required
Date when the shipment was sent (ISO 8601)
expected_arrival_date
string
required
Expected delivery date at warehouse (ISO 8601)
warehouse_id
string
required
Destination warehouse ID
tracking_info
object
required
Shipping and tracking information
items
array
required
Array of items being shipped
packaging_details
object
Packaging and palletization information
shipping_documents
array
Related shipping documents
notes
string
Additional notes or special instructions for receiving
metadata
object
Additional custom fields as key-value pairs

Response

id
string
Unique ASN identifier
object
string
Always “asn”
asn_number
string
System-generated ASN number
status
string
ASN status: “pending”, “in_transit”, “delivered”, “received”, “cancelled”
created_at
string
ISO 8601 timestamp of creation
updated_at
string
ISO 8601 timestamp of last update
curl --location --request POST 'https://api.stateset.com/v1/asns' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
    "purchase_order_id": "po_123456789",
    "supplier_id": "sup_abc123",
    "shipment_date": "2024-01-15T14:00:00Z",
    "expected_arrival_date": "2024-01-18T10:00:00Z",
    "warehouse_id": "wh_001",
    "tracking_info": {
        "carrier": "UPS",
        "tracking_number": "1Z999AA10123456784",
        "service_type": "Ground"
    },
    "items": [
        {
            "sku": "WBH-001",
            "quantity_shipped": 500,
            "quantity_ordered": 500,
            "unit_cost": {
                "amount": 7500,
                "currency": "USD"
            },
            "lot_number": "LOT-2024-001"
        },
        {
            "sku": "USB-C-001",
            "quantity_shipped": 1000,
            "quantity_ordered": 1000,
            "unit_cost": {
                "amount": 450,
                "currency": "USD"
            },
            "lot_number": "LOT-2024-002"
        }
    ],
    "packaging_details": {
        "total_packages": 10,
        "total_pallets": 2,
        "total_weight": {
            "value": 250,
            "unit": "lb"
        }
    },
    "notes": "Please schedule receiving appointment. Fragile electronics."
}'
{
  "id": "asn_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
  "object": "asn",
  "asn_number": "ASN-2024-00001",
  "status": "pending",
  "created_at": "2024-01-15T14:30:00Z",
  "updated_at": "2024-01-15T14:30:00Z",
  "purchase_order_id": "po_123456789",
  "supplier_id": "sup_abc123",
  "warehouse_id": "wh_001",
  "shipment_date": "2024-01-15T14:00:00Z",
  "expected_arrival_date": "2024-01-18T10:00:00Z",
  "actual_arrival_date": null,
  "tracking_info": {
    "carrier": "UPS",
    "tracking_number": "1Z999AA10123456784",
    "service_type": "Ground",
    "tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784"
  },
  "items": [
    {
      "id": "asn_item_123",
      "sku": "WBH-001",
      "product_name": "Wireless Bluetooth Headphones",
      "quantity_shipped": 500,
      "quantity_ordered": 500,
      "quantity_received": 0,
      "unit_cost": {
        "amount": 7500,
        "currency": "USD"
      },
      "lot_number": "LOT-2024-001",
      "status": "pending"
    },
    {
      "id": "asn_item_124",
      "sku": "USB-C-001",
      "product_name": "USB-C Charging Cable",
      "quantity_shipped": 1000,
      "quantity_ordered": 1000,
      "quantity_received": 0,
      "unit_cost": {
        "amount": 450,
        "currency": "USD"
      },
      "lot_number": "LOT-2024-002",
      "status": "pending"
    }
  ],
  "packaging_details": {
    "total_packages": 10,
    "total_pallets": 2,
    "total_weight": {
      "value": 250,
      "unit": "lb"
    }
  },
  "notes": "Please schedule receiving appointment. Fragile electronics.",
  "metadata": {}
}