> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.gappify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.gappify.com/_mcp/server.

# Get a list of Purchase Orders

GET https://api.gappify.com/v1/purchase-orders

Retrieve a list of Purchase Orders based on specified filters.

Reference: https://developers.gappify.com/api-reference/inbound-to-gappify/4/get

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.gappify.com/v1` (Production, default)
- `https://api.uat.gappifyinc.com/v1` (UAT)

## Request

### Query parameters

- `source_system_id` (string, optional) — Unique identifier of the purchase order line in the erp system. This value will be used to match source data and perform upserts.
- `vendor_id` (string, optional) — Id of the Vendor/Supplier. This value should match the source_vendors->g_source_system_id which will be used to send back as part of JE to ERP.
- `per_page` (integer, optional)
- `page` (integer, optional)

## Response

### 200

- `list of PurchaseOrdersResponse`

## Errors

### 401 Unauthorized Error

- `message` (string, required) — The error message
- `success` (boolean, required)

### 422 Unprocessable Entity Error

- `message` (string, required) — The error message
- `errors` (string, required) — The error details

### 404 Not Found Error

- `list of string`

### 500 Internal Server Error

- `list of string`

## Types

### PurchaseOrdersResponse

- `source_system_id` (string, required) — Unique identifier of the purchase order line in the erp system. This value will be used to match source data and perform upserts.
- `vendor_id` (string, required) — Id of the Vendor/Supplier. This value should match the source_vendors->g_source_system_id which will be used to send back as part of JE to ERP.
- `po_id` (string, required) — System Id of the purchase order record.
- `po_number` (string, required) — PO number value.
- `po_header_description` (string, required) — Description of the purchase order.
- `po_line_id` (string, required) — System Id of the purchase order line.
- `po_line_description` (string, required) — Description of the PO line.
- `po_line_amount` (double, required) — Total amount in transaction currency of the PO line.
- `po_header_amount` (double, required) — Total amount at the header level of the PO in transaction currency.
- `po_line_status` (string, required) — Status of the PO line. Status will be leveraged to filter lines that are not active anymore.
- `po_owner` (string, required) — Name of the PO owner.
- `service_end_date` (date, required) — End date of the PO line.
- `service_start_date` (date, required) — Start date of the PO line.
- `invoiced_amount` (double, required) — Amount invoiced in transaction currency of the PO line.
- `po_balance` (double, required) — Balance remaining in transaction currency of the PO line.
- `email` (string, required) — Email of the PO owner.
- `transaction_currency_id` (string, required) — Currency id in which the transaction was posted in the gl. Should match the g_source_system_id in the currency list of source_coas.
- `subsidiary_id` (string, required) — Subsidiary id linked to the po line. This value should match the g_source_system_id in source_coas.
- `subsidiary_currency_id` (string, required) — Subsidiary currency id of the posted transaction line in the gl. Should match the name in the currency list of source_coas.
- `glaccount_debit_id` (string, required) — Expense glaccount id linked to the po line. This value should match the g_source_system_id in source_coas.
- `glaccount_credit_id` (string, required) — Liability glaccount id linked to the po line. This value should match the g_source_system_id in source_coas.
- `department_debit_id` (string, required) — Expense department/cost center id linked to the po line. This value should match the g_source_system_id in source_coas
- `department_credit_id` (string, required) — Liability department/cost center id linked to the po line. This value should match the g_source_system_id in source_coas.
- `location_debit_id` (string, required) — Expense location id linked to the po line. This value should match the g_source_system_id in source_coas.
- `location_credit_id` (string, required) — Liability location id linked to the po line. This value should match the g_source_system_id in source_coas.
- `class_debit_id` (string, required) — Expense class id linked to the po line. This value should match the g_source_system_id in source_coas.
- `class_credit_id` (string, required) — Liability class id linked to the po line. This value should match the g_source_system_id in source_coas.
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `product_debit_id` (string, required) — Expense product id linked to the po line. This value should match the g_source_system_id in source_coas.
- `product_credit_id` (string, required) — Liability product id linked to the po line. This value should match the g_source_system_id in source_coas.
- `project_debit_id` (string, required) — Expense project id linked to the po line. This value should match the g_source_system_id in source_coas.
- `project_credit_id` (string, required) — Liability project id linked to the po line. This value should match the g_source_system_id in source_coas.
- `region_debit_id` (string, required) — Expense region id linked to the po line. This value should match the g_source_system_id in source_coas.
- `region_credit_id` (string, required) — Liability region id linked to the po line. This value should match the g_source_system_id in source_coas.
- `company_debit_id` (string, required) — Expense company id linked to the po line. This value should match the g_source_system_id in source_coas.
- `company_credit_id` (string, required) — Liability company id linked to the po line. This value should match the g_source_system_id in source_coas.
- `intercompany_debit_id` (string, required) — Expense intercompany id linked to the po line. This value should match the g_source_system_id in source_coas.
- `intercompany_credit_id` (string, required) — Liability intercompany id linked to the po line. This value should match the g_source_system_id in source_coas.
- `channel_debit_id` (string, required) — Expense channel id linked to the po line. This value should match the g_source_system_id in source_coas.
- `channel_credit_id` (string, required) — Liability channel id linked to the po line. This value should match the g_source_system_id in source_coas.
- `po_line_amount_cancelled` (double, required) — Any po line amount that has been canceled.
- `cc_email` (string, required) — CC emails to be used as part of outreach. Emails should be ";" separated.
- `deleted_at` (datetime, required)
- `po_date` (date, required) — PO creation date
- `po_line_amount_usd` (double, required)
- `po_balance_usd` (double, required)
- `prepaid_account` (string, required) — GL account name used for prepaid expenses when posting prepaid journal entries. Links to source_coas name.
- `prepaid_account_id` (string, required) — GL account ID used for prepaid expenses when posting prepaid journal entries. Links to source_coas source_system_id.
- `custom_text_1` (string, required) — User-defined custom text field
- `custom_text_2` (string, required) — User-defined custom text field
- `custom_text_3` (string, required) — User-defined custom text field
- `custom_text_4` (string, required) — User-defined custom text field
- `custom_text_5` (string, required) — User-defined custom text field
- `custom_date_1` (date, required) — User-defined custom date field
- `custom_date_2` (date, required) — User-defined custom date field
- `custom_date_3` (date, required) — User-defined custom date field
- `custom_date_4` (date, required) — User-defined custom date field
- `custom_date_5` (date, required) — User-defined custom date field
- `custom_numeric_1` (float, required) — User-defined custom numeric field
- `custom_numeric_2` (float, required) — User-defined custom numeric field
- `custom_numeric_3` (float, required) — User-defined custom numeric field
- `custom_numeric_4` (float, required) — User-defined custom numeric field
- `custom_numeric_5` (float, required) — User-defined custom numeric field
- `type` (string, required) — Row discriminator. `pr` indicates a Purchase Request; `po` or blank indicates a Purchase Order. Consumers should use this value to decide whether to read the `po_*` or `pr_*` trio.
- `pr_id` (string, required) — System Id of the purchase request record. Populated on PR rows (`type` = `pr`).
- `pr_number` (string, required) — PR number value. Populated on PR rows (`type` = `pr`).
- `pr_line_id` (string, required) — System Id of the purchase request line. Populated on PR rows (`type` = `pr`).

