v1

latestOpenAPI 3.0.0Apache 2.02026-07-134699335.3 KB
Orders

Update Order

Updates an open order by adding, replacing, or deleting fields. Square-only: Orders with a completed or canceled status cannot be updated. To pay for an order, use the payments endpoint.

patch/pos/orders/{id}

Path parameters

idstring required

ID of the record you are acting upon.

Query parameters

rawboolean

Include raw response. Mostly used for debugging purposes

Headers

x-apideck-consumer-idstring required

ID of the consumer which you want to get or push data from

x-apideck-app-idstring required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Request body

idstring

A unique identifier for an object.

idempotency_keystring

A value you specify that uniquely identifies this request among requests you have sent.

order_numberstring
order_datestring date nullable
closed_datestring date nullable
reference_idstring nullable

An optional user-defined reference ID that associates this record with another entity in an external system. For example, a customer ID from an external customer management system.

status'open' | 'draft' | 'delivered' | 'delayed' | 'voided' | 'completed' | 'hidden'

Order status. Clover specific: If no value is set, the status defaults to hidden, which indicates a hidden order. A hidden order is not displayed in user interfaces and can only be retrieved by its id. When creating an order via the REST API the value must be manually set to 'open'. More info https://docs.clover.com/reference/orderupdateorder

payment_status'open' | 'paid' | 'refunded' | 'credited' | 'partially_paid' | 'partially_refunded' | 'unknown'

Is this order paid or not?

currency'UNKNOWN_CURRENCY' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRC' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XTS' | 'XXX' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'BTC' | 'ETH' nullable

Indicates the associated currency for an amount of money. Values correspond to ISO 4217.

titlestring
notestring

A note with information about this order, may be printed on the order receipt and displayed in apps

merchant_idstring required
customer_idstring
employee_idstring
location_idstring required
order_type_idstring
tablestring
seatstring
total_amountinteger nullable
total_tipinteger nullable
total_taxinteger nullable
total_discountinteger nullable
total_refundinteger nullable
total_service_chargeinteger nullable
refundedboolean
source'in-store' | 'online' | 'opt' | 'api' | 'kiosk' | 'caller-id' | 'google' | 'invoice' nullable

Source of order. Indicates the way that the order was placed.

voidedboolean
voided_atstring date-time
custom_mappingsCustomMappings nullable

When custom mappings are configured on the resource, the result is included here.

versionstring nullable
updated_bystring nullable

The user who last updated the object.

created_bystring nullable

The user who created the object.

updated_atstring date-time nullable

The date and time when the object was last updated.

created_atstring date-time nullable

The date and time when the object was created.

Example request

