Toggle expense completion for a transaction
This endpoint is intended to mark a card transaction expense as completed or reset it to draft.
Prerequisites:
To use this endpoint you need to have the ACCOUNTING scope for the API Key. Please contact your relation manager to get this permission.
Request Body:
- markAsComplete: Boolean flag to set expense completion.
Validation Errors: Responses return status 422 with an errors array containing field, code, and message. Possible code values include:
- transaction.type.not_supported
- input.mark_as_complete.not_valid
- expense.category.required
- expense.cost_center.required
- expense.vat.required
- expense.receipt.required
- expense.vat.not_valid
- invalid
Path Parameters
- id string required
Transaction identifier
- application/json
Request Body required
- markAsComplete booleannull
- 200
- 400
- 401
- 403
- 404
- 422
OK - The request was processed successfully.
- application/json
- Schema
- Example (from schema)
Schema
- id integer
- currency string
- amount string
- type string
Possible values: [
fee,payin,payout,peer,fx,card] - executionDate string
- executed boolean
- createdAt string
- updatedAt string
- account integer
- transactionDetailId integernull
- tags string[]
documents object
id integername stringmimeType stringexpenseCategory object
id integername stringaccountingAccountNumber stringexternalId stringexpenseCostCenter object
id integername stringnumber string- vat string[]
- comment stringnull
- expenseCompletedAt stringnull
- magicLinkUrl stringnull
{
"id": "1",
"currency": "CHF",
"amount": "100.00",
"type": "payin",
"executionDate": "2023-01-01T00:00:00+00:00",
"executed": true,
"createdAt": "2023-01-01T00:00:00+00:00",
"updatedAt": "2023-01-01T00:00:00+00:00",
"account": 1,
"transactionDetailId": 1,
"tags": [
"tag1",
"tag2"
],
"documents": {
"id": "1",
"name": "example_document.jpg",
"mimeType": "image/jpeg"
},
"expenseCategory": {
"id": "1",
"name": "Travel expense",
"accountingAccountNumber": "123456",
"externalId": "abcefg"
},
"expenseCostCenter": {
"id": "1",
"name": "Travel expense",
"number": "123456"
},
"vat": [
{
"rate": "5",
"amount": "20"
},
{
"rate": "10",
"amount": "30"
}
],
"expenseCompletedAt": "2023-01-01T00:00:00+00:00",
"magicLinkUrl": "https://app.amnis.com/expenses-public/4cb001f8-2b57-4b4a-8d2c-7d1a2f3b4c5d"
}
Bad Request -- Your request is invalid.
Unauthorised -- Your access token is wrong.
- application/json
- Schema
- Example (from schema)
Schema
- type string
- title string
- detail string
{
"type": "string",
"title": "string",
"detail": "string"
}
Forbidden -- Access to the requested resource or action is forbidden.
- application/json
- Schema
- Example (from schema)
Schema
- type string
- title string
- detail string
{
"type": "string",
"title": "string",
"detail": "string"
}
Not Found -- The requested resource could not be found.
Unprocessable Content -- We could not process your request due to invalid data provided.