Legacy Agency API → Agency V2 Migration Guide

Use this guide when moving an OTA, GDS, Reslynx, or Fiche Client integration from the previous /api/client/add payload or the temporary /api/oag/* compatibility surface to the current Agency V2 contract.

Terminology: “Legacy OAGAPI” on this page means the old Reslynx/Fiche Client application API. It is separate from the configured OAG flight-information provider and the OAG webhook.
Current target

Agency V2

/api/v2/agency/*

CURRENT

Authentication

Bearer API key

Authorization: Bearer <api_key>

Do not send the legacy ClientId in V2 requests.

Interactive contract

Agency API Reference

Open the current OpenAPI documentation

Request and response schemas are generated from the running routes.

1. Endpoint migration

Previous endpointCurrent endpointRequired change
POST /api/client/addPOST /api/client/add or POST /api/v2/agency/bookExisting Reslynx/Formulaire clients keep the VER-JSONAPI path and payload. New partners should use Agency V2 snake_case with a Bearer API key.
POST /api/oag/postjsonPOST /api/v2/agency/bookThe compatibility endpoint still writes data but is deprecated. Move authentication, field names, date formats, and response handling to V2.
POST /api/oag/addpaxPOST /api/v2/agency/bookUse a stable external_id for create/update behavior instead of a legacy passenger-index workflow.
GET /api/oag/RegistrationFicheClient
GET /api/oag/NotificationFicheClient
GET /api/v2/agency/bookings/{trip_id}The old FNB calls now return empty arrays. Read the stored booking and its current normalized flight status from Agency V2.
POST /api/oag/updatestatut
POST /api/oag/modifieragence
POST /api/oag/StatutDossierUpdate
No external write replacementThese compatibility calls are no-ops. Booking updates use POST /api/v2/agency/book with the same external_id; claim and back-office status changes remain internal workflows.

2. Authentication migration

SurfaceCredentialsAudience
AGENCY V2Authorization: Bearer <api_key>Current external travel-agency integrations.
LEGACY COMPATIBILITYX-ClientId: <client_id>
X-ApiKey: <api_key>
The aliases ClientId and ApiKey are also accepted.
Only the seven compatibility paths listed in section 5.
STAFF ONLYMicrosoft Entra staff JWTAll other current /api/oag/* management and reporting routes. They are not partner endpoints.

3. Booking payload field mapping

Legacy fieldAgency V2 fieldConversion
locatorlocatorStill required. Maximum 50 characters.
No equivalentexternal_idRequired non-empty string, maximum 100 characters. Keep one stable agency reference for corrections or updates.
pax[].firstname / surnamepassengers[].first_name / last_nameBoth names are required for every supplied passenger.
Passenger typepassengers[].passenger_typeRequired adult or minor. Infant/baby is not supported; minors never create user accounts. phone_type is not a V2 field.
Ticket numberflights[].ticket_numberOptional ticket number for each flight segment.
pax[].dobpassengers[].date_of_birthConvert YYYYMMDD to YYYY-MM-DD.
pax[].cellphonepassengers[].phone_numberThe V2 field accepts the agency-provided phone format.
pax[].emailpassengers[].emailEvery adult requires an email; minors do not. A complete booking requires an adult, and the first adult becomes the voyage owner.
segments[].carrierflights[].iata_codeSend the IATA code if the flight number lacks a carrier prefix. The server resolves the airline name; do not send airline.
segments[].fltnumflights[].flight_numberRequired string, maximum 20 characters.
segments[].gateway / destflights[].departure_airport / arrival_airportSend airport IATA codes. Validated provider data may correct them.
segments[].depdateflights[].flight_dateConvert YYYYMMDD to YYYY-MM-DD.
segments[].deptimeflights[].departure_timeConvert HHmm to HH:mm or HH:mm:ss.
agent.firstname / name / emailtravel_agent.first_name / last_name / emailThe whole travel_agent object is optional; all three fields are required when it is supplied.

4. Booking outcomes and retry rules

SituationHTTPStored result and client action
Both passengers and flights empty400The attributable submission attempt is retained, but no booking record is created. Correct the payload and resend the same external_id.
Passengers only or flights only201 / 200Accepted as an incomplete booking record. The normalized passengers and flights in the response remain empty until a complete resubmission succeeds.
Passengers and flights with a valid owner email and all required fields201 / 200Creates or updates normalized voyage, passenger, flight, and optional travel-agent data.
Adult passenger without email400The submission is retained. Add the booking-owner email and resend the same external_id.
Flight identity is unknown to an external provider201 / 200Agency APIs do not query OAG, AeroDataBox, or another provider before persistence. The travel agency is responsible for confirming that each flight exists.
Missing departure airport, arrival airport or departure time400Supply all required flight details. Skipping the external existence lookup does not waive these schema requirements.
Update after any stored flight has departed400The update is rejected and retained for operations review.
Update when the booking already has a claim409The update is rejected to protect the claim snapshot.
Error handling: authenticated, parseable Agency V2 submissions include error.external_id, error.submission_id, and error.persisted=true when the failed attempt was retained. Malformed JSON or a request that cannot be attributed to an authenticated agency may return persisted=false. Do not generate a new external_id merely to retry a correction.

5. Legacy external compatibility paths

These routes remain mounted so existing integrations can transition without an immediate cutover. They keep the legacy X-ClientId + X-ApiKey authentication contract.

PathCurrent behaviorMigration target
GET /api/oag/RegistrationFicheClientCOMPATIBILITY Returns an empty array; FNB registration is disconnected.GET /api/v2/agency/bookings/{trip_id}
GET /api/oag/NotificationFicheClientCOMPATIBILITY Returns an empty array; the legacy notification query is disconnected.GET /api/v2/agency/bookings/{trip_id}
POST /api/oag/postjsonCOMPATIBILITY Persists a legacy booking when the first passenger email already belongs to a user.POST /api/v2/agency/book
POST /api/oag/updatestatutCOMPATIBILITY Static success response; no database write.No external replacement.
POST /api/oag/modifieragenceCOMPATIBILITY Static success response; no database write.No external replacement.
POST /api/oag/StatutDossierUpdateCOMPATIBILITY Static success response; no database write.No external replacement.
POST /api/oag/addpaxCOMPATIBILITY Creates voyage, passenger, and optional flight data using legacy fields.POST /api/v2/agency/book

6. Removed legacy paths

Legacy pathRuntime statusCurrent alternative
POST /api/oag/SendSMSFicheClient
POST /api/oag/SaveLogSMS
GET /api/oag/GetLogSMSByCellphone
GET /api/oag/GetLogSMSByBagageAndEmbarquement
GET /api/oag/GetRepondPaxForExcel
GET /api/oag/GetRecuWelcomeForExcel
REMOVED (404)No direct external Agency V2 equivalent. Product notifications are managed by the current notification workflows.
GET /api/oag/file
GET /api/oag/file/download
DELETE /api/oag/file/delete
POST /api/oag/file/upload
REMOVED (404)Authenticated mobile users upload profile pictures and claim evidence through the dedicated Mobile API endpoints.

7. Staff-only legacy routes

Remaining /api/oag/* passenger, segment, note, report, message, and URL-configuration routes are the old back-office API and should be retired. They require a staff JWT and are not a travel-agency contract. Do not add new integrations against them.

Cutover checklist

  1. Obtain the Agency V2 API key and switch to the Authorization Bearer header.
  2. Generate and persist one stable external_id reference per agency booking.
  3. Convert legacy names, dates, times, passengers, flights, and travel-agent fields.
  4. Handle accepted incomplete records separately from normalized bookings.
  5. Implement the 400 / 409 / 422 retry rules above.
  6. Verify create, correction, duplicate external_id, and provider-outage scenarios in the target environment.
Agency V2 API Reference API Home