unPLUGDevelopers

Orders and refunds API

List orders

GET/v1/orders

Returns orders, newest first. Filter by member for an order history, or by external_order_id to check whether an order was credited before you retry it.

Permissions: Secret key with checkout:write.

Query parameters#

  • member_idstring (uuid)
    Orders for one member.
  • external_order_idstring
    Exact match. Returns zero or one order.
  • limitinteger
    1 to 100. Default 25.
    Min 1Max 100Default 25
  • cursorstring
    next_cursor from the previous page. See Pagination.

items is shortened above; the response has the full lines.

Response fields#

Returns 200 with list of Order

  • dataarray of Order
    Show attributesOrder
    • idstring (uuid)
      unPLUG's id for the order.
    • external_order_idstringNullable
      Your order id. Unique in your brand, forever.
    • statusstring
      credited, partially_refunded or refunded. See Order statuses.
      One of credited, partially_refunded, refunded
    • member_idstring (uuid)Nullable
      null for a guest order, which earns nothing.
    • location_idstring (uuid)
    • channelstring
      app or web for orders you send. Points earned at the register also show up, as orders with in_store. May grow.
      One of app, web, in_store
    • fulfillmentstringNullable
      pickup, delivery, curbside or dine_in.
    • placed_atstring (date-time)
      When the guest placed the order. The earn rate and bonuses in force at this time apply.
    • currencystring
      USD.
    • subtotal_centsinteger
      Sum of the lines, before discounts, tax and tip.
      Min 0
    • discount_centsinteger
      All discounts on the order, including the unPLUG redemption.
      Min 0
    • tax_centsinteger
      Recorded for reports. They never earn.
      Min 0
    • tip_centsinteger
      Recorded for reports. They never earn.
      Min 0
    • total_centsinteger
      What the guest paid: subtotal minus discount, plus tax and tip.
      Min 0
    • itemsarray of CartItem
      The cart lines, same shape as preview.
      Show attributesCartItem
      • line_idstring
        Your id for the line, unique within the cart.
      • pos_item_idstring
        Square catalog item variation id.
      • namestring
      • quantityinteger
        Min 1
      • unit_price_centsinteger
        Integer cents.
        Min 0
      • pos_category_idsarray of string
      • modifiersarray of object
        Show attributesHide attributes
        • pos_modifier_idstring
        • namestring
        • price_centsinteger
          Integer cents.
          Min 0
    • points_earnedinteger
      Points from the earn rate, on the subtotal after discounts, rounded down.
    • bonus_pointsinteger
      Extra points from promotions in force at placed_at.
    • redemptionsarray of object
      [{ "id", "status" }] for each redemption the order used.
      Show attributesHide attributes
      • idstring (uuid)
      • statusstring
    • memberobjectNullable
      { "points_balance", "tier" } right after the order was credited. Only on the create response and the order.credited webhook.
      Show attributesHide attributes
      • points_balanceinteger
      • Show attributesTierRef
        • idstring (uuid)
        • namestring
    • created_atstring (date-time)
      When unPLUG recorded the order.
  • has_moreboolean
    True when another page exists.
  • next_cursorstringNullable
    Pass as cursor to get the next page.

Error descriptions#

400Bad request
invalid_param

limit is outside 1 to 100, or the cursor is not one we issued.

Any endpoint can also return the common errors.