Skip to main content

Update Contact

Update the contact information for an existing booking (PNR). This endpoint allows you to change the contact name, phone, and email for a booking.


Endpoint

  • URL: /api/v1/flight/updatecontact
  • Method: POST
  • Auth Required: Yes (Bearer Token/X-API-KEY)
  • Content-Type: application/json

Authentication

This endpoint requires a valid JWT Bearer token in the Authorization header:

Authorization: Bearer <access_token>

Obtain tokens via /api/v1/sign-in (POST) with your credentials.


Request Structure

FieldTypeRequiredDescription
systemstringNoBooking system code
bookingCodestringNoBooking code (PNR)
fullNamestringNoContact full name
phonestringNoContact phone number
emailstringNoContact email address

Example Request:

{
"system": "VN",
"bookingCode": "ABC123",
"fullName": "Nguyen Van A",
"phone": "+84901234567",
"email": "contact@example.com"
}

Request Constraints & Business Rules

  • Only bookings that exist and are eligible for update can have their contact information changed.
  • The bookingCode must match an existing booking.
  • The contact information should be valid and up-to-date.
  • All changes are auditable via trackingId and trackingTime.

Response Structure

FieldTypeNullableDescription
systemstringYesSystem name (e.g., VN, VJ)
statusbooleanNotrue if successful, false if failed
errorobjectYesError code object
descriptionstringYesError message or status description
trackingIdstringYesRequest tracking ID
trackingTimestringYesRequest tracking timestamp

Example Response:

{
"system": "VN",
"status": true,
"description": "Contact updated successfully",
"trackingId": "abc-123",
"trackingTime": "2024-06-01T12:00:00Z"
}

Error Codes

See Error Codes for details on possible error responses.


Security & Validation

  • All input is validated for type and required fields.
  • Only authenticated users can access this endpoint.
  • All actions are logged and traceable.

Validation Questions

  • What are the allowed states for a booking to update contact info?
  • Are there restrictions on which fields can be updated?
  • What happens if the booking does not exist or is not eligible for update?

For integration support, see Contact Support.