GET
/
api
/
external
/
v2
/
purchase_requests
List purchase requests
curl --request GET \
  --url https://app.pennylane.com/api/external/v2/purchase_requests \
  --header 'Authorization: Bearer <token>'
{
  "has_more": true,
  "next_cursor": "dXBkYXRlZF9hdDoxNjc0MTIzNDU2",
  "items": [
    {
      "id": 1,
      "purchase_request_number": "PR20230001",
      "supplier": {
        "id": 2,
        "url": "https://app.pennylane.com/api/external/v2/suppliers/2"
      },
      "requester": {
        "id": 3
      },
      "reviewer": {
        "id": 4
      },
      "delivery_address": {
        "address": "8 rue de la paix",
        "postal_code": 75002,
        "city": "Paris",
        "country_alpha2": "FR"
      },
      "status": "to_be_validated",
      "currency": "EUR",
      "reason": "I need a computer to be able to create purchase requests",
      "estimated_delivery_date": "2023-12-31",
      "amount": "1234.56",
      "currency_amount": "1234.56",
      "currency_amount_before_tax": "1200.23",
      "exchange_rate": "1.0",
      "currency_tax": "34.33",
      "tax": "34.33",
      "purchase_order": {
        "filename": "Bon-de-commande_n°2025-1.pdf",
        "url": "https://www.pennylane.com/Bon-de-commande_n%C2%B02025-1.pdf"
      },
      "matched_invoices": {
        "items": [
          {
            "id": 42,
            "url": "https://app.pennylane.com/api/external/v2/supplier_invoices/42"
          }
        ]
      },
      "created_at": "2023-08-30T10:08:08.146343Z",
      "updated_at": "2023-08-30T10:08:08.146343Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

cursor
string

Cursor for pagination. Use this to fetch the next set of results. The cursor is an opaque string returned in the previous response's metadata. Leave empty for the first request.

Example:

"dXBkYXRlZF9hdDoxNjc0MTIzNDU2"

limit
integer

Number of items to return per request. Defaults to 20 if not specified. Must be between 1 and 100.

Required range: 1 <= x <= 100
Example:

20

filter
string

You can choose to filter items on specific fields. Available fields and values:

  • id: lt, lteq, gt, gteq, eq, not_eq, in, not_in
  • reviewed_by_id: eq, not_eq, in, not_in
  • user_id: eq, not_eq, in, not_in
  • thirdparty_id: eq, not_eq, in, not_in
Example:

"[{\"field\": \"user_id\", \"operator\": \"eq\", \"value\": \"123\"}]"

sort
string
default:-id

You can choose to sort items on specific attributes Sort field may be prefixed with - for descending order. Example : id will sort by ascending order, -id will sort by descending order. Available fields : id

Response

Returns a list of purchase requests

has_more
boolean
required

Indicates whether additional results are available beyond this set. Use this flag to determine if another request is needed.

Example:

true

next_cursor
string | null
required

Cursor to retrieve the next set of results. Include this value in the cursor parameter of your next request to fetch subsequent items. A null next_cursor in the response indicates no further results.

Example:

"dXBkYXRlZF9hdDoxNjc0MTIzNDU2"

items
object[]
required

The list of items returned