The purchasing flow: requests to orders to receipts
Walk the Internal Teams API purchasing lifecycle end to end: read approved purchase requests, cut purchase orders, associate line items, and record receipts.
This guide walks the purchasing lifecycle end to end with the Internal Teams API. Technicians raise purchase requests (PRs), your purchasing system turns them into purchase orders (POs) with a vendor, and goods arrive as receipts that update stock. It assumes you have a partner API key (see the introduction).All examples assume:
Purchase requests: requested, denied, cancelled, approved, orderInProgress, ordered, partially_ordered, fulfilled, partially_fulfilled. A PR’s status is recomputed from its line items as they get associated to POs, so most of the movement happens automatically.Purchase orders: new, ordered, received, partially_received, cancelled, closed.
1. Read approved purchase requests
# The ordering backlogcurl -H "X-API-KEY: $KEY" -H "OW-KEY: $SECRET" \ "$BASE/v1/partners/inventory/purchase_requests?status=approved"# One PR with its part and equipment line itemscurl -H "X-API-KEY: $KEY" -H "OW-KEY: $SECRET" \ "$BASE/v1/partners/inventory/purchase_requests/601"
Any query parameter other than the paging parameters acts as an equality filter on the entity’s columns (status=approved, stockLocationId=42), always inside your company’s scope.For a cross-PR worklist, query line items directly:
When your approval flow lives outside OpenWrench, you can also set PR statuses directly. Use PATCH .../purchase_requests/{id}/{status} for any status in the vocabulary, and PATCH .../purchase_requests/{id}/cancelled to cancel (only from requested or approved; otherwise 400).
2. Create the purchase order
POST /v1/partners/inventory/purchase_orders creates the PO with its line items in one call. Required: status (typically new), partEquipmentVendorId, currencyId, and createdByEmail. totalCost is required unless your company’s inventory settings mark PO cost as non-mandatory (it is mandatory by default). supplierCompanyId and supplierFacilityId are derived from your key.
Each line item sets isEquipmentLine and then either the part* fields or the equipment* fields. prLineItemIds records which PR lines the PO line fulfils. Passing a top-level id replaces an existing PO’s writable fields instead of creating a new one.
Associate PR line items
If you did not link PRs via prLineItemIds at creation time, associate them explicitly:
Each listed PR line item moves to orderInProgress with its associatedPurchaseOrderLineItemId set, and each parent PR’s status is recomputed. Ids your key cannot read are silently skipped (the call can return an empty list), so verify the returned items against what you sent.
Revise line items
POST /v1/partners/inventory/purchase_order_line_items/bulk takes a JSON array of line items, all referencing the same supplierPurchaseOrderId, and has replace semantics:
OpenWrench first deletes all existing non-received line items on the PO, then creates the submitted ones. Send the complete intended set of open lines every time. Line status is not settable here: new lines start as new, and a line resubmitted with its id keeps its status.
The PO’s part/equipment/purchase-request id lists are recomputed and the purchase-order notification is re-sent. supplierFacilityId/supplierCompanyId per item come from your key; items without write permission are silently skipped.
This sets the PO to ordered and emails the order to the vendor. The success response is the confirmation string envelope ("type": "Email", "data": "Email has been sent"), not the PO; re-fetch the PO for its new state. To abort instead, PATCH .../purchase_orders/{id}/cancel (which does return the updated PO).
4. Record receipts as goods arrive
PUT /v1/partners/inventory/purchase_order_receipts records receiving against one PO line item. On this endpoint updatedBy and supplierFacilityIdmust be supplied in the body; they are not derived from the key.
receiptNumber, purchaseOrderId, purchaseOrderLineItemId, receivedQuantity, updatedBy, and supplierFacilityId are required.
receivedQuantity must be non-zero; a negative value records a return.
Updating a receipt adjusts the received quantities and costs on the PO line item and the stock records at the destination stock location.
For serialized equipment, send one entry per unit in equipmentPerStockLocationReceiptValues, assetReceiptValues, or receiptValuesWithoutId. The array length must equal receivedQuantity, these arrays may not accompany a return, and serial or asset numbers already in use are rejected.
Vendor invoice metadata (invoiceNumber, invoiceCurrency, invoiceTotal, exchangeRate, invoiceTotalPostExchange) can be captured on the receipt.
Read a receipt back with GET /v1/partners/inventory/purchase_order_receipts/{id}.
Idempotency and error handling
Creates are not idempotent: retrying a timed-out PO create can duplicate the order. Use the list endpoint with a filter (for example on your receiptNumber-style external references) to check before retrying.
Permission problems surface as 400 (with the standard error envelope). Silently-skipped ids on the bulk and associate endpoints mean a “successful” call may have done less than you asked. Always reconcile the response payload against your request.
The catalog endpoints supply the partId, equipmentTypeId, partEquipmentVendorId, and stockLocationId values this flow needs.
Every purchase order, line item, and receipt change made through these endpoints is recorded on the purchase order’s audit trail in OpenWrench, attributed to the contact behind your API key.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OpenWrench Docs","description":"Reference documentation and integration guides for the OpenWrench External API — buyer, supplier, and partner surfaces.","colors":{"primary":"#6D28D9","light":"#8B5CF6","dark":"#5B21B6"},"logo":{"light":"https://mintcdn.com/openwrench/MpgUm2Im5ZrD9tFw/logo/light.svg?fit=max\u0026auto=format\u0026n=MpgUm2Im5ZrD9tFw\u0026q=85\u0026s=763bb056b0ddeaaeae3d8bee85dc3e06","dark":"https://mintcdn.com/openwrench/MpgUm2Im5ZrD9tFw/logo/dark.svg?fit=max\u0026auto=format\u0026n=MpgUm2Im5ZrD9tFw\u0026q=85\u0026s=a84a39cf7849f387cfb865ba22e0a38e"},"favicon":"https://mintcdn.com/openwrench/MpgUm2Im5ZrD9tFw/favicon.png?fit=max\u0026auto=format\u0026n=MpgUm2Im5ZrD9tFw\u0026q=85\u0026s=b01cf4070a34a54ba40b628a09269099","navbar":{"links":[{"href":"mailto:support@useopenwrench.com","label":"Support"}]},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","href":"buyer-api/introduction"},{"language":"es","href":"es/buyer-api/introduction"},{"language":"fr-CA","href":"fr-CA/buyer-api/introduction"},{"language":"sv","href":"sv/buyer-api/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"openwrench","hasAudioNarration":false,"actualSubdomain":"openwrench","customDomains":["api-docs.useopenwrench.com"],"gitSource":{"type":"github","owner":"emptor-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adafe041d1d6d712a14178e","clientVersion":"0.0.4160","searchFilterCounts":[{"language":"en","tag":"API Reference","count":159},{"language":"es","tag":"Referencia de la API","count":159},{"language":"fr-CA","tag":"Référence de l’API","count":159},{"language":"sv","tag":"API-referens","count":159},{"language":"en","tag":"Buyer API","count":123},{"language":"es","tag":"Buyer API","count":123},{"language":"fr-CA","tag":"API Acheteur","count":123},{"language":"sv","tag":"Buyer API","count":123},{"language":"en","tag":"Supplier API","count":90},{"language":"es","tag":"Supplier API","count":90},{"language":"fr-CA","tag":"API Fournisseur","count":90},{"language":"sv","tag":"Supplier API","count":90},{"language":"en","tag":"Internal Teams API","count":32},{"language":"es","tag":"Internal Teams API","count":32},{"language":"fr-CA","tag":"Internal Teams API","count":32},{"language":"sv","tag":"Internal Teams API","count":32},{"language":"en","tag":"Endpoints","count":29},{"language":"es","tag":"Endpoints","count":29},{"language":"fr-CA","tag":"Points de terminaison","count":29},{"language":"sv","tag":"Slutpunkter","count":29},{"language":"en","tag":"Work Orders","count":25},{"language":"es","tag":"Work Orders","count":25},{"language":"fr-CA","tag":"Work Orders","count":25},{"language":"sv","tag":"Work Orders","count":25},{"language":"en","tag":"Guides","count":20},{"language":"es","tag":"Guías","count":20},{"language":"fr-CA","tag":"Guides","count":20},{"language":"sv","tag":"Guider","count":20},{"language":"en","tag":"Invoices","count":16},{"language":"es","tag":"Invoices","count":16},{"language":"fr-CA","tag":"Invoices","count":16},{"language":"sv","tag":"Invoices","count":16},{"language":"en","tag":"Service Calls","count":12},{"language":"en","tag":"Purchase Orders","count":12},{"language":"es","tag":"Service Calls","count":12},{"language":"es","tag":"Purchase Orders","count":12},{"language":"fr-CA","tag":"Service Calls","count":12},{"language":"fr-CA","tag":"Purchase Orders","count":12},{"language":"sv","tag":"Service Calls","count":12},{"language":"sv","tag":"Purchase Orders","count":12}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"partners-api/purchasing-flow","slug":"/partners-api/purchasing-flow","pageMetadata":{"title":"The purchasing flow: requests to orders to receipts","sidebarTitle":"Purchasing flow","description":"Walk the Internal Teams API purchasing lifecycle end to end: read approved purchase requests, cut purchase orders, associate line items, and record receipts.","href":"/partners-api/purchasing-flow"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Walk the Internal Teams API purchasing lifecycle end to end: read approved purchase requests, cut purchase orders, associate line items, and record receipts.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This guide walks the purchasing lifecycle end to end with the Internal Teams API. Technicians raise `,_jsx(_components.strong,{children:`purchase requests`}),` (PRs), your purchasing system turns them into `,_jsx(_components.strong,{children:`purchase orders`}),` (POs) with a vendor, and goods arrive as `,_jsx(_components.strong,{children:`receipts`}),` that update stock. It assumes you have a partner API key (see the `,_jsx(_components.a,{href:`/partners-api/introduction`,children:`introduction`}),`).`]}),`\n`,_jsx(_components.p,{children:`All examples assume:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` BASE=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.useopenwrench.com/api/external\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KEY=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cpartner-api-key>\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # X-API-KEY header`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SECRET=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cshared-secret>\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # OW-KEY header`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`status-vocabulary`,children:`Status vocabulary`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Purchase requests`}),`: `,_jsx(_components.code,{children:`requested`}),`, `,_jsx(_components.code,{children:`denied`}),`, `,_jsx(_components.code,{children:`cancelled`}),`, `,_jsx(_components.code,{children:`approved`}),`, `,_jsx(_components.code,{children:`orderInProgress`}),`, `,_jsx(_components.code,{children:`ordered`}),`, `,_jsx(_components.code,{children:`partially_ordered`}),`, `,_jsx(_components.code,{children:`fulfilled`}),`, `,_jsx(_components.code,{children:`partially_fulfilled`}),`. A PR’s status is recomputed from its line items as they get associated to POs, so most of the movement happens automatically.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Purchase orders`}),`: `,_jsx(_components.code,{children:`new`}),`, `,_jsx(_components.code,{children:`ordered`}),`, `,_jsx(_components.code,{children:`received`}),`, `,_jsx(_components.code,{children:`partially_received`}),`, `,_jsx(_components.code,{children:`cancelled`}),`, `,_jsx(_components.code,{children:`closed`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`1-read-approved-purchase-requests`,children:`1. Read approved purchase requests`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The ordering backlog`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-KEY: $KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OW-KEY: $SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$BASE/v1/partners/inventory/purchase_requests?status=approved\"`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# One PR with its part and equipment line items`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-KEY: $KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OW-KEY: $SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$BASE/v1/partners/inventory/purchase_requests/601\"`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Any query parameter other than the paging parameters acts as an equality filter on the entity’s columns (`,_jsx(_components.code,{children:`status=approved`}),`, `,_jsx(_components.code,{children:`stockLocationId=42`}),`), always inside your company’s scope.`]}),`\n`,_jsx(_components.p,{children:`For a cross-PR worklist, query line items directly:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-KEY: $KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OW-KEY: $SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$BASE/v1/partners/inventory/purchase_request_line_items?status=approved\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-KEY: $KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OW-KEY: $SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$BASE/v1/partners/inventory/purchase_request_line_items/count_by?status=approved\"`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`When your approval flow lives outside OpenWrench, you can also set PR statuses directly. Use `,_jsx(_components.code,{children:`PATCH .../purchase_requests/{id}/{status}`}),` for any status in the vocabulary, and `,_jsx(_components.code,{children:`PATCH .../purchase_requests/{id}/cancelled`}),` to cancel (only from `,_jsx(_components.code,{children:`requested`}),` or `,_jsx(_components.code,{children:`approved`}),`; otherwise `,_jsx(_components.code,{children:`400`}),`).`]}),`\n`,_jsx(Heading,{level:`2`,id:`2-create-the-purchase-order`,children:`2. Create the purchase order`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /v1/partners/inventory/purchase_orders`}),` creates the PO with its line items in one call. Required: `,_jsx(_components.code,{children:`status`}),` (typically `,_jsx(_components.code,{children:`new`}),`), `,_jsx(_components.code,{children:`partEquipmentVendorId`}),`, `,_jsx(_components.code,{children:`currencyId`}),`, and `,_jsx(_components.code,{children:`createdByEmail`}),`. `,_jsx(_components.code,{children:`totalCost`}),` is required unless your company’s inventory settings mark PO cost as non-mandatory (it is mandatory by default). `,_jsx(_components.code,{children:`supplierCompanyId`}),` and `,_jsx(_components.code,{children:`supplierFacilityId`}),` are derived from your key.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$BASE/v1/partners/inventory/purchase_orders\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-KEY: $KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OW-KEY: $SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"status\": \"new\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"partEquipmentVendorId\": 44,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currencyId\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"createdByEmail\": \"purchasing@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"stockLocationId\": 7,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"totalBeforeTax\": 620.00,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tax\": 52.70,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"totalCost\": 672.70,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"incomingLineItems\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"isEquipmentLine\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"partId\": 210,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"partQuantity\": 2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"partUomId\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"partCost\": 310.00,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"partCurrencyId\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prLineItemIds\": [8801, 8802]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Each line item sets `,_jsx(_components.code,{children:`isEquipmentLine`}),` and then either the `,_jsx(_components.code,{children:`part*`}),` fields or the `,_jsx(_components.code,{children:`equipment*`}),` fields. `,_jsx(_components.code,{children:`prLineItemIds`}),` records which PR lines the PO line fulfils. Passing a top-level `,_jsx(_components.code,{children:`id`}),` replaces an existing PO’s writable fields instead of creating a new one.`]}),`\n`,_jsx(Heading,{level:`3`,id:`associate-pr-line-items`,children:`Associate PR line items`}),`\n`,_jsxs(_components.p,{children:[`If you did not link PRs via `,_jsx(_components.code,{children:`prLineItemIds`}),` at creation time, associate them explicitly:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X PATCH -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-KEY: $KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OW-KEY: $SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$BASE/v1/partners/inventory/purchase_request_line_items/associate_po_line_item/8801,8802/9902\"`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Each listed PR line item moves to `,_jsx(_components.code,{children:`orderInProgress`}),` with its `,_jsx(_components.code,{children:`associatedPurchaseOrderLineItemId`}),` set, and each parent PR’s status is recomputed. Ids your key cannot read are `,_jsx(_components.strong,{children:`silently skipped`}),` (the call can return an empty list), so verify the returned items against what you sent.`]}),`\n`,_jsx(Heading,{level:`3`,id:`revise-line-items`,children:`Revise line items`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /v1/partners/inventory/purchase_order_line_items/bulk`}),` takes a `,_jsx(_components.strong,{children:`JSON array`}),` of line items, all referencing the same `,_jsx(_components.code,{children:`supplierPurchaseOrderId`}),`, and has replace semantics:`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`OpenWrench first deletes all existing `,_jsx(_components.strong,{children:`non-received`}),` line items on the PO, then creates the submitted ones. Send the complete intended set of open lines every time. Line status is not settable here: new lines start as `,_jsx(_components.code,{children:`new`}),`, and a line resubmitted with its `,_jsx(_components.code,{children:`id`}),` keeps its status.`]})}),`\n`,_jsxs(_components.p,{children:[`The PO’s part/equipment/purchase-request id lists are recomputed and the purchase-order notification is re-sent. `,_jsx(_components.code,{children:`supplierFacilityId`}),`/`,_jsx(_components.code,{children:`supplierCompanyId`}),` per item come from your key; items without write permission are silently skipped.`]}),`\n`,_jsx(Heading,{level:`2`,id:`3-mark-the-order-placed`,children:`3. Mark the order placed`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X PATCH -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-KEY: $KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OW-KEY: $SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$BASE/v1/partners/inventory/purchase_orders/350/ordered\"`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This sets the PO to `,_jsx(_components.code,{children:`ordered`}),` and emails the order to the vendor. The success response is the confirmation string envelope (`,_jsx(_components.code,{children:`\"type\": \"Email\"`}),`, `,_jsx(_components.code,{children:`\"data\": \"Email has been sent\"`}),`), `,_jsx(_components.strong,{children:`not`}),` the PO; re-fetch the PO for its new state. To abort instead, `,_jsx(_components.code,{children:`PATCH .../purchase_orders/{id}/cancel`}),` (which does return the updated PO).`]}),`\n`,_jsx(Heading,{level:`2`,id:`4-record-receipts-as-goods-arrive`,children:`4. Record receipts as goods arrive`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`PUT /v1/partners/inventory/purchase_order_receipts`}),` records receiving against one PO line item. On this endpoint `,_jsx(_components.code,{children:`updatedBy`}),` and `,_jsx(_components.code,{children:`supplierFacilityId`}),` `,_jsx(_components.strong,{children:`must be supplied in the body`}),`; they are not derived from the key.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X PUT `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$BASE/v1/partners/inventory/purchase_order_receipts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-KEY: $KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OW-KEY: $SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"receiptNumber\": \"RCPT-1042\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"purchaseOrderId\": 350,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"purchaseOrderLineItemId\": 9902,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"receivedQuantity\": 2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pricePerQuantity\": 310.00,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"updatedBy\": \"warehouse@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"supplierFacilityId\": 12`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Rules:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`receiptNumber`}),`, `,_jsx(_components.code,{children:`purchaseOrderId`}),`, `,_jsx(_components.code,{children:`purchaseOrderLineItemId`}),`, `,_jsx(_components.code,{children:`receivedQuantity`}),`, `,_jsx(_components.code,{children:`updatedBy`}),`, and `,_jsx(_components.code,{children:`supplierFacilityId`}),` are required.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`receivedQuantity`}),` must be non-zero; `,_jsx(_components.strong,{children:`a negative value records a return`}),`.`]}),`\n`,_jsx(_components.li,{children:`Updating a receipt adjusts the received quantities and costs on the PO line item and the stock records at the destination stock location.`}),`\n`,_jsxs(_components.li,{children:[`For serialized equipment, send one entry per unit in `,_jsx(_components.code,{children:`equipmentPerStockLocationReceiptValues`}),`, `,_jsx(_components.code,{children:`assetReceiptValues`}),`, or `,_jsx(_components.code,{children:`receiptValuesWithoutId`}),`. The array length must equal `,_jsx(_components.code,{children:`receivedQuantity`}),`, these arrays may not accompany a return, and serial or asset numbers already in use are rejected.`]}),`\n`,_jsxs(_components.li,{children:[`Vendor invoice metadata (`,_jsx(_components.code,{children:`invoiceNumber`}),`, `,_jsx(_components.code,{children:`invoiceCurrency`}),`, `,_jsx(_components.code,{children:`invoiceTotal`}),`, `,_jsx(_components.code,{children:`exchangeRate`}),`, `,_jsx(_components.code,{children:`invoiceTotalPostExchange`}),`) can be captured on the receipt.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Read a receipt back with `,_jsx(_components.code,{children:`GET /v1/partners/inventory/purchase_order_receipts/{id}`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`idempotency-and-error-handling`,children:`Idempotency and error handling`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Creates are not idempotent: retrying a timed-out PO create can duplicate the order. Use the list endpoint with a filter (for example on your `,_jsx(_components.code,{children:`receiptNumber`}),`-style external references) to check before retrying.`]}),`\n`,_jsxs(_components.li,{children:[`Permission problems surface as `,_jsx(_components.code,{children:`400`}),` (with the standard error envelope). Silently-skipped ids on the bulk and associate endpoints mean a “successful” call may have done less than you asked. Always reconcile the response payload against your request.`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.a,{href:`/partners-api/catalog-and-stock`,children:`catalog endpoints`}),` supply the `,_jsx(_components.code,{children:`partId`}),`, `,_jsx(_components.code,{children:`equipmentTypeId`}),`, `,_jsx(_components.code,{children:`partEquipmentVendorId`}),`, and `,_jsx(_components.code,{children:`stockLocationId`}),` values this flow needs.`]}),`\n`,_jsx(_components.li,{children:`Every purchase order, line item, and receipt change made through these endpoints is recorded on the purchase order’s audit trail in OpenWrench, attributed to the contact behind your API key.`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"The purchasing flow: requests to orders to receipts","sidebarTitle":"Purchasing flow","description":"Walk the Internal Teams API purchasing lifecycle end to end: read approved purchase requests, cut purchase orders, associate line items, and record receipts.","href":"/partners-api/purchasing-flow"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Status vocabulary","slug":"status-vocabulary","depth":2,"children":[]},{"title":"1. Read approved purchase requests","slug":"1-read-approved-purchase-requests","depth":2,"children":[]},{"title":"2. Create the purchase order","slug":"2-create-the-purchase-order","depth":2,"children":[{"title":"Associate PR line items","slug":"associate-pr-line-items","depth":3,"children":[]},{"title":"Revise line items","slug":"revise-line-items","depth":3,"children":[]}]},{"title":"3. Mark the order placed","slug":"3-mark-the-order-placed","depth":2,"children":[]},{"title":"4. Record receipts as goods arrive","slug":"4-record-receipts-as-goods-arrive","depth":2,"children":[]},{"title":"Idempotency and error handling","slug":"idempotency-and-error-handling","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"openwrench","siteName":"OpenWrench Docs","title":"The purchasing flow: requests to orders to receipts - OpenWrench Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/partners-api/purchasing-flow","matchLevel":0},"es":{"href":"/es/partners-api/purchasing-flow","matchLevel":1},"fr-CA":{"href":"/fr-CA/partners-api/purchasing-flow","matchLevel":1},"sv":{"href":"/sv/partners-api/purchasing-flow","matchLevel":1}}},"lastModified":"2026-10-01T03:53:55.320Z","originalFileLocation":"partners-api/purchasing-flow.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Walk the Internal Teams API purchasing lifecycle end to end: read approved purchase requests, cut purchase orders, associate line items, and record receipts.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OpenWrench Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"The purchasing flow: requests to orders to receipts - OpenWrench Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Walk the Internal Teams API purchasing lifecycle end to end: read approved purchase requests, cut purchase orders, associate line items, and record receipts.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OpenWrench Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://openwrench.mintlify.site/_mintlify/api/og/v2?division=Internal+Teams+API\u0026amp;title=The+purchasing+flow%3A+requests+to+orders+to+receipts\u0026amp;description=Walk+the+Internal+Teams+API+purchasing+lifecycle+end+to+end%3A+read+approved+purchase+requests%2C+cut+purchase+orders%2C+associate+line+items%2C+and+record+receipts.\u0026amp;theme=8eaa85c789c5eedd571f3d45\u0026amp;signature=664269ab19df0aa86d54bf22478edb2245417373861eb289e811b2caed27553c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"The purchasing flow: requests to orders to receipts - OpenWrench Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Walk the Internal Teams API purchasing lifecycle end to end: read approved purchase requests, cut purchase orders, associate line items, and record receipts.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://openwrench.mintlify.site/_mintlify/api/og/v2?division=Internal+Teams+API\u0026amp;title=The+purchasing+flow%3A+requests+to+orders+to+receipts\u0026amp;description=Walk+the+Internal+Teams+API+purchasing+lifecycle+end+to+end%3A+read+approved+purchase+requests%2C+cut+purchase+orders%2C+associate+line+items%2C+and+record+receipts.\u0026amp;theme=8eaa85c789c5eedd571f3d45\u0026amp;signature=664269ab19df0aa86d54bf22478edb2245417373861eb289e811b2caed27553c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/openwrench/XAALPMBrZvYVDdsH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OpenWrench Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6D28D9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/partners-api/purchasing-flow.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://api-docs.useopenwrench.com/es/partners-api/purchasing-flow\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr-CA\" href=\"https://api-docs.useopenwrench.com/fr-CA/partners-api/purchasing-flow\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"sv\" href=\"https://api-docs.useopenwrench.com/sv/partners-api/purchasing-flow\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://api-docs.useopenwrench.com/#organization\",\"name\":\"OpenWrench Docs\",\"url\":\"https://api-docs.useopenwrench.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/openwrench/MpgUm2Im5ZrD9tFw/logo/light.svg?fit=max\u0026auto=format\u0026n=MpgUm2Im5ZrD9tFw\u0026q=85\u0026s=763bb056b0ddeaaeae3d8bee85dc3e06\"}},{\"@type\":\"WebSite\",\"@id\":\"https://api-docs.useopenwrench.com#website\",\"name\":\"OpenWrench Docs\",\"url\":\"https://api-docs.useopenwrench.com\",\"publisher\":{\"@id\":\"https://api-docs.useopenwrench.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow#webpage\",\"url\":\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow\",\"name\":\"The purchasing flow: requests to orders to receipts\",\"description\":\"Walk the Internal Teams API purchasing lifecycle end to end: read approved purchase requests, cut purchase orders, associate line items, and record receipts.\",\"dateModified\":\"2026-10-01T03:53:55.320Z\",\"isPartOf\":{\"@id\":\"https://api-docs.useopenwrench.com#website\"},\"breadcrumb\":{\"@id\":\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Internal Teams API\",\"item\":\"https://api-docs.useopenwrench.com/partners-api/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The purchasing flow: requests to orders to receipts\",\"item\":\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow#article\",\"headline\":\"The purchasing flow: requests to orders to receipts\",\"name\":\"The purchasing flow: requests to orders to receipts\",\"description\":\"Walk the Internal Teams API purchasing lifecycle end to end: read approved purchase requests, cut purchase orders, associate line items, and record receipts.\",\"url\":\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow\",\"mainEntityOfPage\":{\"@id\":\"https://api-docs.useopenwrench.com/partners-api/purchasing-flow#webpage\"},\"dateModified\":\"2026-10-01T03:53:55.320Z\",\"publisher\":{\"@id\":\"https://api-docs.useopenwrench.com/#organization\"},\"isPartOf\":{\"@id\":\"https://api-docs.useopenwrench.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OpenWrench Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OpenWrench Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/partners-api/purchasing-flow.md","siteName":"OpenWrench Docs","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Buyer API","groups":[{"group":"Getting Started","pages":[{"title":"Buyer API authentication, rate limits, and pagination","sidebarTitle":"Introduction","icon":"building","href":"/buyer-api/introduction"}]},{"group":"Guides","pages":[{"title":"Work orders in the Buyer API","sidebarTitle":"Work orders","href":"/buyer-api/work-orders"},{"title":"Webhooks in the Buyer API","sidebarTitle":"Webhooks","href":"/buyer-api/webhooks"},{"title":"Service calls and visit evidence in the Buyer API","sidebarTitle":"Service calls","href":"/buyer-api/service-calls"},{"title":"Assets, asset types, models, meters, and locations","sidebarTitle":"Assets \u0026 locations","href":"/buyer-api/assets-and-locations"},{"title":"Invoice lifecycle and payment workflows in the Buyer API","sidebarTitle":"Invoices","href":"/buyer-api/invoices"},{"title":"Quotes and proposals in the Buyer API","sidebarTitle":"Quotes \u0026 proposals","href":"/buyer-api/quotes-and-proposals"},{"title":"Planned maintenance schedules in the Buyer API","sidebarTitle":"Planned maintenance","href":"/buyer-api/planned-maintenance"},{"title":"Supplier network and ranked dispatch in the Buyer API","sidebarTitle":"Supplier network","href":"/buyer-api/supplier-network"},{"title":"Site survey walkthroughs in the Buyer API","sidebarTitle":"Site surveys","href":"/buyer-api/site-survey-walkthroughs"},{"title":"Files and attachments in the Buyer API","sidebarTitle":"Files \u0026 attachments","href":"/buyer-api/files-and-attachments"},{"title":"Identity, user provisioning, and utilities in the Buyer API","sidebarTitle":"Account \u0026 utilities","href":"/buyer-api/account-and-utilities"}]},{"group":"API Reference","pages":[{"group":"Ping","pages":[{"title":"Ping (auth check)","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/ping","href":"/buyer-reference/ping/ping-auth-check"}]},{"group":"Me","pages":[{"title":"Identity of the calling API key","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/me","href":"/buyer-reference/me/identity-of-the-calling-api-key"}]},{"group":"Locations","pages":[{"title":"List locations","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/location/locations","href":"/buyer-reference/locations/list-locations"},{"title":"Count locations","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/location/locations/count_by","href":"/buyer-reference/locations/count-locations"},{"title":"Get a location","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/location/locations/{id}","href":"/buyer-reference/locations/get-a-location"},{"title":"Patch a location (locationTypeDetails only)","deprecated":null,"version":null,"openapi":"/openapi/buyer.json patch /v1/buyer/location/locations/{id}","href":"/buyer-reference/locations/patch-a-location-locationtypedetails-only"},{"title":"Get multiple locations by ids","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/location/locations/multiple/{ids}","href":"/buyer-reference/locations/get-multiple-locations-by-ids"}]},{"group":"Regions","pages":[{"title":"List regions","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/location/regions","href":"/buyer-reference/regions/list-regions"},{"title":"Get a region","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/location/regions/{id}","href":"/buyer-reference/regions/get-a-region"}]},{"group":"Asset Types","pages":[{"title":"List asset types","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/asset_types","href":"/buyer-reference/asset-types/list-asset-types"},{"title":"Create an asset type","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/asset/asset_types","href":"/buyer-reference/asset-types/create-an-asset-type"},{"title":"Get an asset type","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/asset_types/{id}","href":"/buyer-reference/asset-types/get-an-asset-type"}]},{"group":"Asset Meters","pages":[{"title":"List asset meters","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/meters","href":"/buyer-reference/asset-meters/list-asset-meters"},{"title":"Create an asset meter","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/asset/meters","href":"/buyer-reference/asset-meters/create-an-asset-meter"},{"title":"List asset meter readings","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/meter_readings","href":"/buyer-reference/asset-meters/list-asset-meter-readings"},{"title":"Record an asset meter reading","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/asset/meter_readings","href":"/buyer-reference/asset-meters/record-an-asset-meter-reading"},{"title":"Count asset meters","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/meters/count_by","href":"/buyer-reference/asset-meters/count-asset-meters"},{"title":"Get an asset meter","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/meters/{id}","href":"/buyer-reference/asset-meters/get-an-asset-meter"},{"title":"Count asset meter readings","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/meter_readings/count_by","href":"/buyer-reference/asset-meters/count-asset-meter-readings"},{"title":"Get an asset meter reading","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/meter_readings/{id}","href":"/buyer-reference/asset-meters/get-an-asset-meter-reading"}]},{"group":"Assets","pages":[{"title":"List assets","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/assets","href":"/buyer-reference/assets/list-assets"},{"title":"Create an asset","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/asset/assets","href":"/buyer-reference/assets/create-an-asset"},{"title":"List assets (lite projection)","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/assets/asset_lite","href":"/buyer-reference/assets/list-assets-lite-projection"},{"title":"Get an asset","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/assets/{id}","href":"/buyer-reference/assets/get-an-asset"}]},{"group":"Asset Labels","pages":[{"title":"List asset labels","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/asset_labels","href":"/buyer-reference/asset-labels/list-asset-labels"},{"title":"Get an asset label","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/asset_labels/{id}","href":"/buyer-reference/asset-labels/get-an-asset-label"},{"title":"Replace an asset's labels","deprecated":null,"version":null,"openapi":"/openapi/buyer.json put /v1/buyer/asset/assets/{assetId}/labels","href":"/buyer-reference/asset-labels/replace-an-assets-labels"}]},{"group":"Asset Models","pages":[{"title":"List asset models","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/asset_models","href":"/buyer-reference/asset-models/list-asset-models"},{"title":"Create an asset model","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/asset/asset_models","href":"/buyer-reference/asset-models/create-an-asset-model"},{"title":"Fuzzy-match an asset model by name","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/asset_models/fuzzy/{name}/{assetTypeId}","href":"/buyer-reference/asset-models/fuzzy-match-an-asset-model-by-name"},{"title":"Get an asset model","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/asset/asset_models/{id}","href":"/buyer-reference/asset-models/get-an-asset-model"}]},{"group":"Work Orders","pages":[{"title":"List work orders","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/work_orders","href":"/buyer-reference/work-orders/list-work-orders"},{"title":"Create a work order","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/work_order/work_orders","href":"/buyer-reference/work-orders/create-a-work-order"},{"title":"Count work orders","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/work_orders/count_by","href":"/buyer-reference/work-orders/count-work-orders"},{"title":"Get a work order","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/work_orders/{id}","href":"/buyer-reference/work-orders/get-a-work-order"},{"title":"Patch a work order (supplier reassignment only)","deprecated":null,"version":null,"openapi":"/openapi/buyer.json patch /v1/buyer/work_order/work_orders/{id}","href":"/buyer-reference/work-orders/patch-a-work-order-supplier-reassignment-only"},{"title":"Mark work reviewed and completed","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/work_order/work_orders/status_update/work_reviewed_and_completed","href":"/buyer-reference/work-orders/mark-work-reviewed-and-completed"},{"title":"Cancel a work order","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/work_order/work_orders/status_update/cancelled","href":"/buyer-reference/work-orders/cancel-a-work-order"},{"title":"Mark work unsatisfactory","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/work_order/work_orders/status_update/work_unsatisfactory","href":"/buyer-reference/work-orders/mark-work-unsatisfactory"},{"title":"Reopen a work order","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/work_order/work_orders/status_update/reopen","href":"/buyer-reference/work-orders/reopen-a-work-order"},{"title":"List work order problem types","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/problem_types","href":"/buyer-reference/work-orders/list-work-order-problem-types"}]},{"group":"Work Order Notes","pages":[{"title":"Append a note to a work order","deprecated":null,"version":null,"openapi":"/openapi/buyer.json patch /v1/buyer/work_order/work_orders/append_notes","href":"/buyer-reference/work-order-notes/append-a-note-to-a-work-order"},{"title":"Append photo notes to a work order in bulk","deprecated":null,"version":null,"openapi":"/openapi/buyer.json patch /v1/buyer/work_order/work_orders/append_notes/bulk","href":"/buyer-reference/work-order-notes/append-photo-notes-to-a-work-order-in-bulk"},{"title":"Get a work order's notes","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/work_order_notes/{woId}","href":"/buyer-reference/work-order-notes/get-a-work-orders-notes"}]},{"group":"Work Order Labels","pages":[{"title":"List work order labels","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/work_order_labels","href":"/buyer-reference/work-order-labels/list-work-order-labels"},{"title":"Get a work order label","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/work_order_labels/{id}","href":"/buyer-reference/work-order-labels/get-a-work-order-label"},{"title":"Replace a work order's labels","deprecated":null,"version":null,"openapi":"/openapi/buyer.json put /v1/buyer/work_order/work_orders/{woId}/labels","href":"/buyer-reference/work-order-labels/replace-a-work-orders-labels"}]},{"group":"Service Calls","pages":[{"title":"Get a service call with work logs","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/service_calls/{id}/with_work_logs","href":"/buyer-reference/service-calls/get-a-service-call-with-work-logs"},{"title":"Get a service call with technician details","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/service_calls/{id}/with_tech_details","href":"/buyer-reference/service-calls/get-a-service-call-with-technician-details"},{"title":"Get a service call with work logs and technician details","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/work_order/service_calls/{id}/with_work_logs/with_tech_details","href":"/buyer-reference/service-calls/get-a-service-call-with-work-logs-and-technician-details"}]},{"group":"Site Survey Walkthroughs","pages":[{"title":"List walkthroughs","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/site_survey/walkthroughs","href":"/buyer-reference/site-survey-walkthroughs/list-walkthroughs"},{"title":"Count walkthroughs","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/site_survey/walkthroughs/count_by","href":"/buyer-reference/site-survey-walkthroughs/count-walkthroughs"},{"title":"Get a walkthrough","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/site_survey/walkthroughs/{id}","href":"/buyer-reference/site-survey-walkthroughs/get-a-walkthrough"}]},{"group":"Invoices","pages":[{"title":"List invoices","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/invoice/invoices","href":"/buyer-reference/invoices/list-invoices"},{"title":"Count invoices","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/invoice/invoices/count_by","href":"/buyer-reference/invoices/count-invoices"},{"title":"List invoices in download (flattened) form","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/invoice/invoices/download","href":"/buyer-reference/invoices/list-invoices-in-download-flattened-form"},{"title":"Get an invoice","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/invoice/invoices/{id}","href":"/buyer-reference/invoices/get-an-invoice"},{"title":"Set invoice status to pending","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/invoice/status/pending","href":"/buyer-reference/invoices/set-invoice-status-to-pending"},{"title":"Set invoice status to approved","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/invoice/status/approved","href":"/buyer-reference/invoices/set-invoice-status-to-approved"},{"title":"Set invoice status to processing","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/invoice/status/processing","href":"/buyer-reference/invoices/set-invoice-status-to-processing"},{"title":"Set invoice status to paid","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/invoice/status/paid","href":"/buyer-reference/invoices/set-invoice-status-to-paid"},{"title":"Mark the invoice for a work order as paid","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/invoice/status/paid/by_work_order_id","href":"/buyer-reference/invoices/mark-the-invoice-for-a-work-order-as-paid"},{"title":"Append the work order detail page to an invoice PDF","deprecated":null,"version":null,"openapi":"/openapi/buyer.json patch /v1/buyer/invoice/file/invoice_pdf/add_work_order_detail_page/{invoiceId}","href":"/buyer-reference/invoices/append-the-work-order-detail-page-to-an-invoice-pdf"},{"title":"Bulk-update invoices with dynamic filters","deprecated":null,"version":null,"openapi":"/openapi/buyer.json patch /v1/buyer/invoice/bulk_update_with_filters","href":"/buyer-reference/invoices/bulk-update-invoices-with-dynamic-filters"},{"title":"Publish draft invoices for completed work orders","deprecated":null,"version":null,"openapi":"/openapi/buyer.json patch /v1/buyer/invoice/publish_draft_invoices_if_wo_complete_and_auto_publish_enabled","href":"/buyer-reference/invoices/publish-draft-invoices-for-completed-work-orders"}]},{"group":"Proposals","pages":[{"title":"List proposals","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/quote/proposals","href":"/buyer-reference/proposals/list-proposals"},{"title":"Get a proposal","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/quote/proposals/{id}","href":"/buyer-reference/proposals/get-a-proposal"}]},{"group":"Files","pages":[{"title":"Upload a file","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/file/upload","href":"/buyer-reference/files/upload-a-file"},{"title":"Download a file","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/file/download/{id}/{name}","href":"/buyer-reference/files/download-a-file"}]},{"group":"Planned Maintenance","pages":[{"title":"List planned maintenance schedules","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/pm/planned_maintenance_schedules","href":"/buyer-reference/planned-maintenance/list-planned-maintenance-schedules"},{"title":"Count planned maintenance schedules","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/pm/planned_maintenance_schedules/count_by","href":"/buyer-reference/planned-maintenance/count-planned-maintenance-schedules"},{"title":"Get a planned maintenance schedule","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/pm/planned_maintenance_schedules/{id}","href":"/buyer-reference/planned-maintenance/get-a-planned-maintenance-schedule"},{"title":"Skip the next scheduled run","deprecated":null,"version":null,"openapi":"/openapi/buyer.json patch /v1/buyer/pm/planned_maintenance_schedules/skip_schedule","href":"/buyer-reference/planned-maintenance/skip-the-next-scheduled-run"},{"title":"Record a PM scheduler run log","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/pm/scheduler_run_logs","href":"/buyer-reference/planned-maintenance/record-a-pm-scheduler-run-log"}]},{"group":"Currency Exchange","pages":[{"title":"Get the latest exchange rate","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/currency_exchange/latest/{targetCurrencyId}/{baseCurrencyId}","href":"/buyer-reference/currency-exchange/get-the-latest-exchange-rate"}]},{"group":"Supplier Network","pages":[{"title":"List supplier facilities in the buyer's network","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/supplier_facilities","href":"/buyer-reference/supplier-network/list-supplier-facilities-in-the-buyers-network"},{"title":"Get a supplier facility","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/supplier_facilities/{id}","href":"/buyer-reference/supplier-network/get-a-supplier-facility"},{"title":"Ranked private-network suppliers for a location and problem type","deprecated":null,"version":null,"openapi":"/openapi/buyer.json get /v1/buyer/private_network/buyer_supplier_relationships/ranked/{locationId}/{problemTypeId}","href":"/buyer-reference/supplier-network/ranked-private-network-suppliers-for-a-location-and-problem-type"}]},{"group":"User Provisioning","pages":[{"title":"Provision a buyer user","deprecated":null,"version":null,"openapi":"/openapi/buyer.json post /v1/buyer/user/provision","href":"/buyer-reference/user-provisioning/provision-a-buyer-user"}]}]},{"group":"Internal Teams API","pages":[{"title":"Purchasing and inventory with the Internal Teams API","sidebarTitle":"Introduction","description":"Purchasing and inventory access for your internal service teams: purchase requests, purchase orders, receipts, parts and equipment catalogs, and stock levels.","icon":"boxes-stacked","href":"/partners-api/introduction"},{"title":"The purchasing flow: requests to orders to receipts","sidebarTitle":"Purchasing flow","href":"/partners-api/purchasing-flow"},{"title":"Catalog, stock levels, and work order consumption","sidebarTitle":"Catalog \u0026 stock","description":"Read parts, equipment types, vendors, stock locations, per-location inventory, and the parts consumed on work orders with the Internal Teams API.","href":"/partners-api/catalog-and-stock"},{"group":"Endpoints","pages":[{"group":"Ping","pages":[{"title":"Ping","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/ping","href":"/internal-teams-reference/ping/ping"}]},{"group":"Purchase Requests","pages":[{"title":"Retrieve a purchase request by id","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/purchase_requests/{id}","href":"/internal-teams-reference/purchase-requests/retrieve-a-purchase-request-by-id"},{"title":"List purchase requests","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/purchase_requests","href":"/internal-teams-reference/purchase-requests/list-purchase-requests"},{"title":"Cancel a purchase request","deprecated":null,"version":null,"openapi":"/openapi/partners.json patch /v1/partners/inventory/purchase_requests/{id}/cancelled","href":"/internal-teams-reference/purchase-requests/cancel-a-purchase-request"},{"title":"Update purchase request status","deprecated":null,"version":null,"openapi":"/openapi/partners.json patch /v1/partners/inventory/purchase_requests/{id}/{status}","href":"/internal-teams-reference/purchase-requests/update-purchase-request-status"}]},{"group":"Purchase Request Line Items","pages":[{"title":"Count purchase request line items","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/purchase_request_line_items/count_by","href":"/internal-teams-reference/purchase-request-line-items/count-purchase-request-line-items"},{"title":"List purchase request line items","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/purchase_request_line_items","href":"/internal-teams-reference/purchase-request-line-items/list-purchase-request-line-items"},{"title":"Associate PR line items with a PO line item","deprecated":null,"version":null,"openapi":"/openapi/partners.json patch /v1/partners/inventory/purchase_request_line_items/associate_po_line_item/{ids}/{poLineItem}","href":"/internal-teams-reference/purchase-request-line-items/associate-pr-line-items-with-a-po-line-item"}]},{"group":"Purchase Orders","pages":[{"title":"List purchase orders","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/purchase_orders","href":"/internal-teams-reference/purchase-orders/list-purchase-orders"},{"title":"Create a purchase order","deprecated":null,"version":null,"openapi":"/openapi/partners.json post /v1/partners/inventory/purchase_orders","href":"/internal-teams-reference/purchase-orders/create-a-purchase-order"},{"title":"Retrieve a purchase order by id","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/purchase_orders/{id}","href":"/internal-teams-reference/purchase-orders/retrieve-a-purchase-order-by-id"},{"title":"Cancel a purchase order","deprecated":null,"version":null,"openapi":"/openapi/partners.json patch /v1/partners/inventory/purchase_orders/{id}/cancel","href":"/internal-teams-reference/purchase-orders/cancel-a-purchase-order"},{"title":"Mark a purchase order as ordered","deprecated":null,"version":null,"openapi":"/openapi/partners.json patch /v1/partners/inventory/purchase_orders/{id}/ordered","href":"/internal-teams-reference/purchase-orders/mark-a-purchase-order-as-ordered"}]},{"group":"Purchase Order Line Items","pages":[{"title":"Bulk (re)create purchase order line items","deprecated":null,"version":null,"openapi":"/openapi/partners.json post /v1/partners/inventory/purchase_order_line_items/bulk","href":"/internal-teams-reference/purchase-order-line-items/bulk-recreate-purchase-order-line-items"}]},{"group":"Purchase Order Receipts","pages":[{"title":"Retrieve a purchase order receipt by id","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/purchase_order_receipts/{id}","href":"/internal-teams-reference/purchase-order-receipts/retrieve-a-purchase-order-receipt-by-id"},{"title":"Update a purchase order receipt","deprecated":null,"version":null,"openapi":"/openapi/partners.json put /v1/partners/inventory/purchase_order_receipts","href":"/internal-teams-reference/purchase-order-receipts/update-a-purchase-order-receipt"}]},{"group":"Parts","pages":[{"title":"Retrieve a part by id","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/parts/{id}","href":"/internal-teams-reference/parts/retrieve-a-part-by-id"},{"title":"List parts","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/parts","href":"/internal-teams-reference/parts/list-parts"}]},{"group":"Equipment Types","pages":[{"title":"Retrieve a equipment type by id","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/equipment_types/{id}","href":"/internal-teams-reference/equipment-types/retrieve-a-equipment-type-by-id"},{"title":"List equipment types","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/equipment_types","href":"/internal-teams-reference/equipment-types/list-equipment-types"}]},{"group":"Vendors","pages":[{"title":"Retrieve a vendor by id","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/part_equipment_vendors/{id}","href":"/internal-teams-reference/vendors/retrieve-a-vendor-by-id"},{"title":"List vendors","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/part_equipment_vendors","href":"/internal-teams-reference/vendors/list-vendors"}]},{"group":"Stock Locations","pages":[{"title":"Retrieve a stock location by id","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/stock_locations/{id}","href":"/internal-teams-reference/stock-locations/retrieve-a-stock-location-by-id"},{"title":"List stock locations","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/stock_locations","href":"/internal-teams-reference/stock-locations/list-stock-locations"}]},{"group":"Parts Per Stock Location","pages":[{"title":"Retrieve a parts per stock location by id","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/parts_per_stock_locations/{id}","href":"/internal-teams-reference/parts-per-stock-location/retrieve-a-parts-per-stock-location-by-id"},{"title":"List parts per stock location","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/parts_per_stock_locations","href":"/internal-teams-reference/parts-per-stock-location/list-parts-per-stock-location"}]},{"group":"Equipment Per Stock Location","pages":[{"title":"Retrieve a equipment per stock location by id","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/equipment_per_stock_locations/{id}","href":"/internal-teams-reference/equipment-per-stock-location/retrieve-a-equipment-per-stock-location-by-id"},{"title":"List equipment per stock location","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/inventory/equipment_per_stock_locations","href":"/internal-teams-reference/equipment-per-stock-location/list-equipment-per-stock-location"}]},{"group":"Work Order Parts and Equipment","pages":[{"title":"List parts and equipment used on a work order","deprecated":null,"version":null,"openapi":"/openapi/partners.json get /v1/partners/work_order/work_order_parts_equipments/{workOrderId}","href":"/internal-teams-reference/work-order-parts-and-equipment/list-parts-and-equipment-used-on-a-work-order"}]}]}]}]},{"tab":"Supplier API","pages":[{"title":"Supplier API","href":"/supplier-api/introduction"}]}]},{"language":"es","pages":[{"title":"es","href":"/es/partners-api/purchasing-flow"}]},{"language":"fr-CA","pages":[{"title":"fr-CA","href":"/fr-CA/partners-api/purchasing-flow"}]},{"language":"sv","pages":[{"title":"sv","href":"/sv/partners-api/purchasing-flow"}]}]},"basePath":"","title":"The purchasing flow: requests to orders to receipts - OpenWrench Docs","buildId":"dpl_GRSyrvXT6FFTpZZTGz5iZPp3D2zE","deploymentId":"dpl_GRSyrvXT6FFTpZZTGz5iZPp3D2zE","dynamics":[],"chunks":[]}