{
  "id": "12345",
  "idempotency_key": "random_string",
  "order_number": "1F",
  "order_date": "2022-08-12",
  "closed_date": "2022-08-13",
  "reference_id": "my-order-001",
  "status": "open",
  "payment_status": "open",
  "currency": "USD",
  "merchant_id": "12345",
  "customer_id": "12345",
  "employee_id": "12345",
  "location_id": "12345",
  "order_type_id": "12345",
  "table": "1F",
  "seat": "23F",
  "total_amount": 275,
  "total_tip": 700,
  "total_tax": 275,
  "total_discount": 300,
  "customers": [
    {
      "id": "12345",
      "first_name": "Elon",
      "middle_name": "D.",
      "last_name": "Musk",
      "phone_numbers": [
        {
          "id": "12345",
          "country_code": "1",
          "area_code": "323",
          "number": "111-111-1111",
          "extension": "105",
          "type": "primary"
        }
      ],
      "emails": [
        {
          "id": "123",
          "email": "elon@musk.com",
          "type": "primary"
        }
      ]
    }
  ],
  "fulfillments": [
    {
      "id": "12345",
      "type": "shipment",
      "pickup_details": {
        "accepted_at": "2020-09-30T07:43:32.000Z",
        "auto_complete_duration": "P1W3D",
        "cancel_reason": "Not hungry",
        "expires_at": "2016-09-04T23:59:33.123Z",
        "pickup_at": "2016-09-04T23:59:33.123Z",
        "pickup_window_duration": "P1W3D",
        "prep_time_duration": "P1W3D",
        "note": "Pickup in the back.",
        "placed_at": "2016-09-04T23:59:33.123Z",
        "rejected_at": "2016-09-04T23:59:33.123Z",
        "ready_at": "2016-09-04T23:59:33.123Z",
        "expired_at": "2016-09-04T23:59:33.123Z",
        "picked_up_at": "2016-09-04T23:59:33.123Z",
        "canceled_at": "2016-09-04T23:59:33.123Z",
        "curbside_pickup_details": {
          "buyer_arrived_at": "2016-09-04T23:59:33.123Z"
        },
        "recipient": {
          "customer_id": "12345",
          "display_name": "Elon Musk",
          "address": {
            "id": "123",
            "type": "primary",
            "string": "25 Spring Street, Blackburn, VIC 3130",
            "name": "HQ US",
            "line1": "Main street",
            "line2": "apt #",
            "line3": "Suite #",
            "line4": "delivery instructions",
            "line5": "Attention: Finance Dept",
            "street_number": "25",
            "city": "San Francisco",
            "state": "CA",
            "postal_code": "94104",
            "country": "US",
            "latitude": "40.759211",
            "longitude": "-73.984638",
            "county": "Santa Clara",
            "contact_name": "Elon Musk",
            "salutation": "Mr",
            "phone_number": "111-111-1111",
            "fax": "122-111-1111",
            "email": "elon@musk.com",
            "website": "https://elonmusk.com",
            "notes": "Address notes or delivery instructions.",
            "row_version": "1-12345"
          },
          "phone_number": {
            "id": "12345",
            "country_code": "1",
            "area_code": "323",
            "number": "111-111-1111",
            "extension": "105",
            "type": "primary"
          },
          "email": {
            "id": "123",
            "email": "elon@musk.com",
            "type": "primary"
          }
        }
      }
    }
  ],
  "line_items": [
    {
      "id": "12345",
      "name": "New York Strip Steak",
      "item": {
        "id": "12345"
      },
      "total_tax": 2000,
      "total_discount": 3000,
      "total_amount": 27500,
      "quantity": 1,
      "unit_price": 27500.5,
      "applied_taxes": [
        {
          "id": "12345",
          "tax_id": "sales-tax",
          "amount": 27500,
          "currency": "USD"
        }
      ],
      "applied_discounts": [
        {
          "id": "12345",
          "discount_id": "12345",
          "amount": 27500,
          "currency": "USD"
        }
      ],
      "modifiers": [
        {
          "id": "12345",
          "name": "New York Strip Steak - no cheese",
          "amount": 27500,
          "currency": "USD",
          "alternate_name": "Modifier New",
          "modifier_group_id": "123"
        }
      ]
    }
  ],
  "payments": [
    {
      "id": "12345",
      "amount": 27500,
      "currency": "USD"
    }
  ],
  "service_charges": [
    {
      "id": "12345",
      "name": "Charge for delivery",
      "amount": 27500,
      "percentage": 12.5,
      "currency": "USD",
      "active": true
    }
  ],
  "refunds": [
    {
      "id": "12345",
      "location_id": "12345",
      "amount": 27500,
      "currency": "USD",
      "reason": "The reason for the refund being issued.",
      "tender_id": "12345",
      "transaction_id": "12345"
    }
  ],
  "taxes": [
    {
      "id": "state-sales-tax",
      "name": "State Sales Tax",
      "amount": 27500,
      "currency": "USD",
      "percentage": 15,
      "auto_applied": true
    }
  ],
  "discounts": [
    {
      "id": "12345",
      "product_id": "12345",
      "name": "10% off",
      "type": "percentage",
      "amount": 27500,
      "currency": "USD",
      "scope": "order"
    }
  ],
  "tenders": [
    {
      "id": "12345",
      "name": "10% off",
      "type": "cash",
      "note": "An optional note associated with the tender at the time of payment.",
      "amount": 27500,
      "percentage": 10,
      "currency": "USD",
      "total_amount": 275,
      "total_tip": 7,
      "total_discount": 3,
      "buyer_tendered_cash_amount": 27500,
      "change_back_cash_amount": 27500,
      "card": {
        "id": "12345",
        "bin": "41111",
        "card_type": "credit",
        "prepaid_type": "prepaid",
        "cardholder_name": "John Doe",
        "customer_id": "12345",
        "merchant_id": "12345",
        "exp_month": 1,
        "exp_year": 2022,
        "fingerprint": " Intended as a POS-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.",
        "last_4": "The last 4 digits of the card number.",
        "enabled": true,
        "billing_address": {
          "id": "123",
          "type": "primary",
          "string": "25 Spring Street, Blackburn, VIC 3130",
          "name": "HQ US",
          "line1": "Main street",
          "line2": "apt #",
          "line3": "Suite #",
          "line4": "delivery instructions",
          "line5": "Attention: Finance Dept",
          "street_number": "25",
          "city": "San Francisco",
          "state": "CA",
          "postal_code": "94104",
          "country": "US",
          "latitude": "40.759211",
          "longitude": "-73.984638",
          "county": "Santa Clara",
          "contact_name": "Elon Musk",
          "salutation": "Mr",
          "phone_number": "111-111-1111",
          "fax": "122-111-1111",
          "email": "elon@musk.com",
          "website": "https://elonmusk.com",
          "notes": "Address notes or delivery instructions.",
          "row_version": "1-12345"
        },
        "reference_id": "card-001",
        "version": "230320320320"
      },
      "card_status": "authorized",
      "card_entry_method": "swiped",
      "payment_id": "12345",
      "location_id": "12345",
      "transaction_id": "12345"
    }
  ],
  "source": "api",
  "voided_at": "2020-09-30T07:43:32.000Z",
  "version": "230320320320",
  "updated_by": "12345",
  "created_by": "12345",
  "updated_at": "2020-09-30T07:43:32.000Z",
  "created_at": "2020-09-30T07:43:32.000Z",
  "pass_through": [
    {
      "extend_paths": [
        {
          "path": "$.nested.property",
          "value": {
            "TaxClassificationRef": {
              "value": "EUC-99990201-V1-00020000"
            }
          }
        }
      ]
    }
  ]
}

Response

Orders

status_codeinteger required

HTTP Response Status Code

statusstring required

HTTP Response Status

servicestring required

Apideck ID of service provider

resourcestring required

Unified API resource name

operationstring required

Operation performed

_rawRaw nullable

Raw response from the integration when raw=true query param is provided

Example response

{
  "status_code": 200,
  "status": "OK",
  "service": "clover",
  "resource": "orders",
  "operation": "update",
  "data": {
    "id": "12345"
  }
}