Fred ExpenseReport Api (v1)

Download OpenAPI specification:

Fred Expense Report API

This API manages expense reports (notes de frais): expense requests, their lifecycle and the workflow scoped to an accounting folder. It is part of the larger Fred platform and is consumed by other Fred services.

Authentication

All endpoints are protected and require a valid Fred bearer token, except where explicitly marked as anonymous. Authentication and authorization follow the common Inqom mechanism shared by every Fred microservice.

See the shared Inqom authentication documentation for how to obtain a token and call the API behind the gateway.

Environments

Environment Base URL
Production https://api.inqom.com/expensereport
Staging https://api-staging.inqom.com/expensereport

Access

Returns whether the given accounting folder has been granted access to the ExpenseReport module.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier.

Responses

Response samples

Content type
true

Grants access to the ExpenseReport module for the given accounting folder. This operation is idempotent.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier.

Responses

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Revokes access to the ExpenseReport module for the given accounting folder. This operation is idempotent.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier.

Responses

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Addresses

Returns the address completions matching the search prefix, at most five, each carrying its label and a resolution reference to retransmit unchanged to the resolution endpoint. A search matching nothing is a result, not an error: the response is a 200 with an empty list. The completions never carry coordinates.

Authorizations:
oauth2
query Parameters
query
string

The free-text search prefix on the address label.

Responses

Response samples

Content type
[
  • {
    }
]

Resolves the coordinates of an address completion previously returned by "SearchCompletions", carrying its outcome: "Located" with the coordinates, or "NotLocated" when the reference resolves to no candidate or to more than one. Both are business answers, hence a 200: only a 5xx means the resolution service itself is unavailable. On "NotLocated", the coordinate properties are absent from the response body, not null. The reference is required and must be one this module issued through "SearchCompletions": a missing or undecodable reference is an integration error answered by a 400, never by a business outcome computed on a defaulted address.

Authorizations:
oauth2
query Parameters
reference
string

The resolution reference returned by the completions endpoint, to be retransmitted unchanged.

Responses

Response samples

Content type
{
  • "Outcome": "Located",
  • "Latitude": 0.1,
  • "Longitude": 0.1
}

EmployeeBankAccountImports

Deposits a CSV or XLSX file of employee bank accounts for preview. Nothing is written to any employee's bank account by this call, including when the file has no data row: the response still carries a report, with every count at zero.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema: multipart/form-data
file
string <binary>

The file to deposit (multipart/form-data, field name: file).

Responses

Response samples

Content type
{
  • "ImportId": 0,
  • "State": "Reported",
  • "SubmittedOn": "2019-08-24T14:15:22Z",
  • "SubmittedByUserId": 0,
  • "ExpiresOn": "2019-08-24T14:15:22Z",
  • "IgnoredColumns": [
    ],
  • "Counts": {
    },
  • "Lines": [
    ]
}

Returns an import's report: the preview classification before `apply`, or what was actually written after it. Open to any holder of the capability in the folder, not only the depositor — reading and applying can be split between two people on purpose. An importId that is valid but belongs to another folder answers the same `404`, with an identical body, as one that does not exist at all: the response must never confirm the existence of another folder's resource (ADR 0001).

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

importId
required
integer <int32>

The import identifier.

Responses

Response samples

Content type
{
  • "ImportId": 0,
  • "State": "Reported",
  • "SubmittedOn": "2019-08-24T14:15:22Z",
  • "SubmittedByUserId": 0,
  • "ExpiresOn": "2019-08-24T14:15:22Z",
  • "IgnoredColumns": [
    ],
  • "Counts": {
    },
  • "Lines": [
    ]
}

Applies an import: writes every line whose target still matches what was seen at deposit time, one independent write per line, then purges the transitory clear-text IBAN values. An import already applied, or past its 24h lifetime, answers `409` with a cause naming which of the two it is. See `Get` for the `404` opacity this action shares with it.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

importId
required
integer <int32>

The import identifier.

Responses

Response samples

Content type
{
  • "ImportId": 0,
  • "State": "Reported",
  • "SubmittedOn": "2019-08-24T14:15:22Z",
  • "SubmittedByUserId": 0,
  • "ExpiresOn": "2019-08-24T14:15:22Z",
  • "IgnoredColumns": [
    ],
  • "Counts": {
    },
  • "Lines": [
    ]
}

Returns the template of the file this import reads, named `modele-import-iban-salaries-v1.csv` by its `Content-Disposition`: a CSV in UTF-8 with a byte order mark, separated by `;`, whose header is built from the columns the deposit reads, in their order, followed by two example lines. Deposited as is, it is never refused for a missing column. It is the same for every folder: it carries none of the folder's data, and serving it reads neither the folder's directory nor the database. Reserved to the roles that may import, as `Deposit`: `403` otherwise.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

EmployeeBankAccounts

Lists the accounting folder's employees together with the completeness of their bank account (whether an IBAN is on file), optionally restricted to one side of that filter. Open to every role covered by `CanViewWholeFolder` — chief executive, DAF (their group roles included), DAF read-only, chartered accountant, chief accounting officer. Firm-side accounting roles can consult this list, but never appear in it: who may view and who is counted are two independent rules.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

query Parameters
hasIban
boolean

Restricts the listing to employees who do (or do not) have an IBAN on file (optional).

pageNumber
integer <int32>

1-based page number (optional, defaults to 1).

pageSize
integer <int32>

Page size (optional, defaults to 20, capped at 100).

Responses

Response samples

Content type
{
  • "Items": [
    ],
  • "TotalCount": 0,
  • "PageNumber": 0,
  • "PageSize": 0,
  • "TotalPages": 0
}

Returns the caller's own bank account. An employee who has never entered one gets a `200` with `HasIban: false`, never a `404` — the resource is the employee's bank account slot, which always exists once the folder does.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
{
  • "UserId": 0,
  • "DisplayName": "string",
  • "HasIban": true,
  • "MaskedIban": "string",
  • "Bic": "string"
}

Enters or replaces the caller's own bank account. Only an IBAN of the SEPA area is accepted (`IbanCountryOutsideEuroArea` otherwise). Submitting the account already on file (same IBAN, holder name and BIC) is idempotent — it answers `200` without adding a trace. An empty or missing IBAN is refused: this endpoint never clears a bank account. The BIC is optional. Entering the IBAN, even unchanged, replaces the BIC on file with the one sent, so an IBAN sent without a BIC clears it. A malformed BIC is not saved and the request still succeeds: the response carries `BicRejectionReason` (`BicStructureNotValid`). Every change of the BIC is traced; the holder is mailed only when the IBAN changes. The account holder's name follows the rule of its field, `AccountHolderName`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The IBAN, the BIC and, only when it differs, the account holder's name.

Iban
required
string

The employee's IBAN, in any commonly copied form (spaced, with a leading/trailing blank, dashes).

AccountHolderName
string or null

The account holder's name, only when it differs from the employee's own name (optional). No read returns it, so omitted or null keeps the name on file, even when the IBAN changes; empty clears it.

Bic
string or null

The BIC of the employee's bank (optional), 8 or 11 characters, in any case and with spaces. A malformed BIC is not saved and never refuses the request: the IBAN is saved, and the response says why the BIC was not.

Responses

Request samples

Content type
{
  • "Iban": "string",
  • "AccountHolderName": "string",
  • "Bic": "string"
}

Response samples

Content type
{
  • "UserId": 0,
  • "DisplayName": "string",
  • "HasIban": true,
  • "MaskedIban": "string",
  • "Bic": "string",
  • "BicRejectionReason": "string"
}

Returns the caller's own postal address and whether it is compliant. `IsCompliant` is true when the address can be written into the transfer file, that is when the city holds at least one Latin letter; it does not mean the address was verified. A caller who has never entered an address gets a `200` with `IsCompliant: false` and no address field, never a `404`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
{
  • "Street": "string",
  • "ZipCode": "string",
  • "City": "string",
  • "IsCompliant": true
}

Enters, replaces or erases the caller's own postal address. The body replaces the address as a whole: street, postal code and city are all optional and a field left empty is cleared; all three empty or missing erases the address and answers `200` like any other save. The address is saved trimmed, a line break or a tab becoming a space, even when it is not compliant. A control character, a bidirectional control or an isolated surrogate is refused with `400` (`PostalAddressStreetHasForbiddenCharacter`, `PostalAddressZipCodeHasForbiddenCharacter`, `PostalAddressCityHasForbiddenCharacter`), and so is a value over 256, 20 or 100 characters (`PostalAddressStreetTooLong`, `PostalAddressZipCodeTooLong`, `PostalAddressCityTooLong`). The response is the address as stored and `IsCompliant`: true when the address can be written into the transfer file, that is when the city holds at least one Latin letter; it does not mean the address was verified.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The street, the postal code and the city, replacing what is on file.

Street
string or null

The street line (optional), up to 256 characters.

ZipCode
string or null

The postal code (optional), up to 20 characters.

City
string or null

The city (optional), up to 100 characters. The address is compliant when it holds at least one Latin letter.

Responses

Request samples

Content type
{
  • "Street": "string",
  • "ZipCode": "string",
  • "City": "string"
}

Response samples

Content type
{
  • "Street": "string",
  • "ZipCode": "string",
  • "City": "string",
  • "IsCompliant": true
}

Enters or replaces an employee's bank account on their behalf, with the same checks as the employee's own entry (`PUT me`) and the same response: the target's account, the IBAN masked. The body replaces the IBAN and the BIC; the account holder's name follows the rule of its field, `AccountHolderName`. Behind its own feature flag, `reimbursement-iban-on-behalf`. Reserved to the roles covered by `CanEnterBankAccountOnBehalf` — chief executive, DAF (their group roles included), chartered accountant, chief accounting officer; never the read-only DAF — and only while the caller's token is positioned on the folder of the route: the roles it carries are those of the folder it was issued for. Anything else answers `403`, whatever the target. The target must figure in the folder's employees, the very set `GET` lists. Every other target — unknown identifier, user of another folder, accounting-firm collaborator who is not an employee of the folder, deactivated user — answers one and the same `404` (`EmployeeNotFound`, same body), checked before the IBAN is validated: the identifiers are sequential, so telling them apart would let a caller enumerate who exists in a folder or in the platform. A directory that returns no roster is never read as an unknown employee: it answers `417` (`UserDirectoryUnavailable`) and the call can be retried. A transport failure towards the directory is not mapped and surfaces as a `500`; in both cases nothing is written and no mail is sent. Submitting the account already on file (same normalised IBAN, same holder name and same BIC) is idempotent: `200` with no trace and no mail. Otherwise the change is traced as entered on the holder's behalf, and the holder — and nobody else — is warned by mail naming the author as soon as the IBAN changes. The response never tells whether the holder was or will be warned. The BIC follows the rules of `PUT me`: optional, replaced with the IBAN, and a malformed one is not saved without refusing the request (`BicRejectionReason`).

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

userId
required
integer <int32>

The employee the bank account is entered for.

Request Body schema:

The IBAN and the BIC, replacing what is on file, and the account holder's name when it changes.

Iban
required
string

The employee's IBAN, in any commonly copied form (spaced, with a leading/trailing blank, dashes).

AccountHolderName
string or null

The account holder's name, only when it differs from the employee's own name (optional). No read returns it, so omitted or null keeps the name on file, even when the IBAN changes; empty clears it.

Bic
string or null

The BIC of the employee's bank (optional), 8 or 11 characters, in any case and with spaces. A malformed BIC is not saved and never refuses the request: the IBAN is saved, and the response says why the BIC was not.

Responses

Request samples

Content type
{
  • "Iban": "string",
  • "AccountHolderName": "string",
  • "Bic": "string"
}

Response samples

Content type
{
  • "UserId": 0,
  • "DisplayName": "string",
  • "HasIban": true,
  • "MaskedIban": "string",
  • "Bic": "string",
  • "BicRejectionReason": "string"
}

Employees

Lists a page of the accounting folder's employees, sorted on the last name, then the first name, then the user identifier, every employee included, with or without an IBAN or a vehicle. Each line carries whether an IBAN is on file and, if so, the same mask as the bank accounts listing — never the IBAN in clear — and the employee's vehicles of this folder, locked ones included and deleted ones left out, each with the `State`, `LicensePlate` and `RegistrationDocumentId` of the vehicles routes (`State` and `LicensePlate` omitted while `expense-report.back.vehicle-edition` is off). `Status` says what is missing: `MissingIban`, `MissingRegistrationDocument` (a vehicle without its registration document), both, or `Complete`; neither a missing plate nor the absence of any vehicle counts. 20 lines by default, 100 at most; a page number or a page size that is not strictly positive answers 400 (`PageNumber_INVALID`, `PageSize_INVALID`).

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

query Parameters
pageNumber
integer <int32>

1-based page number (optional, defaults to 1).

pageSize
integer <int32>

Page size (optional, defaults to 20, capped at 100).

Responses

Response samples

Content type
{
  • "Items": [
    ],
  • "TotalCount": 0,
  • "PageNumber": 0,
  • "PageSize": 0,
  • "TotalPages": 0
}

Counts, over the whole folder, the employees the listing carries, those without an IBAN, and their vehicles without a registration document — vehicles, not employees: two such vehicles of one employee count twice.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
{
  • "Employees": 0,
  • "MissingIban": 0,
  • "MissingRegistrationDocuments": 0
}

ExpenseCategories

