Skip to content

Latest commit

 

History

History
60 lines (51 loc) · 2.4 KB

update-order-request.md

File metadata and controls

60 lines (51 loc) · 2.4 KB

Update Order Request

Defines the fields that are included in requests to the UpdateOrder endpoint.

Structure

Update Order Request

Fields

Name Type Tags Description
order Order Optional Contains all information related to a single order to process with Square,
including line items that specify the products to purchase. Order objects also
include information about any associated tenders, refunds, and returns.

All Connect V2 Transactions have all been converted to Orders including all associated
itemization data.
fields_to_clear List of string Optional The dot notation paths
fields to clear. For example, line_items[uid].note.
For more information, see Deleting fields.
idempotency_key string Optional A value you specify that uniquely identifies this update request.

If you are unsure whether a particular update was applied to an order successfully,
you can reattempt it with the same idempotency key without
worrying about creating duplicate updates to the order.
The latest order version is returned.

For more information, see Idempotency.
Constraints: Maximum Length: 192

Example (as JSON)

{
  "order": {
    "id": "id6",
    "location_id": "location_id0",
    "reference_id": "reference_id4",
    "source": {
      "name": "name2"
    },
    "customer_id": "customer_id4",
    "line_items": [
      {
        "uid": "uid1",
        "name": "name1",
        "quantity": "quantity7",
        "quantity_unit": {
          "measurement_unit": {
            "custom_unit": {
              "name": "name9",
              "abbreviation": "abbreviation1"
            },
            "area_unit": "METRIC_SQUARE_CENTIMETER",
            "length_unit": "IMPERIAL_MILE",
            "volume_unit": "GENERIC_FLUID_OUNCE",
            "weight_unit": "METRIC_KILOGRAM"
          },
          "precision": 201
        },
        "note": "note3",
        "catalog_object_id": "catalog_object_id5"
      }
    ]
  },
  "fields_to_clear": [
    "fields_to_clear1"
  ],
  "idempotency_key": "idempotency_key6"
}