> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Procurement

> Suppliers, purchase orders, and inbound shipments.

## Queries

* [`inboundShipment`](/docs/api-reference/v3/reference/procurement/queries/inbound-shipment) — Fetch a single inbound shipment by its id.
* [`inboundShipments`](/docs/api-reference/v3/reference/procurement/queries/inbound-shipments) — List inbound shipments, optionally filtered by status.
* [`purchaseOrder`](/docs/api-reference/v3/reference/procurement/queries/purchase-order) — Fetch a single purchase order by its id, or by its purchase order number. Provide exactly one.
* [`purchaseOrders`](/docs/api-reference/v3/reference/procurement/queries/purchase-orders) — List purchase orders, optionally filtered by supplier or status.
* [`supplier`](/docs/api-reference/v3/reference/procurement/queries/supplier) — Fetch a single supplier by its id.
* [`suppliers`](/docs/api-reference/v3/reference/procurement/queries/suppliers) — List suppliers.

## Mutations

* [`cancelPurchaseOrder`](/docs/api-reference/v3/reference/procurement/mutations/cancel-purchase-order) — Cancel a purchase order, releasing it from incoming stock. Returns null if no purchase order with that id is owned by the caller. Cancelling an already-cancelled order is a no-op. Throws a 409 CONFLICT error (with an extension code of PURCHASE\_ORDER\_CLOSED or PURCHASE\_ORDER\_HAS\_RECEIVED\_ITEMS) if the order can no longer be cancelled.
* [`createInboundShipment`](/docs/api-reference/v3/reference/procurement/mutations/create-inbound-shipment) — Create an inbound shipment fulfilling a purchase order. Its line items are derived from that order, not supplied: when this is the order's only shipment they mirror the order exactly, but once an order has several shipments new order lines are left unassigned and quantity changes stop propagating. Throws a 409 CONFLICT error (with an extension code of PURCHASE\_ORDER\_NOT\_EDITABLE) if the order is closed or cancelled.
* [`createPurchaseOrder`](/docs/api-reference/v3/reference/procurement/mutations/create-purchase-order) — Create a purchase order. Throws a 409 CONFLICT error (with an extension code of PURCHASE\_ORDER\_NUMBER\_TAKEN) if `poNumber` is already used by another order.
* [`updateInboundShipment`](/docs/api-reference/v3/reference/procurement/mutations/update-inbound-shipment) — Update an inbound shipment's own details. Returns null if no inbound shipment with that id is owned by the caller. Its line items are set separately with `updateInboundShipmentItems`, and its status is derived from receiving. Throws a 409 CONFLICT error (with an extension code of SHIPMENT\_ALREADY\_RECEIVED) when changing the location of a shipment that has already received stock.
* [`updateInboundShipmentItems`](/docs/api-reference/v3/reference/procurement/mutations/update-inbound-shipment-items) — Set which units of a purchase order an inbound shipment carries, taking unallocated units from the order and returning ones no longer wanted. Returns null if the caller owns no such shipment and order. A partial allocation persists only while the order has more than one shipment; on an order with a single shipment the next order update restores the full quantity. Throws a 409 CONFLICT error (with an extension code of SHIPMENT\_NOT\_LINKED\_TO\_PURCHASE\_ORDER, PRODUCT\_NOT\_ON\_PURCHASE\_ORDER, PURCHASE\_ORDER\_QUANTITY\_EXCEEDED, or PURCHASE\_ORDER\_ITEM\_HAS\_RECEIPTS).
* [`updatePurchaseOrder`](/docs/api-reference/v3/reference/procurement/mutations/update-purchase-order) — Update a purchase order. Returns null if no purchase order with that id is owned by the caller. Changing `items` re-syncs the order's inbound shipments: on an order with exactly one shipment the lines mirror through, and on one with several new lines are left unassigned. Throws a 409 CONFLICT error (with an extension code of PURCHASE\_ORDER\_NOT\_EDITABLE, PURCHASE\_ORDER\_ITEM\_HAS\_RECEIPTS, or PURCHASE\_ORDER\_NUMBER\_TAKEN) if the change conflicts with the order's current state.

