Van Group API

API docs

Excursions

Excursions | *Get all excursions

(Admin) Page-able list of all excursions

get
api/excursions/get-all
{
        cauth: "eyJhbGci..."
}
{
        pp: 10,
        pageNr: 1
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       data?: [
         {
           _id: "65b6ae35d5da1629368a9481",
           place: {
             text: "Split Riva",
             place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
           },
           price: 30,
           title: "Title",
           description: "Excursion description",
           pictureUrl: "url-to-image.png",
           isActive: true
         }
       ],
       page?: {
         current: 1,
         last: 3,
         total: 27
       }
}

Excursions | *Post a new excursion

(Admin) Add a new excursion

post
api/excursions/create
{
        cauth: "eyJhbGci..."
}
{
  place: {
    text: "Split Riva",
    place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
  },
  price: 30,
  title: "Title",
  description: "Excursion description",
  pictureUrl: "url-to-image.png",
  isActive: true
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       excursion?: {
           _id: "65b6ae35d5da1629368a9481",
           place: {
             text: "Split Riva",
             place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
           },
           price: 30,
           title: "Title",
           description: "Excursion description",
           pictureUrl: "url-to-image.png",
           isActive: true
       }
}

Excursions | *Update excursion

(Admin) Update excursion

post
api/excursions/fupdate
{
        cauth: "eyJhbGci..."
}
{
  _id: "65b6ae35d5da1629368a9481",
  place: {
    text: "Split Riva",
    place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
  },
  price: 30,
  title: "Title",
  description: "Excursion description",
  pictureUrl: "url-to-image.png",
  isActive: true
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       excursion?: {
           _id: "65b6ae35d5da1629368a9481",
           place: {
             text: "Split Riva",
             place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
           },
           price: 30,
           title: "Title",
           description: "Excursion description",
           pictureUrl: "url-to-image.png",
           isActive: true
       }
}

Excursions | Get public excursions

Get all excursions for frontend

get
api/excursions/get
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       excursions?: [{
           place: {
             text: "Split Riva",
             place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
           },
           price: 30,
           title: "Title",
           description: "Excursion description",
           pictureUrl: "url-to-image.png"
       }]
}

Locations

Locations | *Get all locations

(Admin) Page-able list of all special locations which are used for pickups

get
api/locations/get-all
{
        cauth: "eyJhbGci..."
}
{
        pp: 10,
        pageNr: 1
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       data?: [
         {
           _id: "65b6ae35d5da1629368a9481",
           place: {
             text: "Split Riva",
             place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
           },
           isActive: true
         }
       ],
       page?: {
         current: 1,
         last: 3,
         total: 27
       }
}

Locations | *Post a new location

(Admin) Add a new location which will be used for pickups (special locations)

post
api/locations/create
{
        cauth: "eyJhbGci..."
}
{
  place: {
    text: "Split Riva",
    place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
  },
  isActive: true
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       location?: {
         _id: "65b6ae35d5da1629368a9481"
         place: {
           text: "Split Riva",
           place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
         },
         isActive: true
       }
}

Locations | *Update location

(Admin) Update location which will be used for pickups (special locations)

post
api/locations/fupdate
{
        cauth: "eyJhbGci..."
}
{
      _id: "65b6ae35d5da1629368a9481"
      place: {
        text: "Split Riva",
        place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
      },
      isActive: true
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       location?: {
         _id: "65b6ae35d5da1629368a9481"
         place: {
           text: "Split Riva",
           place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
         },
         isActive: true
       }
}

Locations | Get location predictions for destinations

Should return predictions relevant to Croatia

get
api/locations/destinations
{
        search: "split"
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       predictions?: [
           {
               name: "Split Riva",
               address: "Riva address 330",
               place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM",
               type : 'airport'
           }
       ]
}

Locations | Get location predictions for pickups

Should return predictions relevant to the Split and its surroundings as well as specially included locations

get
api/locations/pickups
{
        search: "split"
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       predictions?: [
           {
               name: "Split Riva",
               address: "Riva address 330",
               place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM",
               type : 'airport'
           }
       ]
}

Partners

Partners | *Get all partners

(Admin) Page-able list of all partners

get
api/partners/get-all
{
        cauth: "eyJhbGci..."
}
{
        pp: 10,
        pageNr: 1
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       data?: [
         {
           _id: "65b6ae35d5da1629368a9481",
           title: "Title",
           description: "Excursion description",
           pictureUrl: "url-to-image.png",
           isActive: true
         }
       ],
       page?: {
         current: 1,
         last: 3,
         total: 27
       }
}

Partners | *Post a new partner

(Admin) Add a new partner

post
api/partners/create
{
        cauth: "eyJhbGci..."
}
{
  title: "Title",
  description: "Excursion description",
  pictureUrl: "url-to-image.png",
  isActive: true
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       partner?: {
           _id: "65b6ae35d5da1629368a9481",
           title: "Title",
           description: "Excursion description",
           pictureUrl: "url-to-image.png",
           isActive: true
       }
}

Partners | *Update partner

(Admin) Update partner

post
api/partners/fupdate
{
        cauth: "eyJhbGci..."
}
{
  _id: "65b6ae35d5da1629368a9481",
  title: "Title",
  description: "Excursion description",
  pictureUrl: "url-to-image.png",
  isActive: true
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       partner?: {
           _id: "65b6ae35d5da1629368a9481",
           title: "Title",
           description: "Excursion description",
           pictureUrl: "url-to-image.png",
           isActive: true
       }
}

