---
title: "Update fields on an Order"
method: PATCH
path: "/orders/public/{orderNumber}"
tags: ["Orders"]
---

# Update fields on an Order

`PATCH /orders/public/{orderNumber}`

## Request

- Base URL: `https://api.paperlessparts.com/v1`
- URL: `https://api.paperlessparts.com/v1/orders/public/{orderNumber}`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/paperlessparts/apis/paperless-parts-api/docs/orders/public/:orderNumber/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update fields on an Order.

## Path parameters

- `orderNumber` integer, required: A unique identifier for an Order

## Request body

- object
  - `erp_code` string, nullable: The unique identifier of the corresponding order record in the ERP system, cast to a string.

## Response `200`

Successful response

- Order
  - `uuid` string, uuid
  - `billing_info` AddressInfo, nullable
    - `id` integer
    - `address1` string
    - `address2` string, nullable
    - `attention` string
    - `business_name` string
    - `city` string
    - `country` string
    - `facility_name` string, nullable
    - `phone` string
    - `phone_ext` string, nullable
    - `postal_code` string
    - `state` string
    - `erp_code` string, nullable
  - `created` string, date-time
  - `contact` OrderContact
    - `account` object
      - `erp_code` string, nullable
      - `id` number
      - `notes` string, nullable
      - `name` string
      - `payment_terms` string, nullable
      - `payment_terms_period` string, nullable
    - `email` string, email
    - `first_name` string
    - `id` integer
    - `last_name` string
    - `notes` string, nullable
    - `phone` string, nullable
    - `phone_ext` string, nullable
  - `customer` OrderCustomer: Deprecated! Will be removed soon.
    - `company` OrderCompany
      - `business_name` string
      - `erp_code` string
    - `email` string, email
    - `first_name` string
    - `last_name` string
    - `phone` string
    - `phone_ext` string
  - `deliver_by` string, date-time, nullable
  - `erp_code` string, nullable
  - `estimator` OrderUser
    - `first_name` string
    - `last_name` string
    - `email` string, email
    - `avatar_color` string
  - `number` integer: A unique identifier for an Order
  - `order_items` OrderItem[]
    - `id` integer
    - `components` OrderComponent[]
      - `id` string
      - `child_ids` integer[]
      - `children` ComponentChild[]
        - `child_id` integer: ID of the child component
        - `quantity` integer: The number of child component instances belonging to this parent. Note, the total number of instances of this child component in this assembly tree may be larger if this child appears in multiple places in the tree.
      - `deliver_quantity` integer: The quantity of this component that must be delivered (innate quantity * root component quantity).
      - `description` string, nullable
      - `export_controlled` boolean: Whether or not this order component contains data that is export controlled (ITAR) by the US Government.
      - `finishes` string[]: Note: this field is deprecated. Finishes now show up as Operations.
      - `innate_quantity` integer: The quantity of this subcomponent that must be produced to make one top-level component.
      - `is_root_component` boolean
      - `make_quantity` integer: The quantity of this component that must be made to satisfy the quantity specified by the customer as well as the yield specified for this component (innate quantity * root component quantity / yield).
      - `material` OrderMaterial: This can also be null
        - `id` integer
        - `display_name` string
        - `family` string
        - `material_class` string
        - `name` string
      - `material_operations` OrderOperation[]
        - `id` integer
        - `category` 'material' | 'operation'
        - `cost` number, float
        - `costing_variables` OrderCostingVariable[]
          - `label` string
          - `variable_class` 'basic' | 'drop_down' | 'table'
          - `value_type` 'string' | 'number' | 'currency' | 'boolean'
          - `value` union: This will be indicated by the value_type field.
            - string
            - number
            - integer
            - boolean
          - `row` object, nullable: An object representing a row from a custom table. This object will have arbitrary key-value pairs based on custom table schema it was pulled from. The row field will only be non-null when the variable_class field is 'table'.
          - `options` union[], nullable: A list of the options for a drop down variable. Can be strings, floats, or integers indicated by value_type. The options field will only be non-null when the variable_class field is 'drop_down'.
            - union
              - …
          - `type` string: To Be Deprecated
        - `quantities` OperationQuantity[]
          - `price` number, float
          - `manual_price` number, float, nullable
          - `lead_time` integer, nullable
          - `manual_lead_time` integer, nullable
          - `quantity` integer
        - `is_finish` boolean
        - `is_outside_service` boolean
        - `name` string
        - `erp_code` string
        - `operation_definition_name` string
        - `notes` string, nullable
        - `position` integer: The position of the order operation in the order display, indexed from 1. Note that the position applies across both material operations and order operations. TODO - this shows up as 0 if there is only one operation on the order?
        - `runtime` number, float, nullable
        - `setup_time` number, float, nullable
      - `parent_ids` integer[]
      - `part_name` string
      - `part_number` string, nullable
      - `part_url` string, url
      - `part_uuid` string
      - `process` OrderProcess
        - `id` integer
        - `external_name` string
        - `name` string
      - `purchased_component` QuotePurchasedComponent
        - `oem_part_number` string: Unique identifier for purchased component within a supplier account
        - `internal_part_number` string, nullable
        - `description` string, nullable
        - `piece_price` number: Cost per piece to 4 decimal places
        - `id` string
        - `properties` PurchasedComponentProperty[]
          - `name` string: Name of corresponding purchased component column in table display
          - `code_name` string: Name used to access property within pricing formulas via 'dot' operator
          - `value_type` 'string' | 'boolean' | 'numeric'
          - `value` union: Value of property, None or of type corresponding to value_type
            - string
            - number
            - boolean
      - `revision` string, nullable
      - `shop_operations` OrderOperation[]
        - `id` integer
        - `category` 'material' | 'operation'
        - `cost` number, float
        - `costing_variables` OrderCostingVariable[]
          - `label` string
          - `variable_class` 'basic' | 'drop_down' | 'table'
          - `value_type` 'string' | 'number' | 'currency' | 'boolean'
          - `value` union: This will be indicated by the value_type field.
            - string
            - number
            - integer
            - boolean
          - `row` object, nullable: An object representing a row from a custom table. This object will have arbitrary key-value pairs based on custom table schema it was pulled from. The row field will only be non-null when the variable_class field is 'table'.
          - `options` union[], nullable: A list of the options for a drop down variable. Can be strings, floats, or integers indicated by value_type. The options field will only be non-null when the variable_class field is 'drop_down'.
            - union
              - …
          - `type` string: To Be Deprecated
        - `quantities` OperationQuantity[]
          - `price` number, float
          - `manual_price` number, float, nullable
          - `lead_time` integer, nullable
          - `manual_lead_time` integer, nullable
          - `quantity` integer
        - `is_finish` boolean
        - `is_outside_service` boolean
        - `name` string
        - `erp_code` string
        - `operation_definition_name` string
        - `notes` string, nullable
        - `position` integer: The position of the order operation in the order display, indexed from 1. Note that the position applies across both material operations and order operations. TODO - this shows up as 0 if there is only one operation on the order?
        - `runtime` number, float, nullable
        - `setup_time` number, float, nullable
      - `supporting_files` OrderSupportingFile[]
        - `filename` string
        - `url` string, url
      - `thumbnail_url` string, nullable
      - `type` 'assembled' | 'manufactured' | 'purchased'
    - `description` string, nullable
    - `expedite_revenue` number, float, nullable
    - `export_controlled` boolean: Whether or not this order item contains data that is export controlled (ITAR) by the US Government.
    - `filename` string
    - `lead_days` integer
    - `markup_1_price` number, float
    - `markup_1_name` string
    - `markup_2_price` number, float
    - `markup_2_name` string
    - `private_notes` string, nullable
    - `public_notes` string, nullable
    - `quantity` integer
    - `quantity_outstanding` integer
    - `quote_item_id` integer
    - `quote_item_type` 'automatic' | 'manual': Indicates whether the quote item is associated with a part (automatic pricing), or not (manual pricing).
    - `root_component_id` integer
    - `ships_on` string, date
    - `total_price` number, float
    - `unit_price` number, float
    - `base_price` number, float
    - `add_on_fees` number, float, nullable
    - `ordered_add_ons` OrderAddOn[]
      - `is_required` boolean
      - `name` string
      - `erp_code` string
      - `notes` string
      - `price` number, float
      - `quantity` integer
      - `costing_variables` OrderCostingVariable[]
        - `label` string
        - `variable_class` 'basic' | 'drop_down' | 'table'
        - `value_type` 'string' | 'number' | 'currency' | 'boolean'
        - `value` union: This will be indicated by the value_type field.
          - string
          - number
          - integer
          - boolean
        - `row` object, nullable: An object representing a row from a custom table. This object will have arbitrary key-value pairs based on custom table schema it was pulled from. The row field will only be non-null when the variable_class field is 'table'.
        - `options` union[], nullable: A list of the options for a drop down variable. Can be strings, floats, or integers indicated by value_type. The options field will only be non-null when the variable_class field is 'drop_down'.
          - union
            - number
            - string
        - `type` string: To Be Deprecated
    - `pricing_items` object[]
    - `unit_price_before_discounts` number, float, nullable
  - `payment_details` OrderPaymentDetails
    - `card_brand` string, nullable
    - `card_last4` string, nullable
    - `net_payout` number, float, nullable
    - `payment_type` 'credit_card' | 'purchase_order', nullable
    - `purchase_order_number` string
    - `purchasing_dept_contact_email` string, email, nullable
    - `purchasing_dept_contact_name` string, nullable
    - `shipping_cost` number, float
    - `subtotal` number, float
    - `tax_cost` number, float
    - `tax_rate` number, float
    - `payment_terms` string, nullable
    - `total_price` number, float
  - `private_notes` string, nullable
  - `purchase_order_file_url` string, uri, nullable
  - `quote_erp_code` string, nullable
  - `quote_number` integer
  - `quote_rfq_number` string, nullable
  - `quote_revision_number` integer
  - `sales_person` OrderUser
    - `first_name` string
    - `last_name` string
    - `email` string, email
    - `avatar_color` string
  - `salesperson` OrderUser
    - `first_name` string
    - `last_name` string
    - `email` string, email
    - `avatar_color` string
  - `send_from_facility` Facility, nullable
    - `account_id` integer
    - `address` Address
      - `id` integer
      - `address1` string: (Required)
      - `address2` string, nullable: (Required)
      - `city` string: (Required)
      - `state` string: (Required) State/Province must be specified as standard postal abbreviation
      - `postal_code` string: (Required) US postal codes may optionally contain 4-digit extension, e.g., `'02114-1234'`
      - `country` string: (Required) Country must be ISO 3166-1 alpha-3 code. Currently allowed values are `'USA'`, `'CAN'`.
      - `erp_code` string: The unique identifier for this address record in the ERP
    - `attention` string
    - `id` integer
    - `name` string
    - `salesperson` SalesPerson
      - `uuid` string, uuid
      - `first_name` string
      - `last_name` string
      - `email` string, email
      - `erp_code` string
  - `shipments` OrderShipment[]
    - `id` integer
    - `pickup_recipient` string, nullable
    - `shipment_date` string, date-time
    - `shipment_items` OrderShipmentItem[]
      - `id` integer
      - `order_item_id` integer
      - `quantity` integer
    - `shipping_cost` number, float
    - `tracking_number` string
  - `shipping_info` AddressInfo, nullable
    - `id` integer
    - `address1` string
    - `address2` string, nullable
    - `attention` string
    - `business_name` string
    - `city` string
    - `country` string
    - `facility_name` string, nullable
    - `phone` string
    - `phone_ext` string, nullable
    - `postal_code` string
    - `state` string
    - `erp_code` string, nullable
  - `shipping_option` OrderShippingOption
    - `customers_account_number` string, nullable
    - `customers_carrier` 'ups' | 'fedex', nullable
    - `shipping_method` 'early_am_overnight' | 'ground' | 'next_day_air' | 'second_day_air', nullable
    - `type` 'pickup' | 'customers_shipping_account' | 'suppliers_shipping_account'
  - `ships_on` string, date
  - `status` 'pending' | 'confirmed' | 'on_hold' | 'in_process' | 'completed' | 'cancelled'

---

[API](https://skmtc.dev/paperlessparts/apis/paperless-parts-api.md) - [All operations](https://skmtc.dev/paperlessparts/apis/paperless-parts-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paperlessparts/apis/paperless-parts-api/revisions/3eb132ead1fe?raw)
