Browse
 
Tools
Rss Categories

Data Export APIs

Reference Number: AA-01057 Views: 4480 Created: 2016-09-30 11:09 Last Updated: 2019-06-14 11:31 0 Rating/ Voters

Rental Car Manager offers an API to export certain datasets.  There is a cost to set up these APIs, please contact RCM support (support@rentalcarmanager.com) for more information.


The list of API calls in this article detail all of the data that can be exported.  


Developers - Click here for technical info: Information for Developers


The following exports are described below:



VEHICLES

Return all vehicle information for those vehicles added, updated or deleted within the input date range.  Initial data load can be performed with very large date range (e.g. 01-01-2000 to today), then each day they can just request the previous day’s changes.


Input:

  • StartDateTime 
  • EndDateTime

Output:

  • ID (unique identifier)
  • CategoryType
  • Type
  • RegistrationNo
  • VehicleType
  • Make
  • Model
  • Year
  • DateOnFleet (for new vehicles)
  • DateOffFleet (for “deleted” vehicles)
  • RegistrationDate
  • FleetNo
  • VIN
  • CurrentLocation
  • Grade
  • FuelCapacity
  • cDateEntered
  • cUpdatedDate
  • DeleteDate
  • PurchaseDate
  • PurchasePrice
  • PurchaseMileage
  • ResidualValue
  • DepreciationRate
  • MonthlyPayment
  • DisposalDate
  • DisposalPrice
  • DisposalMileage
  • Transmission
  • FuelType
  • CurrentMileage
  • RadioCode
  • RegoExpiryDate
  • StateCode
  • COFDate
  • EleWOFDate
  • Utilise
  • UtiliseStartDate
  • UtiliseEndDate
  • Available
  • PMBaseDate
  • PMScheduleCategory
  • FinanceStartDate
  • FinanceEndDate
  • TotalMileage
  • TotalMaintenanceCost

 

RESERVATIONS

Return all Reservations which have been updated within the input date range. Date range will need to be restricted in order to prevent very large datasets, however we can supply an initial data load in a separate transaction if required.  Thereafter, regular requests can query for changes made since the previous request.  Note that updates that were made may not affect the information that will be returned, for e.g. if an operator updated a fee or insurance details, you will receive the reservation again despite it not have changed the information you receive.


Input:

  • StartDateTime
  • EndDateTime
  • (optional: PickupLocationID?  Or DropOffLocationID?)

Output:

  • ReservationNo (unique ID) (0 if this booking has not been allocated to a vehicle)
  • UnallocatedReservationNo (unique ID, not the same as above.  Some reservations will have 0 for this field)
  • PickupLocationID (integer ID, see below for location information)
  • DropOffLocationID (integer ID, see below for location information)
  • TotalRentalDays
  • DailyRate
  • InsuranceDailyRate
  • InsuranceID
  • RentalSource
  • ReservationStatus [could be also named "BookingType"] (as at the time of data extraction, this could be Reservation (not yet hired), Hired, Returned, or Cancelled)
  • PickupDateTime
  • DropOffDateTime
  • DateEntered
  • LastUpdatedDate
  • PaymentType
  • BookingOperatorName
  • BookedCategoryType (category of the vehicle as it was originally booked)
  • BookedVehicleType (type of vehicle as it was originally booked)
  • CustomerID [could be also named "acID"] (matches ID in the customers export)
  • VehicleID [could be also named "carID"] (matches one of those returned in the vehicles export)
  • BookingAgency
  • CompanyName
  • AgentCommission
  • AgentBranchID
  • StampDuty
  • GST
  • KmsIn
  • KmsOut
  • FuelIn
  • FuelOut
  • AgentCollected

 

LOCATIONS

Return all information about a renting location.


Input:

  • None (these details don’t change frequently)

Output:

  • LocationID (unique identifier)
  • LocationName
  • Address (street address) 
  • Suburb
  • State
  • Country
  • Latitude/longitude (this information not currently recorded in RCM)


SEASON RATES

Return all standard and agency rates by location


Input:

  • LocationID (unique identifier)