Returns the list of all expense categories available for the given accounting folder, with their account configuration (catalogue defaults or per-folder overrides).

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
[
  • {
    }
]

ExpenseReportSettings

Returns the full current state of the expense report settings for the accounting folder, so it can feed the settings screen and be re-posted as-is to the PUT endpoint (idempotent round-trip). A system category's `Label` is read-only (derived from the catalogue) and is ignored if re-posted to the PUT endpoint; a user category's `Label` is editable and propagated to the entry form, the accounting entries generated afterwards, and the expense report PDF. `Type` is `"system"` or `"user"`. `ReportGenerationFrequency` reflects the persisted per-folder frequency (default `"perRequest"` when no setting exists). `CounterpartAccount` reflects the persisted per-folder counterparty configuration (mode `"single"`/`"perIssuer"` and its account `Name`); it is `null` when no counterparty configuration has been set for the folder. `JournalId` is the effective posting journal driving the module's accounting entries: the per-folder configured journal when one is set, otherwise the journal named `"HA"`, otherwise the oldest journal of type `Buy`. It is omitted when the folder has no purchase journal at all.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
{
  • "Categories": [
    ],
  • "ReportGenerationFrequency": "string",
  • "CounterpartAccount": {
    },
  • "JournalId": 0
}

Reconciles the desired full state of the expense report settings for the accounting folder. The operation is atomic: either the whole batch of accounts is valid and persisted, or the request is rejected and nothing is written. This is the <b>only</b> write route for the per-category configuration (the mono-category `PATCH` was removed): `Categories` is a strict full-replace of the folder's configuration — any catalogue category absent from the batch has its override reset to the catalogue default (system category) or soft-deleted (user category, historical expense requests keep resolving it with its frozen label); an empty `Categories` list purges the whole per-folder configuration back to catalogue defaults. A user category's `Label` can be renamed here: a non-empty label is required and the new label is propagated to the entry form, the accounting entries of the open exercise, and the expense report PDF; a system category's `Label` is ignored (locked to the catalogue). `ReportGenerationFrequency` is optional: when absent, the persisted frequency is left unchanged (defaults to `"perRequest"` if none exists yet). When present, it must be `"perRequest"` or `"monthly"`, otherwise the request is rejected with 400. `CounterpartAccount` is optional: when absent, the persisted counterparty configuration is left unchanged. When present, `Mode` must be `"single"` or `"perIssuer"`; `Name` is always required (in both modes) and must be a numeric, strictly positive PCG account that exists and is usable — otherwise the request is rejected with 400. `JournalId` is optional: when absent, the persisted posting journal is left unchanged. When present it must be strictly positive, and changing it is restricted to accounting roles (accountant, chief accountant, DAF or group DAF) — any other role is rejected with 403.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The desired full-state payload.

required
Array of objects (ExpenseReportSettingsCategoryLine)
ReportGenerationFrequency
string or null
object (CounterpartAccountInput)
JournalId
integer <int32>

Responses

Request samples

Content type
{
  • "Categories": [
    ],
  • "ReportGenerationFrequency": "string",
  • "CounterpartAccount": {
    },
  • "JournalId": 0
}

Response samples

Content type
{
  • "Categories": [
    ],
  • "ReportGenerationFrequency": "string",
  • "CounterpartAccount": {
    },
  • "JournalId": 0
}

ExpenseRequests

Creates an expense request for the given accounting folder. The author is stamped server-side from the authenticated user. The trip of a mileage allowance may carry stops: `Trip.Waypoints`, optional, an ordered list of 0 to 8 stops `{ Label, Latitude?, Longitude? }` between the departure and the arrival, the two coordinates of a stop given together or not at all. `Distance` is the total distance retained, recorded as sent and never recalculated. Refused with a 400, the message naming the cause and the rank of the stop: more than 8 stops (`Trip_Waypoints_TOO_MANY`), a stop without an address (`Trip_Waypoints_Label_INVALID`), an address longer than 200 characters (`Trip_Waypoints_Label_TOO_LONG`), and the coordinates of a stop incomplete, off the globe or not finite (`WaypointCoordinatesIncomplete`, `WaypointCoordinatesOutOfRange`, `WaypointCoordinatesNotFinite`). The validation codes stay on the server, as on the other validators: their message names the cause. While the `expense-report.back.multi-stop-trips` feature flag is off, any stop is refused with a 400 whose error name is `WaypointsUnavailable`; an absent or empty list is never refused. `Trip.IsDistanceCalculated`, optional, is the caller's declaration, never checked against a calculation: `true` calculated, `false` entered without the calculation succeeding, absent when unknown; read back as sent. `true` while an address has no coordinates is refused with a 400 naming it: `CalculatedDistanceWithoutOriginCoordinates`, `CalculatedDistanceWithoutDestinationCoordinates`, or `CalculatedDistanceWithoutWaypointCoordinates` with the stop's rank. `false` asks for no reason, and no feature flag reads it. `Trip.CalculatedDistance` and `Trip.CalculatedAt`, optional, are the distance the route calculation proposed, in whole kilometres, and when: recorded as sent, never recalculated, `CalculatedAt` kept only with a calculated distance. The distance is overridden when `Distance` differs from `CalculatedDistance`, which the read model tells by `IsDistanceOverridden`, set by the server; `Trip.DistanceOverrideReason` is then required, a 400 named `DistanceOverrideReasonRequired` otherwise. The reason is trimmed, refused past 500 characters (`DistanceOverrideReasonTooLong`) and dropped when the distance is not overridden; a negative calculated distance is refused (`CalculatedDistanceMustNotBeNegative`). Without a calculated distance nothing is asked nor flagged, and the allowance is always computed on `Distance`. `Trip.IsRouteNotCalculable`, optional, is the caller's declaration that the route calculation found no route — an address it could not find, the service unavailable, no addresses to calculate from — never checked; read back as sent, absent when unknown, as on an allowance recorded before the indication existed. `true` keeps no `CalculatedDistance`, `CalculatedAt` nor `DistanceOverrideReason`, whatever the body sends: such a trip is never overridden and asks for no reason. `Trip.IsRoundTrip`, optional, is the caller's declaration that the trip is an outbound leg and its return, never checked against a calculation; read back as sent, absent when unknown, as on an allowance recorded before the indication existed. With `true`, `Distance` is the total of the outbound and return legs and `CalculatedDistance` the calculated total (`DistanceKm` of `GET routes?isRoundTrip=true`): the server never doubles nor recomputes anything, and the allowance is computed on `Distance` alone. An outbound leg and a return leg do not combine with stops: `true` with any stop is refused with a 400 named `RoundTripWithWaypoints`, before the `WaypointsUnavailable` refusal and whether or not the feature flag is on; an empty list of stops is no stop. No feature flag governs the indication.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The expense request payload.

Name
required
string
Amount
number or null <decimal>
ExpenseDate
required
string <date-time>
Comment
string or null
CategoryId
required
integer <int32>
SupportingDocumentId
integer <int32>
Array of objects or null (VatBreakdownLineDto)
object (TripDto)
FuelType
string or null
Enum: "Petrol" "Diesel" "SuperethanolE85" "Lpg" "Cng" "Electricity"
VehicleType
string or null
Enum: "PassengerCar" "CommercialVehicle"
LicensePlate
string or null
object (BreakfastDto)
Array of objects or null (GuestDto)

Responses

Request samples

Content type
{
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ]
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Lists the expense requests of the given accounting folder over an optional expense-date period, with pagination and a user-driven sort. Privileged roles (accountant, chief accountant, CEO, DAF, their group roles, read-only DAF) see all requests in the folder; any other role — including an absent or unrecognised one — sees only their own. Each item of the returned page carries its history, ordered chronologically, with the same entries as the history endpoint of a single expense request.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

query Parameters
expenseFromDate
string <date-time>

Inclusive lower bound on the expense date (optional). Requests dated before this day are excluded. When omitted, the period has no lower bound: without expenseToDate either, the listing covers the caller's whole perimeter, whatever the expense dates.

expenseToDate
string <date-time>

Inclusive upper bound on the expense date (optional). When omitted, the period is left-open (no upper bound).

validationFromDate
string <date-time>

Inclusive lower bound on the validation date (optional). When set, only validated requests dated on or after this day are returned — requests without a validation date (À valider, Refusée) are excluded.

validationToDate
string <date-time>

Inclusive upper bound on the validation date (optional). When set, only validated requests dated on or before this day are returned — requests without a validation date (À valider, Refusée) are excluded.

status
Array of strings
Items Enum: "ToValidate" "Validated" "Refused" "Reimbursed" "ToCancel" "Cancelled"

Restricts the listing to the given statuses (optional, repeatable, case-insensitive, union semantics). Omitting it returns every status except Cancelled; naming Cancelled explicitly returns the cancelled requests, and selecting all six statuses returns the whole perimeter. An unrecognised value is rejected with a 400 before reaching the query. Reimbursed is derived from the reimbursement lot carrying the expense (lot Validated or Reconciled), never from a column of its own.

sortField
string
Enum: "Name" "AuthorName" "Category" "ExpenseDate" "ValidatedAt" "CreatedAt" "Amount" "Status"

Column the whole result set is sorted on (optional): Name, AuthorName, Category (on the displayed category label), ExpenseDate, ValidatedAt, CreatedAt, Amount or Status. Defaults to ExpenseDate. An unrecognised value is rejected with a 400. Amount is the amount including VAT. Status follows the workflow order, not the alphabet of the status names: ToValidate, Validated, Reimbursed, ToCancel, Cancelled, Refused — the derived Reimbursed included. Ties are broken on the identifier.

sortDirection
string
Enum: "Ascending" "Descending"

Sort direction (optional): Ascending or Descending. Defaults to Descending.

pageNumber
integer <int32>

1-based page number (optional, defaults to 1, must be > 0).

pageSize
integer <int32>

Number of items per page (optional, defaults to 20, capped at 100, must be > 0).

authorUserId
integer <int32>

Restricts the listing to the requests of a single author (optional). It narrows the caller's own perimeter, it never widens it: a caller who only sees their own requests gets an empty page when naming a colleague.

hasReimbursement
boolean

Restricts the listing to the requests attached to a reimbursement (true) or to those no reimbursement holds (false). Optional — when omitted, both are returned. Combined with status=Validated, false yields the expenses that remain to be paid.

reimbursementId
integer <int32>

Restricts the listing to the requests carried by the given reimbursement (optional, must be > 0). Combined with authorUserId, it yields one beneficiary's expenses within that lot. Like the author filter, it narrows the caller's own perimeter and never widens it.

categoryId
Array of integers <int32> [ items <int32 > ]

Restricts the listing to the requests carrying one of the given categories (optional, repeatable, union semantics), matched on the category recorded on the request — a category deactivated since stays filterable. A bare categoryId= selects nothing and restricts nothing; an identifier unknown to the catalog matches no request, without an error.

search
string

Keyword matched against the request name, the author's display name or the category label (optional, union of the three). Trimmed; a blank keyword restricts nothing. Case-insensitive, accent-sensitive; % and _ are matched literally. The amount is not searched.

createdFromDate
string <date-time>

Inclusive lower bound on the creation date (optional), compared on the day of the server-stamped creation instant. It combines with the expense-date period rather than replacing it: a request created within the range but whose expense falls outside the period stays out.

createdToDate
string <date-time>

Inclusive upper bound on the creation date (optional), compared on the day of the server-stamped creation instant, independently of the lower bound.

Responses

Response samples

Content type
{
  • "Items": [
    ],
  • "TotalCount": 0,
  • "PageNumber": 0,
  • "PageSize": 0,
  • "TotalPages": 0
}

Replaces an expense request still awaiting validation (`ToValidate`) with the given payload, which has the shape of the creation's and goes through the very same checks: category, expense date not in the future, comment required by the category, supporting document of the folder, VAT breakdown, trip and vehicle of a mileage allowance, fuel details, usability of the accounting accounts. A full replace: an optional field omitted or null is erased, there is no partial-update semantics. The author, the folder and the status never change — the expense request stays `ToValidate` — and the modification joins the history as `Updated`, without reason and without diff. No accounting entry, document or email is produced: none exists before validation. A supporting document replaced or removed is not deleted from the document store. A category deactivated since the expense was entered is accepted as long as it is kept; choosing another deactivated category is refused (`CategoryInactive`). A mileage allowance is re-estimated without counting its own previous kilometres in the year's cumulative mileage; the amount actually due is still recomputed at validation. Reserved to the author of the expense request — any other caller, decider included, is rejected with 403 (`NotExpenseAuthor`). The authorship check runs right after the lookup and before any state or business check, so this 403 discloses only that the identifier belongs to an expense request of this folder — not its status, amount, lot or content. A caller who sees the whole folder can read it anyway; one who does not gets a 404 for the same identifier on the detail endpoint. That residual disclosure within the caller's own folder is accepted. 409, named `UpdateRequiresExpenseToValidate`, when the expense request is not `ToValidate` (validated, refused, awaiting cancellation or cancelled): nothing is then changed. A modification and a decision on the same expense request are serialized — the first one to reach the server wins: a modification arriving after a validation or a refusal gets this 409, a validation arriving after a modification validates the modified values. Two distinct 404 share this route. An unknown expense request — or one belonging to another accounting folder, deliberately indistinguishable — answers a body naming `ExpenseRequestNotFound`. The feature flag being off answers the generic problem details the framework builds for a bare not-found, naming nothing: that absence of an error name is what tells the caller the feature is off rather than the expense request missing. The trip's stops follow the creation's contract (`Trip.Waypoints`, 0 to 8 ordered stops, the same 400 refusals, `Distance` recorded as sent), and so do `Trip.IsDistanceCalculated`, `Trip.IsRouteNotCalculable`, `Trip.IsRoundTrip` and the calculated distance: the amendment records anew the `CalculatedDistance` and `CalculatedAt` it sends, and requires the reason of an overridden distance the same way. A full replace: a body without `Waypoints` erases the stops the expense request carries, one without `IsDistanceCalculated`, `IsRouteNotCalculable` or `IsRoundTrip` that indication, one without `CalculatedDistance` the calculated distance, its time and its reason. While the `expense-report.back.multi-stop-trips` feature flag is off, the 400 named `WaypointsUnavailable` refuses any stop except when the request sends back exactly the stops already carried, in the same order, so that an expense request entered with stops stays amendable; a stop added, removed, reordered or edited is refused, an absent or empty list never. The flag is read after the 404, 403 and 409 above. `RoundTripWithWaypoints` refuses any stop with `Trip.IsRoundTrip` at `true`, the stops already carried and sent back unchanged included, after the same 404, 403 and 409 and before the flag.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Request Body schema:

