# /fulfillment-orders

#### `GET /fulfillment-orders`

#### List all fulfillment orders.

Request:

* `limit` (number) - Optional. The number of fulfillment orders to retrieve.  Set to 50 by default but can be set up to 250
* `created_at_min` (ISO8610 timestamp) - Optional. List fulfillment orders created since the given time
* `starting_after` (UUID) - Optional. Paginate fulfillment orders after the given fulfillment order ID
* `references` (string) - Optional. Comma separated list of (URL-encoded) Purple Dot fulfillment order references

Body:

* `fulfillment_orders` - An array containing fulfillment orders across pre-orders that are now fulfillable
  * `id` - The Purple Dot ID of the fulfillment order
  * `status` - The current status of the fulfillment order, which can be one of:
    * `UNFULFILLED` - the order has been placed and is waiting to be fulfilled
    * `FULFILLED` - all items have been fulfilled
    * `VOIDED` - the order was canceled
  * `created_at` (ISO8610 timestamp) - when this fulfillment order was created (effectively, when Purple Dot was told the related line items are ready to be fulfilled)
  * `purchased_at` (ISO8610 timestamp) - the `created_at` of the pre-order this fulfillment order originates from
  * `reference` - The Purple Dot fulfillment order reference, defined as `concat(Purple Dot pre-order reference, fulfillment order index)`
  * `customer` - The customer placing the order
    * `email` - The customer's email address
    * `external_id` - The Shopify ID of this customer, if we know it
    * `first_name`
    * `last_name`
    * `tags` - Shopify tags for the customer
    * `default_address`
      * `first_name`
      * `last_name`
      * `address1`
      * `address2`
      * `city`
      * `postal_code`
      * `province_code` - The ISO3166 code of the second level administrative subdivision
      * `country` - The English name of the country
      * `country_code` - The ISO3166 code of the country
      * `phone`
  * `currency` - The presentment currency of the order
  * `subtotal_price` - The total of the line items before taxes and shipping
  * `total_tax` - The total tax on the pre-order
  * `tax_included` - Whether the tax is included in listed prices or not
  * `total_discounts` - The total discounts applied to the fulfillment order
  * `total_price` - The fulfillment order total
  * `line_items` - Array of line items in this fulfillment order
    * `id` - The Purple Dot ID of the line item
    * `name` - The name of the product variant in this line item
    * `product_id` - The Shopify ID of the line item's product
    * `variant_id` - The Shopify ID of the line item's product variant
    * `sku` - The SKU code of the product variant in this line item
    * `price` - The unit cost of the product variant in this line item, before taxes/discounts etc
    * `quantity` - The quantity of the line item
    * `taxable` - Whether the product variant in this line item is taxable
    * `tax_lines` - The taxes applied to the line item
      * `price`  - The total amount of tax for the line item
      * `rate`  - The tax rate as a decimal
      * `title`  - The name of the tax
      * `inclusive`  - Whether this tax is already included in the line item price
    * `total_discount` - The total amount of discounts applied to the line item
    * `total` - The total cost of this line item, after tax/discounts etc, are considered
  * `shipping_address`
    * `first_name`
    * `last_name`
    * `address1`
    * `address2`
    * `city`
    * `postal_code`
    * `province_code` - The ISO3166 code of the second level administrative subdivision
    * `country` - The English name of the country
    * `country_code` - The ISO3166 code of the country
    * `phone`
  * `shipping_lines` - An array of shipping rates
    * `id` - The Purple Dot ID of the shipping line
    * `price` - The unit cost of this shipping line, before taxes/discounts etc
    * `total`- The total cost of this shipping line, after tax/discounts etc, are considered
    * `title` - The user-facing name of the shipping rate
    * `code` - The shipping rate carrier code
    * `tax_lines` - The taxes applied to the shipping rate
      * `price`  - The total amount of tax for the shipping line
      * `rate`  - The tax rate as a decimal
      * `title`  - The name of the tax
      * `inclusive`  - Whether this tax is already included in the shipping line price
  * `note` - optional notes from the Shopify order
* `starting_after` - The ID of the last fulfillment order in the list, which can then be used in the next request
* `has_more` - Indicates whether there are more fulfillment orders available to page through

Examples:

{% code overflow="wrap" %}

```
curl --request GET \
     --url 'https://www.purpledotprice.com/admin/api/v1/fulfillment_orders?created_at_min=2023-08-17T00:00:00.000Z&limit=1' \
     --header 'X-Purple-Dot-Access-Token: <access_token>'
```

{% endcode %}

{% code overflow="wrap" %}

```json
<incoming...>
```

{% endcode %}

```
curl --request GET \
     --url 'https://www.purpledotprice.com/admin/api/v1/fulfillment_orders?references=#PD12345678/2,#PD87654321/1' \
     --header 'X-Purple-Dot-Access-Token: <access_token>'
```