Output:

  • Rate Type (e.g. "Direct" or Agency rate type)
  • VehicleCategoryID (unique identifier)
  • VehicleCategory
  • LocationName
  • LocationCode
  • LocationID
  • StartDate (Season start date)
  • EndDate (Season end date)
  • SeasonName
  • FromDay (number of booking days from this number for this rate)
  • ToDay (number of booking days to this number for this rate, e.g. FromDay = 4, ToDay = 7 then bookings between 4 and 7 days would get this daily rate)
  • Rate - the daily rate for this season/location/rate type

 

AGENCIES

Exports all agency data


Input:

  • none

Output:

  • AgencyID    
  • AgencyDiscountID 
  • AgencyCommissionType 
  • AgencyName                                         
  • AgencyCode           
  • AgencyLocationID 
  • AgencyCity                                         
  • AgencyAddress                                      
  • AgencySuburb                                       
  • AgencyState                    
  • AgencyPostCode       
  • AgencyEmail                                        
  • AgencyCountry                  
  • AgencyContact                                      
  • AgencyNotes
  • AgencyIsNotActive 
  • AgencyRateTypeID 
  • AgencyRateType                                     
  • IsWholesaleAgency 
  • AgencyWSAvailable 
  • AgencyBranchID 
  • AgencyBranchDiscountID 
  • AgencyBranchIsNotActive 
  • AgencyBranchCommissionType 
  • AgencyBranchName                                   
  • AgencyBranchCode     
  • AgencyBranchCommission 
  • AgencyBranchCity                                   
  • AgencyBranchAddress                                
  • AgencyBranchSuburb                                 
  • AgencyBranchState              
  • AgencyBranchPostCode 
  • AgencyBranchEmail                                  
  • AgencyBranchContact                               
  • AgencyBranchNotes
  • AgencyBranchCountry            
  • AgencyBranchRegionID 
  • AgencyBranchRegion                                 
  • AgencyBranchPaymentTypeID

                

BOOKING EXTRA FEES

Returns the extra fees applied to a particular reservation, location or across a date range. Does not include bonds or insurances


Input:

  • LocationID
  • ReservationNo
  • StartingDayTime (required - only returns where reservation was last updated within this and EndingDayTime)
  • EndingDayTime (required)

Output:

  • ExtraFeesID
  • Name
  • ReservationNo (only used for allocated reservations, will be 0 for unallocated)
  • UnallocatedReservationNo (will be 0 if this is an allocated reservation)
  • ExtraDailyRate
  • Days (number of)
  • ID

 

RESERVATION RATE DETAILS

Returns the reservation rate details applied to a particular reservation, location or across a date range.


Input:

  • LocationID (0 for all Locations)
  • ReservationNo
  • StartingDayTime (required - only returns where reservation was last updated within this and EndingDayTime)
  • EndingDayTime (required)

Output:

  • ReservationNo (only used for allocated reservations, will be 0 for unallocated)
  • UnallocatedReservationNo (will be 0 if this is an allocated reservation)
  • Days (number of)
  • Rate (final rate applied)
  • SeasonID
  • RateName
  • StandardRate (rate before any discounts applied)
  • DiscountPercent
  • DiscountID
  • DiscountType
  • DiscountName
  • TripRates
  • ExtendRate (0, or 1 if this rate was the result of a booking extension)
  • NoOfHours (used for hourly or partial day bookings)

  

RESERVATION PAYMENT DETAILS

Get reservation payment details across a date range


Input:

  • StartingDayTime (required - only returns where reservation was last updated within this and EndingDayTime)
  • EndingDayTime (required)

Output:

  • ReservationNo (only used for allocated reservations, will be 0 for unallocated)
  • UnallocatedReservationNo (will be 0 if this is an allocated reservation)
  • BillingLocationID
  • PaymentType
  • PaidAmount
  • PaymentDate
  • OperatorLoginID
  • CashReceiptName
  • OtherDescription
  • DMYCreated
  • InvoicePaymentID
  • LoginIP
  • PaymentTokenID

Technical info for developers


RESERVATION NOTES

Get notes recorded against reservations, either by a date range (last updated) or specific reservation number

Input:

  • ReservationNo (0 if any reservation, will match on allocated and unallocated resNo)
  • StartingDayTime (required - only returns where Notes were last updated within this and EndingDayTime)
  • EndingDayTime (required)

