List Unlinked CDRs
curl --request GET \
--url https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked', 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://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"transactionId": 123,
"amountInCents": 123,
"authIdTag": {
"uid": "<string>",
"label": "<string>",
"billingReference": "<string>"
},
"consumedInWattHours": 123,
"chargingTime": {
"days": 123,
"hours": 123,
"minutes": 123,
"seconds": 123
},
"customerName": "John Doe",
"endedAt": "2023-11-07T05:31:56Z",
"locationName": "<string>",
"centsPerWh": 123,
"startedAt": "2023-11-07T05:31:56Z",
"tagIdLabel": "<string>"
}
],
"pagination": {
"currentPage": 3,
"itemCount": 20,
"itemsPerPage": 25,
"totalItems": 70,
"totalPages": 3
}
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Invalid request body",
"instance": "/v1/uri-called/",
"errors": [
"currentPage must be a positive integer"
]
}List Unlinked CDRs
Fetch a list of Charge Detail Records that are eligible for reimbursement, but not yet linked to an expense.
GET
/
v1
/
expenses
/
{expenseId}
/
charge-detail-records
/
unlinked
List Unlinked CDRs
curl --request GET \
--url https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked', 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://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/unlinked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"transactionId": 123,
"amountInCents": 123,
"authIdTag": {
"uid": "<string>",
"label": "<string>",
"billingReference": "<string>"
},
"consumedInWattHours": 123,
"chargingTime": {
"days": 123,
"hours": 123,
"minutes": 123,
"seconds": 123
},
"customerName": "John Doe",
"endedAt": "2023-11-07T05:31:56Z",
"locationName": "<string>",
"centsPerWh": 123,
"startedAt": "2023-11-07T05:31:56Z",
"tagIdLabel": "<string>"
}
],
"pagination": {
"currentPage": 3,
"itemCount": 20,
"itemsPerPage": 25,
"totalItems": 70,
"totalPages": 3
}
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Invalid request body",
"instance": "/v1/uri-called/",
"errors": [
"currentPage must be a positive integer"
]
}Authorizations
Authorization via a JWT bearer token.
Path Parameters
Unique identifier of the Expense.
Example:
"f570bb7a-180a-4f82-bc13-eedf3573de43"
Query Parameters
Maximum number of items to return per page.
Required range:
1 <= x <= 500Page number, starting at 1.
Required range:
x >= 1Field to sort the CDR list by.
Available options:
consumedInWattHours, endedAt, id, locationName, startedAt, transactionId The ordering direction.
Available options:
ASC, DESC Was this page helpful?