Skip to main content
POST
/
finops
/
v1
/
transactions
/
{transaction_id}
/
expense_history
Record an approval action in expense history
curl --request POST \
  --url https://api.sandbox.tesouro.com/finops/v1/transactions/{transaction_id}/expense_history \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-finops-version: <x-finops-version>' \
  --header 'x-organization-id: <x-organization-id>' \
  --data '
{
  "acted_at": "2023-11-07T05:31:56Z",
  "action": "<string>",
  "approval_policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "approval_policy_name": "<string>",
  "approval_policy_process_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "approval_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "approval_source": "policy",
  "entity_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "reject_reason": "<string>"
}
'
{
  "status": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-finops-version
string<date>
required
x-organization-id
string<uuid>
required

The ID of the entity that owns the requested resource.

Example:

"9d2b4c8f-2087-4738-ba91-7359683c49a4"

Path Parameters

transaction_id
string<uuid>
required

Body

application/json
acted_at
string<date-time>
required

Timestamp when this specific action was performed.

action
string
required

The approval action performed: 'approved' or 'rejected'.

Required string length: 1 - 30
approval_policy_id
string<uuid>

Approval policy ID.

approval_policy_name
string

Approval policy name.

Maximum string length: 255
approval_policy_process_id
string<uuid>

Approval policy process ID.

approval_request_id
string<uuid>

Approval request ID from approval-requests.

approval_source
string
default:policy

Source of the action. Typically 'policy'.

entity_user_id
string<uuid>

The user who performed the action.

reject_reason
string

Reason for rejection, if applicable.

Required string length: 1 - 1024

Response

Successful Response

status
string
required

Creation status. Always 'created'.