Output:

  • NotesID - unique identifier for this notes record
  • ReservationNo (only used for allocated reservations, will be 0 for unallocated)
  • UnallocatedReservationNo (will be 0 if this is an allocated reservation)
  • Priority - either Low, Medium or High
  • Status - either Active, Closed or Deleted
  • Subject
  • DateEntered
  • EnteredByID
  • LastUpdated
  • LastUpdatedByID
  • FollowUpOperatorID
  • Notes

Technical Info for Developers

 

CUSTOMERS

Returns customer details by customer id and/or date range for last updated or last hired


Input:

  • CustomerID (0 for all customers)
  • StartingDayTime (required - only returns where reservation was last updated or last hired within this and EndingDayTime)
  • EndingDayTime (required)

Output:

  • ID
  • FirstName
  • LastName
  • DOB
  • Occupation
  • PostalAddress
  • City
  • State
  • Postcode
  • Country
  • Phone
  • Mobile
  • Email
  • Maillist
  • LastUpdateDate
  • LastHireDate
  • License
  • LiscenseIssued


EXTRA ITEMS

Returns all extra items and insurances


Input:

  • ExtraItemID (0 for all)

Output:

  • ID
  • ExtraType (either "Insurance" or "Extra Item")
  • VehicleCategoryType
  • VehicleCategory
  • Description
  • MaxPrice
  • Rate
  • ExcessFee

 

RENTAL SOURCE

Returns all items from the Rental Source list


Input:

  • RentalSourceID (0 for all)

Output:

  • ID
  • RentalSource
  • LocationID

 

RCM OPERATORS

Gets data about all active RCM users


Input:

  • UserID (0 for all users)

Output:

  • ID
  • LocationID
  • AccessLevel
  • UserName
  • FirstName
  • LastName
  • UserEmail

Technical info for developers


VEHICLE SERVICE RECORDS

Gets data about periodic or manual services for vehicles

Input:

  • LocationID (restrict based on Branch - 0 returns all locations)
  • StartingDay (required - only returns where service record was last updated within this and EndingDay)
  • EndingDay (required)
Output:

  • Branch
  • RegistrationNo
  • FleetNo
  • SupplierName
  • ServiceName
  • Service (Periodic or Manual)
  • ServiceType
  • UnitsCompleted (Kilometres or Miles depending on your RCM configuration)
  • LabourCost
  • PONo (purchase order)
  • Notes
  • InvoiceNo
  • Taxes
  • CreatedByID (UserID of operator who created this record)
  • AuthorisedBy (Name)
  • DateCompleted
  • InvoiceDate
  • ServiceCompleted (Yes or No)
  • DateClosed
  • GstAmount
  • NetCost
  • Cost

Technical info for developers


ON ROAD REPAIRS

Input:

  • StartingDay (required - only returns where record was created within this and EndingDay)
  • EndingDay (required)

Output:

  • ReservationNo
  • Rego
  • CustomerID
  • CustomerName
  • DateCreated
  • EnteredByID (RCM User ID)
  • Problem Type
  • ProblemDesc
  • Closed (Yes or No)

Technical info for developers


MAINTENANCE BOOKINGS

Returns data about maintenance bookings

Inputs:

  • LocationID (restrict based on Pickup Location - 0 returns all locations)
  • StartingDayTime (required - only returns where reservation pickup or dropoff date was within this and EndingDayTime)
  • EndingDayTime (required)

Output:

  • ReservationNo
  • CategoryType
  • Model
  • Rego
  • FleetNo
  • Repairer
  • VehicleID
  • Notes
  • PickupLocationID
  • PickupLocation
  • DropoffLocationID
  • DropoffLocation
  • PickupDateTime
  • DropoffDateTime

Technical info for developers


AGENT PAYMENTS

Returns data about payments from and to Agents

Inputs: 

  • StartingDay (required - only returns where payment date is within this and EndingDay)
  • EndingDay (required)

Outputs:

  • ReservationNo (only used for allocated reservations, will be 0 for unallocated)
  • UnallocatedReservationNo (will be 0 if this is an allocated reservation)
  • BillingLocationID (integer - links to Location from Location export)
  • PaymentType (e.g. "Bank Transfer")
  • CreatedByID (the RCM user who created the record)
  • Reference
  • PaymentFromAgent ($ amount)
  • PaymentToAgent ($ amount)

