> ## 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.

# List Purchase Orders

> This lists purchase orders.

### Body

<ParamField body="limit" required="true" type="string">
  This is the limit of the purchase orders.
</ParamField>

<ParamField body="offset" required="true" type="string">
  This is the offset of the purchase orders.
</ParamField>

<ParamField body="order_direction" required="true" type="string">
  This is the order direction of the purchase orders.
</ParamField>

### Response

<ResponseField name="id" type="string">
  This is the id of the purchase order.
</ResponseField>

<ResponseField name="createdat" type="string">
  This is the date the purchase order was created.
</ResponseField>

<ResponseField name="delivery_date" type="string">
  This is the date the purchase order was delivered.
</ResponseField>

<ResponseField name="description" type="string">
  This is the description of the purchase order.
</ResponseField>

<ResponseField name="external_id" type="string">
  This is the external id of the purchase order.
</ResponseField>

<ResponseField name="financer" type="string">
  This is the financer of the purchase order.
</ResponseField>

<ResponseField name="fulfiller" type="string">
  This is the fulfiller of the purchase order.
</ResponseField>

<ResponseField name="lastupdated" type="string">
  This is the date the purchase order was last updated.
</ResponseField>

<ResponseField name="purchase_date" type="string">
  This is the date the purchase order was purchased.
</ResponseField>

<ResponseField name="purchase_order_hash" type="string">
  This is the hash of the purchase order.
</ResponseField>

<ResponseField name="purchase_order_name" type="string">
  This is the name of the purchase order.
</ResponseField>

<ResponseField name="purchase_order_number" type="string">
  This is the number of the purchase order.
</ResponseField>

<ResponseField name="purchase_order_status" type="string">
  This is the status of the purchase order.
</ResponseField>

<ResponseField name="purchaser" type="string">
  This is the purchaser of the purchase order.
</ResponseField>

<ResponseField name="subtotal" type="string">
  This is the subtotal of the purchase order.
</ResponseField>

<ResponseField name="total" type="string">
  This is the total of the purchase order.
</ResponseField>

<ResponseField name="vendor" type="string">
  This is the vendor of the purchase order.
</ResponseField>

<ResponseField name="transaction_id" type="string">
  This is the transaction id of the purchase order.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request GET 'https://api.stateset.com/v1/purchase_order/list' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
  }'
  ```

  ```graphQL GraphQL theme={null}
   query ($limit: Int!, $offset: Int!, $order_direction: order_by) {
    purchasorder(limit: $limit, offset: $offset, order_by: {createdDate: $order_direction}) {
      id
      createdat
      delivery_date
      description
      external_id
      financer
      fulfiller
      lastupdated
      purchase_date
      purchase_order_hash
      purchase_order_name
      purchase_order_number
      purchase_order_status
      purchaser
      subtotal
      total
      vendor
      transaction_id
    }
  }
  ```

  ```js Node.js theme={null}
  const purchaseorders = await stateset.purchaseorders.list({
    'rt_1NXWPnCo6bFb1KQto6C8OWvE'
  });
  ```

  ```py Python theme={null}
  purchaseorders = stateset.purchaseorders.list({
    'rt_1NXWPnCo6bFb1KQto6C8OWvE'
  })
  ```

  ```go Golang  theme={null}
  purchaseorders, err := stateset.purchaseorders.list(
    'rt_1NXWPnCo6bFb1KQto6C8OWvE'
  )
  ```

  ```ruby Ruby theme={null}
  purchaseorders = Stateset::purchaseorders.List(
    'rt_1NXWPnCo6bFb1KQto6C8OWvE'
  )
  ```

  ```java Java theme={null}
  purchaseorders = Stateset.purchaseorders.list(
    'rt_1NXWPnCo6bFb1KQto6C8OWvE'
  );
  ```

  ```csharp C# theme={null}
  purchaseorders s = Stateset.purchaseorders.list(
    'rt_1NXWPnCo6bFb1KQto6C8OWvE'
  );
  ```

  ```php PHP theme={null}
  $purchaseorders = Stateset\purchaseorders::List(
    'rt_1NXWPnCo6bFb1KQto6C8OWvE'
  );
  ```

  ```http HTTP theme={null}
  GET /v1/purchaseorder HTTP/1.1
  Host: api.stateset.com
  Content-Type: application/json
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      {
      "id": "po_1NXWPnCo6bFb1KQto6C8OWvE",
      "createdat": "2021-04-20T20:00:00.000Z",
      "delivery_date": "2021-04-20T20:00:00.000Z",
      "description": "This is a purchase order.",
      "external_id": "po_1NXWPnCo6bFb1KQto6C8OWvE",
      "financer": "0x00000000",
      "fulfiller": "0x00000000",
      "lastupdated": "2021-04-20T20:00:00.000Z",
      "purchase_date": "2021-04-20T20:00:00.000Z",
      "purchase_order_hash": "0x00000000",
      "purchase_order_name": "Purchase Order",
      "purchase_order_number": "po_1NXWPnCo6bFb1KQto6C8OWvE",
      "purchase_order_status": "0x00000000",
      "purchaser": "0x00000000",
      "subtotal": "0.00",
      "total": "0.00",
      "vendor": "0x00000000",
      "transaction_id": "0x00000000"

      }
  }   
  ```
</ResponseExample>