The full replacement payload, in the shape of the creation's.

Name
required
string
Amount
number or null <decimal>
ExpenseDate
required
string <date-time>
Comment
string or null
CategoryId
required
integer <int32>
SupportingDocumentId
integer <int32>
Array of objects or null (VatBreakdownLineDto)
object (TripDto)
FuelType
string or null
Enum: "Petrol" "Diesel" "SuperethanolE85" "Lpg" "Cng" "Electricity"
VehicleType
string or null
Enum: "PassengerCar" "CommercialVehicle"
LicensePlate
string or null
object (BreakfastDto)
Array of objects or null (GuestDto)

Responses

Request samples

Content type
{
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ]
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Deletes an expense request still awaiting validation (`ToValidate`). A soft delete: the expense request moves to `Cancelled` and joins the history as `Deleted`, without reason. It then leaves the default listing, stays readable through the detail endpoint and through the listing filtered on `Cancelled`, and can be brought back to `ToValidate` by the resubmission. Its supporting document is not removed from the document store, and no accounting entry, document or email is touched: none exists before validation. `Deleted` is what tells an expense request withdrawn before validation apart from one cancelled after it (`CancellationAccepted`): both are `Cancelled`: neither the `status` filter nor the status counters tell them apart — only the history does. Reserved to the author of the expense request — any other caller, decider included, is rejected with 403 (`NotExpenseAuthor`). The authorship check runs right after the lookup and before any state or business check, so this 403 discloses only that the identifier belongs to an expense request of this folder — not its status, amount, lot or content. A caller who sees the whole folder can read it anyway; one who does not gets a 404 for the same identifier on the detail endpoint. That residual disclosure within the caller's own folder is accepted. 409, named `DeletionRequiresExpenseToValidate`, when the expense request is not `ToValidate`: its status and history are then left untouched. Two distinct 404 share this route. An unknown expense request — or one belonging to another accounting folder, deliberately indistinguishable — answers a body naming `ExpenseRequestNotFound`. The feature flag being off answers the generic problem details the framework builds for a bare not-found, naming nothing: that absence of an error name is what tells the caller the feature is off rather than the expense request missing.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Returns a single expense request scoped to the given accounting folder, including the author's display name. Readable by its author and by the roles that see the whole folder in the listing: accountant, chief accountant, CEO, DAF, group CEO, group DAF and read-only DAF. Any other caller (an employee, or any role outside that list, Fred admin and support included) gets, for an expense request of the folder they did not file, the very 404 an unknown identifier answers: same status, same body naming `ExpenseRequestNotFound`. The opacity is deliberate: identifiers are sequential, and telling "exists but not yours" apart from "does not exist" would let an employee enumerate their colleagues' expenses. An expense request of another accounting folder answers that same 404.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Lists the authors the folder's expense requests can be filtered on: the people having filed at least one request in the folder, whatever its status — not the folder's user directory. The set is stable at the folder level: it depends on no criterion of the listing, so an author offered may match nothing once combined with the other filters. Labels come from the user directory, an author it no longer knows being kept under a fallback label; the authors are sorted by display name. Carries the listing's two gates: the folder-level policy, and the narrowing to the caller's own requests when they cannot see the whole folder — such a caller is offered only themselves, never the nominative list of the colleagues who file expenses.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
[
  • {
    }
]

Counts the folder's expense requests per status over an optional expense-date period. The base is the period and the caller's read scope only: the counters ignore every other criterion of the listing (author, category, keyword), so a tab may announce more requests than the filtered list beneath it shows. As on the listing, both bounds are optional and each applies on its own: without any, the counters cover the whole history the caller can read, in a single grouped statement on the folder's index. The six keys are always present — an absent key and a zero key do not mean the same thing to the caller — and the "all statuses" total is their sum, computed by the caller. The six keys include `Cancelled`, which the listing hides when no status is selected: their sum matches the listing's `TotalCount` only when all six statuses are selected, and exceeds the total of the unfiltered listing by the `Cancelled` count. `Reimbursed` is a status derived from the reimbursement lot that carries the expense (its lot is `Validated` or `Reconciled`); it is never written to the expense request itself. Carries the listing's two gates: the folder-level policy, and the narrowing to the caller's own requests when they cannot see the whole folder — the tabs never report folder-wide totals to an employee whose listing shows only their own rows.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

query Parameters
expenseFromDate
string <date-time>

Inclusive lower bound on the expense date (optional), as on the listing.

expenseToDate
string <date-time>

Inclusive upper bound on the expense date (optional), as on the listing.

Responses

Response samples

Content type
{
  • "ToValidate": 0,
  • "Validated": 0,
  • "Refused": 0,
  • "Reimbursed": 0,
  • "ToCancel": 0,
  • "Cancelled": 0
}

Validates the expense request: approves it and lets the accounting entry be produced. Reserved to the roles allowed to decide on an expense (DAF, CEO, group DAF, group CEO) — any other role is rejected with 403, whether or not the request is eligible. A request already decided (already validated or refused), or deleted by its author, is rejected with 409, without any further side effect. Serialized with a concurrent modification of the same expense request by a row lock held from the read to the commit: a validation reaching the server after a modification validates the values it just recorded, never a stale read.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Rejects the expense request with a free-text reason, so no accounting entry is produced for it. `Reason` is mandatory, capped at 500 characters, and persisted as entered so it can be carried to the issuer (notification and history entry). Reserved to the roles allowed to decide on an expense (DAF, CEO, group DAF, group CEO) — any other role is rejected with 403, whether or not the request is eligible. A request already decided (already validated or refused), or deleted by its author, is rejected with 409, without any further side effect. Serialized with a concurrent modification of the same expense request by a row lock held from the read to the commit: a refusal reaching the server after a modification refuses the values it just recorded, never a stale read.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Request Body schema:

The rejection payload carrying the reason.

Reason
required
string

Responses

Request samples

