latestOpenAPI 3.0.32026-08-083681145.6 KB

19558399745c

Orders

GET /orders

This endpoint retrieves a list of orders, ordered ascending by updated_at. Page through the results with cursor, taken from the previous response; requesting a page beyond the first without a cursor falls back to offset pagination and is rate limited. Pass excluded_states as a comma-separated list of order states to leave out. Pass original_order_id to retrieve the orders derived from that order, which is how a replacement order is found from the order it replaced.

get/orders

Query parameters

limitinteger
pageinteger
updated_at_minstring
excluded_statesstring
ship_after_maxstring
created_at_minstring
sort_bystring
cursorstring
original_order_idstring

Response

Successful response

pageinteger

The current page number.

limitinteger

The maximum number of orders per page.

updated_at_minstring

The minimum updated_at timestamp used to filter orders.

sort_by'UPDATED_AT' | 'CREATED_AT'
cursorstring

A cursor for pagination. Use this value in subsequent requests to get the next page of results.

Example response

{
  "orders": [
    {
      "id": "bo_bxdmjbwxid",
      "display_id": "BXDMJBWXID",
      "created_at": "2019-03-15T00:09:15.000Z",
      "updated_at": "2019-03-15T00:10:00.000Z",
      "items": [
        {
          "id": "oi_bq425ju5vh",
          "created_at": "2019-03-15T00:09:15.000Z",
          "updated_at": "2019-03-15T00:09:15.000Z",
          "order_id": "bo_bxdmjbwxid",
          "product_id": "p_fccaefnahr",
          "variant_id": "po_3745tjzrpc",
          "quantity": 1,
          "sku": "goldenretriever",
          "product_name": "Golden Dog",
          "variant_name": "retriever",
          "customizations": [
            {
              "token": "custom_abc123",
              "type": "text",
              "value": "Happy Birthday!"
            }
          ],
          "price": {
            "amount_minor": 4999,
            "currency": "USD"
          },
          "tester_price": {
            "amount_minor": 4999,
            "currency": "USD"
          },
          "discounts": [
            {
              "id": "bpc_k3w2kb97tp",
              "code": "SUMMER10",
              "discount_percentage": 10,
              "discount_amount": {
                "amount_minor": 4999,
                "currency": "USD"
              }
            }
          ]
        }
      ],
      "shipments": [
        {
          "id": "s_bq425ju5vh",
          "created_at": "2019-03-15T00:09:15.000Z",
          "updated_at": "2019-03-15T00:09:15.000Z",
          "order_id": "bo_bxdmjbwxid",
          "carrier": "fedex",
          "tracking_code": "94029300101029282",
          "maker_cost": {
            "amount_minor": 4999,
            "currency": "USD"
          },
          "shipping_label_url": "https://cdn.faire.com/shipping-labels/label_abc123.pdf"
        }
      ],
      "address": {
        "id": "a_abc123def",
        "name": "John Smith",
        "address1": "41 King Street West",
        "address2": "3rd Floor",
        "postal_code": "N2G 1A1",
        "city": "Kitchener",
        "state": "Ontario",
        "state_code": "ON",
        "phone_number": "555-123-4567",
        "country": "Canada",
        "country_code": "CAN",
        "company_name": "Faire Wholesale, Inc"
      },
      "ship_after": "2019-03-15T00:09:15.000Z",
      "payout_costs": {
        "payout_flat_fee": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "commission_bps": 2500,
        "commission_flat_fee": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "payout_fee": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "commission": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "total_payout": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "payout_protection_fee": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "damaged_and_missing_items": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "net_tax": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "shipping_subsidy": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "taxes": [
          {
            "value": {
              "amount_minor": 4999,
              "currency": "USD"
            }
          }
        ],
        "subtotal_after_brand_discounts": {
          "amount_minor": 4999,
          "currency": "USD"
        },
        "total_brand_discounts": {
          "amount_minor": 4999,
          "currency": "USD"
        }
      },
      "payment_initiated_at": "2019-03-16T00:10:34.000Z",
      "original_order_id": "bo_bg5ude6pmd",
      "retailer_id": "r_c9385ldj",
      "source": "MARKETPLACE",
      "customer": {
        "first_name": "John",
        "last_name": "Smith"
      },
      "brand_discounts": [
        {
          "id": "bpc_k3w2kb97tp",
          "code": "SUMMER10",
          "discount_percentage": 10,
          "discount_amount": {
            "amount_minor": 4999,
            "currency": "USD"
          }
        }
      ],
      "is_free_shipping": true,
      "faire_covered_shipping_cost": {
        "amount_minor": 4999,
        "currency": "USD"
      },
      "estimated_payout_at": "2019-03-16T00:00:00.000Z",
      "purchase_order_number": "12345",
      "notes": "Please include a handwritten thank-you note"
    }
  ]
}