Partners | Get public partners

Get all partners for frontend

get
api/partners/get
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       partners?: [{
           title: "Title",
           description: "Excursion description",
           pictureUrl: "url-to-image.png"
       }]
}

Transfers

Transfers | *Get all transfers

(Admin) Page-able list of all transfers

get
api/transfers/get-all
{
        cauth: "eyJhbGci..."
}
{
        pp: 10,
        pageNr: 1
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       data?: [
         {
             _id: "65b6ae35d5da1629368a9481",
             from: {
                 name: "Test2",
                 place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
             },
             to: {
                 name: "Test2",
                 place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
             },
             peopleCount: 1,
             date: '2024-02-22T23:00:00.000Z (or some other date format)',
             fromType: 'None',
             fromTransportName: '',
             extra: {
                 childSeat: false
             },
             passengerTitle: 'Mr',
             firstName: 'Test',
             lastName: 'Mc test',
             email: '[email protected]',
             phoneNumber: '+38512342212'
         }
       ],
       page?: {
         current: 1,
         last: 3,
         total: 27
       }
}

Transfers | Get my transfers

Page-able list of transfers assigned to my account

get
api/transfers/get-my-transfers
{
        cauth: "eyJhbGci..."
}
{
        pp: 10,
        pageNr: 1
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       data?: [
         {
             _id: "65b6ae35d5da1629368a9481",
             from: {
                 name: "Test2",
                 place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
             },
             to: {
                 name: "Test2",
                 place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
             },
             peopleCount: 1,
             date: '2024-02-22T23:00:00.000Z (or some other date format)',
             fromType: 'None',
             fromTransportName: '',
             extra: {
                 childSeat: false
             },
             passengerTitle: 'Mr',
             firstName: 'Test',
             lastName: 'Mc test',
             email: '[email protected]',
             phoneNumber: '+38512342212'
         }
       ],
       page?: {
         current: 1,
         last: 3,
         total: 27
       }
}

Transfers | Post a new transfer

Create a new transfer booking

post
api/transfers/create
{
  from: {
      name: "Test2",
      place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
  },
  to: {
      name: "Test2",
      place_id: "ChIJ2WylVSZhNRMRILUrhlCtAAM"
  },
  peopleCount: 1,
  date: '2024-02-22T23:00:00.000Z (or some other date format)',
  fromType: 'None',
  fromTransportName: '',
  extra: {
      childSeat: false
  },
  passengerTitle: 'Mr',
  firstName: 'Test',
  lastName: 'Mc test',
  email: '[email protected]',
  phoneNumber: '+38512342212'
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1
}

Users

Users | *Get all users

(Admin) Page-able list of all users

get
api/users/get-all
{
        cauth: "eyJhbGci..."
}
{
        pp: 10,
        pageNr: 1
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       data?: [
         {
           _id: "65b6ae35d5da1629368a9481",
           firstName: 'Test',
           lastName: 'Mc test',
           phoneNumber: '+38512342212'
           active: true
         }
       ],
       page?: {
         current: 1,
         last: 3,
         total: 27
       }
}

Users | *Get user

(Admin) Details about the user

get
api/users/get
{
        cauth: "eyJhbGci..."
}
{
     _id: "65b6ae35d5da1629368a9481",
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1,
       user?: {
           _id: "65b6ae35d5da1629368a9481",
           firstName: 'Test',
           lastName: 'Mc test',
           phoneNumber: '+38512342212'
           email: '[email protected]',
           type: 'Admin',
           active: true,
           bankAccountNumber: '38512342212',
           ... any other banking info
       }
}

Users | *Post a new user

(Admin) Create a new user

post
api/users/create
{
        cauth: "eyJhbGci..."
}
{
  firstName: 'Test',
  lastName: 'Mc test',
  phoneNumber: '+38512342212'
  email: '[email protected]',
  type: 'Admin',
  active: true,
  bankAccountNumber: '38512342212',
  ... any other banking info
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1
       user: {
         _id: "65b6ae35d5da1629368a9481",
         firstName: 'Test',
         lastName: 'Mc test',
         phoneNumber: '+38512342212'
         email: '[email protected]',
         type: 'Admin',
         active: true,
         bankAccountNumber: '38512342212',
         ... any other banking info
       }
}

Users | *Update user

(Admin) Update user

post
api/users/update
{
        cauth: "eyJhbGci..."
}
{
  _id: "65b6ae35d5da1629368a9481",
  firstName: 'Test',
  lastName: 'Mc test',
  phoneNumber: '+38512342212'
  email: '[email protected]',
  type: 'Admin',
  active: true,
  bankAccountNumber: '38512342212',
  ... any other banking info
}
{
       result?: 1,
       error?: "Relevant error message",
       _t_: 1
       user: {
         _id: "65b6ae35d5da1629368a9481",
         firstName: 'Test',
         lastName: 'Mc test',
         phoneNumber: '+38512342212'
         email: '[email protected]',
         type: 'Admin',
         active: true,
         bankAccountNumber: '38512342212',
         ... any other banking info
       }
}

Generated with apidoc 1.2.0 - Wed Mar 20 2024 19:40:02 GMT+0000 (Coordinated Universal Time)