> ## Documentation Index
> Fetch the complete documentation index at: https://docs.d-edge.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This site documents the D-EDGE APIs for technology partners (web agencies, OTAs, PMS and RMS vendors, booking and CRM tools). It is written for developers integrating with hotels that use the D-EDGE platform.
> Seven APIs, grouped by domain. Connectivity: Channel Manager API (distribute a hotel's inventory to your channel and send bookings back). Pricing & Availability: Best Price API (best offers to highlight), Quotation API (all bookable offers for a stay), Daily Rates API (daily availability between two dates). Booking: Booking Engine API (a hotel's full direct booking funnel), Gift Shop API (gift vouchers from catalogue to payment). Guest Management: CRM API (guest profiles).
> Pick the API by the need: to display prices, use the Best Price API or the Daily Rates API; to quote a specific stay, use the Quotation API; to book, use the Booking Engine API; to sell gift vouchers, use the Gift Shop API; to manage guest profiles, use the CRM API; to receive hotel inventory and send bookings back as a distribution channel, use the Channel Manager API.
> Base URLs, hotel identifiers, and credentials are delivered by the D-EDGE partnership team during onboarding. Do not invent base URLs, endpoints, parameters, or example credentials that do not appear on these pages.
> Authentication differs per API: OAuth 1.0 for Best Price, Quotation, Daily Rates, and Booking Engine; an X-API-KEY header for Gift Shop; OAuth 2.0 client credentials for CRM; partner-defined credentials carried in the XML message for the Channel Manager API. Read each API's Authentication page before writing code.
> A mock environment returns realistic but fictitious data without credentials. The Postman and Insomnia collections on the API collections page target it by default. Use it for exploration and tests, never for production traffic.
> Use the official names exactly: D-EDGE, D-EDGE platform, Channel Manager API, partnership team. Do not use Back Office or Extranet.
> Each API has a Changelog page. Check it for the current behaviour before relying on an older answer. For questions these pages do not answer, direct the reader to the Contact us page.

# Get a guest

> Read a guest profile by identifier



## OpenAPI

````yaml crm-api/open-api/crm-api.json GET /api/guestprofile/entities/{entity_id}/guests/{guest_id}
openapi: 3.0.3
info:
  description: >-
    D-EDGE CRM Guest Profile is a CDP (Customer Data Platform).


    Guest Profile API allows every authenticated user or third party system to
    interact with D-EDGE CRM Guest Profile data.


    The API can be accessed with a valid OAuth bearer token obtained towards the
    D-EDGE CRM ID server either by hotel agents or by third party systems dully
    registered on D-EDGE CRM ID.
  version: '1.0'
  title: Guest Profile API
servers:
  - url: https://{apiBaseUrl}
    variables:
      apiBaseUrl:
        default: api.example.com
        description: Base URL delivered by D-EDGE during partnership setup
security:
  - bearerAuth: []
