Trip Wallet API

API Documentation

GET /trips

List all the trips

POST /trips

Create a new trip


Required parameters:

  • user: *required* the id of the user
  • name: *required* the name of the trip
  • start_date: (optional) the starting date of the trip
  • end_date: (optional) the end date of the trip

GET /trips/:id

Get the details of a specific trip


Required parameters:

  • id: *required* the number that identifies the trip

Sample response:

id: 1,

user: 7,

name: Maldives Trip,

start_date: 2023-02-15T11:20:15.000Z,

end_date: null



      

PUT /trips/:id

Edit a trip


Required parameters:

  • id: *required* the number that identifies the trip
  • name: (optional) the name of the trip
  • start_date: (optional) the starting date of the trip
  • end_date: (optional) the end date of the trip

DELETE /trips/:id

Delete a specific trip


Required parameters:

  • id: *required* the number that identifies the trip

POST /expenses

Create a new expense


Required parameters:

  • trip: *required* the number that identifies the trip
  • name: *required* the name of the expense
  • date: *required* the date of the expense
  • amount: *required* the amount of the expense
  • currency: *required* the currency of the expense

GET /expenses/:id

Get the details of a specific expense


Required parameters:

  • id: *required* the number that identifies the expense

PUT /expenses/:id

Edit a specific expense


Required parameters:

  • id: *required* the number that identifies the expense
  • trip: (optional) the number that identifies the trip
  • name: (optional) the name of the expense
  • date: (optional) the date of the expense
  • amount: (optional) the amount of the expense
  • currency: (optional) the currency of the amount expennse

DELETE /expense

Delete a specific expense


Required parameters:

  • id: *required* this is the number that identifies the expense