---
title: "Create a purchase order for a specific partner."
method: POST
path: "/purchase-orders"
tags: ["Purchase order"]
---

# Create a purchase order for a specific partner.

`POST /purchase-orders`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/purchase-orders`
- Auth: OAuth 2
  - Authorization code: `https://localhost/oauth2/authorize`
  - Token URL: `https://localhost/oauth2/authorize`

Create a purchase order for a specific partner.

## Request body

- PurchaseOrderRequest: Purchase order creation object for a specific partner.
  - `locationId` string, required: Location id in the GrubTech platform
  - `supplierId` string, required: Supplier id in the GrubTech platform
  - `externalPoId` string, required: Purchase order id in the external platform
  - `note` string: A special Note for the purchase order.
  - `purchaseOrderItems` PurchaseOrderItem[], required
    - `catalogItemId` string: Catalog item id in GrubTech platform
    - `qty` Quantity: Quantity details of a catalog item.
      - `qty` number: The amount or number of a specific catalog item
      - `unitId` string: Measuring unit id for above quantity
    - `cost` Cost: Price details for a specific catalog item.
      - `value` integer: Specifies the price amount. The amount should always be an integer value (never decimals) because the price is set in the lowest denomination (e.g., cents for US currency, not dollars). Price should always be set even if the price is 0.
      - `currencyCode` string: These are the three-letter alphabetic codes that represent the various currencies used throughout the world
    - `taxAmount` TaxAmount: Tax details for a specific catalog item.
      - `value` number, required: Tax value
      - `taxCode` string, required: Alphabetic codes that represent the various taxes
  - `source` Source, required: Source system details
    - `source` string: Source system name
    - `createdAt` string, date-time: Purchase order or receival note created date and time on external system.

## Response `200`

Successful response

- PurchaseOrderResponse: Purchase order response
  - `poNumber` string: Purchase order number in the GrubTech platform
  - `createdAt` string, date-time: Purchase order created time and date in the GrubTech platform

## Other responses

- `400`: Bad request
- `500`: Internal server error

---

[API](https://skmtc.dev/grubtech/apis/inventory-service.md) - [All operations](https://skmtc.dev/grubtech/apis/inventory-service/llms.txt) - [OpenAPI document](https://skmtc.dev/grubtech/apis/inventory-service/revisions/8e275e5431a4?raw)
