PurchaseOrder

Returns a list of purchase orders.Deprecated

DEPRECATED Please use the endpoint "/api/v1/purchaseOrders"

Securitybearer
Request
path Parameters
jobId
required
string <uuid>
query Parameters
isDeleted
boolean
modifiedSince
string <date-time>
Responses
get/api/v1/jobs/{jobId}/purchaseOrders
Request samples
Response samples
application/json
[
  • {
    }
]

Creates a new purchase order on the specified job.

Securitybearer
Request
path Parameters
jobId
required
string <uuid>

The job id on which to create the purchase order.

Request Body schema:
required

The purchase order to be created.

orderStatus
string (OrderStatus)
Enum: "notStarted" "inProgress" "completed" "cancelled"
dateIssued
string or null <date-time>

The date purchase order was issued. If not specified, the default value is the server time.

description
string or null

The purchase order description.

vendorId
string or null <uuid>

The vendor id for the purchase order.

purchaseOrder
required
string non-empty

The purchase order name.

Responses
post/api/v1/jobs/{jobId}/purchaseOrders
Request samples
{
  • "purchaseOrder": "POCement",
  • "orderStatus": "inProgress",
  • "dateIssued": "2019-01-01",
  • "description": "Purchase order for cement",
  • "vendorId": "563a5017-2405-4c07-85d3-518caae7d374"
}
Response samples
application/json
{
  • "id": "03de8151-cbe4-4cc8-83b5-87c0d9837377",
  • "jobId": "65053153-ed97-442d-b796-0e24df2b444d",
  • "orderStatus": "inProgress",
  • "dateIssued": "2019-01-01",
  • "vendorName": "Smith Company",
  • "vendorDescription": "Smith & Sons Company",
  • "purchaseOrder": "PORebar",
  • "description": "Purchase order for rebars",
  • "vendorId": "66322a73-ca2d-4361-83c7-8460e39f28d3"
}

Returns purchase orders

This call returns a list of purchase orders for the specified business unit, job, purchase order, date range, or modified since date.

Securitybearer
Request
query Parameters
businessUnitId
string <uuid>

The business unit id.

jobId
string <uuid>

The job id.

purchaseOrderId
string <uuid>

The purchase order id.

modifiedSince
string <date-time>

The date of the last modification.

isDeleted
boolean

If true, returns deleted purchase orders.

startDate
string <date-time>

The beginning of a date range to gather purchase orders.

endDate
string <date-time>

The end of a date range to gather purchase orders.

limit
integer <int32> [ 1 .. 1000 ]
Default: 1000

The maximum number of results that should be returned.

cursor
string

Optional. When there are additional results, the metadata nextCursor field should be passed to retrieve the next page of results.

Responses
get/api/v1/purchaseOrders
Request samples
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Returns purchase order line items

This call will return a list of purchase order line items for the specified business unit, job, purchase order or modified since date.

Securitybearer
Request
query Parameters
businessUnitId
string <uuid>

The business unit id.

jobId
string <uuid>

The job id.

purchaseOrderId
string <uuid>

The purchase order id.

modifiedSince
string <date-time>

The date of the last modification.

isDeleted
boolean

If true, returns deleted purchase order items.

limit
integer <int32> [ 1 .. 1000 ]
Default: 1000

The maximum number of results that should be returned.

cursor
string

Optional. When there are additional results, the metadata nextCursor field should be passed to retrieve the next page of results.

Responses
get/api/v1/purchaseOrderItems
Request samples
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Updates a purchase order

This call updates an existing purchase order by id. Canceling a purchase order is not supported yet.

Securitybearer
Request
path Parameters
id
required
string <uuid>

The purchase order id.

Request Body schema:
required

Updated values for the purchase order.

orderStatus
string (OrderStatus)
Enum: "notStarted" "inProgress" "completed" "cancelled"
dateIssued
string or null <date-time>

The date purchase order was issued. If not specified, the default value is the server time.

description
string or null

The purchase order description.

purchaseOrder
string or null

The purchase order name.

vendorId
string or null <uuid>

The vendor id for the purchase order.

Responses
204

No Content

put/api/v1/purchaseOrders/{id}
Request samples
{
  • "purchaseOrder": "POCement",
  • "orderStatus": "inProgress",
  • "dateIssued": "2019-01-01",
  • "description": "Purchase order for cement",
  • "vendorId": "563a5017-2405-4c07-85d3-518caae7d374"
}

Returns a list of material purchase order details. This endpoint only supports web-only companies.

Securitybearer
Request
path Parameters
purchaseOrderId
required
string <uuid>
Responses
get/api/v1/purchaseOrders/{purchaseOrderId}/details/material
Request samples
Response samples
application/json
[
  • {
    }
]

Creates a material purchase order detail

This call creates the specified job-level material purchase order detail.

Securitybearer
Request
path Parameters
purchaseOrderId
required
string <uuid>

The purchase order id.

Request Body schema:
required

Details about the CustomCostType to add.

isFullyReceived
boolean or null

Whether the item is fully received. Default is false.

isFullyInstalled
boolean or null

Whether the item is fully installed. Default is false.

sequence
required
number <double>

The sequence number of the purchase order detail. Used to sort the purchase order details.

note
string or null

The note.

quantity
required
number <double>

The item quantity.

unitCost
required
number <double>

The item unit cost.

unitOfMeasure
required
string non-empty

The item unit of measure.

salesTaxPercent
number <double>

The item sales tax represented in percent.

isCancelled
boolean

Whether the purchase order detail is canceled.

alternateDescription
string or null

An alternate description for this purchase order.

vendorItemNumber
string or null

The vendor item number.

jobMaterialId
required
string <uuid>

The job material Id.

Responses
post/api/v1/purchaseOrders/{purchaseOrderId}/details/material
Request samples
{
  • "jobMaterialId": "ef6817b3-685b-4f4f-88f5-296ebb120a1b",
  • "sequence": 10.5,
  • "note": "New material purchase order detail",
  • "quantity": 250,
  • "unitCost": 14.75,
  • "unitOfMeasure": "LF",
  • "salesTaxPercent": 10.25,
  • "isCancelled": false,
  • "alternateDescription": "Alternate description",
  • "vendorItemNumber": "VI-1",
  • "isFullyReceived": false,
  • "isFullyInstalled": true
}
Response samples
application/json
{
  • "jobMaterialId": "d10a8684-902c-46cc-be79-c8587bb68e8d",
  • "id": "4391e64a-04d9-46a7-84b2-9f3b3fa942a7",
  • "purchaseOrderId": "da03efb0-258b-468c-82f4-0daadc5a3d0b",
  • "sequence": 20.1,
  • "isFullyReceived": false,
  • "isFullyInstalled": false,
  • "note": "Note 1",
  • "quantity": 100.5,
  • "unitCost": 10.5,
  • "unitOfMeasure": "EA",
  • "salesTaxPercent": 8.25,
  • "isCancelled": false,
  • "alternateDescription": "alt description",
  • "vendorItemNumber": "180.00.1"
}

Updates material purchase order detail

This call updates an existing material purchase order detail by its id. Currently, update is limited to isFullyReceived and isFullyInstalled fields only.

Securitybearer
Request
path Parameters
id
required
string <uuid>

The purchase order detail id.

Request Body schema:
required

Details about the purchase order detail to be updated.

isFullyReceived
boolean or null

Whether the item is fully received. Default is false.

isFullyInstalled
boolean or null

Whether the item is fully installed. Default is false.

Responses
204

No Content

put/api/v1/purchaseOrders/details/material/{id}
Request samples
{
  • "isFullyReceived": false,
  • "isFullyInstalled": true
}