API reference

HTS APIs

Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.

PUT/contracts/{id}/contact_infoOther

Update Contact Info

https://fintech.staging.htsapis.com/flights-dafar/v2/contracts/{id}/contact_info

Replace the customer contact info (email, phone number, additional email-only notification recipients, and the primary booker's SMS/push notification preferences) on an existing contract. Send the full contact info; it replaces the stored set. This endpoint never sends notifications — recording SMS/push consent does not trigger delivery, and a request that enables SMS without a phone number is rejected as invalid; verifying the change is the partner's responsibility. The email address is validated the same way as during contract creation; an invalid address returns InvalidEmail. Allowed once the contract is confirmed, including fully-redeemed contracts; rejected for unconfirmed drafts and for voided or concluded contracts, which return InvalidContractStatus.

Parameters

id
path · string
required

A unique identifier for a contract.

Request body application/json · required

email_address
email_address · one of 3
required
Show fields
Exactly one of the following, selected by type:
hashed (hashed) hashed
type
string
required

value: hashed

value
string
required

A stable hash of the user's email address. Must be stable across different API calls and different bookings. Used for transaction correlation for fraud analysis.

Length ≥ 1
literal (literal) literal
type
string
required

value: literal

value
string
required

The actual email address for the user.

Pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$
not_provided (not_provided1) not_provided1
type
string
required

value: not_provided

phone_number
string
Pattern ^\+[1-9][0-9]{1,14}$
additional_recipients
array of additional_contact_info
Show fields
Array of additional_contact_info
email_address
literal1

Email address of the additional recipient to notify.

Show fields
value
string
required

The actual email address for the user.

Pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$
phone_number
string

SMS notifications are not currently supported; a request that includes a phone number is rejected.

Pattern ^\+[1-9][0-9]{1,14}$
notification_preferences
notification_preferences

Consent for the PRIMARY BOOKER (the email_address / phone_number on this contact_info) to receive disruption notifications via SMS/push. Applies to the primary booker only: additional_recipients never receive SMS or push (they are email-only, notification-only). Captured per offer at purchase; does not persist across offers. Recording consent does not trigger delivery.

Show fields
sms
boolean

SMS consent for the primary booker's phone_number. Omit = not specified, true = opt-in, false = declined. Requires phone_number to be present; the request is rejected if sms=true and phone_number is absent.

push
boolean

Push consent for the primary booker. Omit = not specified, true = opt-in, false = declined.

Responses

204
No body.
400Syntactic errors were encountered while handling the request
Array of error
message
string
required
code
string
required
Example
[
  {
    "message": "string",
    "code": "string"
  }
]
401The client could not be authenticated
No body.
403The authenticated client does not have permission to call this endpoint
No body.
404The requested resource could not be found
No body.
422Semantic errors were encountered while handling the request
Array of dafar_update_contact_info_error · one of 2
Items ≥ 1
Exactly one of the following, selected by code:
invalid_contract_status (invalid_contract_status3) invalid_contract_status3
message
string
required

A human-readable message describing the error

code
string
required
invalid_email (invalid_email1) invalid_email1
message
string
required

A human-readable message describing the error

code
string
required
Example
[
  {
    "message": "string",
    "code": "string"
  }
]
499The client cancelled the request
No body.
500The server encountered an internal error
No body.
Request
curl -X PUT "https://fintech.staging.htsapis.com/flights-dafar/v2/contracts/<id>/contact_info" \
  -H "X-Api-Key: $HTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email_address": {
    "type": "string",
    "value": "a8cfcd74832004951b4408cdb0a5dbcd8c7e5243f7fe-244bf72058205241da"
  },
  "phone_number": "string",
  "additional_recipients": [
    {
      "email_address": {
        "value": "john@email.com"
      },
      "phone_number": "string"
    }
  ],
  "notification_preferences": {
    "sms": true,
    "push": true
  }
}'

Examples are generated from the schema where the spec publishes none; field values are illustrative.