API:Doc Services Resource

Services

GET /api/services

The services resource

The Services endpoint returns information about the R-Engine Services (vehicels, equipments, yaghts) offered from the companies assosiated to authedicated user. The response includes the display name and other details and groups of info about each service, and lists the services in the proper display order as they are stored initial at the database. You can re-sort the results by add sorting filter at your request as show here.

This endpoint does not reflect real-time availability of the services without “Availability filters”. You can use the the same endpoint to determine real-time availability by using “Availability filters” as show below.

In some cases, the list of service returned may contain double or more services with dublicate names. This is due to multicompany results. You can get unique results if your filter them by company.

Resource End Points

GET /api/services List services
GET /api/services/{service_id},{service_id},… Get specific service details

Authorization

R-Engine API is using basic authentication method. Use the credentials which are provided via R-Engine standard web interface.

Query Parameters

Name Type Description
filter[extra_filters][companyid] Integer The companyid of the company you want services from.
e.g. ?filter[extra_filters][companyid]=14
filter[extra_filters][brand] Integer The brand of the brand you want services from.
e.g. ?filter[extra_filters][brand]=10
filter[extra_filters][alias] String The alias of a specific service.
e.g. ?filter[extra_filters][alias]=vw-polo
filter[extra_filters][title] String The title of a specific service.
e.g. ?filter[extra_filters][title]=Volkswagen Polo
filter[extra_filters][category_id] Integer The category_id of a specific group of services.
e.g. ?filter[extra_filters][category_id]=10
filter[availability][pickup_coordinates] String* The pickup coordinates use the form (lat,lon).
e.g. ?filter[availability][pickup_coordinates]=(31.65464,27.99954)
filter[availability][return_coordinates] String* The return coordinates use the form (lat,lon).
e.g. ?filter[availability][return_coordinates]=(31.65464,27.99954)
filter[availability][pickup_date] String* The pickup date uses the form Y-m-d.
e.g. ?filter[availability][pickup_date]=2016-08-30
filter[availability][return_date] String* The return date uses the form Y-m-d.
e.g. ?filter[availability][return_date]=2016-08-30
filter[availability][pickup_time] String* The pickup date uses the form H:i
e.g. ?filter[availability][pickup_time]=08:00
filter[availability][return_time] String* The return date uses the form H:i
e.g. ?filter[availability][return_time]=08:00
filter[availability][coupon] String A coupon code that should be enabled as a dynamic policy at the backend
e.g. ?filter[availability][coupon]=XMASSPARTY

*: required for availability response

Response with no availability filters

Status-Code: 200 OK

      		
          {
            "data": [
              {
                "id": 32161,
                "alias": "MATIZ",
                "title": "MATIZ",
                "description": "",
                "brand": {
                  "id": 1849,
                  "name": "Chevrolet",
                  "description": "",
                  "media": [
                    "https://secure.reservationengine.net/rest/assets/bizz/1414745610-chevolet.jpg"
                  ]
                },
                "media": [
                  "https://secure.reservationengine.net/rest/assets/bizz/1435697883-matiz.jpg",
                  "https://secure.reservationengine.net/rest/assets/bizz/1447145334-DAEWOOMatiz-3621_1.jpg"
                ],
                "company": {
                  "id": 14,
                  "name": "bizz",
                  "url": "Bizz.com",
                  "alias": "bizz",
                  "email": "info@reservationengine.net",
                  "phone": "",
                  "social": null,
                  "vat_reg_num": "",
                  "country": "FRA",
                  "address": "P.O. Box 566",
                  "city": "Paris",
                  "reservation_email": "",
                  "currency": "€",
                  "media": [
                    "https://secure.reservationengine.net/rest/assets/bizz/1471249140-xitelogo.jpg"
                  ]
                },
                "group": {
                  "id": 1430,
                  "name": "7 Passenger",
                  "description": "Explorer/Pathfinder"
                },
                "availabilities_and_rates": [],
                "extras": [
                  {
                    "id": 2593,
                    "name": "Baby seat",
                    "description": "",
                    "media": "https://secure.reservationengine.net/rest/assets/images/bizz/1475436597-babyseat.png",
                    "params": {
                      "rangeMax": "2",
                      "rangeMin": "",
                      "price": "5",
                      "parent": "2593",
                      "fixedPrice": "0"
                    }
                  },
                  {
                    "id": 2594,
                    "name": "Booster",
                    "description": "",
                    "params": {
                      "rangeMax": "2",
                      "rangeMin": "",
                      "price": "5",
                      "parent": "2593",
                      "fixedPrice": "0"
                    }
                  }
                ]
              },
              {
                "id": 32169,
                "alias": "Picanto",
                "title": "Picanto",
                "description": "",
                "brand": {
                  "id": 2139,
                  "name": "KIA",
                  "description": "",
                  "media": [
                    "https://secure.reservationengine.net/rest/assets/bizz/1414745750-kia.jpg"
                  ]
                },
                "media": [
                  "https://secure.reservationengine.net/rest/assets/bizz/1435830097-picanto.jpg"
                ],
                "company": {
                  "id": 14,
                  "name": "bizz",
                  "url": "Bizz.com",
                  "alias": "bizz",
                  "email": "info@reservationengine.net",
                  "phone": "",
                  "social": null,
                  "vat_reg_num": "",
                  "country": "FRA",
                  "address": "P.O. Box 566",
                  "city": "Paris",
                  "reservation_email": "",
                  "currency": "€",
                  "media": [
                    "https://secure.reservationengine.net/rest/assets/bizz/1471249140-xitelogo.jpg"
                  ]
                },
                "group": {
                  "id": 1430,
                  "name": "7 Passenger",
                  "description": "Explorer/Pathfinder"
                },
                "availabilities_and_rates": [],
                "extras": [
                  {
                    "id": 2593,
                    "name": "Baby seat",
                    "description": "",
                    "params": {
                      "rangeMax": "2",
                      "rangeMin": "",
                      "price": "5",
                      "parent": "null"
                    }
                  },
                  {
                    "id": 2594,
                    "name": "Booster",
                    "description": "",
                    "params": {
                      "rangeMax": "2",
                      "rangeMin": "",
                      "price": "5",
                      "parent": "2593", 
                      "fixedPrice": "",
                    }
                  }
                ],
                "attributes": [
                  {
                    "id": 1513,
                    "name": "Passengers",
                    "description": "",
                    "value": "5"
                  }
                ]
              }
            ]
          }
      		
        

