Search...
Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt
Filter by Custom Post Type

FreshWorks API Cheatsheet

Modified June 9, 2018 | Created February 7, 2018 | Jeff Valair

Filed under API

1.0 – Login

  • /token
    email={email}&Method=email
    contactId={contactId}&Method=contactid
  • Available profile endpoints when logged in:
    /profile/contact/
    /profile/contact/update
    /profile/contact/password
    /profile/booking/
    /profile/booking/create
    /profile/booking/update

Reference:
grant_type=password&contactid={contactId}&email={email}&password={password}&key={key}&method=[email|contactid]

1.1 – Forgot Password

  • Search Contacts
    /2017-11/contact
  • Trigger password recovery
    /2017-11/contact/password/recovery

    Repeat for each array element returned /2017-11/contact

2.0 – Registration

  • Create contact
    2017-11/contact/create
  • If desired, seamlessly login via /token using password and the returned contactList/contactId.

4.0 – Find a Flight

  • Departure / Arrival
    /2017-11/location
  • Automatically filter arrival locations based on selected departure location.
    /2017-11/location/pairs orย /2017-11/location (pairing: [{…}])
  • Male | Female | Child | Infant
    /2017-11/type

    Will add option in future update to filter by typeList/web/active = true

4.0.1, 4.1.x – Available Flights

Build a route availability lookup.

  1. departureDateStart: “yyyy-mm-dd hh:mm:ss”
  2. departureDateFinish: “yyyy-mm-dd hh:mm:ss”
  3. departureTimeStart: 0
  4. departureTimeFinish: 1440
  5. departureLocationId: [1,2,3..]
    /2017-11/location
  6. arrivaLocationId: [1,2,3…]
    /2017-11/location
  7. classId: [1,2,3..]
    /2017-11/class
    Always set ClassId: [1] (Passengers)
  8. fareId: [1,2,3…]
    /2017-11/type for unknown passengers
    /2017-11/contact/id orย /2017-11/profile/contact for known passenger
    Example:
    Jeff Valair (ContactId: 4), 2x Male, 1x Child
    /2017-11/contact/4 or /2017-11/profile/contact = 22
    /2017-11/type (Male) = 9
    /2017-11/type (Female) 7
    FareId: [22,9,9,7]
  9. booking: [0,1,2] (for internal phone bookings)
    web: [0,1,2] (for online bookings)
    0=Closed; 1=View Only, 2=Open
    Always set to web: [1,2]
  10. Availability calculation for locks (seats) and weight.
    /2017-11/contact/id orย /2017-11/profile/contact for known passenger
    /2017-11/type for unknown passengers
    Example:
    Jeff Valair (ContactId: 4) + John Smith (Male) + Jane Smith (Female)
    /2017-11/contact/4 orย /2017-11/profile/contact = 1 locks, 180 lbs
    /2017-11/type (Male) = 1 locks, 200 lbs
    /2017-11/type (Female) 1 locks, 153 lbs
    Total Locks: 3 locks
    Total Weight: 533 lbs
  • Search routes
    /2017-11/route
  • Flight Results
    Schedule:ย routeList/connections/schedule[hop:1, 2…]
    Recommend if routeList/hub=true
    Schedule:ย routeList/connections/schedule[hop:1]+routeList/hops
    Departure: routeList/departure/date
    Arrival: routeList/arrival/date
    Pricing: routeList/classes/tiers()/total
  • Tier
    Tier: routeList/classes/tiers()/tier
    Total: routeList/classes/tiers()/total
    Conditions:
    /2017-11/tier
  • Is available for booking calculations:
    • routeList/classes/tier/locksMaximum –ย routeList/classes/tier/locksUsed
      >= Total Locks
    • routeList/classes/tier/weightMaximum –ย routeList/classes/tier/weightUsed
      >= Total Weight
    • routeList/classes/tier/web: 2
    • routeList/classes/tier/isRulesValid: true

4.1.2 – Available Flights

  • /2017-11/route/id

4.3.x – Payment Information

  1. Payment API not yet available

4.4.x – Booking Summary

  • routeClassTierId
    /2017-11/route
    routeList/classes/tiers()/routeClassTierId
  1. Fare summary API not yet available, only total
  2. Email confirmation API not yet available
  3. Terms and Conditions API not yet available
  • Create basic booking
    2017-11/profile/booking/create
    Scenario: Customer is making booking for themselves only.
    In /booking/createย you can specify the ContactId, but in /profile/booking/create the ContactId is omitted as it will use the logged in customer.ย  If you specify a group: false, then the owner of the booking is also assumed to be the person travelling.

  • Create group booking
    2017-11/profile/booking/create
    Scenarios: Customer is making a booking which is for or includes anyone else.

3.x – Home, 5.x – My Flights

  • My bookings
    2017-11/profile/booking
    2017-11/profile/booking/id
  • Tier conditions
    2017-11/tier

8.1 – My Account

  • My contact
    2017-11/profile/contact
    2017-11/profile/contact/update

8.2 – My Account (Change Password)

  • My password
    2017-11/profile/contact/password

8.3, 8.4 – My Account (Payment)

  1. Payment API not yet available

8.5 – My Account (Notifications)

  1. Notifications API not yet available

9.x – Customer Care

  • Out of scope except for 9.6 Terms and Conditions.

Possible changes:

  • Branch route pairs underneath each individual location
  • Integrate tier description w/booking

/status

schedule

1 on time
2 delayed
3 cancelled
4 miscellaneous
(unknown)

booking

1 confirmed
2 cancelled
3 waiting list
4 stand by
5 miscellaneous
(unknown)

luggage

1 confirmed
2 cancelled
3 waiting list
4 stand by
5 miscellaneous
(unknown)

state

(unknown)

Booking Status

Confirmed

Cancelled

Waiting List

 

logo
Bitnami