# Update an order

Partial update of an order's header fields. Rejected with `403` when the order's current workflow step is
read-only for the caller's user type.
Accepts user session headers only.

Endpoint: PUT /v1/orders/{orderGuid}
Version: 1.19
Security: UserGuid, UserToken, SupplierGuid

## Security:

  - `UserGuid` (unknown)
    apiKey in header userGuid

  - `UserToken` (unknown)
    apiKey in header userToken

  - `SupplierGuid` (unknown)
    apiKey in header supplierGuid

## Path parameters:

  - `orderGuid` (string, required)
    GUID of the order.

## Request fields (application/json):

  - `name` (string)

  - `po_no` (string)

  - `note` (string)

  - `internal_note` (string)

  - `invoice_no` (string)

  - `vendor_id` (integer)

  - `catalog_id` (integer)

  - `price_group_id` (integer)

  - `project_id` (integer)

  - `client_id` (integer)

  - `is_sample` (boolean)

  - `is_on_hold` (boolean)

  - `is_cancelled` (boolean)

  - `is_local_delivery` (boolean)

  - `shipping` (number)

  - `clear_manual_shipping_fee` (boolean)

  - `labor` (number)

  - `price_adjustment` (number)

  - `discount` (number)

  - `discount_type_id` (integer)

  - `tax_rate_override` (number)

  - `Ship_To` (object)
    Address fields accepted when creating or updating an address.

  - `Ship_To.name` (string)
    Contact name at this address.
    Example: Jane Doe

  - `Ship_To.company_name` (string)
    Example: Acme, Inc.

  - `Ship_To.address_line_one` (string)
    Example: 123 Any Street

  - `Ship_To.address_line_two` (string)
    Example: Unit A

  - `Ship_To.address_line_three` (string)

  - `Ship_To.city` (string)
    Example: Anytown

  - `Ship_To.state` (string)
    Example: CA

  - `Ship_To.postal_code` (string)
    Example: 12345

  - `Ship_To.country` (string)
    Example: US

  - `Ship_To.phone` (string)

  - `Ship_To.fax` (string)

  - `Ship_To.email` (string)

  - `Ship_To.note` (string)

  - `Ship_To.address_internal_id` (string)
    Your own identifier for this address.

  - `save_address_to_vendor` (boolean)
    Also save `Ship_To` as the customer's default shipping address.

  - `shipping_warehouse_id` (integer)

  - `workflow_id` (integer)

  - `allow_substitutions` (boolean)

  - `allow_backorders` (boolean)

  - `approve_decline` (string)
    Approve or decline a quote.
    Enum: "APPROVE", "DECLINE", "null"

  - `tags` (array)

  - `do_not_ship_before_date` (string)

  - `cancel_date` (string)

  - `assignedUsers` (array)

  - `assignedUsers.guid` (string)

  - `details` (object)
    Supplier-specific extra order fields.

## Response 200:

  - `200` (unknown)
    The updated order.

