Import a purchase order.
Changed onImport 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
Request
- Base URLhttps://app.pennylane.com
- URLhttps://app.pennylane.com/api/external/v2/purchase_requests/imports
- AuthOAuth 2Authorization code: https://app.pennylane.com/oauth/authorizeToken URL: https://app.pennylane.com/oauth/oauth/token scopes: purchase_requests:all
Headers
Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.
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"
}Changes
- warning
added the new
VESenum value to theresponse property for the response status - info
added the new optional
headerrequest parameterX-Company-Id - info
added the new
DE_intracom_exempt_BU0233enum value to the request property// - info
added the new
ES_intracom_sales_goodsenum value to the request property// - info
added the new
ES_intracom_sales_servicesenum value to the request property// - info
added the new
ES_isp_purchases_100enum value to the request property// - info
added the new
ES_isp_purchases_210enum value to the request property// - info
added the new
ES_isp_salesenum value to the request property// - info
added the new
ES_suplidoenum value to the request property// - info
added the new
VESenum value to the request property
- warning