Skip to content

Create an expense

Planned API — Reference Only

Proposed creation operation for expenses. Educational design only; no route, database operation or external access is implemented.

POST/v1/expenses

Proposed behavior

This endpoint specification is an illustrative design, not a published operational contract. It cannot be called from this site and does not exist as a documentation backend route.

Proposed authentication and permissions

Proposed bearer API key or OAuth access token. Authentication is not implemented.

Proposed expenses:write scope. No permissions are currently issued or enforced by a public API.

Illustrative request parameters

No query parameters are illustrated for this operation.

Proposed JSON body fields
NameTypeDescription
user_idrequiredstringProposed identifier for a fictional employee.
amountrequirednumberIllustrative expense amount; monetary precision remains undecided.
currencyrequiredstringIllustrative ISO currency code.
merchantstringFictional merchant label.

Static example request

Every example uses a reserved .example hostname and YOUR_API_KEY. Language tabs and Copy only change or copy text; they never execute it.

# Reference only. Placeholder host and credential; do not run against production.
curl -X POST "https://api.remizen.example/v1/expenses" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"user_id":"usr_example","amount":125,"currency":"USD","merchant":"Example merchant"}'

Static example response

201 (example)Fictional response fixture

Sample data only. No request was sent and no records were read or written.

JSON
{
  "id": "exp_example",
  "user_id": "usr_example",
  "amount": 125,
  "currency": "USD",
  "merchant": "Example merchant",
  "status": "draft"
}

Proposed status codes

CodeIllustrative meaning
201Illustrative successful response; no request has been performed.
400Proposed invalid-input response; format subject to change.
401Proposed authentication error; token validation is not implemented.
403Proposed permission error; scope enforcement is not implemented.
429Potential rate-limit response; no rate policy is established.

Static example request

# Reference only. Placeholder host and credential; do not run against production.
curl -X POST "https://api.remizen.example/v1/expenses" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"user_id":"usr_example","amount":125,"currency":"USD","merchant":"Example merchant"}'

Illustrative response

Placeholder values, not a live response.

201 (example)
{
  "id": "exp_example",
  "user_id": "usr_example",
  "amount": 125,
  "currency": "USD",
  "merchant": "Example merchant",
  "status": "draft"
}