Content type
{
  • "Reason": "string"
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Asks for the cancellation of a validated expense request, with a free-text reason: the expense request moves to `ToCancel` and the reason joins the history as `CancellationRequested`. No accounting entry is touched by this gesture — the expense request keeps whichever entry it had posted, and only the acceptance below removes it. Reserved to the author of the expense request — any other caller is rejected with 403 (`NotExpenseAuthor`). The authorship check runs right after the lookup and before any state or business check, so this 403 discloses only that the identifier belongs to an expense request of this folder — not its status, amount, lot or content. A caller who sees the whole folder can read it anyway; one who does not gets a 404 for the same identifier on the detail endpoint. That residual disclosure within the caller's own folder is accepted. `Reason` is mandatory and capped at 500 characters. 409, named `CancellationRequiresValidatedExpense`, when the expense request is not `Validated`. 409, named `ExpenseCommittedToReimbursement`, when it is carried by a reimbursement lot, whatever the lot's progress: the message names the lot by its identifier, followed by its name when it has one, and the lot identifier is also returned as the error's parameter. In both cases its status and history are then left untouched. Two distinct 404 share this route. An unknown expense request — or one belonging to another accounting folder, deliberately indistinguishable — answers a body naming `ExpenseRequestNotFound`. The feature flag being off answers the generic problem details the framework builds for a bare not-found, naming nothing: that absence of an error name is what tells the caller the feature is off rather than the expense request missing. The dated history, including this event and its reason, is read through `GET …/{expenseRequestId}/history`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Request Body schema:

The cancellation request payload carrying the reason.

Reason
required
string

Responses

Request samples

Content type
{
  • "Reason": "string"
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Withdraws the cancellation request the author has filed, bringing the expense request back to `Validated`: the withdrawal joins the history as `CancellationWithdrawn`, and neither the accounting entry nor its posting fields are touched. No mail is sent — nobody else has acted on the request. Withdrawing then filing a new cancellation request is allowed. Reserved to the author of the expense request — any other caller, decider included, is rejected with 403 (`NotExpenseAuthor`). The authorship check runs right after the lookup and before any state or business check, so this 403 discloses only that the identifier belongs to an expense request of this folder — not its status, amount, lot or content. A caller who sees the whole folder can read it anyway; one who does not gets a 404 for the same identifier on the detail endpoint. That residual disclosure within the caller's own folder is accepted. 409, named `NoPendingCancellationRequest`, when the expense request is not `ToCancel` — its status and history are then left untouched. Two distinct 404 share this route. An unknown expense request — or one belonging to another accounting folder, deliberately indistinguishable — answers a body naming `ExpenseRequestNotFound`. The feature flag being off answers the generic problem details the framework builds for a bare not-found, naming nothing: that absence of an error name is what tells the caller the feature is off rather than the expense request missing. The dated history, including this event, is read through `GET …/{expenseRequestId}/history`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Accepts the cancellation request: the expense request moves to `Cancelled`, its accounting entry is deleted (never reversed by a counter-entry) and the acceptance joins the history as `CancellationAccepted`. An expense request validated without ever posting an entry is cancelled without any remote call. The author is then notified by email, on a best-effort basis: a failure to send never fails the gesture. Reserved to the roles allowed to decide on an expense (DAF, CEO, group DAF, group CEO) — any other role is rejected with 403, whether or not the expense request exists. 409, named `NoPendingCancellationRequest`, when the expense request is not `ToCancel` — its status, entry and history are then left untouched, and accounting is never called. The cause of a refused deletion is read from accounting's own refusal, never pre-checked: accounting refuses the deletion as a whole, and that deletion runs under the same unit of work as the status switch, so a refusal undoes the switch without anything having been deleted — the expense request stays `ToCancel`, the entry and its history untouched. Four causes are named in 409: `AccountingEntryValidated` (the accountant validated the entry), `AccountingExerciseLocked`, `AccountingPeriodClosed` and `AccountingFolderClosed`. 503, named `AccountingUnavailable`, when accounting's answer leaves the entry's fate indeterminate (network failure, timeout, or a 5xx/408 from accounting): the gesture can be retried safely once accounting is reachable again — refusing the cancellation instead could leave a `Validated` expense whose entry has actually been deleted. Any other refusal falls back to 417 (`AccountingBackendError`). Two distinct 404 share this route. An unknown expense request — or one belonging to another accounting folder, deliberately indistinguishable — answers a body naming `ExpenseRequestNotFound`. The feature flag being off answers the generic problem details the framework builds for a bare not-found, naming nothing: that absence of an error name is what tells the caller the feature is off rather than the expense request missing. The dated history, including this event, is read through `GET …/{expenseRequestId}/history`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Declines the cancellation request with a free-text reason: the expense request moves back to `Validated`, its accounting entry and its posting fields are left untouched, and the decline joins the history as `CancellationDeclined`, carrying the reason. The author is then notified by email, on a best-effort basis: a failure to send never fails the gesture. Reserved to the roles allowed to decide on an expense (DAF, CEO, group DAF, group CEO) — any other role is rejected with 403, whether or not the expense request exists. `Reason` is mandatory and capped at 500 characters. 409, named `NoPendingCancellationRequest`, when the expense request is not `ToCancel` — its status, entry and history are then left untouched. Two distinct 404 share this route. An unknown expense request — or one belonging to another accounting folder, deliberately indistinguishable — answers a body naming `ExpenseRequestNotFound`. The feature flag being off answers the generic problem details the framework builds for a bare not-found, naming nothing: that absence of an error name is what tells the caller the feature is off rather than the expense request missing. The dated history, including this event and its reason, is read through `GET …/{expenseRequestId}/history`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Request Body schema:

The decline payload carrying the reason.

Reason
required
string

Responses

Request samples

Content type
{
  • "Reason": "string"
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Resubmits a refused or cancelled expense request for a new decision: it moves back to `ToValidate`, its validation date, refusal reason, accounting entry id and posting fields are cleared, and the resubmission joins the history as `Resubmitted`, without a reason. No accounting call is made and no email is sent. The expense request can then be validated again, which posts a new accounting entry. A mileage allowance is repriced as at entry, on the current characteristics of its vehicle and the cumulative of its trip's year, itself excluded: the returned `Amount` is the recomputed one. Any other expense keeps its amount, as does an allowance while the `expense-report.back.vehicle-edition` feature flag is off. A deleted vehicle answers 400 (`VehicleDeleted`); a locked one refuses nothing. Reserved to the author of the expense request — any other caller is rejected with 403 (`NotExpenseAuthor`). The authorship check runs right after the lookup and before any state or business check, so this 403 discloses only that the identifier belongs to an expense request of this folder — not its status, amount, lot or content. A caller who sees the whole folder can read it anyway; one who does not gets a 404 for the same identifier on the detail endpoint. That residual disclosure within the caller's own folder is accepted. 409, named `ResubmissionRequiresRefusedOrCancelledExpense`, when the expense request is neither `Refused` nor `Cancelled` — its status and history are then left untouched. Two distinct 404 share this route. An unknown expense request — or one belonging to another accounting folder, deliberately indistinguishable — answers a body naming `ExpenseRequestNotFound`. The feature flag being off answers the generic problem details the framework builds for a bare not-found, naming nothing: that absence of an error name is what tells the caller the feature is off rather than the expense request missing. The dated history, including the former refusal reason, is read through `GET …/{expenseRequestId}/history`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "AuthorUserId": 0,
  • "AuthorName": "string",
  • "Name": "string",
  • "Amount": 0,
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "Comment": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidatedAt": "2019-08-24T14:15:22Z",
  • "CategoryId": 0,
  • "SupportingDocumentId": 0,
  • "VatBreakdown": [
    ],
  • "Trip": {
    },
  • "FuelType": "Petrol",
  • "VehicleType": "PassengerCar",
  • "LicensePlate": "string",
  • "Breakfast": {
    },
  • "Guests": [
    ],
  • "ExternalId": "string",
  • "Status": "ToValidate",
  • "ReimbursementId": 0,
  • "ReimbursementName": "string",
  • "Ht": 0,
  • "Tva": 0,
  • "History": [
    ]
}

Returns the dated history of the expense request's state changes, in chronological order: the status reached, when it occurred (UTC), the acting user's display name, and the reason for a refusal, a cancellation request or its decline. Readable by exactly the callers who can read the detail endpoint; any other caller gets the same 404 as for an unknown identifier, same body naming `ExpenseRequestNotFound`. Validations, refusals and the cancellation request (`CancellationRequested`, with its reason), its withdrawal by the author (`CancellationWithdrawn`, without one), its acceptance (`CancellationAccepted`, without one), its decline (`CancellationDeclined`, with its reason) and the author's resubmission (`Resubmitted`, without one) are traced, as are a replacement by the author (`Updated`, without reason) and a deletion by the author (`Deleted`, without reason). `Created` is only written for expense requests entered since the history existed; the oldest ones carry none.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

expenseRequestId
required
integer <int32>

The expense request identifier.

Responses

Response samples

Content type
[
  • {
    }
]

Simulates the mileage allowance amount for a prospective trip in the given accounting folder, without persisting anything. The amount is the marginal "recalculated cumulative right" (droit cumulé recalculé − déjà versé) for the trip distance, computed on the current calendar-year cumulative mileage of the vehicle for the authenticated user in the folder. The vehicle is either a saved one (`vehicleId`) or one not saved yet, described by `vehicleType`, `vehicleEnergy`, `vehicleFiscalPower` and `vehiclePriorKilometers`; exactly one of the two is required. For an unsaved vehicle the cumulative mileage is its `vehiclePriorKilometers` of the current calendar year alone, since no expense request can reference a vehicle that does not exist yet, and the amount is the one recorded for the same data once the vehicle is created, on an expense dated in the current calendar year. The vehicle model does not enter the scale and is not asked for.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

query Parameters
distance
integer <int32>

The trip distance in kilometres (must be strictly positive).

vehicleId
integer <int32>

The saved vehicle identifier; the cumulative right is tracked per vehicle and per user. Exclusive with the vehicle* parameters: exactly one of the two ways of naming the vehicle is required.

excludedExpenseRequestId
integer <int32>

Optional. The expense request being edited: its own kilometres are left out of the cumulative mileage, so the simulated amount is the one its modification will record — for an expense dated in the current calendar year, since the simulation always computes on it. Omitted, every expense request of the year counts. An identifier matching none of the caller's mileage allowances for this vehicle changes nothing, and so does any identifier when the vehicle is unsaved: no expense request can reference a vehicle that does not exist yet.

vehicleType
string
Enum: "PassengerCar" "Motorcycle" "Moped"

Unsaved vehicle: its type (PassengerCar, Motorcycle or Moped). Required as soon as any vehicle* parameter is given. The vehicle model is not asked for: it does not enter the scale.

vehicleFiscalPower
string
Enum: "Car3OrLess" "Car4" "Car5" "Car6" "Car7OrMore" "Moto1To2" "Moto3To5" "MotoOver5"

Unsaved vehicle: its fiscal power. Required for a passenger car or a motorcycle, forbidden for a moped, and it has to belong to the vehicle type.

vehicleEnergy
string
Enum: "Combustion" "Electric" "Hybrid"

Unsaved vehicle: its energy (Combustion, Electric or Hybrid). Required as soon as any vehicle* parameter is given.

vehiclePriorKilometers
integer <int32>

Unsaved vehicle: the kilometres already driven this calendar year (UTC) before the first trip declared here (optional, must not be negative). Omitted, it counts as 0.

Responses

Response samples

Content type
0
0

FavoriteGuests

Saves a favorite guest for the given accounting folder. The owner is stamped server-side from the caller. The last name, first name, job title and company are all required; each is trimmed, its inner spaces collapsed, and bounded to 100 characters (400 otherwise). Saving a guest the caller already holds — same four fields, without regard to case or surrounding spaces — creates nothing and answers 200 with the favorite already saved, as it was first entered.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The favorite guest payload.

LastName
string or null
FirstName
string or null
JobTitle
string or null
Company
string or null

Responses

Request samples

Content type
{
  • "LastName": "string",
  • "FirstName": "string",
  • "JobTitle": "string",
  • "Company": "string"
}

Response samples

Content type
{
  • "Id": 0,
  • "LastName": "string",
  • "FirstName": "string",
  • "JobTitle": "string",
  • "Company": "string"
}

Lists the favorite guests owned by the caller in the given accounting folder, in alphabetical order (last name, first name, job title, company, case ignored). The scope stays the caller's own favorites, never widened by a folder-wide role.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
[
  • {
    }
]

FavoriteTrips

Saves a favorite trip for the given accounting folder. The owner is stamped server-side from the caller. Coordinates are sent per endpoint, absent or complete, never half filled; a favorite saved without them keeps none for good — nothing geocodes it afterwards. The distance is in whole kilometers; with `IsRoundTrip` it is the total of the outbound and return legs, as on an expense request, never the one-way route. The name is trimmed and must be unique for the caller in the folder, compared without regard to case or surrounding spaces; a name already taken answers 400. A favorite may carry stops: `Waypoints`, optional, the same ordered list of 0 to 8 stops `{ Label, Latitude?, Longitude? }` as the trip of an expense request, between the departure and the arrival. `Distance` is then the total of the route through its stops, recorded as sent and never recalculated. While the `expense-report.back.multi-stop-trips` feature flag is off, a body carrying any stop is refused with a 400 named `WaypointsUnavailable`, before any of its stops is checked; an absent or empty list is never refused. Otherwise the stops are refused with a 400 whose error name is the cause, the message naming the rank of the stop: more than 8 stops (`TooManyWaypoints`, checked before any stop), a stop without an address (`WaypointLabelRequired`), an address longer than 200 characters (`WaypointLabelTooLong`), and the coordinates of a stop incomplete, off the globe or not finite (`WaypointCoordinatesIncomplete`, `WaypointCoordinatesOutOfRange`, `WaypointCoordinatesNotFinite`). `IsRoundTrip` with any stop is refused with a 400 named `RoundTripWithWaypoints`, before the feature flag is read. A refused favorite is not saved. `CalculatedDistance` and `DistanceOverrideReason`, optional, are kept from the trip the favorite comes from: the distance the route calculation proposed, in whole kilometers, recorded as sent and never recalculated, and the reason why `Distance` differs from it. No reason is required here, the expense request asks for it when the favorite is used. The reason is dropped unless `CalculatedDistance` is sent and differs from `Distance`; once kept, it is trimmed and refused past 500 characters (`DistanceOverrideReasonTooLong`). A negative calculated distance is refused (`CalculatedDistanceMustNotBeNegative`).

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The favorite trip payload.

Name
required
string
Origin
required
string
OriginLatitude
number or null <double>
OriginLongitude
number or null <double>
Destination
required
string
DestinationLatitude
number or null <double>
DestinationLongitude
number or null <double>
Distance
required
integer <int32>
IsRoundTrip
required
boolean
Array of objects or null (WaypointDto)
CalculatedDistance
integer <int32>
DistanceOverrideReason
string or null

Responses

Request samples

Content type
{
  • "Name": "string",
  • "Origin": "string",
  • "OriginLatitude": 0.1,
  • "OriginLongitude": 0.1,
  • "Destination": "string",
  • "DestinationLatitude": 0.1,
  • "DestinationLongitude": 0.1,
  • "Distance": 0,
  • "IsRoundTrip": true,
  • "Waypoints": [
    ],
  • "CalculatedDistance": 0,
  • "DistanceOverrideReason": "string"
}

Response samples

Content type
{
  • "Id": 0,
  • "Name": "string",
  • "Origin": "string",
  • "OriginLatitude": 0.1,
  • "OriginLongitude": 0.1,
  • "Destination": "string",
  • "DestinationLatitude": 0.1,
  • "DestinationLongitude": 0.1,
  • "Distance": 0,
  • "CalculatedDistance": 0,
  • "DistanceOverrideReason": "string",
  • "IsRoundTrip": true,
  • "Waypoints": [
    ]
}

Lists the favorite trips owned by the caller in the given accounting folder, ordered by name. The scope stays the caller's own favorites, never widened by a folder-wide role. Each favorite always carries its `Waypoints`, in the order saved, empty for a favorite without stops, whether the `expense-report.back.multi-stop-trips` feature flag is on or off. Each favorite carries its `CalculatedDistance` and `DistanceOverrideReason`, both null for a favorite saved without a calculated distance.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
[
  • {
    }
]

LaundryAccounts

Reads the couple of accounts of the folder: its charge account and its owner contribution account, 615500 and 108100 while the folder has recorded none. Reserved to the accountant, the chief accountant, the DAF and the group DAF: any other role, and a DAF who also holds the read-only DAF role, answers 403.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
{
  • "ChargeAccount": "string",
  • "OwnerContributionAccount": "string"
}

Records the couple of accounts of the folder, each verified in the folder's chart of accounts (PCG); answers the couple recorded, as the GET does. Refused in 400: `ChargeAccount_REQUIRED`, `OwnerContributionAccount_REQUIRED`, then `AccountNotFound` or `AccountNotImpactable`, which names the account refused by its role; nothing is recorded when either account is refused. Answers 417 `AccountingBackendError` when the accounting does not return the chart of accounts. Reserved as the GET is: any other role, and a DAF who also holds the read-only DAF role, answers 403.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The charge account and the owner contribution account.

ChargeAccount
string or null
OwnerContributionAccount
string or null

Responses

Request samples

Content type
{
  • "ChargeAccount": "string",
  • "OwnerContributionAccount": "string"
}

Response samples

Content type
{
  • "ChargeAccount": "string",
  • "OwnerContributionAccount": "string"
}

LaundryArticles

Creates an article of the folder, its label and its reference price, in its version 1; answers the article with its `ArticleId`, its label stored without its surrounding spaces, its reference price and its version. Refused in 400 before any write: `Label_REQUIRED` (a label missing or blank), `Label_TOO_LONG` (a label above 200 characters once trimmed), `ReferencePrice_REQUIRED`, `ReferencePrice_INVALID` (a reference price at 0 or below), `ReferencePrice_SCALE_INVALID` (not a whole number of cents: `1.800` is accepted as `1.80`), `LaundryArticleLabelAlreadyUsed` (a label already carried by an article of the folder, case, accents and surrounding spaces ignored, inner spaces counted as one). Reserved to the accountant, the chief accountant, the DAF and the group DAF: any other role, and a DAF who also holds the read-only DAF role, answers 403.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The label and the reference price of the article.

Label
string or null
ReferencePrice
number or null <decimal>

Responses

Request samples

Content type
{
  • "Label": "string",
  • "ReferencePrice": 0
}

Response samples

Content type
{
  • "ArticleId": 0,
  • "Label": "string",
  • "ReferencePrice": 0,
  • "Version": 0
}

Changes the label or the reference price of an article of the folder, a full state as the creation takes it: the article keeps its `ArticleId` and is recorded in its next version, its previous version kept; answers the article with its label, its reference price and its new version. When the standard day in force counts the article (a quantity per day above 0), the same gesture records the next version of the standard day: the same quantities, the same discount, the new label and the new reference price, the caller as its author and a reason written by the module (`Prix de « Blouses » passé de 2,80 € à 3,00 €`); the months not yet submitted are computed on it, a submitted month keeps its own version. An article at 0 per day records no version of the standard day. Refused in 400 before any write, as the creation is: `Label_REQUIRED`, `Label_TOO_LONG`, `ReferencePrice_REQUIRED`, `ReferencePrice_INVALID`, `ReferencePrice_SCALE_INVALID`, `LaundryArticleLabelAlreadyUsed` (a label carried by another article of the folder, the article itself excluded), nothing recorded. Answers 404 `LaundryArticleNotFound` for an article unknown, of another folder, or removed. Reserved to the accountant, the chief accountant, the DAF and the group DAF: any other role, and a DAF who also holds the read-only DAF role, answers 403.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

articleId
required
integer <int32>

The article identifier.

Request Body schema:

The label and the reference price of the article, a full replacement.

Label
string or null
ReferencePrice
number or null <decimal>

Responses

Request samples

Content type
{
  • "Label": "string",
  • "ReferencePrice": 0
}

Response samples

Content type
{
  • "ArticleId": 0,
  • "Label": "string",
  • "ReferencePrice": 0,
  • "Version": 0
}

Removes an article from the folder. The removal is logical, never physical: the article is no longer shown nor proposed by the standard day, and a composition that sends it answers 400 `LaundryArticleUnknown`, while the versions of the standard day and the months that used it keep it. Answers 400 `LaundryArticleInStandardDay` while the standard day in force counts the article (a quantity per day above 0), nothing removed: the firm first sets it to 0 in a new version of the standard day, with a reason. Answers 404 `LaundryArticleNotFound` for an article unknown, of another folder, or already removed. Reserved as the change is: any other role, and a DAF who also holds the read-only DAF role, answers 403.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

articleId
required
integer <int32>

The article identifier.

Responses

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

LaundryDeclarations

Computes, without recording anything, what declaring `workedDays` for the month would give: per article of the standard day version frozen on the month if it is submitted, otherwise of the latest version, its quantity (days × quantity per day), its retained price (reference price less the discount, rounded to the cent) and its amount, then the total of the lines and the version of the standard day used. No VAT. A `workedDays` that is missing (`WorkedDays_REQUIRED`), negative (`WorkedDays_NEGATIVE`), above 31 (`WorkedDays_TOO_HIGH`) or not a whole number answers 400, a month that does not exist (outside 1 to 12) 400 `DeclarationMonthInvalid`, a missing `year` or `month` 400 `Year_REQUIRED` or `Month_REQUIRED`. As the submission does, a month whose first day is after today (Paris time) answers 400 `LaundryDeclarationMonthInFuture`, and more days worked than the month counts 400 `WorkedDaysExceedMonthLength`; the future month wins over the days. A folder whose standard day the firm has not composed answers 417 `LaundryStandardDayNotComposed`, before any statement or entry.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

query Parameters
year
integer <int32>

The year of the declared month, for instance 2026.

month
integer <int32>

The declared month, from 1 (January) to 12 (December).

workedDays
integer <int32>

The days worked in the month: a whole number from 0 to 31.

Responses

Response samples

Content type
{
  • "Articles": [
    ],
  • "Total": 0,
  • "StandardDayVersion": 0
}

Submits the days worked in a month: the server computes the declaration on the folder's current standard day (never on a preview), records it and freezes it. With days worked, its entry is booked without the firm's validation in the folder's expense report journal (debit the folder's charge account tagged `Blanchissage`, credit its owner contribution account, 615500 and 108100 while the folder has recorded none, dated the last day of the month) and the month answers `Posted`; with 0 day it answers `Entered`, with no entry and no statement. With days worked, the monthly statement is first rendered in PDF and deposited in the folder's GED (« Relevé mensuel blanchissage — <mois> <année> », one per folder and month), then the entry leaves with it attached; `StatementDocumentId` is its GED identifier, absent with 0 day. A statement that cannot be rendered or deposited answers 417 `LaundryDeclarationStatementFailed`, nothing recorded and no entry. One declaration and one entry per month and per folder: submitting the same days again answers the declaration already recorded, with no second entry; any other number of days on a submitted month answers 409 `LaundryDeclarationAlreadySubmitted`. A `workedDays` that is missing (`WorkedDays_REQUIRED`), negative (`WorkedDays_NEGATIVE`), above 31 (`WorkedDays_TOO_HIGH`) or not a whole number answers 400, a month that does not exist (outside 1 to 12) 400 `DeclarationMonthInvalid`. Before any statement or entry, a month whose first day is after today (Paris time) answers 400 `LaundryDeclarationMonthInFuture`, and more days worked than the month counts 400 `WorkedDaysExceedMonthLength`; the future month wins over the days. A refusal the accounting names answers 409: `AccountingExerciseLocked` or `AccountingPeriodClosed` (the month is closed in the accounting), `AccountingFolderClosed` (the folder accepts no more entry), `AccountingExerciseNotOpened` (the month precedes the first open exercise); nothing is recorded nor frozen, the deposited statement is withdrawn from the GED, and the same month can be submitted again once the period reopens. An outcome the accounting does not confirm (a timeout, or a server error with no known name) answers 503 `AccountingUnavailable`: nothing is recorded, the statement stays in the GED and the next submission replaces it. Any other refusal answers 417 `AccountingBackendError`. The declarant is the authenticated user; the read-only DAF is refused in 403. A folder whose standard day the firm has not composed answers 417 `LaundryStandardDayNotComposed`, before any statement or entry.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

year
required
integer <int32>

The year of the declared month.

month
required
integer <int32>

The declared month, from 1 to 12.

Request Body schema:

The days worked in the month.

WorkedDays
integer <int32>

Responses

Request samples

Content type
{
  • "WorkedDays": 0
}

Response samples

Content type
{
  • "Year": 0,
  • "Month": 0,
  • "WorkedDays": 0,
  • "Articles": [
    ],
  • "Total": 0,
  • "StandardDayVersion": 0,
  • "Status": "Entered",
  • "SubmittedAt": "2019-08-24T14:15:22Z",
  • "StatementDocumentId": 0
}

Reads a declared month as it was computed at its submission, whatever the standard day became since. `StatementDocumentId` is the GED identifier of its monthly statement, absent for a month of 0 day: the statement opens and exports through the GED. A month never declared answers 404 `LaundryDeclarationNotFound`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

year
required
integer <int32>

The year of the declared month.

month
required
integer <int32>

The declared month, from 1 to 12.

Responses

Response samples

Content type
{
  • "Year": 0,
  • "Month": 0,
  • "WorkedDays": 0,
  • "Articles": [
    ],
  • "Total": 0,
  • "StandardDayVersion": 0,
  • "Status": "Entered",
  • "SubmittedAt": "2019-08-24T14:15:22Z",
  • "StatementDocumentId": 0
}

LaundryStandardDay

Reads the folder's standard day to compose it: each article of the folder, in the order of their creation, with its `ArticleId`, its reference price, its retained price (the reference price less the discount, rounded to the cent as the declaration does) and its quantity per day in the latest version, 0 when the version does not hold it, then the discount and the amount of a day. Before any composition, `Version`, `EffectiveDate`, `AuthorUserId` and `Reason` are null, every article is at 0 per day and `DailyAmount` is 0; a folder without any article answers no article. Reserved to the accountant, the chief accountant, the DAF and the group DAF: any other role, and a DAF who also holds the read-only DAF role, answers 403.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
{
  • "Version": 0,
  • "EffectiveDate": "2019-08-24",
  • "AuthorUserId": 0,
  • "Reason": "string",
  • "Discount": 0,
  • "Articles": [
    ],
  • "DailyAmount": 0
}

Composes the folder's standard day, with a reason, and records its next version, dated the day of the recording (Paris time), its author being the caller; answers the standard day as the GET does, with the version, its effective date, its author, the reason, the discount and the amount of a day (quantity × retained price, summed). An article of the folder absent from the body counts 0 per day. The `Discount` is optional, a fraction (0.20 for 20 %): absent, the new version keeps the discount of the version in force, 0.20 for the first one. Refused in 400 before any write: `Reason_REQUIRED` (a reason missing or blank), `Reason_TOO_LONG` (a reason above 500 characters), `QuantityPerDay_NEGATIVE`, `LaundryArticleUnknown` (an `ArticleId` that is not an article of the folder, one of another folder included), `LaundryArticleDuplicated` (the same article twice), `LaundryStandardDayEmpty` (every quantity at 0), `Discount_INVALID` (a discount out of its bounds: below 0, or 1 or more), `Discount_SCALE_INVALID` (more than four decimals). Reserved as the GET is: any other role, and a DAF who also holds the read-only DAF role, answers 403.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The reason, the quantity per day of each article and, optionally, the discount.

Reason
string or null
Array of objects or null (ComposedLaundryArticle)
Discount
number or null <decimal>

Responses

Request samples

Content type
{
  • "Reason": "string",
  • "Articles": [
    ],
  • "Discount": 0
}

Response samples

Content type
{
  • "Version": 0,
  • "EffectiveDate": "2019-08-24",
  • "AuthorUserId": 0,
  • "Reason": "string",
  • "Discount": 0,
  • "Articles": [
    ],
  • "DailyAmount": 0
}

OfferSynchronization

Re-reads the features the folder's offer entitles it to and converges the module onto them: grants the module access when the offer covers expense reports, revokes it when it no longer does. Convergent and idempotent: the folder's current entitlement is read on every call, so replaying the operation is safe and the order of the calls does not matter.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier.

Responses

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

ReimbursementReconciliation

Records what the accounting side was observed to hold for an entry, and converges the reimbursement that produced it: fully lettered transit line, the lot is reconciled and dated; partly lettered or unlettered, it is not. Convergent and idempotent: the observation is an absolute state rather than a change, so replaying it is safe and the order of the calls does not matter.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier.

Request Body schema:

The entry observed, and the lettering it carries.

LetterId
required
integer <int32>

The letter carrying the entry's transit line.

State
required
string
Enum: "NotReconciled" "PartiallyReconciled" "Reconciled"

The reconciliation that lettering amounts to.

AccountingEntryId
integer <int32>

The entry the lettering was observed on, when the observation names one. Completing a partial letter only reports the lines it just added — never the transit line lettered at the first step — so that observation names the letter alone, and the reimbursement is then resolved by the letter it memorised.

LetteredAt
string or null <date-time>

The letter's accounting date, when the observation carries one.

Responses

Request samples

Content type
{
  • "LetterId": 0,
  • "State": "NotReconciled",
  • "AccountingEntryId": 0,
  • "LetteredAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Reimbursements

Lists the accounting folder's reimbursements, most recent first, optionally restricted to the given statuses. Each row's name, payment date and issuing account are the lot's own; its total, beneficiary count and expense count are derived from the expenses it carries; its validation date and whether it holds a credit transfer file are the lot's own too, and let a caller offer the download without reading each lot back. The issuing account's IBAN is returned in clear — it identifies the company, not an employee. Consultation is open to anyone allowed to see the whole folder — a DAF in read-only included — and refused to a caller who only sees their own expenses.

A lot still in preparation carries no validation date at all: ValidationDate is left out of the payload rather than serialized to null.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

query Parameters
statuses
Array of strings
Items Enum: "Preparing" "Validated" "Reconciled"

Restricts the listing to the given statuses (optional, repeatable, union semantics — omitted means every status). An unrecognised value is rejected with a 400 before reaching the query.

pageNumber
integer <int32>

1-based page number (optional, defaults to 1).

pageSize
integer <int32>

Page size (optional, defaults to 20, capped at 100).

Responses

Response samples

Content type
{
  • "Items": [
    ],
  • "TotalCount": 0,
  • "PageNumber": 0,
  • "PageSize": 0,
  • "TotalPages": 0
}

Constitutes a reimbursement out of the selected expenses, named by the gestionnaire, dated for payment and optionally carrying the issuing account from which the transfer will depart. Reserved to the roles allowed to prepare a reimbursement — anyone who sees the whole folder and is not read-only. That capability is deliberately independent of the one needed to decide on an expense: validating an expense and paying it are two decisions, so a chief accountant who cannot validate can still prepare.

account is optional at this stage — the lot can be constituted before its issuing account is known, and validation is what enforces it (IbanRequiredForSepa, 417).

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The identifiers of the expenses to reimburse, the lot's name, its payment date and, optionally, its issuing account.

ExpenseRequestIds
required
Array of integers <int32> [ items <int32 > ]
Name
required
string
PaymentDate
required
string <date>
object (ReimbursementAccountInput)

Responses

Request samples

Content type
{
  • "ExpenseRequestIds": [
    ],
  • "Name": "string",
  • "PaymentDate": "2019-08-24",
  • "Account": {
    }
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "Status": "Preparing",
  • "Name": "string",
  • "PaymentDate": "2019-08-24",
  • "BankAccountId": 0,
  • "Iban": "string",
  • "Bic": "string",
  • "BankCoordinatesHistory": [
    ],
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidationDate": "2019-08-24T14:15:22Z",
  • "TotalAmount": 0,
  • "ExpenseCount": 0,
  • "HasTransferFile": true,
  • "AccountingEntryId": 0,
  • "HasAnomaly": true,
  • "AnomalyCode": "string",
  • "Reconciliation": {
    },
  • "Beneficiaries": [
    ],
  • "Transfers": [
    ]
}

Corrects the name, payment date and issuing account of a reimbursement still in preparation. A full replace on the three fields this route carries: an omitted, null or empty `account` erases the issuing account's coordinates altogether, there is no partial-update semantics and no sentinel for "unchanged". Reserved to the roles allowed to prepare a reimbursement. Does not carry the lot's expense lines — that belongs to a later alignment.

Functional refusal (417) — switch on Errors[].Name: ReimbursementCannotBeUpdated when the lot is not in preparation any more. This is distinct from the 417 a caller gets from losing an optimistic-concurrency race against another write on the same lot (InvalidStatusTransition): the first names a refusal on a lot the request found already moved on, the second a request that got there second.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

reimbursementId
required
integer <int32>

The reimbursement identifier.

Request Body schema:

The corrected name, payment date and issuing account.

Name
required
string
PaymentDate
required
string <date>
object (ReimbursementAccountInput)

Responses

Request samples

Content type
{
  • "Name": "string",
  • "PaymentDate": "2019-08-24",
  • "Account": {
    }
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "Status": "Preparing",
  • "Name": "string",
  • "PaymentDate": "2019-08-24",
  • "BankAccountId": 0,
  • "Iban": "string",
  • "Bic": "string",
  • "BankCoordinatesHistory": [
    ],
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidationDate": "2019-08-24T14:15:22Z",
  • "TotalAmount": 0,
  • "ExpenseCount": 0,
  • "HasTransferFile": true,
  • "AccountingEntryId": 0,
  • "HasAnomaly": true,
  • "AnomalyCode": "string",
  • "Reconciliation": {
    },
  • "Beneficiaries": [
    ],
  • "Transfers": [
    ]
}

Returns a reimbursement with its per-beneficiary summary: how much is owed to each employee, over how many expenses, and the IBAN on file for them. The summary is part of the reimbursement's representation, not a sub-resource, and is never paginated. A beneficiary's IBAN is only ever returned masked; the lot's own issuing account is returned in clear, coordinates history included — it identifies the company, not an employee — but masked in the transfer orders it emitted, which carry no other bank value. `HasIban` and `MaskedIban` always tell the IBAN on file today, whatever the lot's status. `Transfers` lists every credit transfer order the lot emitted, the current one first: one per validation, kept when the lot is invalidated (`Superseded`, with when and by whom, authors named when the directory resolves them). A lot back in preparation that lists one has already handed an order over, and validating it again emits another. On a validated or reconciled lot whose order is recorded, each line also carries the masked IBAN that order credits (`TransferredMaskedIban`) and whether the IBAN on file differs from it (`IbanChangedSinceTransfer`, compared on the full value: two IBANs can share a mask). Both are absent on a lot in preparation and on a lot validated before orders were recorded — never filled with the IBAN on file. Each beneficiary line also flags, for the control that precedes the payment: its last IBAN change (`LastIbanChange`: date, `FirstEntry` or `Replacement`, whether it was entered on behalf of the holder, the author's name when it was, whether the IBAN is the author's own account in the folder (`IbanMatchesAuthorOwnAccount`), whether it is recent and whether it is later than the lot's creation) and whether another employee of the folder holds the same IBAN (`SharesIbanWithAnotherEmployee`, a bare boolean). The flags inform and never block. They are about the IBAN the lot pays: the transferred one when the order is recorded — the change shown is then the one that produced it — and the IBAN on file otherwise. A change is recent within 120 hours before the reference, or since the lot was created; the reference is the reading instant while the lot is in preparation, and the instant its order was emitted once validated (its validation date for a lot validated before orders were recorded). A beneficiary with neither an IBAN on file nor a line in the recorded order carries no flag. Consultation is open to anyone allowed to see the whole folder, and refused to a caller who only sees their own expenses — a read-only DAF included, who can read the issuing account without being able to change it.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

reimbursementId
required
integer <int32>

The reimbursement identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "Status": "Preparing",
  • "Name": "string",
  • "PaymentDate": "2019-08-24",
  • "BankAccountId": 0,
  • "Iban": "string",
  • "Bic": "string",
  • "BankCoordinatesHistory": [
    ],
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidationDate": "2019-08-24T14:15:22Z",
  • "TotalAmount": 0,
  • "ExpenseCount": 0,
  • "HasTransferFile": true,
  • "AccountingEntryId": 0,
  • "HasAnomaly": true,
  • "AnomalyCode": "string",
  • "Reconciliation": {
    },
  • "Beneficiaries": [
    ],
  • "Transfers": [
    ]
}

Abandons a reimbursement being prepared: the expenses it carried go back to being payable, and cancellable, and the lot is deleted for good, without any trace of the lot itself; the transfer orders it emitted before an invalidation are kept, outside the lot. Reserved to the roles allowed to prepare a reimbursement.

Not found (404) — ReimbursementNotFound when the folder holds no such lot.

Functional refusal (417) — InvalidStatusTransition when the lot is not in preparation any more (validated, reconciled), with no side effect. A lot validated then invalidated is back in preparation and abandons like any other. The same refusal is what the loser of two concurrent gestures on the lot gets — nothing is replayed server side.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

reimbursementId
required
integer <int32>

The reimbursement identifier.

Responses

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Adds the selected expenses to a reimbursement being prepared and returns the lot with its recomputed summary. The gesture is additive, never a replacement of the lot's selection, and all or nothing: one ineligible expense and none is added. Reserved to the roles allowed to prepare a reimbursement.

Not found (404) — ReimbursementNotFound when the folder holds no such lot.

Conflict (409) — the same refusals as the constitution, one error per offending expense, its identifier in Errors[].Parameters: ExpenseAlreadyInReimbursement (this lot included), ExpenseNotValidated. ExpenseSelectionChangedDuringPreparation when the selection moved meanwhile, or names an expense the folder does not hold.

Functional refusal (417) — InvalidStatusTransition when the lot is not in preparation any more (validated, reconciled), with no side effect; also what the loser of two concurrent gestures on the same lot gets. The caller reads the lot back and retries.

Unprocessable (422) — EmptySelection, or SelectionTooLarge when the lot would carry more than 5,000 expenses once completed.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

reimbursementId
required
integer <int32>

The reimbursement identifier.

Request Body schema:

The identifiers of the expenses to add.

ExpenseRequestIds
required
Array of integers <int32> [ items <int32 > ]

Responses

Request samples

Content type
{
  • "ExpenseRequestIds": [
    ]
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "Status": "Preparing",
  • "Name": "string",
  • "PaymentDate": "2019-08-24",
  • "BankAccountId": 0,
  • "Iban": "string",
  • "Bic": "string",
  • "BankCoordinatesHistory": [
    ],
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidationDate": "2019-08-24T14:15:22Z",
  • "TotalAmount": 0,
  • "ExpenseCount": 0,
  • "HasTransferFile": true,
  • "AccountingEntryId": 0,
  • "HasAnomaly": true,
  • "AnomalyCode": "string",
  • "Reconciliation": {
    },
  • "Beneficiaries": [
    ],
  • "Transfers": [
    ]
}

Removes one expense from a reimbursement being prepared, so it goes back to being payable, and cancellable. A lot is never empty: removing its last expense deletes the lot for good, the transfer orders it emitted before an invalidation being kept outside it. Reserved to the roles allowed to prepare a reimbursement.

Not found (404) — switch on Errors[].Name: ReimbursementNotFound when the folder holds no such lot, ExpenseNotInReimbursement when the lot does not carry that expense.

Functional refusal (417) — InvalidStatusTransition when the lot is not in preparation any more (validated, reconciled), with no side effect. It is also what the loser of two concurrent gestures on the same lot gets — two removals included, even of two different expenses: nothing is replayed server side, the caller reads the lot back and retries.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

reimbursementId
required
integer <int32>

The reimbursement identifier.

expenseRequestId
required
integer <int32>

The expense request to remove from the lot.

Responses

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Validates a reimbursement: the lot is closed for preparation and its SEPA credit transfer file becomes available for download, and the credit transfer order it carries is recorded, listed in `Transfers` of the returned lot. Reserved to the roles allowed to prepare a reimbursement. Nothing is sent: the issuing account and the payment date are the lot's own, captured at preparation time, and the label carried in the file is the lot's name.

The payment of a reimbursement is behind its own feature flag, on top of the preparation one the controller carries: turning preparation on does not turn validation on.

A payment date that has elapsed by the time of the validation — the lot waited in preparation, or was invalidated and is validated again later — is moved to the validation day rather than refused: the transfer file requests an execution that day, and the returned lot carries it. A payment date still to come is kept.

The whole enchainment runs under one unit of work — the file is kept and the lot transitions, or neither happens: the file store is enrolled as a transactional component, so a rollback erases what it wrote.

Functional refusals (417) — switch on Errors[].Name: IbanRequiredForSepa when the lot has no issuing account, DebtorNameUnknown when the accounting folder's own name cannot be resolved, DebtorNameNotSepaCompatible when that name carries no character the SEPA charset keeps, ReimbursementHasNoExpenseRequests when the lot carries no expense, EmployeeMustHaveIban when a beneficiary has no bank account on file, BeneficiaryNameNotSepaCompatible when a beneficiary's name carries no character the SEPA charset keeps either, and InvalidStatusTransition when the lot is not in preparation any more — which is what a second validation gets, deliberately not a 409, and what the loser of two concurrent validations gets too.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

reimbursementId
required
integer <int32>

The reimbursement identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "Status": "Preparing",
  • "Name": "string",
  • "PaymentDate": "2019-08-24",
  • "BankAccountId": 0,
  • "Iban": "string",
  • "Bic": "string",
  • "BankCoordinatesHistory": [
    ],
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidationDate": "2019-08-24T14:15:22Z",
  • "TotalAmount": 0,
  • "ExpenseCount": 0,
  • "HasTransferFile": true,
  • "AccountingEntryId": 0,
  • "HasAnomaly": true,
  • "AnomalyCode": "string",
  • "Reconciliation": {
    },
  • "Beneficiaries": [
    ],
  • "Transfers": [
    ]
}

Invalidates a validated reimbursement: the lot returns to preparation and loses its validation date, its credit transfer file reference and its accounting entry, which is deleted at the accounting side. The credit transfer order it carried is kept, marked `Superseded` with the invalidation's date and author, and stays listed in `Transfers`. Reserved to the roles allowed to prepare a reimbursement.

Validating again emits a second credit transfer order, with identifiers of its own. The first one may already have reached the bank: the file is handed over for deposit, so the module cannot know.

Functional refusal (417) — switch on Errors[].Name: InvalidStatusTransition when the lot is not validated — one still in preparation, and a reconciled one, which is settled and does not reopen here.

Accounting refusal (409/503/417) — accounting refuses the deletion of the passing entry as a whole, and that deletion runs under the same unit of work as the status switch, so a refusal undoes the switch without anything having been deleted and the lot stays Validated. Named in 409: AccountingEntryValidated, AccountingExerciseLocked, AccountingPeriodClosed and AccountingFolderClosed. 503, named AccountingUnavailable, when accounting's answer leaves the entry's fate indeterminate (network failure, timeout, or a 5xx/408 from accounting): the gesture can be retried safely once accounting is reachable again. Any other refusal falls back to 417 (AccountingBackendError).

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

reimbursementId
required
integer <int32>

The reimbursement identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "Status": "Preparing",
  • "Name": "string",
  • "PaymentDate": "2019-08-24",
  • "BankAccountId": 0,
  • "Iban": "string",
  • "Bic": "string",
  • "BankCoordinatesHistory": [
    ],
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ValidationDate": "2019-08-24T14:15:22Z",
  • "TotalAmount": 0,
  • "ExpenseCount": 0,
  • "HasTransferFile": true,
  • "AccountingEntryId": 0,
  • "HasAnomaly": true,
  • "AnomalyCode": "string",
  • "Reconciliation": {
    },
  • "Beneficiaries": [
    ],
  • "Transfers": [
    ]
}

