v1

latestOpenAPI 3.0.12026-07-141671231.8 MB
Purchase Requests

Retrieve a purchase request

Retrieve a purchase request

ℹ️ This endpoint requires one of the following scopes: purchase_requests:all, purchase_requests:readonly

get/api/external/v2/purchase_requests/{id}

Path parameters

idinteger required

Response

The requested Purchase Request

idinteger required

Purchase request identifier

purchase_order_numberstring nullable required

Purchase order number

status'to_be_validated' | 'approved' | 'rejected' | 'invoiced' required
currency'EUR' | 'USD' | 'GBP' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'FJD' | 'FKP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'IMP' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JEP' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SLE' | 'SOS' | 'SRD' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XDR' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'ZWL' required
reasonstring required

Reason of the request

estimated_delivery_datestring date nullable required

Estimated delivery date for the purchase request

amountstring string required
currency_amountstring required

Purchase Request currency amount (total value of the purchase request in the currency of the purchase request)

currency_amount_before_taxstring required

Purchase Request currency amount before tax (total value before tax of the purchase request in the currency of the purchase request)

exchange_ratestring required

Purchase request exchange rate (used to convert the purchase request to euros. If the purchase request currency is euro it will be 1.0)

currency_taxstring required

Purchase request taxable amount (in euros. If the currency is euro, currency_amount and amount are identical)

taxstring required

Purchase request taxable amount (in purchase request currency)

created_atstring date-time required

The time the purchase request has been created

updated_atstring date-time required

The last time the purchase request has been updated

Example response

{
  "id": 1,
  "purchase_order_number": "PR20230001",
  "supplier": {
    "id": 2,
    "url": "https://app.pennylane.com/api/external/v2/suppliers/2"
  },
  "delivery_address": {
    "address": "8 rue de la paix",
    "postal_code": "75002",
    "city": "Paris",
    "country_alpha2": "FR"
  },
  "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"
  },
  "linked_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"
}