## Examples

**Response**

```json
[
  {
    "source_system_id": "source_system_id",
    "vendor_id": "vendor_id",
    "po_id": "po_id",
    "po_number": "po_number",
    "po_header_description": "po_header_description",
    "po_line_id": "po_line_id",
    "po_line_description": "po_line_description",
    "po_line_amount": 1.1,
    "po_header_amount": 1.1,
    "po_line_status": "po_line_status",
    "po_owner": "po_owner",
    "service_end_date": "2023-01-15",
    "service_start_date": "2023-01-15",
    "invoiced_amount": 1.1,
    "po_balance": 1.1,
    "email": "email",
    "transaction_currency_id": "transaction_currency_id",
    "subsidiary_id": "subsidiary_id",
    "subsidiary_currency_id": "subsidiary_currency_id",
    "glaccount_debit_id": "glaccount_debit_id",
    "glaccount_credit_id": "glaccount_credit_id",
    "department_debit_id": "department_debit_id",
    "department_credit_id": "department_credit_id",
    "location_debit_id": "location_debit_id",
    "location_credit_id": "location_credit_id",
    "class_debit_id": "class_debit_id",
    "class_credit_id": "class_credit_id",
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z",
    "product_debit_id": "product_debit_id",
    "product_credit_id": "product_credit_id",
    "project_debit_id": "project_debit_id",
    "project_credit_id": "project_credit_id",
    "region_debit_id": "region_debit_id",
    "region_credit_id": "region_credit_id",
    "company_debit_id": "company_debit_id",
    "company_credit_id": "company_credit_id",
    "intercompany_debit_id": "intercompany_debit_id",
    "intercompany_credit_id": "intercompany_credit_id",
    "channel_debit_id": "channel_debit_id",
    "channel_credit_id": "channel_credit_id",
    "po_line_amount_cancelled": 1.1,
    "cc_email": "cc_email",
    "deleted_at": "2024-01-15T09:30:00Z",
    "po_date": "2023-01-15",
    "po_line_amount_usd": 1.1,
    "po_balance_usd": 1.1,
    "prepaid_account": "prepaid_account",
    "prepaid_account_id": "prepaid_account_id",
    "custom_text_1": "custom_text_1",
    "custom_text_2": "custom_text_2",
    "custom_text_3": "custom_text_3",
    "custom_text_4": "custom_text_4",
    "custom_text_5": "custom_text_5",
    "custom_date_1": "2023-01-15",
    "custom_date_2": "2023-01-15",
    "custom_date_3": "2023-01-15",
    "custom_date_4": "2023-01-15",
    "custom_date_5": "2023-01-15",
    "custom_numeric_1": 1.1,
    "custom_numeric_2": 1.1,
    "custom_numeric_3": 1.1,
    "custom_numeric_4": 1.1,
    "custom_numeric_5": 1.1,
    "type": "type",
    "pr_id": "pr_id",
    "pr_number": "pr_number",
    "pr_line_id": "pr_line_id"
  },
  {
    "source_system_id": "source_system_id",
    "vendor_id": "vendor_id",
    "po_id": "po_id",
    "po_number": "po_number",
    "po_header_description": "po_header_description",
    "po_line_id": "po_line_id",
    "po_line_description": "po_line_description",
    "po_line_amount": 1.1,
    "po_header_amount": 1.1,
    "po_line_status": "po_line_status",
    "po_owner": "po_owner",
    "service_end_date": "2023-01-15",
    "service_start_date": "2023-01-15",
    "invoiced_amount": 1.1,
    "po_balance": 1.1,
    "email": "email",
    "transaction_currency_id": "transaction_currency_id",
    "subsidiary_id": "subsidiary_id",
    "subsidiary_currency_id": "subsidiary_currency_id",
    "glaccount_debit_id": "glaccount_debit_id",
    "glaccount_credit_id": "glaccount_credit_id",
    "department_debit_id": "department_debit_id",
    "department_credit_id": "department_credit_id",
    "location_debit_id": "location_debit_id",
    "location_credit_id": "location_credit_id",
    "class_debit_id": "class_debit_id",
    "class_credit_id": "class_credit_id",
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z",
    "product_debit_id": "product_debit_id",
    "product_credit_id": "product_credit_id",
    "project_debit_id": "project_debit_id",
    "project_credit_id": "project_credit_id",
    "region_debit_id": "region_debit_id",
    "region_credit_id": "region_credit_id",
    "company_debit_id": "company_debit_id",
    "company_credit_id": "company_credit_id",
    "intercompany_debit_id": "intercompany_debit_id",
    "intercompany_credit_id": "intercompany_credit_id",
    "channel_debit_id": "channel_debit_id",
    "channel_credit_id": "channel_credit_id",
    "po_line_amount_cancelled": 1.1,
    "cc_email": "cc_email",
    "deleted_at": "2024-01-15T09:30:00Z",
    "po_date": "2023-01-15",
    "po_line_amount_usd": 1.1,
    "po_balance_usd": 1.1,
    "prepaid_account": "prepaid_account",
    "prepaid_account_id": "prepaid_account_id",
    "custom_text_1": "custom_text_1",
    "custom_text_2": "custom_text_2",
    "custom_text_3": "custom_text_3",
    "custom_text_4": "custom_text_4",
    "custom_text_5": "custom_text_5",
    "custom_date_1": "2023-01-15",
    "custom_date_2": "2023-01-15",
    "custom_date_3": "2023-01-15",
    "custom_date_4": "2023-01-15",
    "custom_date_5": "2023-01-15",
    "custom_numeric_1": 1.1,
    "custom_numeric_2": 1.1,
    "custom_numeric_3": 1.1,
    "custom_numeric_4": 1.1,
    "custom_numeric_5": 1.1,
    "type": "type",
    "pr_id": "pr_id",
    "pr_number": "pr_number",
    "pr_line_id": "pr_line_id"
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.gappify.com/v1/purchase-orders"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.gappify.com/v1/purchase-orders';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.gappify.com/v1/purchase-orders"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.gappify.com/v1/purchase-orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.gappify.com/v1/purchase-orders")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.gappify.com/v1/purchase-orders', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.gappify.com/v1/purchase-orders");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.gappify.com/v1/purchase-orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```