Returns a temporary, signed URL to the SEPA credit transfer file of a validated reimbursement — not the file itself. Reserved to the roles allowed to prepare a reimbursement.

The file served is the one kept at validation, never a fresh one. Its identifiers are drawn anew at each production, so regenerating would hand back a different document than the one the bank holds. There is no limit on how many times it can be fetched, and each link issued is journalled, naming the lot's current order.

Functional refusal (417) — switch on Errors[].Name: ReimbursementHasNoTransferFile when the lot carries no file yet, rather than an empty success.

A link, opened by navigation — not a redirect, not a fetch. Same shape as Paiement's own download route: the front opens the returned URL with window.open rather than following it as an HTTP redirect. A redirect would mean the browser's own request chases it cross-origin, which would need a CORS rule granted on every storage account this route can point at just so Content-Disposition stays readable. A navigation triggers no CORS at all: the browser honours Content-Disposition natively, which is what names the download for the user — the front never reads the name off this response either way.

The route always answers a link — there is no direct-file fallback. Only a store able to sign a temporary URL can serve this route; the disk-backed store R6's one-off migration still needs cannot, and asking it here is a configuration fault the route fails loudly on, not a business refusal to soften.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

reimbursementId
required
integer <int32>

The reimbursement identifier.

Responses

Response samples