## Response 200 fields (application/json):

  - `id` (integer)

  - `guid` (string)

  - `name` (string)
    Order number as displayed, e.g. `ABC-10000`.

  - `api_guid` (string)
    Client-supplied idempotency key, when the order was created through the API.

  - `supplier_id` (integer)

  - `vendor_id` (integer)

  - `user_id` (integer)

  - `catalog_id` (integer)

  - `price_group_id` (integer)

  - `category_id` (integer)

  - `parent_order_id` (integer)

  - `client_id` (integer)

  - `project_id` (integer)

  - `sales_rep_id` (integer)

  - `ship_to_id` (integer)

  - `order_state_id` (integer)
    Current workflow state id (1 = PRELIMINARY, 2 = SUBMITTED, 8 = SHIPPED, 9 = COMPLETED, 23 = CANCELLED, ...).

  - `order_source_id` (integer)
    Origin of the order (1 = ORDERWERKS, 20 = OTHER, 21 = APP, ...).

  - `po_no` (string)

  - `invoice_no` (string)

  - `description` (string)

  - `note` (string)

  - `internal_note` (string)

  - `shipping_instructions` (string)

  - `is_quote` (boolean)

  - `is_sample` (boolean)

  - `is_local_pickup` (boolean)

  - `is_local_delivery` (boolean)

  - `is_shipped` (boolean)

  - `partially_shipped` (boolean)

  - `is_on_hold` (boolean)

  - `is_cancelled` (boolean)

  - `sub_total` (number)

  - `tax` (number)

  - `shipping` (number)

  - `labor` (number)

  - `discount` (number)

  - `discount_total` (number)

  - `other` (number)

  - `grand_total` (number)

  - `delivery_date` (string)

  - `ship_date` (string)

  - `do_not_ship_before_date` (string)

  - `created_at` (string)

  - `updated_at` (string)

  - `Order_Items` (array)

  - `Order_Items.id` (integer)

  - `Order_Items.guid` (string)

  - `Order_Items.order_id` (integer)

  - `Order_Items.catalog_item_id` (integer)

  - `Order_Items.catalog_item_guid` (string)

  - `Order_Items.parent_order_item_id` (integer)

  - `Order_Items.item_no` (integer)
    Line number within the order.

  - `Order_Items.sku` (string)

  - `Order_Items.name` (string)

  - `Order_Items.description` (string)

  - `Order_Items.qty` (number)
    Quantity ordered. Never reduced by shipments.

  - `Order_Items.qty_shipped` (number)

  - `Order_Items.qty_backordered` (number)

  - `Order_Items.qty_pending` (number)

  - `Order_Items.qty_reserved` (number)

  - `Order_Items.is_manual_price` (boolean)

  - `Order_Items.list_price_frozen` (number)
    Unit price captured when the line was created.

  - `Order_Items.net_price` (number)

  - `Order_Items.discount` (number)

  - `Order_Items.discount_total` (number)

  - `Order_Items.tax` (number)

  - `Order_Items.total` (number)

  - `Order_Items.is_credit` (boolean)

  - `Order_Items.is_backordered` (boolean)

  - `Order_Items.note` (string)

  - `Order_Items.width` (number)

  - `Order_Items.height` (number)

  - `Order_Items.depth` (number)

  - `Order_Items.selected_options` (array)

  - `Order_Items.Catalog_Item` (object)
    A product. With API key authentication the paged list endpoint returns exactly the fields below; other endpoints (and user session calls) return the full model, which has many more optional fields.

  - `Order_Items.Catalog_Item.id` (integer)

  - `Order_Items.Catalog_Item.guid` (string)

  - `Order_Items.Catalog_Item.catalog_id` (integer)

  - `Order_Items.Catalog_Item.category_id` (integer)

  - `Order_Items.Catalog_Item.sku` (string)

  - `Order_Items.Catalog_Item.upc` (string)

  - `Order_Items.Catalog_Item.name` (string)

  - `Order_Items.Catalog_Item.description` (string)

  - `Order_Items.Catalog_Item.manufacturer` (string)

  - `Order_Items.Catalog_Item.color` (string)

  - `Order_Items.Catalog_Item.style` (string)

  - `Order_Items.Catalog_Item.active` (boolean)

  - `Order_Items.Catalog_Item.is_taxable` (boolean)

  - `Order_Items.Catalog_Item.msrp` (number)

  - `Order_Items.Catalog_Item.cost_per_uom` (number)
    Supplier cost. Omitted for customer (vendor) users.

  - `Order_Items.Catalog_Item.pricing` (object)
    Price per price group, keyed by price group name. `"N/A"` means not offered to that group.
    Example: {"Retail":99.99,"Wholesale":79.99,"Distributor":"N/A"}

  - `Order_Items.Catalog_Item.has_inventory` (boolean)
    Whether stock is tracked for this item.

  - `Order_Items.Catalog_Item.qty_on_hand` (number)

  - `Order_Items.Catalog_Item.qty_incoming` (number)

  - `Order_Items.Catalog_Item.reserved_qty_on_hand` (number)

  - `Order_Items.Catalog_Item.qty_backordered` (number)

  - `Order_Items.Catalog_Item.qty_held_for_backorders` (number)

  - `Order_Items.Catalog_Item.min_qty_on_hand` (number)

  - `Order_Items.Catalog_Item.max_qty_on_hand` (number)

  - `Order_Items.Catalog_Item.min_order_qty` (number)

  - `Order_Items.Catalog_Item.allow_backorder` (boolean)

  - `Order_Items.Catalog_Item.qty_break` (number)
    Quantity at which `qty_break_price` applies.

  - `Order_Items.Catalog_Item.qty_break_price` (number)

  - `Order_Items.Catalog_Item.has_serials` (boolean)

  - `Order_Items.Catalog_Item.has_lots` (boolean)

  - `Order_Items.Catalog_Item.has_exp_date` (boolean)

  - `Order_Items.Catalog_Item.width` (number)

  - `Order_Items.Catalog_Item.height` (number)

  - `Order_Items.Catalog_Item.depth` (number)

  - `Order_Items.Catalog_Item.item_weight` (number)

  - `Order_Items.Catalog_Item.shipping_weight` (number)

  - `Order_Items.Catalog_Item.is_product_group` (boolean)

  - `Order_Items.Catalog_Item.product_group_type` (string)
    Enum: "flat", "multi", "null"

  - `Order_Items.Catalog_Item.product_group_display_style` (string)

  - `Order_Items.Catalog_Item.group_parent_catalog_item_id` (integer)

  - `Order_Items.Catalog_Item.group_sequence` (integer)

  - `Order_Items.Catalog_Item.group_title` (string)

  - `Order_Items.Catalog_Item.subsection_id` (integer)

  - `Order_Items.Catalog_Item.third_party_sku` (string)

  - `Order_Items.Catalog_Item.third_party_pricing` (string)

  - `Order_Items.Catalog_Item.third_party_size` (string)

  - `Order_Items.Catalog_Item.Category` (object)

  - `Order_Items.Catalog_Item.Category.id` (integer)

  - `Order_Items.Catalog_Item.Category.guid` (string)

  - `Order_Items.Catalog_Item.Category.catalog_id` (integer)

  - `Order_Items.Catalog_Item.Category.parent_category_id` (integer)

  - `Order_Items.Catalog_Item.Category.name` (string)

  - `Order_Items.Catalog_Item.Category.sequence` (integer)

  - `Order_Items.Catalog_Item.Category.hide_category` (boolean)

  - `Order_Items.Catalog_Item.Category.created_at` (string)

  - `Order_Items.Catalog_Item.Category.updated_at` (string)

  - `Order_Items.Catalog_Item.CategoryHierarchy` (array)
    Root-to-leaf category path, when category retrieval is not skipped.

  - `Order_Items.Catalog_Item.created_at` (string)

  - `Order_Items.Catalog_Item.updated_at` (string)

  - `Order_Items.Catalog_Item.deleted_at` (string)
    Present only in delta-sync responses for soft-deleted items.

  - `Order_Items.created_at` (string)

  - `Order_Items.updated_at` (string)

  - `Ship_To` (object)
    A billing or shipping address. Additional internal fields may be present.

  - `Ship_To.id` (integer)

  - `Ship_To.guid` (string)

  - `Ship_To.vendor_id` (integer)

  - `Ship_To.order_id` (integer)

  - `Ship_To.name` (string)
    Contact name at this address.

  - `Ship_To.company_name` (string)

  - `Ship_To.address_line_one` (string)

  - `Ship_To.address_line_two` (string)

  - `Ship_To.address_line_three` (string)

  - `Ship_To.city` (string)

  - `Ship_To.state` (string)

  - `Ship_To.postal_code` (string)

  - `Ship_To.country` (string)

  - `Ship_To.phone` (string)

  - `Ship_To.fax` (string)

  - `Ship_To.email` (string)

  - `Ship_To.note` (string)

  - `Ship_To.address_internal_id` (string)
    Your own identifier for this address, if one was supplied.

  - `Ship_To.is_vendor_main_ship_to` (boolean)

  - `Ship_To.verified` (boolean)
    True when the address was verified against a postal database.

  - `Ship_To.lat` (number)

  - `Ship_To.lng` (number)

  - `Ship_To.created_at` (string)

  - `Ship_To.updated_at` (string)

  - `Vendor` (object)
    A customer of the supplier. The full model includes many integration-specific fields (QuickBooks, Stripe, FastBound, routing); only the commonly used ones are listed here.

  - `Vendor.id` (integer)

  - `Vendor.guid` (string)

  - `Vendor.supplier_id` (integer)

  - `Vendor.parent_vendor_id` (integer)

  - `Vendor.customer_internal_id` (string)
    Your own identifier for this customer.

  - `Vendor.name` (string)

  - `Vendor.email` (string)

  - `Vendor.shipping_email` (string)

  - `Vendor.phone` (string)

  - `Vendor.cell` (string)

  - `Vendor.fax` (string)

  - `Vendor.address_line_one` (string)

  - `Vendor.address_line_two` (string)

  - `Vendor.city` (string)

  - `Vendor.state` (string)

  - `Vendor.postal_code` (string)

  - `Vendor.country` (string)

  - `Vendor.active` (boolean)

  - `Vendor.tax_exempt` (boolean)

  - `Vendor.resale_tax_id` (string)

  - `Vendor.lock_catalog_id` (integer)
    When set, the customer can only order from this catalog.

  - `Vendor.price_group_id` (integer)
    Price group used for this customer's pricing.

  - `Vendor.payment_type_id` (integer)

  - `Vendor.payment_term_id` (integer)

  - `Vendor.require_payment` (boolean)

  - `Vendor.credit_limit` (number)

  - `Vendor.open_balance` (number)

  - `Vendor.is_ecomm_user` (boolean)
    True for Orderwerks Online (e-commerce) customers.

  - `Vendor.net_term_ecomm_user` (boolean)

  - `Vendor.require_po` (boolean)

  - `Vendor.standing_po` (string)

  - `Vendor.hide_pricing` (boolean)

  - `Vendor.currency_id` (integer)

  - `Vendor.notes` (string)

  - `Vendor.default_order_category_id` (integer)

  - `Vendor.route_id` (integer)

  - `Vendor.route_stop_order` (integer)
    Standing stop order of the customer on its route; null = unordered (sorts last, by name).

  - `Vendor.timezone` (string)

  - `Vendor.bill_to_id` (integer)

  - `Vendor.ship_to_id` (integer)

  - `Vendor.created_at` (string)

  - `Vendor.updated_at` (string)

  - `Vendor.deleted_at` (string)
    Present only in delta-sync responses for soft-deleted customers.

  - `Catalog` (object)

  - `Catalog.id` (integer)

  - `Catalog.guid` (string)

  - `Catalog.supplier_id` (integer)

  - `Catalog.name` (string)
    Example: Main Catalog

  - `Catalog.email` (string)

  - `Catalog.version` (string)

  - `Catalog.active` (boolean)

  - `Catalog.order_item_type_id` (integer)

  - `Catalog.currency_id` (integer)

  - `Catalog.order_prefix_override` (string)
    Prefix used for order numbers created from this catalog, if overridden.

  - `Catalog.last_inventory_update` (string)

  - `Catalog.Price_Groups` (array)

  - `Catalog.Price_Groups.id` (integer)

  - `Catalog.Price_Groups.guid` (string)

  - `Catalog.Price_Groups.catalog_id` (integer)

  - `Catalog.Price_Groups.value` (string)
    Price group name. This is the key used in a catalog item's `pricing` object.
    Example: Wholesale

  - `Catalog.Price_Groups.is_main` (boolean)

  - `Catalog.Price_Groups.percentage` (number)

  - `Catalog.Price_Groups.price_upcharge_type_id` (integer)

  - `Catalog.Price_Groups.created_at` (string)

  - `Catalog.Price_Groups.updated_at` (string)

  - `Catalog.Price_Groups.deleted_at` (string)

  - `Catalog.created_at` (string)

  - `Catalog.updated_at` (string)

  - `Order_State` (object)

  - `Order_State.id` (integer)

  - `Order_State.guid` (string)

  - `Order_State.name` (string)

  - `User` (object)
    User who created the order.

  - `User.id` (integer)

  - `User.guid` (string)

  - `User.name` (string)

  - `User.email` (string)

  - `Supplier` (object)

  - `Supplier.id` (integer)

  - `Supplier.guid` (string)

  - `Supplier.name` (string)

  - `Supplier.email` (string)

  - `Client` (object)
    End client on behalf of whom the customer placed the order, if any.

  - `Client.id` (integer)

  - `Client.guid` (string)

  - `Client.name` (string)

  - `Parent_Order` (object)

  - `Parent_Order.id` (integer)

  - `Parent_Order.guid` (string)

  - `Parent_Order.name` (string)

  - `Order_Detail` (object)
    Supplier-specific extra fields.

  - `Order_State_Logs` (array)
    State transition history.

  - `Order_State_Logs.created_at` (string)

  - `Order_State_Logs.User` (object)

  - `Order_State_Logs.User.name` (string)

  - `Order_State_Logs.User.email` (string)

  - `Order_State_Logs.Order_State` (object)

  - `Order_State_Logs.Order_State.name` (string)

  - `Assigned_Users` (array)

  - `Assigned_Users.id` (integer)

  - `Assigned_Users.guid` (string)

  - `Assigned_Users.name` (string)

  - `Assigned_Users.email` (string)

