> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get ASN

> Retrieve a single ASN by ID with full shipment details

### Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the ASN to retrieve
</ParamField>

### Query Parameters

<ParamField query="include_receiving_data" type="boolean">
  Include detailed receiving data if available (default: true)
</ParamField>

<ParamField query="include_tracking_history" type="boolean">
  Include tracking status history (default: false)
</ParamField>

### Response

<ResponseField name="id" type="string">
  Unique ASN identifier
</ResponseField>

<ResponseField name="object" type="string">
  Always "asn"
</ResponseField>

<ResponseField name="asn_number" type="string">
  System-generated ASN number
</ResponseField>

<ResponseField name="status" type="string">
  Current status: "pending", "in\_transit", "delivered", "received", "partially\_received", "cancelled"
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of creation
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp of last update
</ResponseField>

<ResponseField name="purchase_order_id" type="string">
  Associated purchase order ID
</ResponseField>

<ResponseField name="supplier" type="object">
  Supplier information
</ResponseField>

<ResponseField name="warehouse" type="object">
  Destination warehouse details
</ResponseField>

<ResponseField name="shipment_date" type="string">
  Date when shipment was sent
</ResponseField>

<ResponseField name="expected_arrival_date" type="string">
  Expected delivery date
</ResponseField>

<ResponseField name="actual_arrival_date" type="string">
  Actual delivery date (when delivered)
</ResponseField>

<ResponseField name="tracking_info" type="object">
  Shipping and tracking details
</ResponseField>

<ResponseField name="items" type="array">
  Array of items with shipping and receiving details
</ResponseField>

<ResponseField name="packaging_details" type="object">
  Packaging and palletization information
</ResponseField>

<ResponseField name="receiving_data" type="object">
  Receiving information if ASN has been processed

  <Expandable title="Receiving data properties">
    <ResponseField name="received_date" type="string">
      Date when items were received
    </ResponseField>

    <ResponseField name="received_by" type="string">
      User who processed the receiving
    </ResponseField>

    <ResponseField name="discrepancies" type="array">
      Any discrepancies found during receiving
    </ResponseField>

    <ResponseField name="notes" type="string">
      Receiving notes
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="shipping_documents" type="array">
  Related shipping documents
</ResponseField>

<ResponseField name="notes" type="string">
  Additional notes or instructions
</ResponseField>

<ResponseField name="metadata" type="object">
  Custom metadata fields
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request GET 'https://api.stateset.com/v1/asns/asn_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
  --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```graphQL GraphQL theme={null}
  query GetASN($id: ID!) {
    asn(id: $id) {
      id
      asn_number
      status
      supplier {
        id
        name
      }
      warehouse {
        id
        name
      }
      shipment_date
      expected_arrival_date
      actual_arrival_date
      tracking_info {
        carrier
        tracking_number
        tracking_url
        current_status
      }
      items {
        id
        sku
        product_name
        quantity_shipped
        quantity_received
        status
        discrepancies {
          type
          expected
          actual
          notes
        }
      }
      receiving_data {
        received_date
        received_by
        total_items_received
        discrepancy_count
      }
    }
  }
  ```

  ```javascript Node.js theme={null}
  const asn = await stateset.asns.retrieve(
    'asn_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    {
      include_receiving_data: true,
      include_tracking_history: true
    }
  );
  ```

  ```python Python theme={null}
  asn = stateset.asns.retrieve(
      'asn_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
      include_receiving_data=True,
      include_tracking_history=True
  )
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "asn_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "object": "asn",
    "asn_number": "ASN-2024-00001",
    "status": "delivered",
    "created_at": "2024-01-15T14:30:00Z",
    "updated_at": "2024-01-18T11:15:00Z",
    "purchase_order_id": "po_123456789",
    "purchase_order_number": "PO-2024-00123",
    "supplier": {
      "id": "sup_abc123",
      "name": "AudioTech Suppliers Inc.",
      "contact_email": "shipping@audiotech.com"
    },
    "warehouse": {
      "id": "wh_001",
      "name": "Main Distribution Center",
      "address": {
        "line1": "123 Warehouse Way",
        "city": "Los Angeles",
        "state": "CA",
        "postal_code": "90001",
        "country": "US"
      }
    },
    "shipment_date": "2024-01-15T14:00:00Z",
    "expected_arrival_date": "2024-01-18T10:00:00Z",
    "actual_arrival_date": "2024-01-18T09:30:00Z",
    "tracking_info": {
      "carrier": "UPS",
      "tracking_number": "1Z999AA10123456784",
      "service_type": "Ground",
      "tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
      "current_status": "Delivered",
      "last_update": "2024-01-18T09:30:00Z",
      "tracking_history": [
        {
          "timestamp": "2024-01-15T14:15:00Z",
          "status": "Picked up",
          "location": "San Francisco, CA"
        },
        {
          "timestamp": "2024-01-16T22:00:00Z",
          "status": "In transit",
          "location": "Fresno, CA"
        },
        {
          "timestamp": "2024-01-18T06:00:00Z",
          "status": "Out for delivery",
          "location": "Los Angeles, CA"
        },
        {
          "timestamp": "2024-01-18T09:30:00Z",
          "status": "Delivered",
          "location": "Los Angeles, CA"
        }
      ]
    },
    "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_receipt"
      },
      {
        "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_receipt"
      }
    ],
    "packaging_details": {
      "total_packages": 10,
      "total_pallets": 2,
      "total_weight": {
        "value": 250,
        "unit": "lb"
      },
      "packages": [
        {
          "package_id": "PKG001",
          "type": "pallet",
          "tracking_number": "1Z999AA10123456784"
        }
      ]
    },
    "shipping_documents": [
      {
        "type": "packing_list",
        "document_number": "PL-2024-00001",
        "url": "https://documents.stateset.com/packing-lists/PL-2024-00001.pdf"
      }
    ],
    "receiving_data": null,
    "notes": "Please schedule receiving appointment. Fragile electronics.",
    "metadata": {}
  }
  ```
</ResponseExample>
