Expense Claims
Get Expense Claim
HTTP GET v1/expenses/{EXPENSE_CLAIM_ID}
Returns the Expense Claim for the User with the matching Expense Claim ID. dateSubmitted will be null if the Expense Claim has not yet been submitted.
Response
{
"expenseClaimID" : 123456,
"name" : "December 2022",
"dateSubmitted" : "2022-12-01",
"currencyID": 1,
"status" : "Open",
"userId": 123456
}
Get Expense Claims
HTTP GET v1/expenses?page={PAGE}&claimsPerPage={CLAIMS_PER_PAGE}
Returns the specific page of Expense Claims specified in PAGE, ordered by most recent and showing the number of items per page specified in CLAIMS_PER_PAGE, for the logged in User.
Response
[
{
"expenseClaimID": 123456,
"name": "December 2022",
"dateSubmitted": "2022-12-01",
"currencyID": 1,
"status": "Open | FIN Rejected | MAN Rejected | Awaiting FIN Approval | Awaiting MAN Approval | Awaiting Payment | Paid"
},
{
"expenseClaimID": 123457,
"name": "December 2022",
"dateSubmitted": "2022-12-12",
"currencyID": 1,
"status": "Open | FIN Rejected | MAN Rejected | Awaiting FIN Approval | Awaiting MAN Approval | Awaiting Payment | Paid"
}
]
Get Recent Expense Claims
HTTP GET v1/expenses
Returns the 5 most recent expense claims for the logged in User.
Response
[
{
"expenseClaimID": 123456,
"name": "December 2022",
"dateSubmitted": "2022-12-01",
"currencyID": 1,
"status": "Open | FIN Rejected | MAN Rejected | Awaiting FIN Approval | Awaiting MAN Approval | Awaiting Payment | Paid"
},
{
"expenseClaimID": 123457,
"name": "December 2022",
"dateSubmitted": "2022-12-12",
"currencyID": 1,
"status": "Open | FIN Rejected | MAN Rejected | Awaiting FIN Approval | Awaiting MAN Approval | Awaiting Payment | Paid"
}
]
Get Expense Claims By Status
HTTP GET v1/expenses/?status={STATUS}
Returns all the expenses for the user with the matching Expense Claim Status specified by {STATUS}
. The options for status are Open | FINRejected | MANRejected | AwaitingFINApproval | AwaitingMANApproval | AwaitingPayment | Paid
. dateSubmitted
will be null if the Expense Claim has not yet been submitted.
Response
[
{
"expenseClaimID": 123456,
"name": "December 2022",
"dateSubmitted": "2022-12-01",
"currencyID": 1,
"status": "Open"
},
{
"expenseClaimID": 123457,
"name": "December 2022",
"dateSubmitted": "2022-12-12",
"currencyID": 1,
"status": "Open"
}
]
Create Expense Claim
HTTP POST v1/expenses
Create a new Expense Claim. To default to using Expense Claim names of the month and year in the format "Dec 2022", supply a JSON body with no name property.
The claim will be created for the current API user.
Request
{
//Optional - will default to the current month and year in the format "Dec 2022"
"name" : "July Expenses"
}
Response
{
"id" : 1234
}
Update Expense Claim
HTTP PUT v1/expenses/{EXPENSE_CLAIM_ID
Update the name of an Expense Claim for the relevant Expense Claim ID. Returns a 200 OK
response if the name was successfully updated.
Request
{
"name" : "July Expense Claim"
}
Submit Expense Claim
HTTP POST v1/expenses/{EXPENSE_CLAIM_ID}/submit
Submit an Expense Claim for either Line Manager or Financial Manager approval depending upon the client's CMAP configuration. Returns a true or false success status and notification message.
Response
{
"result": "{success: true, notification: '' | success: false, notification: ''}"
}
Mark Expense Claim as Paid
v1/expenses/{EXPENSE_CLAIM_ID}/MarkAsPaid
Sets an Expense Claim to be marked as the paid status.
Response
{
"result": true
}