paths:
  /api/guestprofile/entities/{entity_id}/guests/{guest_id}:
    parameters:
      - name: entity_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: guest_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    get:
      tags:
        - Guest
      summary: Get
      description: >-
        Returns guest based on ID with entity view. If the guest is merged, il
        will return the merged guest.
      operationId: getGuestById
      parameters:
        - name: redirect
          in: query
          description: >-
            If the guest is merged, redirect=false will force to return the
            original guest (default is true)
          required: false
          schema:
            type: boolean
        - name: expand
          in: query
          description: >-
            Return the source profiles of a merged guest in full. Without it,
            composedWith holds their identifiers; with it, it holds the profiles
            themselves.
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: The guest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/guest'
              examples:
                guest:
                  $ref: '#/components/examples/guest'
        '400':
          $ref: '#/components/responses/InvalidQueryOrParams'
        '401':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    guest:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/guestType'
        title:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              description: Form of address of the guest.
              type: string
              enum:
                - MS
                - MRS
                - MR
                - MR&MRS
        gender:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              description: Gender of the guest.
              type: string
              enum:
                - M
                - F
                - X
        firstname:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: string
              maxLength: 255
        lastname:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: string
              maxLength: 255
        middlename:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: string
              maxLength: 255
        company:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: object
              properties:
                title:
                  type: string
                  maxLength: 255
                company:
                  type: string
                  maxLength: 255
        birthdate:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: object
              properties:
                birthdate:
                  type: string
                  format: date
                range_min:
                  type: string
                  format: date
                range_max:
                  type: string
                  format: date
        pmsId:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: object
              properties:
                id:
                  type: string
                  maxLength: 255
                pms:
                  type: string
        loyalty:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: object
              properties:
                program:
                  type: string
                  maxLength: 255
                id:
                  type: string
                  maxLength: 255
                status:
                  type: string
                  maxLength: 255
                points:
                  type: integer
        languages:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: string
                minLength: 2
                maxLength: 2
        nationalities:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: string
                minLength: 2
                maxLength: 2
        emails:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: object
                properties:
                  email:
                    type: string
                    format: email
        phones:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: object
                properties:
                  phone:
                    type: string
                  internationalFormat:
                    type: string
                  nationalFormat:
                    type: string
                  country:
                    type: string
                  type:
                    type: string
        notes:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: string
        addresses:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: object
                properties:
                  street:
                    type: string
                  city:
                    type: string
                  zipcode:
                    type: string
                  state:
                    type: string
                  country:
                    type: string
                    minLength: 2
                    maxLength: 2
                  timezone:
                    type: string
        socials:
          type: object
          properties:
            linkedin:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: object
                  properties:
                    url:
                      type: string
                    followers:
                      type: integer
            twitter:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: object
                  properties:
                    url:
                      type: string
                    followers:
                      type: integer
            facebook:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
            avatar:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
            website:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
        documents:
          type: object
          properties:
            passport:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: object
                  properties:
                    id:
                      type: string
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                    issued:
                      type: string
                      format: date
                    expires:
                      type: string
                      format: date
            identityCard:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: object
                  properties:
                    id:
                      type: string
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                    issued:
                      type: string
                      format: date
                    expires:
                      type: string
                      format: date
            drivingLicence:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: object
                  properties:
                    id:
                      type: string
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                    issued:
                      type: string
                      format: date
        optedOut:
          type: object
          properties:
            marketing:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
            prestay:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
            app:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
            sendinblue:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
        customFields:
          type: object
          properties:
            text_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
                  maxLength: 2028
            numeric_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: number
            date_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
                  format: date
            boolean_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
            list_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
        tags:
          type: array
          items:
            type: string
        revenue:
          type: number
        composedWith:
          description: >-
            When the guest is merged, this property holds all guests IDs who
            compose the guest
          type: array
          items:
            type: string
            format: uuid
    guestType:
      description: >-
        Kind of profile. A profile produced by a merge carries merge, and
        reading one of its sources returns it.
      type: string
      enum:
        - guest
        - extra
        - merge
      default: guest
    from:
      description: >-
        Who provided the information: the hotel staff, the guest, the property
        management system, or the D-EDGE platform. Set it to the real origin of
        the data you send rather than a constant.
      type: string
      enum:
        - agent
        - guest
        - pms
        - system
    error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        data:
          type: object
  examples:
    guest:
      value:
        entityId: 8dfd708c-9584-4ed3-8e2c-415afb373a13
        firstname:
          from: pms
          value: Martin
          updated: '2023-03-09T13:19:40+00:00'
        pmsId:
          from: pms
          value:
            id: '139569'
            pms: protelio
          updated: '2023-03-09T13:19:40+00:00'
        type: guest
        optedOut:
          prestay:
            from: agent
            value: false
            updated: '2023-03-09T13:19:40+00:00'
          marketing:
            from: guest
            value: true
            updated: '2023-03-09T13:19:40+00:00'
        socials:
          avatar:
            from: agent
            value: https://www.example.com/avatars/martin-dupont.png
            updated: '2023-03-09T13:19:40+00:00'
          twitter:
            from: system
            value:
              url: https://twitter.com/example
              followers: 500
            updated: '2023-03-09T13:19:40+00:00'
          website:
            from: system
            value: https://www.example.com
            updated: '2023-03-09T13:19:40+00:00'
          linkedin:
            from: system
            value:
              url: https://www.linkedin.com/in/example
            updated: '2023-03-09T13:19:40+00:00'
        lastname:
          from: pms
          value: Dupont
          updated: '2023-03-09T13:19:40+00:00'
        birthplace:
          from: pms
          value:
            city: La Rochelle
            country: FR
            zipcode: '17000'
          updated: '2023-03-09T13:19:40+00:00'
        extra: 3ef1a024-8293-49c8-b17f-24bb96c9f50e
        loyalty:
          from: guest
          value:
            id: '123456789'
            points: 107
            status: gold
            program: hotelrewards
          updated: '2023-03-09T13:19:40+00:00'
        phones:
          - value:
              phone: '+33600000000'
              countryCode: FR
              internationalFormat: +33 6 00 00 00 00
              nationalFormat: 06 00 00 00 00
              type: mobile
            from: guest
            preferred: true
        languages:
          - from: guest
            value: fr
            updated: '2023-03-09T13:19:40+00:00'
          - from: guest
            value: es
            updated: '2023-03-09T13:19:40+00:00'
            preferred: true
        title:
          from: pms
          value: MRS
          updated: '2023-03-09T13:19:40+00:00'
        notes:
          - value: Prefers a quiet room away from the lift.
            from: agent
        gender:
          from: system
          value: M
          updated: '2023-03-09T13:19:40+00:00'
        addresses:
          - from: guest
            value:
              city: Ramonville Saint-Agne
              state: Occitanie
              street: 12 avenue de l'Europe
              country: FR
              zipcode: '31520'
            updated: '2023-03-09T13:19:40+00:00'
          - from: agent
            value:
              city: Paris
              state: Ile-De-France
              street: 21 rue de Rocroy
              country: FR
              zipcode: '75000'
            updated: '2023-03-09T13:19:40+00:00'
            preferred: true
        nationalities:
          - from: guest
            value: FR
            updated: '2023-03-09T13:19:40+00:00'
          - from: guest
            value: ES
            updated: '2023-03-09T13:19:40+00:00'
            preferred: true
        company:
          from: guest
          value:
            title: Web developer
            company: D-EDGE CRM
          updated: '2023-03-09T13:19:40+00:00'
        middlename:
          from: guest
          value: Fitzgerlad
          updated: '2023-03-09T13:19:40+00:00'
        id: ef779d32-deca-4bd1-853d-07987e82027c
        createdAt: '2023-03-09T13:19:40.000000Z'
        birthdate:
          from: guest
          value:
            birthdate: '1987-02-20'
          updated: '2023-03-09T13:19:40+00:00'
        emails:
          - value:
              email: martin.dupont@example.com
            from: pms
            preferred: true
        composedWith: []
  responses:
    InvalidQueryOrParams:
      description: URL Params/Request body error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Invalid params:
              value:
                code: system.invalidParams
                message: invalid property
            Invalid query:
              value:
                code: system.invalidQuery
                message: invalid property
    AccessDenied:
      description: Access denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Access denied:
              value:
                code: system.accessDenied
                message: system.accessDenied
                data: {}
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Not found:
              value:
                code: system.notFound
                message: system.notFound
                data: {}
    Timeout:
      description: Service timeout
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Service timeout:
              value:
                code: system.timeout
                message: system.timeout
                data: {}
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Internal error:
              value:
                code: system.internalError
                message: system.internalError
                data: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.