customers

Retrieve customer or agency information from inbound contacts

post/v0/inbound_contacts

Request

  • Base URL: https://api.clubmed.com
  • URL: https://api.clubmed.com/v0/inbound_contacts
  • Auth: OpenID Connect (https://auth.clubmed.com/.well-known/openid-configuration, scopes: openid, email, profile, clubmed)

Headers

x-api-keystring required

Api_key provided by ClubMed API team

authorizationstring required

Optional Access Token (bearer)

Example:Bearer aaaa.vbbbB.bbbb

Access Token (bearer)

Request body

idstring required

call id

Example request

{
  "id": "123456",
  "line_called": {
    "phone_number": "+33125456985",
    "type": "DIRECT",
    "label": "FR 0810 DIRECT",
    "country_code": "FR",
    "site_code": "301"
  },
  "caller": {
    "country_code": "FR",
    "salesman_id": "123456",
    "phone_number": "+33123456789",
    "channel": "WHATSAPP"
  },
  "search_history": {
    "max_events": 1,
    "max_history": 2
  }
}

Response

ok

idstring required

call id

channel'WHATSAPP' | 'PHONE'

Type of incoming communication used

phone_numberstring

Formatted caller phone number

identification_status'SINGLE_CONTACT' | 'SingleContact' | 'MULTIPLE_CONTACT' | 'MultipleContact' | 'TOO_MUCH_CONTACT' | 'TooMuchContact' | 'SINGLE_AGENCY' | 'SingleAgency' | 'MULTIPLE_AGENCY' | 'MultipleAgency' | 'TOO_MUCH_AGENCY' | 'TooMuchAgency' | 'SINGLE_CE' | 'SingleCE' | 'MULTIPLE_CE' | 'MultipleCE' | 'TOO_MUCH_CE' | 'TooMuchCE' | 'SINGLE_SALESMAN' | 'SingleSalesman' | 'NOT_RECOGNIZED' | 'NotRecognized'

Gives identification information about the caller

Example response

{
  "id": "123456",
  "channel": "WHATSAPP",
  "phone_number": "0102030405",
  "identification_status": "SINGLE_CONTACT",
  "customers": [
    {
      "cxo_account_id": "1231",
      "cxo_contact_id": "4564",
      "customer_id": "123456789",
      "last_name": "Martin",
      "unicode_last_name": "Smith",
      "first_name": "Bob",
      "unicode_first_name": "Tom",
      "civility": "MR",
      "unicode_civility": "MR",
      "email": "monemail@domain.fr",
      "language_code": "FR",
      "type": "CLIENT",
      "loyalty": "GOLD",
      "calls_count": 20,
      "today_calls_count": 1,
      "country": "France",
      "city": "Paris",
      "zip_code": "75014",
      "gm_number": "1231561",
      "preferred_agency": "OPERA",
      "lead_scoring": {
        "interest": "NEUTRAL",
        "favorite_product_line": "MOUNTAIN",
        "exclusive_collection": true
      },
      "events": [
        {
          "agent_id": "cme142",
          "last_name": "Martin",
          "unicode_last_name": "Smith",
          "first_name": "Bob",
          "unicode_first_name": "Tom",
          "date": "2020-12-31T23:58:46.000Z",
          "status": "SUCCESS",
          "type": "F2F"
        }
      ],
      "commercial_offers": [
        {
          "amount": 300.5,
          "currency": "EUR",
          "type": "CREDIT_NOTE",
          "validity_start_date": "20180328",
          "validity_end_date": "20180528",
          "origin_type": "CLAIM"
        }
      ],
      "bookings_information": [
        {
          "booking_id": "154585",
          "status": "VALIDATED",
          "expired_date": "20201227",
          "product_id": "MPAC",
          "departure_date": "20201227",
          "product_segmentation": "MOUNTAIN"
        }
      ],
      "alerts": [
        {
          "level": "INFO",
          "type": "OPTINS",
          "cm_id": "123456789",
          "deadline": "20201227",
          "comment": "ARN--2021-12-18 message",
          "expected_payment": {
            "amount": 300.5,
            "currency": "EUR"
          }
        }
      ],
      "save_proposals": [
        {
          "proposal_id": "123456",
          "product_id": "MPAC",
          "departure_date": "20210112",
          "duration": 6,
          "product_segmentation": "MOUNTAIN"
        }
      ]
    }
  ],
  "agencies": [
    {
      "agency_id": "OPERA",
      "name": "Agence Indir",
      "zip_code": "75008",
      "vip_status": "VIP",
      "networks": [
        {
          "code": "GX",
          "label": "AGENCIES GROUP NATIONAL ACCT"
        }
      ],
      "agent": {
        "salesman_id": "145287",
        "first_name": "John",
        "last_name": "Wick",
        "travel_agent_usage_rate": "45%",
        "unicode_first_name": "Tom",
        "unicode_last_name": "Smith"
      },
      "tops": [
        {
          "xena": true
        }
      ],
      "is_works_council": true,
      "calls_count": 22,
      "events": [
        {
          "agent_id": "cme142",
          "last_name": "Martin",
          "unicode_last_name": "Smith",
          "first_name": "Bob",
          "unicode_first_name": "Tom",
          "date": "2020-12-31T23:58:46.000Z",
          "status": "SUCCESS",
          "type": "F2F"
        }
      ],
      "data_usage": {
        "travel_agent_usage_rate": "45%"
      }
    }
  ],
  "browsing": {
    "current_url": "https://example.url",
    "category": "CAT1",
    "proposal_id": "123456"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.