cURL
curl -X GET \
/accounting/cost-centres/{id} \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/accounting/cost-centres/{id}"
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/accounting/cost-centres/{id}', 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/accounting/cost-centres/{id}",
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;
}{
"name": "Cost Centre",
"type": "KOST1",
"status": "active",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}Cost Centre
Get a cost centre
Get a cost centre
Required permissions:cost-centre:readGET
/
accounting
/
cost-centres
/
{id}
cURL
curl -X GET \
/accounting/cost-centres/{id} \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/accounting/cost-centres/{id}"
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/accounting/cost-centres/{id}', 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/accounting/cost-centres/{id}",
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;
}{
"name": "Cost Centre",
"type": "KOST1",
"status": "active",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Pfadparameter
CostCentre identifier
Antwort
CostCentre resource
The name of the cost centre, which is displayed in the UI
Maximum string length:
255Beispiel:
"Cost Centre"
The type of the cost centre, which is used for exports
Verfügbare Optionen:
KOST1, KOST2 Beispiel:
"KOST1"
The status of the cost centre
Possible values:
active: The cost centre is active and can be used and referencedarchived: The cost centre is archived and cannot be referenced anymore. It also disappears from the UI.
Beispiel:
"active"
Beispiel:
"ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d"
The code of the cost centre, which is used for exports
Beispiel:
"CC"
The date and time when the cost centre was created
Beispiel:
"2021-01-01T00:00:00+00:00"
The date and time when the cost centre was last updated
Beispiel:
"2021-01-01T00:00:00+00:00"
War diese Seite hilfreich?