home > support > API > Marketplace API > add travel agent login to operator site

Travel Agent login via API

Add Travel Agent login functionality to an API powered Tour Operator website.

Overview

The process outlined in this document provides an OAuth-like flow allowing TourCMS Marketplace Travel Agents to log into an API powered tour operator website to book.

The agent will be taken to a co-branded, TourCMS-hosted, secure login page where they can choose whether to log into the tour operator website to book, or into the TourCMS Marketpalce to manage their account.

Basic process

  1. Travel Agent clicks an "Agent login" button/link on your site ("POST" recommended)
  2. Call Start New Agent Login API endpoint, store the public/private token pair and redirect the user to the Login Page URL returned
  3. After log in, the agent is returned to your website, along with the public token
  4. Send the corresponding private token to the Retrieve Agent Booking Key endpoint to receive an Agent Booking Key
  5. When calling Start New Booking for a logged in agent, pass the Agent Booking Key.

Sample implementation

A PHP sample implementation of the above process is available on GitHub.

More information