Returns the purchase request with the given identifier.

GET /accounting/purchase-requests/{id}

Group: Accounting › Purchase Requests · Operation ID: getPurchaseRequest

A purchase request is an internal request to buy, with its header and lines. It shares its read with POST accounting/purchase-requests/search, which returns the same record. The list at GET accounting/purchase-requests is header only, so the line items come back here and on search. status is both the lifecycle state and the approval outcome. There is no separate approvalStatus on this resource.

Open in the interactive reference

Parameters

Name In Type Required Description
Api-Version header "v1" yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
id path string yes The unique identifier for the purchase request to return.

Response

200 Success

Under data (getPurchaseRequestOutput):

Field Type Required Description
id string yes The unique identifier for the purchase request.
purchaseRequestNumber string no The purchase request number, for example 'PR-1', unique across purchase requests. Absent until one has been assigned.
description string no A description of what is being requested. It is shown to the vendor.
internalDescription string no Internal notes on the request, not shown to the vendor.
externalMemo string no A memo intended for the vendor.
status string no The lifecycle and approval state, in one field. Possible values: 'pendingApproval', 'approved', 'rejected', 'closed'. This resource has no separate approvalStatus.
currency string no The currency the request is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount.
totalAmount string (decimal) no The total requested amount, the sum of the line totals, in the request currency.
startDate string (date) no The first day of the period the request covers. Format YYYY-MM-DD.
endDate string (date) no The last day of the period the request covers. Format YYYY-MM-DD.
needByDate string (date) no The date the goods or services are needed by. Format YYYY-MM-DD.
paymentTerms string no The payment-terms key requested for the resulting order, for example 'net30'.
externalId string no The identifier this request has in the upstream system that produced it. It is not unique.
vendorId string no The vendor this request is directed at. See id on GET accounting/vendors/:id. Absent when no vendor has been chosen yet.
vendorName string no The name of the vendor this request is directed at.
entityId string no The legal entity this request belongs to. See id on GET base/entities.
entityName string no The name of the legal entity this request belongs to.
departmentId string no The department raising the request. See id on GET departments/:id.
departmentName string no The name of the department raising the request.
lastModifiedDate string (date-time) yes The date and time the purchase request last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
approvals array of object no The approval decisions on this request, oldest first. An empty array when no approval policy has matched the request.
approvals[].decision string yes What was decided. Values include 'approve' and 'reject'.
approvals[].employeeName string no The name of the employee who decided.
approvals[].message string no The reviewer's note, where one was given.
approvals[].decidedAt string (date-time) yes The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
lines array of object no The request line items, in their order on the request. An empty array when the request has none.
lines[].id string yes The unique identifier for the line item.
lines[].lineNumber string no The line number, for example 'PRL-1'. Unique across purchase request lines.
lines[].description string no A description of the line item.
lines[].isItem boolean no Whether the line references an inventory item. True for an item line, false for a free-text expense line. It is the item-versus-expense discriminator. There is no itemType field on this resource.
lines[].quantity string (decimal) no The quantity requested, as a decimal.
lines[].price string (decimal) no The unit price, in the request currency. Set on item lines. On expense lines the amount is on editableAmount instead.
lines[].editableAmount string (decimal) no The directly entered line amount, in the request currency. Used on expense lines, where there is no unit price to multiply.
lines[].total string (decimal) no The line total, in the request currency. price times quantity on an item line, editableAmount on an expense line.
lines[].currency string no The currency of the line. Format ISO 4217, for example 'USD'. Always the request currency, on each line so the line is self-describing.
lines[].status string no The delivery state of the line. Possible values: 'undelivered', 'delivering', 'delivered'. It is a delivery status, not an approval status.
lines[].priority string no The requested priority of the line. Possible values: 'high', 'medium', 'low'.
lines[].needByDate string (date) no The date this line is needed by, when it differs from the header. Format YYYY-MM-DD.
lines[].deliveryDate string (date) no The date this line was delivered. Format YYYY-MM-DD.
lines[].estimatedDeliveryDate string (date) no The expected delivery date for this line. Format YYYY-MM-DD.
lines[].startDate string (date) no The first day of the period this line covers. Format YYYY-MM-DD.
lines[].endDate string (date) no The last day of the period this line covers. Format YYYY-MM-DD.
lines[].unitOfMeasure string no The name of the unit of measure for the quantity.
lines[].unitOfMeasureId string no The unit of measure for the quantity. See id on GET inventory/unit-of-measures/:id.
lines[].itemId string no The item this line orders. See id on GET inventory/items/:id. Present only on an item line.
lines[].departmentId string no The department this line is charged to. See id on GET departments/:id.

Errors

Code Status
NOT_FOUND 400

Statuses