Best fares, easy and straightforward integration

Designed with for developers

Report Sales

Introduction

With the Sales Report endpoint you will be able to fetch your redirects and successful sales.

There's a special case reflected in the sales report, where if a booking was done on air-viva.com, it will report the air viva booking ID, rather than a FaresAPI PNR.

GET Request Parameters

  • https://faresapi.com/api/v1/report/sales

In order to do that, you need to provide the following parameters. You may omit optional parameters

fromDate Mandatory

A date in YYYY-MM-DD format

toDate Mandatory

A date in YYYY-MM-DD format

You will have to follow these rules

  • From and To dates should both be valid dates in the YYYY-MM-DD format
  • From date should not be greater than to date
  • Period cannot be greater than 31 days

Response

{
    "redirects":[
        {
            "date":"2016-12-21 21:59:43",
            "senior":0,
            "adults":1,
            "children":0,
            "infants":0,
            "commission":"3.00",
            "commissionUsd":"3.00",
            "currency":"USD",
            "site":{
                "id":3,
                "name":"Air Viva",
                "url":"https://air-viva.com/",
                "logo":"https://faresapi.com/bundles/apiv1/images/site/logo/air-viva.com.png"
            },
            "flightId":5,
            "returnFlightId":6,
            "locale":"en",
            "isPaid":false,
            "partnerClickId":"SomePartnerClickIdPassedToRedirect"
        },
        {
            "date":"2016-12-23 21:59:43",
            "senior":0,
            "adults":1,
            "children":0,
            "infants":0,
            "commission":"2.00",
            "commissionUsd":"2.00",
            "currency":"USD",
            "site":{
                "id":1,
                "name":"Flight Co Tz",
                "url":"https://flight.co.tz/",
                "logo":"https://faresapi.com/bundles/apiv1/images/site/logo/flight.co.tz.png"
            },
            "flightId":1,
            "returnFlightId":2,
            "locale":"en",
            "isPaid":false,
            "partnerClickId":null
        },
        {
            "date":"2016-12-24 21:59:43",
            "senior":0,
            "adults":1,
            "children":0,
            "infants":0,
            "commission":"5.00",
            "commissionUsd":"5.00",
            "currency":"USD",
            "site":{
                "id":2,
                "name":"My Flights Vn",
                "url":"https://my-flights.vn/",
                "logo":"https://faresapi.com/bundles/apiv1/images/site/logo/my-flights.vn.png"
            },
            "flightId":3,
            "returnFlightId":4,
            "locale":"en",
            "isPaid":false,
            "partnerClickId":null
        }
    ],
    "sales":[
        {
            "date":"2016-12-21 21:59:43",
            "commission":"12.00",
            "commissionUsd":"12.00",
            "currency":"USD",
            "bookingPrice":"480.00",
            "bookingPriceUsd":"480.00",
            "bookingCurrency":"USD",
            "site":{
                "id":3,
                "name":"Air Viva",
                "url":"https://air-viva.com/",
                "logo":"https://faresapi.com/bundles/apiv1/images/site/logo/air-viva.com.png"
            },
            "pnr":null,
            "airVivaBookingId":124,
            "isPaid":false,
            "partnerClickId":"SomePartnerClickIdPassedToRedirect"
        },
        {
            "date":"2016-12-23 21:59:43",
            "commission":"19.00",
            "commissionUsd":"19.00",
            "currency":"USD",
            "bookingPrice":"760.00",
            "bookingPriceUsd":"760.00",
            "bookingCurrency":"USD",
            "site":{
                "id":1,
                "name":"Flight Co Tz",
                "url":"https://flight.co.tz/",
                "logo":"https://faresapi.com/bundles/apiv1/images/site/logo/flight.co.tz.png"
            },
            "pnr":"ABCDEFG",
            "airVivaBookingId":null,
            "isPaid":false,
            "partnerClickId":null
        }
    ]
}