Response explanation (with no availability filters)

Name Type Description
id Integer The id of the specific resource
alias String The alias of the specific resource. Short name of the service.
title String The title of the specific resource. Full name of the service.
description String A more detailed description of the services.
brand Object The basic brand details of the service.
brand.id Integer The id of the specific brand.
brand.name String The name of the specific brand.
brand.description String A more detailed description of the specific brand.
brand.media Array The fullpath of the images related to the specific brand (e.g.the logo of the brand).
media Array The fullpath of the images related to the specific service (e.g.the photo of a car).
company Object The basic company details of the specific service. Company is the provider of the specific service.
company.id Integer The id of the specific company.
company.name String The name of the specific company.
company.url String The full url of the specific company.
company.alias String The name shotcode of the specific company.
company.email String The contact email of the specific company.
company.phone String The contact phone of the specific company.
company.social String The basic social url of the specific company.
company.vat_reg_num String The vat registraion number of the specific company.
company.country String The international ISO 3166 (A2 or A3) code of country of the specific company.
company.address String The full address of the specific company.
company.city String The city of the specific company.
company.reservation_email String The email that will be send all the bookings confirmations of the specific company. This can be empty in case company doesn’t need notificaitons.
company.currency String The symbol of currency of the specific company.
company.media Array The fullpath of the images related to the specific company (e.g.the logo of the company).
group Object The basic group details of the specific service. Group is a category of the services. Many services can be at the same group.
group.id Integer The id of the specific category.
group.name String The name of the specific category.
group.description String A more detailed description of the specific category.
availabilities_and_rates Array Contains all the information about the availability and rate of the specific service. Learn more below. This array will be empty in case you don’t use any availabiltiy filters.
extras Array of Objects The extras that are assigned to the specific service. Extras are the features that a user can add to his booking (e.g booster, gps, ski facilities, insurance e.t.c).
extras[n] Object Contains the basic details of a specific extra.
extras[n].id Integer The id of the specific ‘n’ extra.
extras[n].name String The name of the specific ‘n’ extra.
extras[n].description String A more detailed description of the specific ‘n’ extra.
extras[n].media String A full path of preview image of the specific ‘n’ extra.
extras[n].params Object Details about the pricing rules of the specific ‘n’ extra.
extras[n].params.rangeMin String Indicates the start value of a valid values range of the specific ‘n’ extra (e.g. “0” in a range [0,1] means the false value, “0” in a range [0,10] means the first value of a a selectable range)
extras[n].params.rangeMax String Indicates the end value of a valid values range of the specific ‘n’ extra (e.g. “1” in a range [0,1] means the true value, “10” in a range [0,10] means that 10 of that extra can be added to the booking)
extras[n].params.price String Indicates the daily price of the specific ‘n’ extra.
extras[n].params.fixedPrice String Indicates the total price of the specific ‘n’ extra. In case this field is not empty, it overrides the daily price.
extras[n].params.parent String Indicates the id of another extra in case there is a grouping of them.
attributes Array of Objects The attributes that are assigned to the specific service. Attributes are the features that cannot be selected at the booking process (e.g. the color of the vehicle, cc, engine e.t.c).
attributes[n] Object Contains the basic details of a specific attribute.
attributes[n].id Integer The id of the specific ‘n’ attribute.
attributes[n].name String The name of the specific ‘n’ attribute.
attributes[n].description String A more detailed description of the specific ‘n’ attribute.
attributes[n].value String The value of the specific ‘n’ attribute.

