curl --request POST \
--url https://app.pennylane.com/api/external/v2/purchase_requests/imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"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_request_number": "PR20230001",
"currency": "EUR",
"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",
"unit": "piece",
"vat_rate": "FR_200",
"description": "<string>"
}
]
}'
{
"id": 42,
"purchase_request_number": "PR20230001",
"supplier": {
"id": 42,
"url": "https://app.pennylane.com/api/external/v2/suppliers/42"
},
"requester": {
"id": 42
},
"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": "2021-06-30",
"amount": "230.32",
"currency_amount": "230.32",
"currency_amount_before_tax": "196.32",
"exchange_rate": "1.0",
"currency_tax": "34.0",
"tax": "34.0",
"purchase_order": {
"url": "https://www.pennylane.com/rails/active_storage/blobs/redirect/eyJfc..==--26d6e7391dd728fae2cde59bd3fbe4dd11e20a95/Bon-de-commande.pdf",
"filename": "<string>"
},
"reviewer": {
"id": 42
},
"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"
}
Import a purchase request
ℹ️ This endpoint requires one of the following scopes:
purchase_requests:all
curl --request POST \
--url https://app.pennylane.com/api/external/v2/purchase_requests/imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"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_request_number": "PR20230001",
"currency": "EUR",
"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",
"unit": "piece",
"vat_rate": "FR_200",
"description": "<string>"
}
]
}'
{
"id": 42,
"purchase_request_number": "PR20230001",
"supplier": {
"id": 42,
"url": "https://app.pennylane.com/api/external/v2/suppliers/42"
},
"requester": {
"id": 42
},
"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": "2021-06-30",
"amount": "230.32",
"currency_amount": "230.32",
"currency_amount_before_tax": "196.32",
"exchange_rate": "1.0",
"currency_tax": "34.0",
"tax": "34.0",
"purchase_order": {
"url": "https://www.pennylane.com/rails/active_storage/blobs/redirect/eyJfc..==--26d6e7391dd728fae2cde59bd3fbe4dd11e20a95/Bon-de-commande.pdf",
"filename": "<string>"
},
"reviewer": {
"id": 42
},
"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"
}
The access token received from the authorization server in the OAuth 2.0 flow.
The imported purchase request
The response is of type object
.
Was this page helpful?