Content type
"string"

ReimbursementTransfers

Lists the credit transfer orders of the accounting folder, most recently emitted first, whatever their status and whether or not the lot that emitted them still exists — an order of a deleted lot is only discoverable here. Rows carry the header only, never the lines. Consultation is open to anyone allowed to see the whole folder — a DAF in read-only included — and refused to a caller who only sees their own expenses.

Bad request (400) — an unknown status, a non-positive page number or page size, or a paymentInformationId longer than 35 characters.

        A lot invalidated then validated again reuses its payment information identifier, so
        filtering on it lists every order that lot ever emitted. `ReimbursementName` on a row is
        the lot's current name, left out once the lot is deleted.
Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

query Parameters
statuses
Array of strings
Items Enum: "Current" "Superseded"

Restricts the listing to the given statuses (optional, repeatable, union semantics — omitted means every status). An unrecognised value is rejected with a 400 before reaching the query.

reimbursementDeleted
boolean

true keeps the orders whose lot no longer exists, false those whose lot still does (optional — omitted means both).

paymentInformationId
string

Keeps the orders carrying exactly this payment information identifier (optional). It is shared by every order of a lot, so it finds them all, the superseded ones and those of a lot since deleted included. At most 35 characters.

pageNumber
integer <int32>

1-based page number (optional, defaults to 1).