Response with availability filtering

Status-Code: 200 OK

          
  {
    "data": [
      {
        "id": 32161,
        "alias": "MATIZ",
        "title": "MATIZ",
        "description": "",
        "brand": {
          "id": 1849,
          "name": "Chevrolet",
          "description": "",
          "media": [
            "https://secure.reservationengine.net/rest/assets/brands/1414745610-chevolet.jpg"
          ]
        },
        "media": [
          "https://secure.reservationengine.net/rest/assets/bizz/1435697883-matiz.jpg",
          "https://secure.reservationengine.net/rest/assets/bizz/1447145334-DAEWOOMatiz-3621_1.jpg"
        ],
        "company": {
          "id": 14,
          "name": "bizz",
          "url": "Bizz.com",
          "alias": "bizz",
          "email": "info@reservationengine.net",
          "phone": "",
          "social": null,
          "vat_reg_num": "",
          "country": "FRA",
          "address": "P.O. Box 566",
          "city": "Paris",
          "reservation_email": "",
          "currency": "€"
        },
        "group": {
          "id": 1430,
          "name": "7 Passenger",
          "description": "Explorer/Pathfinder"
        },
        "total_availability": true,
        "availabilities_and_rates": [
          {
            "date": "2016-08-12",
            "availability": 3,
            "rate": 35.2,
            "offer": [
              {
                "offer_id": 617,
                "type": "20% Discount for Matiz (low season)",
                "old_value": 44,
                "new_value": 35.2,
                "offer_type": "discount"
              }
            ]
          },
          {
            "date": "2016-08-13",
            "availability": 3,
            "rate": 35.2,
            "offer": [
              {
                "offer_id": 617,
                "type": "20% Discount for Matiz (low season)",
                "old_value": 44,
                "new_value": 35.2,
                "offer_type": "discount"
              }
            ]
          }
        ],
        "total_price": 60,
        "extras": [
          {
            "id": 2593,
            "name": "Baby seat",
            "description": "",
            "params": {
              "rangeMax": "2",
              "rangeMin": "",
              "price": "5",
              "parent": "null"
            }
          },
          {
            "id": 2594,
            "name": "Booster",
            "description": "",
            "params": {
              "rangeMax": "2",
              "rangeMin": "",
              "price": "5",
              "parent": "2593"
            }
          }
        ],
        "attributes": [
          {
            "id": 1513,
            "name": "Passengers",
            "description": "",
            "value": "5"
          }
        ]
      }
    ]
  }
            
      	

Response explanation (with availability filters)

Name Type Description
All fields Same as the previous response explanation
total_availability Boolean Indicates where there is availability for all requested dates.
availabilities_and_rates Array of Objects Each object of the array describes each day of the booking availability. In case there is no availability, the array will be empty.
availabilities_and_rates[n] Object Contains the basic details of a specific date.
availabilities_and_rates[n].date String The date of the specific ‘n’ availability object.
availabilities_and_rates[n].availability Integer The number of available services at the specific ‘n’ date.
availabilities_and_rates[n].rate Float The number of rate at the specific ‘n’ date.
availabilities_and_rates[n].offer Array of Objects Array of offers that have been applied to the specific ‘n’ date.
availabilities_and_rates[n].offer[m] Object Contains the basic details of a specific ‘m’ offer.
availabilities_and_rates[n].offer[m].offer_id” Integer The id of the specific ‘m’ offer.
availabilities_and_rates[n].offer[m].type String The title of the specific ‘m’ offer.
availabilities_and_rates[n].offer[m].old_value Float The rate before the offer ‘m’ applies.
availabilities_and_rates[n].offer[m].new_value Float The rate after the offer ‘m’ applies at the specific date.
availabilities_and_rates[n].offer[m].offer_type String The type of action that the offer ‘m’ did the specific date. There are 2 actions: extra (increase the old value), discount (Decrease the old value).
total_price Float Indicates the total cost of the service for the applied availability filters.