## Objects

* [`InboundShipment`](/docs/api-reference/v3/reference/procurement/inbound-shipment) — A shipment of inventory arriving at a location, fulfilling one or more purchase orders.
* [`InboundShipmentItem`](/docs/api-reference/v3/reference/procurement/inbound-shipment-item) — A line item received (or expected) on an inbound shipment.
* [`PurchaseOrder`](/docs/api-reference/v3/reference/procurement/purchase-order) — An order placed with a supplier to restock inventory.
* [`PurchaseOrderItem`](/docs/api-reference/v3/reference/procurement/purchase-order-item) — A line item ordered on a purchase order.
* [`Supplier`](/docs/api-reference/v3/reference/procurement/supplier) — A vendor a merchant buys inventory from, with contacts and purchase orders.
* [`SupplierContact`](/docs/api-reference/v3/reference/procurement/supplier-contact) — A contact person at a supplier.

## Input objects

* [`CreateInboundShipmentInput`](/docs/api-reference/v3/reference/procurement/create-inbound-shipment-input) — The input for creating a new inbound shipment.
* [`CreatePurchaseOrderInput`](/docs/api-reference/v3/reference/procurement/create-purchase-order-input) — The input for creating a new purchase order.
* [`CreatePurchaseOrderItemInput`](/docs/api-reference/v3/reference/procurement/create-purchase-order-item-input) — A line item to order on a new purchase order.
* [`InboundShipmentItemInput`](/docs/api-reference/v3/reference/procurement/inbound-shipment-item-input) — Units of one product that an inbound shipment carries.
* [`UpdateInboundShipmentInput`](/docs/api-reference/v3/reference/procurement/update-inbound-shipment-input) — The fields to change on an inbound shipment. Omit a field to leave it unchanged.
* [`UpdateInboundShipmentItemsInput`](/docs/api-reference/v3/reference/procurement/update-inbound-shipment-items-input) — The units of a purchase order that an inbound shipment should carry.
* [`UpdatePurchaseOrderInput`](/docs/api-reference/v3/reference/procurement/update-purchase-order-input) — The fields to change on a purchase order. Omit a field to leave it unchanged.
* [`UpdatePurchaseOrderItemInput`](/docs/api-reference/v3/reference/procurement/update-purchase-order-item-input) — A line item on an updated purchase order.

## Enums

* [`InboundShipmentSortKey`](/docs/api-reference/v3/reference/procurement/inbound-shipment-sort-key) — A field this list can be ordered by; pass to the list's `orderBy` argument and pair with `reverse` to flip direction.
* [`InboundShipmentStatus`](/docs/api-reference/v3/reference/procurement/inbound-shipment-status) — The lifecycle status of an inbound shipment.
* [`PackingMode`](/docs/api-reference/v3/reference/procurement/packing-mode) — How a shipment line item is packed.
* [`PurchaseOrderCreateStatus`](/docs/api-reference/v3/reference/procurement/purchase-order-create-status) — The statuses a purchase order may be created in. The receiving statuses are derived from received quantities, and cancellation has its own mutation.
* [`PurchaseOrderSortKey`](/docs/api-reference/v3/reference/procurement/purchase-order-sort-key) — A field this list can be ordered by; pass to the list's `orderBy` argument and pair with `reverse` to flip direction.
* [`PurchaseOrderStatus`](/docs/api-reference/v3/reference/procurement/purchase-order-status) — The lifecycle status of a purchase order.
* [`SupplierSortKey`](/docs/api-reference/v3/reference/procurement/supplier-sort-key) — A field this list can be ordered by; pass to the list's `orderBy` argument and pair with `reverse` to flip direction.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.