pageSize
integer <int32>

Page size (optional, defaults to 20, capped at 100).

Responses

Response samples

Content type
{
  • "Items": [
    ],
  • "TotalCount": 0,
  • "PageNumber": 0,
  • "PageSize": 0,
  • "TotalPages": 0
}

Reads one credit transfer order: its header and the lines it carried, whatever its status and whether the lot that emitted it still exists. Consultation is open to anyone allowed to see the whole folder — a DAF in read-only included — and refused to a caller who only sees their own expenses.

Not found (404) — ReimbursementTransferNotFound. An unknown identifier and the identifier of an order of another accounting folder answer the very same status and body: the opacity is deliberate, identifiers being sequential, and it only ever covers the isolation between folders.

What the lines carry.CreditorName and RemittanceInformation are the values recorded when the order was emitted, before they were put in SEPA format for the file, which is why they can differ from the file's. An IBAN is only ever returned masked (MaskedIban, the IBAN the order credits); IbanChangedSinceTransfer tells whether the IBAN the employee holds today differs from it, compared on the full value, and is true when the employee holds none any more. EmployeeDisplayName and the authors' names are left out when the directory does not resolve them — never replaced by an identifier.

The header.ReimbursementId is always the emitting lot's identifier; ReimbursementName is that lot's current name, which can have been changed since the order was emitted, and is left out once the lot is deleted (IsReimbursementDeleted). IsFileServed tells the state of the order — only the current order of a lot serves its file — not whether the caller may download it. A lot invalidated then validated again reuses its payment information identifier: PaymentInformationId is therefore the same on every order of a lot, whereas MessageId is not.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

transferId
required
integer <int32>

The transfer order identifier, as listed in a lot's Transfers.

Responses

Response samples

Content type
{
  • "Header": {
    },
  • "Lines": [
    ]
}

Returns a temporary, signed URL to the SEPA credit transfer file of an order — not the file itself — and only for the current order of a lot. Reserved to the roles allowed to prepare a reimbursement.

Not found (404) — ReimbursementTransferNotFound, for an unknown identifier and for the identifier of an order of another accounting folder alike: same status, same body, the opacity being deliberate and limited to the isolation between folders. Never answered as a 409.

Conflict (409) — SupersededTransferFileNotServed when the order is no longer the current one of its lot, because the lot was invalidated and possibly validated again. The file of a superseded order is never served, by any route: it has been replaced in the application, which does not cancel an order already handed to the bank, and handing the same instruction over a second time would expose the company to a second execution. Only the file of the current order is downloadable, through this route or through the lot's own transfer file route, which serve the same file under the same name.

A link, opened by navigation — not a redirect, not a fetch, exactly like the lot's route. Each link issued is traced with its order, its lot, its folder and the caller, and so is each refusal; a link already issued stays valid until it expires, even if the lot is invalidated meanwhile.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

transferId
required
integer <int32>

The transfer order identifier, as listed in a lot's Transfers.

Responses

Response samples

Content type
"string"

Routes

Returns the road route between two points, optionally through up to 8 ordered stops, carrying its outcome: `Calculated` with the distance in whole kilometres, `NoRouteFound` when no road route joins them, or `SameEndpoints` when both points are identical. All three are business answers, hence a 200: only a 5xx means the routing service itself is unavailable. All four coordinates are required: a missing one is an integration error answered by a 400, never by a business outcome computed on a defaulted point. Without stops the answer is that of a single leg. With stops, the routing service is asked one leg at a time between consecutive points, and the distance is the sum of the exact lengths of the legs, rounded once to the kilometre. `NoRouteFound` as soon as one leg has no route; `SameEndpoints` as soon as two consecutive points are identical (a route coming back to its departure through its stops is computed); a 5xx as soon as the routing service fails on one leg, whatever the other legs answered. A distance is never returned for part of a route. A point the routing service refuses to route counts as a leg without a route, never as an unavailability, with or without stops. On `NoRouteFound`, `UnrecognizedAddressIndexes` names the addresses to blame by their position (0 the departure, then the stops in order, then the arrival): a stop whose two legs have no route; the departure or the arrival when its leg has none and its neighbouring stop is not to blame; both ends of a leg without a route between two stops reached through their other leg. It is empty for any other outcome, and for a route without stops. The two stop lists are repeatable, ordered and of the same length: `waypointLatitudes=45.7&waypointLatitudes=47.2` pairs, by rank, with `waypointLongitudes=-0.6&waypointLongitudes=-1.5`. Refused with a 400: more than 8 stops (`Waypoints_TOO_MANY`), lists of different lengths (`Waypoints_INCOMPLETE`), a coordinate off the globe or not finite (`WaypointCoordinatesOutOfRange`, `WaypointCoordinatesNotFinite`, naming the stop's rank), and any stop while the `expense-report.back.multi-stop-trips` feature flag is off (error name `WaypointsUnavailable`); a request without stops never depends on the flag. The validation codes stay on the server, as on the other validators: their message names the cause. `isRoundTrip` is optional: `false` or absent gives the one-way route above, unchanged. At `true` the routing service is also asked for the way back, from the arrival to the departure, recalculated in the reverse direction (one-way streets make it differ from the outbound leg) and never doubled: it is a second call, with no feature flag. `DistanceKm` is then the sum of the exact lengths of both legs, rounded once to the kilometre; `OutboundDistanceKm` and `ReturnDistanceKm` are the outbound and return legs, each rounded on its own, so their sum may differ from `DistanceKm` by one kilometre. Both are absent unless the outcome is `Calculated` for a round trip. `NoRouteFound` as soon as either direction has no route, with `UnrecognizedAddressIndexes` empty; a 5xx as soon as the routing service fails on either. A round trip is only for a route without stops: any stop with `isRoundTrip` at `true` is refused with a 400 named `RoundTripWithWaypoints`, before the feature flag is read and without calling the routing service.

Authorizations:
oauth2
query Parameters
originLatitude
required
number <double>

Latitude of the departure point, required, between -90 and 90.

originLongitude
required
number <double>

Longitude of the departure point, required, between -180 and 180.

destinationLatitude
required
number <double>

Latitude of the arrival point, required, between -90 and 90.

destinationLongitude
required
number <double>

Longitude of the arrival point, required, between -180 and 180.

waypointLatitudes
Array of numbers <double> [ items <double > ]

Latitudes of the stops, in route order, between -90 and 90. Up to 8 values, as many as waypointLongitudes; omitted for a route without stops, an empty value being refused with a 400.

waypointLongitudes
Array of numbers <double> [ items <double > ]

Longitudes of the stops, in route order, between -180 and 180. Up to 8 values, as many as waypointLatitudes; omitted for a route without stops, an empty value being refused with a 400.

isRoundTrip
boolean

Optional; true asks for the way back as well, on a route without stops only. false or absent is the one-way route.

Responses

Response samples

Content type
{
  • "Outcome": "Calculated",
  • "DistanceKm": 0,
  • "UnrecognizedAddressIndexes": [
    ],
  • "OutboundDistanceKm": 0,
  • "ReturnDistanceKm": 0
}

Returns a static map preview of the road route between two points, optionally through up to 8 ordered stops, as a composed PNG image: the module fetches the background and draws the trace itself, so the route geometry never leaves the back end. When no route can be found, or when both endpoints are identical, there is nothing to draw, hence a 204 for both: unlike the route calculation endpoint above, these are not business answers carried in a 200 body, because there is no image contract that could represent "no route" without either lying (a background centred on the two points) or disclosing the employee's home location for no purpose. Only a 5xx means the routing or map background service itself is unavailable, or answered a trace that strays more than 5 km from a requested point. The stops are those of the route calculation, with the same refusals: the same two repeatable, ordered lists of the same length, a 400 for more than 8 stops (`Waypoints_TOO_MANY`), lists of different lengths (`Waypoints_INCOMPLETE`), a coordinate off the globe or not finite (`WaypointCoordinatesOutOfRange`, `WaypointCoordinatesNotFinite`), and any stop while the `expense-report.back.multi-stop-trips` feature flag is off (`WaypointsUnavailable`); the validation codes stay on the server, their message names the cause. The image traces every leg in route order, a green point on the departure, a red one on the arrival (above the green on a route coming back to its departure), and a smaller grey point, without number, on each stop. A 204 as soon as one leg has no route or two consecutive points are identical: part of a route is never drawn. A request without stops is a single leg, and never depends on the flag. `isRoundTrip` is that of the route calculation, with the same refusal: at `true` on a route without stops, the way back from the arrival to the departure is asked as well and drawn after the outbound leg, in the same trace. The return adds no point: the green one stays on the departure and the red one on the arrival. A 204 as soon as either direction has no route, a 5xx when the return trace strays more than 5 km from either of its two points, and a 400 named `RoundTripWithWaypoints` with any stop, before the feature flag is read and without calling any service.

Authorizations:
oauth2
query Parameters
originLatitude
required
number <double>

Latitude of the departure point, required, between -90 and 90.

originLongitude
required
number <double>

Longitude of the departure point, required, between -180 and 180.

destinationLatitude
required
number <double>

Latitude of the arrival point, required, between -90 and 90.

destinationLongitude
required
number <double>

Longitude of the arrival point, required, between -180 and 180.

waypointLatitudes
Array of numbers <double> [ items <double > ]

Latitudes of the stops, in route order, between -90 and 90. Up to 8 values, as many as waypointLongitudes; omitted for a route without stops, an empty value being refused with a 400.

waypointLongitudes
Array of numbers <double> [ items <double > ]

Longitudes of the stops, in route order, between -180 and 180. Up to 8 values, as many as waypointLatitudes; omitted for a route without stops, an empty value being refused with a 400.

isRoundTrip
boolean

Optional; true asks for the way back as well, on a route without stops only. false or absent is the one-way route.

Responses

SupportingDocuments

Uploads a supporting document (PDF, JPEG or PNG) to the GED for the given accounting folder. Returns the GED document identifier, which can then be referenced when creating an expense request, or a vehicle as its registration document. Each upload records who made it, in which folder: only its uploader can then declare it as a vehicle's registration document. A document uploaded and never referenced stays in the GED.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema: multipart/form-data
file
string <binary>

The file to upload (multipart/form-data, field name: file).

Responses

Response samples

Content type
{
  • "DocumentId": 0
}

Runs ephemeral OCR pre-fill analysis on the uploaded file. The file is uploaded temporarily to the GED, analysed via the Accounting-Documents OCR pipeline, then deleted — nothing is persisted. Returns field suggestions (merchant name, expense date, TTC amount) and the read VAT breakdown (rate / base HT / VAT amount per line). Always returns 200 — upload failure, OCR failure, or cross-folder access yields empty suggestions.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema: multipart/form-data
file
string <binary>

The file to analyse (multipart/form-data, field name: file).

Responses

Response samples

Content type
{
  • "MerchantName": "string",
  • "ExpenseDate": "2019-08-24T14:15:22Z",
  • "AmountTtc": 0,
  • "CurrencyCode": "string",
  • "VatLines": [
    ]
}

VehicleImports

Deposits a CSV or Excel (.xlsx) file of employees' vehicles for preview. Nothing is created by this call: the response is the import and its report, `Reported` when every line can be applied, `Rejected` as soon as one line is in error — such an import can never be applied. Each faulty line is reported with its row, the column in cause and the reason — the registration number being required, checked and unique in the folder and in the file, naming neither vehicle nor owner. The file is refused as a whole in `417`, naming its cause: `ImportFileUnreadable`, `ImportFileColumnsMissing` (the missing columns are named), `ImportFileTooManyRows`, `ImportFileFormatNotSupported` (neither a CSV nor an .xlsx workbook) or `UserDirectoryUnavailable` (the folder's employees could not be read, and the call can be retried). A file larger than the upload limit answers a plain `400`, with no error name: the multipart form limit stops it before this action runs, as for the employee bank account import. Reserved to the roles covered by `CanEnterBankAccountOnBehalf` on the folder of the route, never the read-only DAF: `403` otherwise.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema: multipart/form-data
file
string <binary>

The file to deposit (multipart/form-data, field name: file).

Responses

Response samples

Content type
{
  • "ImportId": 0,
  • "State": "Reported",
  • "SubmittedOn": "2019-08-24T14:15:22Z",
  • "SubmittedByUserId": 0,
  • "AppliedOn": "2019-08-24T14:15:22Z",
  • "AppliedByUserId": 0,
  • "CancelledOn": "2019-08-24T14:15:22Z",
  • "CancelledByUserId": 0,
  • "Counts": {
    },
  • "Lines": [
    ]
}

Lists the folder's applied and cancelled imports, the most recently applied first, without their lines (an import's report is read through `Get`): each with its dates, its counts and the person who applied it (`AppliedBy`), every author named through a single call to the folder's directory, one it no longer knows as `Utilisateur #<id>`. A deposit never applied, a rejected one included, is not listed. Refused with `403` under the same conditions as `Deposit`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
[
  • {
    }
]

