latestOpenAPI 3.0.32026-08-083681145.6 KB

19558399745c

Orders

POST /orders/{order_id}/items/availability

post/orders/{order_id}/items/availability

Path parameters

order_idstring required

Request body

availabilitiesobject

Response

Successful response

idstring

Read-only. A unique identifier of the order, beginning with "bo_". NOTE: When shown on the Faire website, the "bo_" will be stripped and the order ID will be upper-case. e.g. "bo_bxdmjbwxid" appears as "#BXDMJBWXID" (See display_id).

display_idstring

Read-only. The order identifier as displayed on the Faire website, emails, etc.

created_atstring

Read-only. An ISO 8601 timestamp of when the order was created.

updated_atstring

Read-only. An ISO 8601 timestamp of when the order was last updated.

state'NEW' | 'PROCESSING' | 'PRE_TRANSIT' | 'IN_TRANSIT' | 'DELIVERED' | 'CANCELED' | 'BACKORDERED' | 'PENDING_RETAILER_CONFIRMATION'
ship_afterstring

An ISO 8601 timestamp of the earliest the order should ship.

payment_initiated_atstring

An ISO 8601 timestamp of when the brand was paid for this order. Null/absent if the order has not been paid yet.

original_order_idstring

If this order has a parent, for example due to a backorder, this contains the ID of the original order. Null/absent otherwise.

retailer_idstring

A unique identifier that represents the retailer who placed the order. See retailers for more information.

sourcestring

How this order was initiated (may be MARKETPLACE, FAIRE_DIRECT, TRADESHOW, etc).

expected_ship_datestring

If specified, an ISO 8601 timestamp of when the order is expected to be shipped.

requested_ship_datestring

An ISO 8601 timestamp of when the retailer requested the order to be shipped.

processing_atstring

An ISO 8601 timestamp of when the order moved to PROCESSING state.

is_free_shippingboolean

True if the order has free shipping of any kind, false otherwise.

free_shipping_reason'INSIDER_FREE_SHIPPING' | 'FAIRE_DIRECT' | 'BRAND_DISCOUNT' | 'FIRST_ORDER' | 'PROMO_CODE' | 'FREE_SHIPPING_THRESHOLD'

The reason why an order qualifies for free shipping.

estimated_payout_atstring

An ISO 8601 timestamp of when Faire expects to pay the brand for the order. Note that this is not a guarantee of when the order will be paid out.

is_fulfilled_by_faireboolean

True if the order is fulfilled by Faire, false otherwise.

purchase_order_numberstring

Purchase order number entered by retailer (free-text, not validated by Faire).

notesstring

Brand-facing notes for the order. This field is free-text and may contain special requests or instructions from the retailer.

has_pending_retailer_cancellation_requestboolean

Indicates whether there is a pending cancellation request from the retailer for this order. This is true if the retailer has requested cancellation, the request has not been rejected, and the order is not already canceled.

sales_rep_namestring

The name of the brand sales rep attributed to this order

cancelled_atstring

Read-only. An ISO 8601 timestamp of when the order was canceled. Absent unless state is CANCELED.

cancellation_initiated_bystring

Read-only. Who initiated the cancellation. "RETAILER" if the retailer requested it (cancel reason is REQUESTED_BY_RETAILER), "BRAND" otherwise. Absent unless state is CANCELED, or if the initiator is unknown.

Example response

{
  "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"
}