Technical info for developers


AGENT RATES (for use by individual agents)

Inputs: 

  • Starting Day (required - only returns rates for seasons within this and Ending Day)
  • Ending Day (required)

Outputs:

  • sFromDay (integer - lower bound of the rental length, e.g. 5 day rental falls in sFromDay 2 and sToDay 7)
  • sToDay (integer - upper bound of the rental length, "00" for no upper bound)
  • sStartDate (text date in format dd/MM/yyyy - season start date)
  • sEndDate (text date in format dd/MM/yyyy - season end date)
  • Location (text name)
  • VehicleCategoryID (integer)
  • VehicleCategory (text - name of vehicle category this rate applies to. Maps to ID above)
  • Rate (decimal)

Technical info for developers


Information For Developers

INSTRUCTIONS FOR USE

 All data can be retrieved by calling a single URL, the parameters passed on the querystring will determine the type of data and filtering required.

 

URL & QUERYSTRING

The URL to access is:  http://{ServerDomain}/APIExport/ReservationsExport.ashx  (server domain will be provided to you when we grant API access).

General format for the querystring is: {URL as above}?key={keyvalue}&method={methodname}&{param1name}={param1value}&{param2name}={param2value}...etc

 

KEY

Your key (an encrypted string of about 20 characters) will be provided when API access is granted.  Please note that we will require a static IP address to set up the key - access will only be allowed from this IP address.

All calls to the URL requires the key.  This will identify the caller and match the request to your database.  

SHARED SECRET

For those API clients that do not have a static IP address, there are further steps necessary to secure the request.  If you have been issued with a Shared Secret, please see further information below here.

 

METHOD

The method name for the data that requires export.  Valid method names are "repbookingexport", “bookingextrafees”, "vehicle", "customer", "location", "extraitem", "rentalsource", "salesrep", “agency” and “respayment”

Over time, we may add more methods for exports.  If you see a method here that is unavailable in your system, please contact us at support@rentalcarmanager.com to request access.

 

DATA RETURNED

All data will be returned in as a JSON file.  The data will be in the form

[{first record},{next record}, {record 3}, {…}, {last record}]

where record = “fieldname1”:”fieldvalue1”,”fieldname2”:”fieldvalue2”, … ,”fieldnameX”:”fieldvalueX”

No records found will return “[]”

 

---------------------------------------------

 

RESERVATIONS

key = key value as above

method = "repbookingexport"

lid = Integer location id to restrict report by.  A value of 0 returns all locations.

sd = Start date - bookings altered on or after this date will be returned.  String format is yyyyMMdd-HHmm.

ed = End date - bookings altered on or before this date will be returned. String format is yyyyMMdd-HHmm

 

Example call - {URL}?key={key}&method=repbookingexport&lid=2&sd=20160501-0000&ed=20160502-0000

 

Please note – volumes for this export can be very large.  Please restrict to small periods for the export (e.g. daily)

 

-------------------------------------------------

 

VEHICLES

key = key value as above

method = "vehicle"

vid = Integer vehicle id to restrict report by.  A value of 0 returns all vehicles.

sd = Start date - vehicles altered on or after this date will be returned.  String format is yyyyMMdd-HHmm.

ed = End date - vehicles altered on or before this date will be returned. String format is yyyyMMdd-HHmm

 

Example call - {URL}?key={key}&method=vehicle&vid=0&sd=20160501&ed=20160515

 

-------------------------------------------------

 

CUSTOMERS

key = key value as above

method = "customer"

cid = Integer customer id to restrict report by.  A value of 0 returns all customers.

sd = Start date - customer records or last hire dates altered on or after this date will be returned.  String format is yyyyMMdd-HHmm.

ed = End date - customer records or last hire dates altered on or before this date will be returned. String format is yyyyMMdd-HHmm

 

Example call - {URL}?key={key}&method=customer&cid=0&sd=20170101-0900&ed=20170102-0900

 

------------------------------------------------------

 

LOCATIONS

key = key value as above

