> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/internal-purchase-order/update-an-internal-purchase-order.md).

# Update an internal purchase order

Update an internal purchase order

Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"InternalPurchaseOrderResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderResponseSchema"}}}}},"schemas":{"InternalPurchaseOrderResponseSchema":{"title":"InternalPurchaseOrderResponseSchema","type":"object","description":"- sendingStoreUid: The store that creates/sends the internal purchase order. \n- receivingStoreUid: The store that receives the internal purchase order\n- creatingStoreUid: The store that creates the internal purchase order. May be different than sendingStoreUid","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","shippedAt","shippedBy","receivedAt","receivedBy","sendingStoreUid","receivingStoreUid","note","status","trackingNumber","items","internalPurchaseOrderUid","allowedStatuses","internalPurchaseOrderNumber","creatingStoreUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"shippedAt":{"type":"string","format":"date-time","nullable":true},"shippedBy":{"type":"string","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"receivedBy":{"type":"string","nullable":true},"sendingStoreUid":{"$ref":"#/components/schemas/UID"},"receivingStoreUid":{"$ref":"#/components/schemas/UID"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"},"trackingNumber":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}},"internalPurchaseOrderUid":{"$ref":"#/components/schemas/UID"},"allowedStatuses":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"}},"internalPurchaseOrderNumber":{"type":"string"},"creatingStoreUid":{"$ref":"#/components/schemas/UID"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"InternalPurchaseOrderStatusENUM":{"title":"InternalPurchaseOrderStatusENUM","type":"string","description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Draft/work in progress|\n| READY_FOR_CONFIRMATION | The order is ready for confirmation by receiving store|\n| PREPARING_FOR_SHIPMENT | Internal purchase order is ready to be shipped from the sending store|\n| IN_TRANSIT | All quantity sent is registered and products are sent from sending store (and removed from warehouse)|\n| ARRIVED | Purchase order has arrived to requesting store and is ready for registering and controlling quantity|\n| COMPLETE | Purchase order is complete (and stock is added to the receiving stores warehouse)|\n| CANCELLED | Purchase order is cancelled.|\n","enum":["NEW","READY_FOR_CONFIRMATION","PREPARING_FOR_SHIPMENT","IN_TRANSIT","ARRIVED","COMPLETE","CANCELLED"]},"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/OptionalUID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"InternalPurchaseOrderUpdateSchema":{"title":"InternalPurchaseOrderUpdateSchema","type":"object","properties":{"note":{"type":"string"},"status":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"},"trackingNumber":{"type":"string"}}}},"requestBodies":{"InternalPurchaseOrderUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderUpdateSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}":{"put":{"tags":["InternalPurchaseOrder"],"summary":"Update an internal purchase order","operationId":"put-internal-purchase-order-details","description":"Update an internal purchase order\n\nRequired permissions: INTERNAL_PURCHASE_ORDER","responses":{"201":{"$ref":"#/components/responses/InternalPurchaseOrderResponse"}},"requestBody":{"$ref":"#/components/requestBodies/InternalPurchaseOrderUpdateRequest"}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/internal-purchase-order/update-an-internal-purchase-order.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
