Confirm purchase agreement
Confirm a draft purchase agreement
POST
/
admin
/
api
/
v1
/
purchases
/
purchase-agreements
/
{id}
/
confirm
Confirm purchase agreement
curl --request POST \
--url https://erp.arukz.com/admin/api/v1/purchases/purchase-agreements/{id}/confirm \
--header 'Authorization: Bearer <token>'import requests
url = "https://erp.arukz.com/admin/api/v1/purchases/purchase-agreements/{id}/confirm"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://erp.arukz.com/admin/api/v1/purchases/purchase-agreements/{id}/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://erp.arukz.com/admin/api/v1/purchases/purchase-agreements/{id}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": null,
"name": "PA-2949",
"type": "blanket_order",
"state": "draft",
"reference": null,
"starts_at": null,
"ends_at": null,
"description": null,
"currency_id": 793,
"partner_id": 1,
"user_id": null,
"company_id": 1400,
"creator_id": 1,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
"message": "Purchase agreement confirmed successfully."
}{
"message": "Unauthenticated."
}{
"message": "Resource not found."
}{
"message": "Only draft purchase agreements can be confirmed."
}Authorizations
An API token from Sign in, sent as Authorization: Bearer <token>. Tokens last 30 days.
Response
Success
⌘I
Confirm purchase agreement
curl --request POST \
--url https://erp.arukz.com/admin/api/v1/purchases/purchase-agreements/{id}/confirm \
--header 'Authorization: Bearer <token>'import requests
url = "https://erp.arukz.com/admin/api/v1/purchases/purchase-agreements/{id}/confirm"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://erp.arukz.com/admin/api/v1/purchases/purchase-agreements/{id}/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://erp.arukz.com/admin/api/v1/purchases/purchase-agreements/{id}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": null,
"name": "PA-2949",
"type": "blanket_order",
"state": "draft",
"reference": null,
"starts_at": null,
"ends_at": null,
"description": null,
"currency_id": 793,
"partner_id": 1,
"user_id": null,
"company_id": 1400,
"creator_id": 1,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
"message": "Purchase agreement confirmed successfully."
}{
"message": "Unauthenticated."
}{
"message": "Resource not found."
}{
"message": "Only draft purchase agreements can be confirmed."
}