method = "location"

lid = Integer location id to restrict report by.  A value of 0 returns all locations.

 

Example call - {URL}?key={key}&method=location&lid=2

 

-------------------------------------------------------

 

EXTRA ITEMS

key = key value as above

method = "extraitem"

eid = Integer extraItem id to restrict report by.  A value of 0 returns all items.

 

Example call - {URL}?key={key}&method=extraitem&eid=2

 

---------------------------------------------------------

 

RENTAL SOURCES

key = key value as above

method = "rentalsource"

rid = Integer rental source id to restrict report by.  A value of 0 returns all rental sources.

 

Example call - {URL}?key={key}&method=rentalsource&rid=2

 

----------------------------------------------------------

 

OPERATORS (SALES REPRESENTATIVES)

key = key value as above

method = "salesrep"

uid = Integer user id to restrict report by.  A value of 0 returns all users.

 

Example call - {URL}?key={key}&method=salesrep&uid=2

 

-------------------------------------------------------------

 

EXTRA FEES

key = key value as above

method = "bookingextrafees"

lid = Integer location id to restrict report by.  A value of 0 returns all locations.

res = Integer reservation number to restrict report by. A value of 0 returns all reservations. Note a value in this field will be matched against allocated reservationNo and unallocated reservationNos. Returned data will indicate which field was matched.

sd = Start date - bookings altered on or after this date will be returned.  String format is yyyyMMdd-HHmm.

ed = End date - bookings altered on or before this date will be returned. String format is yyyyMMdd-HHmm

 

Example call - {URL}?key={key}&method=bookingextrafees&lid=2&sd=20150501&ed=20150515&res=10232

 

-------------------------------------------------

 

AGENCIES

key = key value as above

method = "agency"

There are no additional parameters for this call

 

Example call - {URL}?key={key}&method=agency

 

-------------------------------------------------------------

 

RESERVATION PAYMENTS

key = key value as above

method = "respayment"

sd = Start date - bookings altered on or after this date will be returned.  String format is yyyyMMdd-HHmm.

ed = End date - bookings altered on or before this date will be returned. String format is yyyyMMdd-HHmm

 

Example call - {URL}?key={key}&method=respayment&sd=20150501-0900&ed=20150502-0900

-------------------------------------------------------------

RESERVATION NOTES

key = key value as above

method = "resnotes"

res = Integer reservation number to restrict report by. A value of 0 returns all reservations. Note a value in this field will be matched against allocated reservationNo and unallocated reservationNos. Returned data will indicate which field was matched.

sd = Start date - notes altered on or after this date will be returned.  String format is yyyyMMdd-HHmm.

ed = End date - notes altered on or before this date will be returned. String format is yyyyMMdd-HHmm


Example call - {URL}?key={key}&method=resnotes&res=0&sd=20180501-0900&ed=20180502-0900


------------------------------------------------------------------

SEASON RATES

key = key value as above

method = "season"

There are no additional parameters for this call

 

Example call - {URL}?key={key}&method=season

-------------------------------------------------------------

 RESERVATION RATES

key = key value as above

method = "paymentdetails"

sd = Start date - bookings rates altered on or after this date will be returned.  String format is yyyyMMdd-HHmm.

ed = End date – bookings rates altered on or before this date will be returned. String format is yyyyMMdd-HHmm

res = Integer reservation number to restrict report by. A value of 0 returns all reservations. Note a value in this field will be matched against allocated reservationNo and unallocated reservationNos. Returned data will indicate which field was matched.

lid = Integer location id to restrict report by (as pickup location).  A value of 0 returns all locations.

 

Example call - {URL}?key={key}&method=paymentdetails&sd=20150501-0900&ed=20150502-0900&lid=1&res=10231

------------------------------------------------------------

VEHICLE SERVICE RECORDS

key = key value as above

method = "service"

sd = Start date - service records entered or closed on or after this date will be returned.  String format is yyyyMMdd.

ed = End date – service records entered or closed on or before this date will be returned. String format is yyyyMMdd.

lid = Integer location id to restrict report by (as Branch).  A value of 0 returns all locations.

 

Example call - {URL}?key={key}&method=service&sd=20150501&ed=20150502&lid=1

