Skip to navigation

Update Material Order

Update a material order. Supports partial updates.

  • lineItems and sections replace all lines. Send a line’s id to keep it; a kept line keeps its scope link even if scopeLineItemId is omitted.
  • vendorId can only change while the material order is a DRAFT. Changing the vendor reprices the lines.
  • status accepts DRAFT, SENT, SCHEDULED, PARTIALLY_FULFILLED, FULFILLED and CANCELED, following the allowed transitions. PENDING_SUPPLIER is read-only: it is returned as-is when a connected supplier has queued the order, and can’t be set.
  • Set isActive to false to archive the material order, or true to unarchive it.
  • Delivery and supplier details are read-only.

Orders accepted by a supplier are locked. Once a connected supplier has accepted a material order, it can’t be edited, and the request returns 400 with the reason.

Authentication

x-api-keystring
API Key authentication via header

Path parameters

material_order_idintegerRequired
Material order identifier

Request

This endpoint expects an object.
vendorIdintegerOptional>=1

Change the vendor. Only while the material order is a DRAFT.

titlestringOptional<=255 characters
Title
descriptionstring or nullOptional
Material order description
internalMemostring or nullOptional

Internal-only memo, never shown to customers or on the PDF or portal. Rich text (HTML, like the app’s editor stores). Send null or "" to clear it.

dueDatestring or nullOptionalformat: "date-time"

Due date (ISO 8601 datetime string). Send null to clear it.

statusenumOptional

Material order status. PENDING_SUPPLIER is read-only and can’t be set.

isActivebooleanOptional

Set to false to archive the material order, or true to unarchive it. Applied independently of any other fields present in the same request.

lineItemslist of objectsOptional

Replaces all lines. May be combined with sections (ungrouped items).

sectionslist of objectsOptional

Replaces all lines, grouped into named sections. May be combined with lineItems (ungrouped items).

Response

Material order updated successfully
idinteger
Material order identifier
statusenum

Material order status. PENDING_SUPPLIER is set only by a connected supplier (the order is queued and waiting for the supplier’s order number). It is returned as-is and can’t be set through the API.

amountdouble
Total amount in dollars
createdAtstringformat: "date-time"
Creation timestamp
updatedAtstringformat: "date-time"
Last update timestamp
materialOrderNumberinteger or nullOptional
Unique material order number
titlestringOptional
Material order title
descriptionstring or nullOptional
Material order description
internalMemostring or nullOptional

Internal-only memo, never shown to customers or on the PDF or portal. Rich text (HTML, like the app’s editor stores). On update, send null or "" to clear it; responses return null when empty.

vendorobject or nullOptional
The vendor the materials are ordered from
recordobject or nullOptional
The project the material order belongs to
issueDatestring or nullOptionalformat: "date-time"
Issue date
dueDatestring or nullOptionalformat: "date-time"
Due date
subtotaldoubleOptional
Subtotal in dollars
isArchivedbooleanOptional
Whether the material order is archived
deliveryMethodenumOptional

How the material is delivered. Read-only: set in the app when the vendor is a connected supplier. Each supplier uses its own subset of these values.

  • ABC Supply: OUR_TRUCK_ROOF, OUR_TRUCK_GROUND, OUR_TRUCK_WINDOW, COMMON_CARRIER, CUSTOMER_PICKUP, EXPRESS_PICKUP, THIRD_PARTY_CARRIER
  • SRS Distribution: GROUND_DROP, ROOF_LOAD, ROOF_EDGE, WILL_CALL (a branch pickup, which carries a pickupTime instead of a delivery window)
deliveryWindowenumOptional

Named delivery window. The branch sets the actual times. Pickups carry a pickupTime instead.

Allowed values:
pickupTimestring or nullOptional

Pickup time (HH:mm, 24-hour) for an SRS WILL_CALL order

deliveryRequestedForstring or nullOptionalformat: "date"

Requested delivery date (YYYY-MM-DD)

deliveryInstructionsstring or nullOptional

Delivery instructions (up to 255 characters)

supplierBranchNumberstring or nullOptional
Supplier branch the material is ordered from
supplierJobAccountNumberinteger or nullOptional
Supplier job account the order bills to
pointOfContactUserobject or nullOptional

Team member the supplier should contact. null means the client.

deliveryContactUserobject or nullOptional

Team member who receives the delivery. null means the point of contact.

lineItemslist of objectsOptional

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error