API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · expenses

Expense Schema

ID du schéma
expense
Collection
expenses
Autorisations
  • Lireexpense_view
  • Créerexpense_create
  • Modifierexpense_edit
  • Supprimerexpense_delete
Relations

Champs

Expense Schema

expenses4 autorisations

Schema for validating expense entities

userIduuidobligatoire

User ID who recorded this expense

datedateobligatoire

Date of the expense (ISO date format)

categorystringobligatoire

Expense category

TRAVELMATERIALLICENSINGACCOMMODATIONMEALSSHIPPINGOTHER
descriptionstringobligatoire

Expense description

1–1000 caractères
amountstringobligatoire

Gross amount in EUR as decimal string

Motif
currencystringobligatoire

Currency code (ISO 4217)

MotifPar défaut : "EUR"
taxRatenumberobligatoire

VAT rate as percentage (e.g., 19 for 19%)

0 – 100Par défaut : 19
netAmountstringobligatoire

Net amount (computed) in EUR as decimal string

Motif
receiptAttachmentIduuidfacultatif

Receipt attachment UUID

nullable
ticketIduuidfacultatif→ ticket

Associated ticket UUID

nullable
projectIduuidfacultatif→ project

Associated project UUID

nullable
partyIduuidfacultatif

Associated party/customer UUID

nullable
contractIduuidfacultatif

Associated contract UUID

nullable
billablebooleanobligatoire

Whether this expense is billable to the customer

Par défaut : true
billingStatusstringobligatoire

Current billing status

OPENAPPROVEDINVOICED
Par défaut : "OPEN"
performanceRecordIduuidfacultatif

Leistungsnachweis this expense was billed on (per-project billing run, ADR 0416). Server-managed.

lecture seulenullable
invoiceIduuidfacultatif

Invoice this expense was billed on (set when billingStatus flips to INVOICED). Server-managed.

lecture seulenullable
approvalStatusstringobligatoire

Approval status

DRAFTSUBMITTEDAPPROVEDREJECTED
Par défaut : "DRAFT"
approvedByIduuidfacultatif

User who approved this expense

nullable
approvedAtdatetimefacultatif

Timestamp when approved (ISO datetime)

nullable
tagsstring[]facultatif

Expense tags

Par défaut : []

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/expenses — Liste, paginée et filtrable
  • GET /api/v1/expenses/<id> — Une entité
  • POST /api/v1/expenses — Créer
  • PATCH /api/v1/expenses/<id> — Mise à jour partielle
  • DELETE /api/v1/expenses/<id> — Suppression logique
  • GET /api/v1/expenses/<id>/timeline — Audit et activités

Recherche