Skip to main content
POST
/
v1
/
expenses
/
{expenseId}
/
charge-detail-records
/
remove
Remove CDRs from Expense
curl --request POST \
  --url https://api.spirii.com/reimbursement/v1/expenses/{expenseId}/charge-detail-records/remove \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "transactionIds": [
    1234567,
    45667891,
    7891230
  ]
}
'
{
  "amountInCents": 123,
  "consumptionInWattHours": 123,
  "currency": "EUR",
  "IBAN": "DK9520000123456789",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "recipientName": "John Doe",
  "recipientCrmId": 123456,
  "cdrList": [
    {
      "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>"
    }
  ],
  "authIdTag": {
    "uid": "<string>",
    "label": "<string>",
    "billingReference": "<string>"
  },
  "period": {
    "year": 2026,
    "monthIndex": 0
  },
  "recipientExternalId": "testExternalId"
}

Authorizations

Authorization
string
header
required

Authorization via a JWT bearer token.

Path Parameters

expenseId
string<uuid>
required

Unique identifier of the Expense.

Example:

"f570bb7a-180a-4f82-bc13-eedf3573de43"

Body

application/json
transactionIds
integer[]
required

Transaction IDs of the charging sessions to add or remove.

Example:
[1234567, 45667891, 7891230]

Response

Successfully removed charge detail records from expense.

amountInCents
number
required

Total reimbursement amount for this expense, in the smallest currency unit (e.g. cents).

consumptionInWattHours
number
required

Total energy consumed across all charging sessions linked to this expense, in watt-hours.

currency
string
required

ISO 4217 currency code for the reimbursement amount.

Example:

"EUR"

IBAN
string
required

IBAN of the recipient's bank account used for the reimbursement transfer.

Example:

"DK9520000123456789"

id
string<uuid>
required

Unique identifier of the expense.

recipientName
string
required

Name of the recipient.

Example:

"John Doe"

recipientCrmId
integer
required

Spirii ID of the recipient.

Example:

123456

reportStatus
enum<string>
required

Status of the Expense Report.

Available options:
Active,
Pending,
Approved,
FundsReceived
cdrList
object[]
required

Charging sessions (CDRs) associated with this expense.

authIdTag
object
paymentStatus
enum<string>

Status of an expense payment.

Available options:
Awaiting funds,
Failed,
In progress,
Not started,
Paid
period
object

Month of the most recent expense in the report.

recipientExternalId
string

External ID of the recipient (Your ID).

Example:

"testExternalId"