Get the approval state
curl --request GET \
--url https://coreapi.io/api/offers/{id}/approval \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/offers/{id}/approval"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/offers/{id}/approval', 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://coreapi.io/api/offers/{id}/approval",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}{
"versionApprovalStatus": "not_required",
"requiresApproval": true,
"canCurrentUserDecide": true,
"request": {
"id": "<string>",
"status": "pending",
"step": {
"order": 123,
"requirement": "any",
"approvers": [
{
"type": "role",
"id": "<string>",
"label": "<string>"
}
],
"name": "<string>"
},
"decisions": [
{
"account": "<string>",
"decision": "approve",
"decidedAt": "2023-11-07T05:31:56Z",
"comment": "<string>"
}
],
"requestedBy": {
"id": "<string>",
"name": "<string>"
},
"requestedAt": "2023-11-07T05:31:56Z"
}
}Freigabe
Get the approval state
Beta. This endpoint is unstable and may still change without notice. Pin against the dated version and watch the changelog.
Returns the approval status of the version under review, the running request (approvers and decisions) and whether the caller may decide. Internal staff only; never exposed to the recipient.
GET
/
api
/
offers
/
{id}
/
approval
Get the approval state
curl --request GET \
--url https://coreapi.io/api/offers/{id}/approval \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/offers/{id}/approval"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/offers/{id}/approval', 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://coreapi.io/api/offers/{id}/approval",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}{
"versionApprovalStatus": "not_required",
"requiresApproval": true,
"canCurrentUserDecide": true,
"request": {
"id": "<string>",
"status": "pending",
"step": {
"order": 123,
"requirement": "any",
"approvers": [
{
"type": "role",
"id": "<string>",
"label": "<string>"
}
],
"name": "<string>"
},
"decisions": [
{
"account": "<string>",
"decision": "approve",
"decidedAt": "2023-11-07T05:31:56Z",
"comment": "<string>"
}
],
"requestedBy": {
"id": "<string>",
"name": "<string>"
},
"requestedAt": "2023-11-07T05:31:56Z"
}
}Autorisierungen
Antwort
The approval sub-resource.
Internal approval state of an offer. Returned only to authenticated staff, never to the recipient.
War diese Seite hilfreich?