-------------------------------------------------------------

ON ROAD REPAIRS

key = key value as above

method = "onroad"

sd = Start date - repair records entered on or after this date will be returned.  String format is yyyyMMdd.

ed = End date – repair records entered on or before this date will be returned. String format is yyyyMMdd.

 

Example call - {URL}?key={key}&method=service&sd=20150501&ed=20150502&lid=1

-------------------------------------------------------------

MAINTENANCE BOOKINGS

key = key value as above

method = "maintenance"

sd = Start date - repair records entered on or after this date will be returned.  String format is yyyyMMdd-HHmm.

ed = End date – repair records entered on or before this date will be returned. String format is yyyyMMdd-HHmm.

lid = Integer location id to restrict report by (as pickup location).  A value of 0 returns all locations.

 

Example call - {URL}?key={key}&method=maintenance&lid=1&sd=20150501-0900&ed=20150502-0900


---------------------------------------------------------------

AGENT PAYMENTS

key = key value as above

method = "agentpayment"

sd = Start date - payments entered on or after this date will be returned.  String format is yyyyMMdd.

ed = End date – payments entered on or before this date will be returned. String format is yyyyMMdd.


Example call - {URL}?key={key}&method=agentpayment&sd=20150501&ed=20150502

--------------------------------------------------------------

AGENT RATES

key = key value as above

method = "agentrates"

sd = Start date - rates for seasons starting on or after this date will be returned.  String format is yyyyMMdd.

ed = End date – rates for seasons ending on or before this date will be returned. String format is yyyyMMdd.


Example call - {URL}?key={key}&method=agentrates&sd=20180101&ed=20180201

--------------------------------------------------------------


SHARED SECRET ACCESS

For those API clients who do not have a fixed IP address, we will issue a "Shared Secret" along with your secure key.

If you have been issued with this secret key then you will need to sign each request using the HMACSHA256 protocol. 

To create the signature: 

1. Get the part of the request URL following the domain information (including the entire query string). 

2. Use the hash secret to sign the part of the URL using HMACSHA256. 

3. Add the hex encoded result to the header of the request as the signature. 

Sample VB Code for requesting agencies:

 
    Public Sub ReturnsMultipleRecords_Demo()
      Dim domain As String = "https://[rentalcarmanager domain here]"
      Dim urlpath As String = "/APIExport/ReservationsExport.ashx"
      Dim secureKey As String = "[secure key here]"
      Dim url As String = urlpath & "?key=" & secureKey & "&method=agency"  'add other parameters here as required

      Dim sharedSecret As String = "[shared secret here]"
      Dim encoding = New System.Text.UTF8Encoding
      Dim myHMAC As New HMACSHA256(encoding.GetBytes(sharedSecret))

      'Hash the url
      Dim hashedBytes As Byte() = myHMAC.ComputeHash(encoding.GetBytes(url))

      'Convert the hash to hex
      Dim strSignature As New StringBuilder(hashedBytes.Length * 2)
      Dim hex As String
      For Each b As Byte In hashedBytes
        hex = Conversion.Hex(b)
        If hex.Length = 1 Then hex = "0" & hex
        strSignature.Append(hex)
      Next

      Using client As New WebClient()
        client.Headers.Add("signature", strSignature.ToString())
        Dim response As String = client.DownloadString(domain & url)
        Console.WriteLine(domain & url)
        'Check response
        Console.WriteLine(response)
        Dim list As List(Of AgencyRecord) = JsonConvert.DeserializeObject(Of List(Of AgencyRecord))(response)
        Console.WriteLine("Found Records: " & list.Count)
      End Using
    End Sub
  
 

During development, please try testing using the following credentials, which will connect to one of our demonstration systems.  If you are able to get a list of sample agencies, then you may proceed to test with the server/key/shared secret that you have been issued:

DOMAIN: "https://demo.rentalcarmanager.com"

SECURE_KEY:  "d2ViLnJlbnRhbGNhcm1hbmFnZXIuY29tL0FVUkNNRGV2NDM4L0hNQUM="

SHARED_SECRET:  "st_w23Zp(Q;/*34@e7M7WA78*u^P-%TV" 


--------------------------------------------------------------