curl --location --request POST 'https://api.stateset.com/api/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."
}'
mutation CreateASN {
createASN(input: {
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
unit_cost: {
amount: 7500
currency: "USD"
}
}
]
}) {
id
asn_number
status
expected_arrival_date
items {
sku
quantity_shipped
}
}
}
const asn = await stateset.asns.create({
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"
}
],
packaging_details: {
total_packages: 10,
total_pallets: 2,
total_weight: {
value: 250,
unit: "lb"
}
}
});
asn = stateset.asns.create({
"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"
}
]
})
{
"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": {}
}
Create ASN
Create an Advanced Shipping Notice for inbound shipments
POST
/
api
/
v1
/
asns
curl --location --request POST 'https://api.stateset.com/api/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."
}'
mutation CreateASN {
createASN(input: {
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
unit_cost: {
amount: 7500
currency: "USD"
}
}
]
}) {
id
asn_number
status
expected_arrival_date
items {
sku
quantity_shipped
}
}
}
const asn = await stateset.asns.create({
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"
}
],
packaging_details: {
total_packages: 10,
total_pallets: 2,
total_weight: {
value: 250,
unit: "lb"
}
}
});
asn = stateset.asns.create({
"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"
}
]
})
{
"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 withasns:write permissions.
Authorization: Bearer YOUR_API_KEY
Request Body
string
required
The purchase order ID this ASN is associated with
string
required
The supplier ID sending the shipment
string
required
Date when the shipment was sent (ISO 8601)
string
required
Expected delivery date at warehouse (ISO 8601)
string
required
Destination warehouse ID
object
required
array
required
Array of items being shipped
Show Item object properties
Show Item object properties
string
required
Product SKU
integer
required
Quantity being shipped
integer
Original quantity ordered (for reference)
string
Lot or batch number for tracking
string
Expiration date for perishable items (ISO 8601)
array
Array of serial numbers for serialized items
object
Packaging and palletization information
Show Packaging properties
Show Packaging properties
integer
Total number of packages/boxes
integer
Total number of pallets
object
array
string
Additional notes or special instructions for receiving
object
Additional custom fields as key-value pairs
Response
string
Unique ASN identifier
string
Always “asn”
string
System-generated ASN number
string
ASN status: “pending”, “in_transit”, “delivered”, “received”, “cancelled”
string
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of last update
curl --location --request POST 'https://api.stateset.com/api/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."
}'
mutation CreateASN {
createASN(input: {
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
unit_cost: {
amount: 7500
currency: "USD"
}
}
]
}) {
id
asn_number
status
expected_arrival_date
items {
sku
quantity_shipped
}
}
}
const asn = await stateset.asns.create({
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"
}
],
packaging_details: {
total_packages: 10,
total_pallets: 2,
total_weight: {
value: 250,
unit: "lb"
}
}
});
asn = stateset.asns.create({
"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"
}
]
})
{
"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": {}
}
⌘I