Returns an import's report: the preview before `apply`, or what was created after it. Open to any holder of the capability in the folder, not only the depositor. An importId that is valid but belongs to another folder answers the same `404` (`ImportNotFound`), with an identical body, as one that does not exist at all: identifiers are sequential, so the response must never confirm the existence of another folder's import. Refused with `403` under the same conditions as `Deposit`. Once the import is cancelled, the report also carries `CancelledOn`, `CancelledByUserId`, the `Removed` and `Kept` counts and, on the line of each vehicle kept, `KeptBecause`; until then those fields are empty.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

importId
required
integer <int32>

The import identifier.

Responses

Response samples

Content type
{
  • "ImportId": 0,
  • "State": "Reported",
  • "SubmittedOn": "2019-08-24T14:15:22Z",
  • "SubmittedByUserId": 0,
  • "AppliedOn": "2019-08-24T14:15:22Z",
  • "AppliedByUserId": 0,
  • "CancelledOn": "2019-08-24T14:15:22Z",
  • "CancelledByUserId": 0,
  • "Counts": {
    },
  • "Lines": [
    ]
}

Applies an import: creates the vehicle of every line for its employee, with its prior mileage, all of them or none. The folder's employees are read again, and a line whose employee has left the folder since the deposit puts the import in error. An import already applied answers `409` (`ImportAlreadyApplied`), an import with a line in error `409` (`ImportHasErrors`), a cancelled import `409` (`ImportCancelled`); none writes anything, and the import keeps its state. See `Get` for the `404` opacity this action shares with it, and `Deposit` for its `403`. A registration number taken since the deposit refuses the application with `409` (`LicensePlatesTakenSinceDeposit`), naming it; two confirmations sent at once are serialised, one applies and the other is refused. A line deposited before registration numbers were checked whose number is unreadable, or that two lines share, answers `409` (`LicensePlatesNoLongerValid`), naming the rows: deposit the file again.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

importId
required
integer <int32>

The import identifier.

Responses

Response samples

Content type
{
  • "ImportId": 0,
  • "State": "Reported",
  • "SubmittedOn": "2019-08-24T14:15:22Z",
  • "SubmittedByUserId": 0,
  • "AppliedOn": "2019-08-24T14:15:22Z",
  • "AppliedByUserId": 0,
  • "CancelledOn": "2019-08-24T14:15:22Z",
  • "CancelledByUserId": 0,
  • "Counts": {
    },
  • "Lines": [
    ]
}

Cancels an applied import: the vehicles it created that carry no mileage allowance — none, or only refused or cancelled ones — are removed with their prior mileage, and those that carry one are kept, awaiting validation (`VehicleInUse`) or in the books, validated or whose cancellation is requested (`VehicleLocked`), the line of each kept vehicle naming why in `KeptBecause`. All or nothing: a vehicle whose version moved since it was read is read again with its allowances, and a failure removes none. A vehicle already deleted by hand counts among the removed ones, and an import whose every vehicle is kept is cancelled all the same. The response is the import's report, `Cancelled`, with `CancelledOn`, `CancelledByUserId` and the `Removed` and `Kept` counts, `Created` keeping the number of vehicles the import created. An import already cancelled answers `200` with the same report and writes nothing. An import never applied, `Reported` or `Rejected`, answers `409` (`ImportNotApplied`). See `Get` for the `404` opacity this action shares with it, and `Deposit` for its `403`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

importId
required
integer <int32>

The import identifier.

Responses

Response samples

Content type
{
  • "ImportId": 0,
  • "State": "Reported",
  • "SubmittedOn": "2019-08-24T14:15:22Z",
  • "SubmittedByUserId": 0,
  • "AppliedOn": "2019-08-24T14:15:22Z",
  • "AppliedByUserId": 0,
  • "CancelledOn": "2019-08-24T14:15:22Z",
  • "CancelledByUserId": 0,
  • "Counts": {
    },
  • "Lines": [
    ]
}

Returns the template of the file this import reads, named `modele-import-vehicules-salaries-v1.xlsx` by its `Content-Disposition`: an Excel workbook whose single sheet, « Véhicules », carries a header built from the columns the deposit reads, in their order, then one example line written with the labels the deposit recognizes. Deposited as is, it is never refused for a missing column; its example line, whose e-mail belongs to no folder, is reported rejected for `EmployeeNotFoundForEmail`. It is the same for every folder: it carries none of the folder's data, and serving it reads neither the folder's directory nor the database. Refused with `403` under the same conditions as `Deposit`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Vehicles

Creates a vehicle for the given accounting folder. The owner is stamped server-side from the authenticated user. Behind the store flag `expense-report.back.vehicle-edition`, the vehicle may carry its French licence plate, `LicensePlate`: optional, the vehicle being declared without one when it is absent, empty or blank; when provided, SIV `AB-123-CD` or FNI `1234 AB 75` (400 `LicensePlateInvalid`), not already carried by a vehicle of the folder that is not deleted, whoever owns it, compared on its normalised form (400 `LicensePlateAlreadyUsed`); it is stored and answered normalised. Off, `LicensePlate` is ignored: neither checked, nor stored, nor answered. Behind the same flag, the vehicle may carry its registration document (carte grise), `RegistrationDocumentId`: optional; when provided, the identifier a `POST .../supporting-documents` of the authenticated user returned in this folder, still in the folder's GED and attached to no expense request nor any vehicle, deleted ones included, otherwise 400 `RegistrationDocumentInvalid`, whatever the reason. Off, `RegistrationDocumentId` is ignored.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Request Body schema:

The vehicle payload.

Model
required
string
VehicleType
required
string
Enum: "PassengerCar" "Motorcycle" "Moped"
FiscalPower
string or null
Enum: "Car3OrLess" "Car4" "Car5" "Car6" "Car7OrMore" "Moto1To2" "Moto3To5" "MotoOver5"
Energy
required
string
Enum: "Combustion" "Electric" "Hybrid"
PriorKilometers
required
integer <int32>
LicensePlate
string or null
RegistrationDocumentId
integer <int32>

Responses

Request samples

Content type
{
  • "Model": "string",
  • "VehicleType": "PassengerCar",
  • "FiscalPower": "Car3OrLess",
  • "Energy": "Combustion",
  • "PriorKilometers": 0,
  • "LicensePlate": "string",
  • "RegistrationDocumentId": 0
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "OwnerUserId": 0,
  • "Model": "string",
  • "VehicleType": "PassengerCar",
  • "FiscalPower": "Car3OrLess",
  • "Energy": "Combustion",
  • "PriorKilometers": 0,
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "RegistrationDocumentId": 0,
  • "State": "Unused",
  • "LicensePlate": "string"
}

Lists the vehicles owned by the authenticated user in the given accounting folder. Each user only ever sees their own vehicles, regardless of role. Behind the store flag `expense-report.back.vehicle-edition`, each vehicle carries its `State`, derived from its mileage allowances: `Unused` (none, or only refused or cancelled ones), `InUse` (at least one awaiting validation, none in the books), `Locked` (at least one in the books: validated, or whose cancellation is requested). Off, `State` is omitted. Each vehicle also carries its normalised `LicensePlate`, omitted for a vehicle without one and while the flag is off.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

Responses

Response samples

Content type
[
  • {
    }
]

Returns a single vehicle scoped to the given accounting folder, provided it is owned by the authenticated user. A vehicle owned by another user in the same folder returns 404, not 403, to avoid disclosing its existence. Carries the same `State` and `LicensePlate` as the list, omitted while `expense-report.back.vehicle-edition` is off.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

vehicleId
required
integer <int32>

The vehicle identifier.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "OwnerUserId": 0,
  • "Model": "string",
  • "VehicleType": "PassengerCar",
  • "FiscalPower": "Car3OrLess",
  • "Energy": "Combustion",
  • "PriorKilometers": 0,
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "RegistrationDocumentId": 0,
  • "State": "Unused",
  • "LicensePlate": "string"
}

Replaces the characteristics of a vehicle owned by the authenticated user, or, through the manager's door, of any vehicle of the folder, with the creation's body: model, type, fiscal power, energy and prior kilometres. Every mileage allowance of the vehicle still awaiting validation is recomputed in the same transaction; a decided one is never touched. Prior kilometres are dated to the current year only when their value changes. The licence plate is optional and, when provided, follows the creation's rules (400 `LicensePlateInvalid`, `LicensePlateAlreadyUsed`, the vehicle's own plate excepted); an absent plate keeps the vehicle's existing one, so a plate is never erased. The registration document is not part of a correction: a `RegistrationDocumentId` sent is ignored and the vehicle keeps its own, replaced or removed through `.../registration-document` only. A vehicle carrying a mileage allowance in the books (validated, or whose cancellation is requested) is locked: any correction, prior kilometres included, answers 409 `VehicleLocked` and changes nothing. The manager's door opens on every vehicle of the folder that is not deleted, whoever owns it, under two conditions: the store flag `expense-report.back.employees-vehicles` on, and a role covered by `CanManageEmployeeVehicles` — chief executive, DAF (their group roles included), chartered accountant, chief accounting officer; never the read-only DAF. No positioning on the folder is required. The vehicle stays its owner's, and the manager becomes its last author. A caller who views the whole folder without that role answers 403 `VehicleManagementForbidden` on any vehicle that is not theirs — unknown, of another folder, or their own once deleted included — while the owner's door stays open to them. An invalid body still answers 400 first. Anyone else — an employee, or anyone but the owner while `employees-vehicles` is off — gets the 404 `VehicleNotFound` of an unknown vehicle for a vehicle owned by another user, to avoid disclosing its existence. Behind the store flag `expense-report.back.vehicle-edition`: off, the route answers a bare 404, with no error name.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

vehicleId
required
integer <int32>

The vehicle identifier.

Request Body schema:

The vehicle's new characteristics, a full replacement.

Model
required
string
VehicleType
required
string
Enum: "PassengerCar" "Motorcycle" "Moped"
FiscalPower
string or null
Enum: "Car3OrLess" "Car4" "Car5" "Car6" "Car7OrMore" "Moto1To2" "Moto3To5" "MotoOver5"
Energy
required
string
Enum: "Combustion" "Electric" "Hybrid"
PriorKilometers
required
integer <int32>
LicensePlate
string or null

Responses

Request samples

Content type
{
  • "Model": "string",
  • "VehicleType": "PassengerCar",
  • "FiscalPower": "Car3OrLess",
  • "Energy": "Combustion",
  • "PriorKilometers": 0,
  • "LicensePlate": "string"
}

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "OwnerUserId": 0,
  • "Model": "string",
  • "VehicleType": "PassengerCar",
  • "FiscalPower": "Car3OrLess",
  • "Energy": "Combustion",
  • "PriorKilometers": 0,
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "RegistrationDocumentId": 0,
  • "State": "Unused",
  • "LicensePlate": "string"
}

Deletes a vehicle owned by the authenticated user, or, through the manager's door of `PUT`, any vehicle of the folder, as long as no mileage allowance holds it: none, or only refused or cancelled ones. The deletion is soft: the vehicle leaves the list and the selector, answers 404 `VehicleNotFound` to every later gesture on it, and its registration document stays in the GED. A vehicle carrying a mileage allowance awaiting validation answers 409 `VehicleInUse`; one carrying a mileage allowance in the books (validated, or whose cancellation is requested) answers 409 `VehicleLocked`; nothing is deleted. The manager's door opens with the same two conditions as on `PUT`, and the same 403: a caller who views the whole folder without the role answers `VehicleManagementForbidden` on any vehicle that is not theirs, unknown, of another folder, or their own once deleted included. Anyone else gets, for a vehicle owned by another user, unknown or already deleted, the 404 `VehicleNotFound`, not 403, to avoid disclosing its existence. A mileage allowance created, amended, resubmitted or estimated on a deleted vehicle then answers 400 `VehicleDeleted`. Behind the store flag `expense-report.back.vehicle-edition`: off, the route answers a bare 404, with no error name.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

vehicleId
required
integer <int32>

The vehicle identifier.

Responses

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Imports or replaces the registration document (carte grise) of a vehicle. The owner can do it, and so can a manager under the same conditions as on `PUT .../vehicles/{vehicleId}`. A locked vehicle is accepted and no mileage allowance moves. A vehicle has at most one registration document. A new one replaces the previous one, which is purged from the GED after the commit, never before. Of two concurrent deposits, the last one recorded wins and the other is purged. The document is stored as-is, without OCR. 403 `VehicleManagementForbidden` to a caller who views the whole folder without the manager role. 404 `VehicleNotFound` to anyone else for another user's vehicle, so as not to disclose it. Every refusal comes before anything is sent to the GED. 417 when the GED refuses the upload.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

vehicleId
required
integer <int32>

The vehicle identifier.

Request Body schema: multipart/form-data
file
string <binary>

The registration document file (multipart/form-data, field name: file).

Responses

Response samples

Content type
{
  • "Id": 0,
  • "AccountingFolderId": 0,
  • "OwnerUserId": 0,
  • "Model": "string",
  • "VehicleType": "PassengerCar",
  • "FiscalPower": "Car3OrLess",
  • "Energy": "Combustion",
  • "PriorKilometers": 0,
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "RegistrationDocumentId": 0,
  • "State": "Unused",
  • "LicensePlate": "string"
}

Removes the registration document (carte grise) of a vehicle. The same callers as for the import can do it, a locked vehicle included. The document is purged from the GED after the commit, never before. Idempotent: on a vehicle without a registration document, nothing happens and it still returns 204. Refuses as the import does: 403 `VehicleManagementForbidden`, or 404 `VehicleNotFound`.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

The accounting folder identifier (tenant scope).

vehicleId
required
integer <int32>

The vehicle identifier.

Responses

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}