Skip to navigation

Create Material Order

Create a material order on a project.

Required fields:

  • recordId: Project ID. Material orders can only be created on projects.
  • vendorId: ID of the vendor the materials are ordered from
  • lineItems and/or sections: at least one line

Optional fields: title (defaults to “Material Order”), description, internalMemo, dueDate.

Line rules

  • Material orders are priced by cost: the total is unitCost × quantity across all lines. unitCost must be 0 or more.
  • unitPrice is the selling price. It doesn’t change the material order’s total; it is copied to the project scope when the line is added there (see below).
  • A catalogItemId may appear at most once per request.
  • A line can link a project scope line item with scopeLineItemId (see below).
  • Prices are in dollars.

Linking scope line items

Set scopeLineItemId on a line to the id of a scope line from GET /projects/{project_id}/line-items, so the material order tracks against the project’s scope. Material orders always order by quantity, so lines don’t take billingMode or billingValue.

  • A scope line can be linked at most once per material order.
  • A linked line must keep the scope line’s unitCost and unitPrice.
  • With Financials 2.0, a linked line that exceeds what is left on the scope line creates and approves a change order that increases the scope, instead of failing.
  • New lines that are not linked are added to the scope with their unitCost and unitPrice. Removing a line from the material order later doesn’t remove it from the scope.
  • PUT /projects/{project_id}/line-items replaces scope lines, so their ids can change. Read them again before linking.

Delivery details

Delivery and supplier details (deliveryMethod, deliveryWindow, pickupTime, deliveryRequestedFor, deliveryInstructions, supplierBranchNumber, supplierJobAccountNumber, pointOfContactUser, deliveryContactUser) are read-only. They are set in the app when the vendor is a connected supplier (SRS Distribution or ABC Supply) and are returned when you read a material order.

Material orders can’t be sent to a supplier through the API.

Authentication

x-api-keystring
API Key authentication via header

Request

This endpoint expects an object.
recordIdintegerRequired>=1
Project ID the material order belongs to
vendorIdintegerRequired>=1
Vendor the materials are ordered from
titlestringOptional<=255 characters
Title. Defaults to "Material Order".
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). Only a non-empty value is stored on create.

dueDatestringOptionalformat: "date-time"

Due date (ISO 8601 datetime string)

lineItemslist of objectsOptional

Required when sections is not provided. May be combined with sections (ungrouped items).

sectionslist of objectsOptional

Required when lineItems is not provided. Grouped line items with named sections.

Response

Material order created 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