v1
latestOpenAPI 3.0.12026-07-141671231.8 MBPurchase Requests
Import a purchase order.
Import a purchase order. This will create a purchase request with an existing purchase order attached. The purchase request will be automatically validated.
ℹ️ This endpoint requires the following scope: purchase_requests:all
post/api/external/v2/purchase_requests/imports
Request body
Example request
{
"file_attachment_id": 42,
"reason": "I need a computer to be able to create purchase requests",
"estimated_delivery_date": "2023-08-30",
"supplier_id": 42,
"purchase_order_number": "PR20230001",
"currency_amount_before_tax": "100.00",
"currency_amount": "120.00",
"amount": "120.00",
"currency_tax": "20.00",
"tax": "20.00",
"delivery_address": {
"address": "8 rue de la paix",
"postal_code": "75002",
"city": "Paris",
"country_alpha2": "FR"
},
"purchase_request_lines": [
{
"currency_amount": "120.00",
"amount": "120.00",
"currency_tax": "20.00",
"tax": "20.00",
"label": "Demo label",
"quantity": 12,
"unit_price": "8.34",
"vat_rate": "FR_200"
}
]
}Response
The imported Purchase Request
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"
}