Skip to content

Submit Expense Report — Proposed Guide

Planned API — Reference Only

Submit Expense Report: Submitting a report would request review of a defined set of expense versions. It is a business transition that must check required…

Overview

Submitting a report would request review of a defined set of expense versions. It is a business transition that must check required evidence and report eligibility.

Key concepts

Freeze or version the review snapshot and record the submitting actor. Assign approval routing independently of a successful HTTP status.

Implementation considerations

If one expense is invalid, define whether submission fails atomically. Do not return a submitted state while silently omitting that expense.

Proposed API behavior

POST /v1/expense-reports/{report_id}/submit is an illustrative design for this topic. Path and field names may change before implementation. Access would require an authorized organization context and operation-specific permission; no public API or authorization grant is available here.

Proposed path parameters
NameTypeDescription
report_idrequiredstringStable fictional report reference; not a secret and not evidence that a resource exists.
Illustrative request fields
NameTypeDescription
versionintegerIllustrative resource revision for detecting stale updates; no live concurrency contract is published.

Static example requests

Proposed, non-executing request examples
# Proposed request text only; this reserved host is not a live API.
curl -X POST 'https://api.remizen.example/v1/expense-reports/rpt_example_123/submit' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: operation_example_123' \
  --data '{
  "version": 1
}'

Fictional response example

200 (proposed example)Static response fixture

Fictional documentation data only. No request was sent, record created, review performed, payment initiated or provider connection activated.

JSON
{
  "data": {
    "report_id": "rpt_example_123",
    "version": 1,
    "id": "rpt_example_123",
    "organization_id": "org_example_123",
    "expense_ids": [
      "exp_example_123"
    ],
    "status": "submitted"
  },
  "meta": {
    "request_id": "req_example_123",
    "reference_only": true
  }
}

Illustrative error case

Review this failure case in context: If one expense is invalid, define whether submission fails atomically. Do not return a submitted state while silently omitting that expense.

422 (illustrative; final error contracts are undecided)Proposed error fixture

Synthetic diagnostic example. Human-readable messages must not be used as stable programmatic contracts.

JSON
{
  "error": {
    "code": "validation_error",
    "message": "The proposed submit expense report operation requires review of its input or authorization.",
    "request_id": "req_example_123"
  }
}

Proposed data types

Illustrative field dictionary
NameTypeDescription
report_idstringStable fictional report reference; not a secret and not evidence that a resource exists.
versionintegerIllustrative resource revision for detecting stale updates; no live concurrency contract is published.
idempotency_keystringNon-secret proposed operation key for controlled replay; supplied as an illustrative header.