## Response 400:

  - `400` (unknown)
    The request is malformed or references a resource the supplier does not own (for example an unknown catalog GUID).

## Response 400 fields (application/json):

  - `message` (string, required)
    Human-readable error message.
    Example: Invalid Catalog GUID

  - `error` (string)
    Underlying error detail, when available.

  - `code` (string)
    Machine-readable code for specific failures (for example `INVALID_DELTA_CURSOR`).

## Response 401:

  - `401` (unknown)
    Missing or invalid credentials.

## Response 401 fields (application/json):

  - `message` (string, required)
    Human-readable error message.
    Example: Invalid Catalog GUID

  - `error` (string)
    Underlying error detail, when available.

  - `code` (string)
    Machine-readable code for specific failures (for example `INVALID_DELTA_CURSOR`).

## Response 403:

  - `403` (unknown)
    Insufficient access, or the order is read-only at its current workflow step (`currentStep` and `stepNumber` included).

## Response 403 fields (application/json):

  - `success` (boolean)
    Example: false

  - `message` (string)

  - `currentStep` (string)

  - `stepNumber` (integer)

## Response 404:

  - `404` (unknown)
    No resource with that GUID is visible to the authenticated supplier.

## Response 404 fields (application/json):

  - `message` (string, required)
    Human-readable error message.
    Example: Invalid Catalog GUID

  - `error` (string)
    Underlying error detail, when available.

  - `code` (string)
    Machine-readable code for specific failures (for example `INVALID_DELTA_CURSOR`).

## Response 500:

  - `500` (unknown)
    Unexpected server error. Some legacy endpoints return the message as `text/plain` instead of JSON.

## Response 500 fields (application/json):

  - `message` (string, required)
    Human-readable error message.
    Example: Invalid Catalog GUID

  - `error` (string)
    Underlying error detail, when available.

  - `code` (string)
    Machine-readable code for specific failures (for example `INVALID_DELTA_CURSOR`).

