> ## 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.

# Partially update a guest

> Update a guest differentially, appending to array attributes



## OpenAPI

````yaml crm-api/open-api/crm-api.json PATCH /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
    patch:
      tags:
        - Guest
      summary: Differential update
      description: >-
        Update partially guest based on ID on entity. Array attributes ( like
        languages, nationalies, phones, emails, notes ... ) will append values
        from the request payload.
      operationId: patchGuestById
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/guestUpdate'
            examples:
              guest:
                value:
                  title:
                    value: MR
                    from: guest
                  gender:
                    value: M
                    from: guest
      responses:
        '200':
          $ref: '#/components/responses/ResourceWithLocation'
        '400':
          $ref: '#/components/responses/GuestInvalidQueryOrParams'
        '401':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    guestUpdate:
      type: object
      properties:
        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
            _delete:
              type: boolean
        gender:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              description: Gender of the guest.
              type: string
              enum:
                - M
                - F
                - X
            _delete:
              type: boolean
        firstname:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: string
              maxLength: 255
            _delete:
              type: boolean
        lastname:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: string
              maxLength: 255
            _delete:
              type: boolean
        middlename:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: string
              maxLength: 255
            _delete:
              type: boolean
        company:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: object
              properties:
                title:
                  type: string
                  maxLength: 255
                company:
                  type: string
                  maxLength: 255
            _delete:
              type: boolean
        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
            _delete:
              type: boolean
        pmsId:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/from'
            value:
              type: object
              properties:
                id:
                  type: string
                  maxLength: 255
                pms:
                  type: string
            _delete:
              type: boolean
        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
            _delete:
              type: boolean
        languages:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: string
                minLength: 2
                maxLength: 2
              _delete:
                type: boolean
              _index:
                type: number
              preferred:
                type: boolean
        nationalities:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: string
                minLength: 2
                maxLength: 2
              _delete:
                type: boolean
              _index:
                type: number
              preferred:
                type: boolean
        emails:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: object
                properties:
                  email:
                    type: string
                    format: email
              _delete:
                type: boolean
              _index:
                type: number
              preferred:
                type: boolean
        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
              _delete:
                type: boolean
              _index:
                type: number
              preferred:
                type: boolean
        notes:
          type: array
          items:
            type: object
            properties:
              from:
                $ref: '#/components/schemas/from'
              value:
                type: string
              _delete:
                type: boolean
              _index:
                type: number
        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
              _delete:
                type: boolean
              _index:
                type: number
              preferred:
                type: boolean
        socials:
          type: object
          properties:
            linkedin:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: object
                  properties:
                    url:
                      type: string
                    followers:
                      type: integer
                _delete:
                  type: boolean
            twitter:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: object
                  properties:
                    url:
                      type: string
                    followers:
                      type: integer
                _delete:
                  type: boolean
            facebook:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
                _delete:
                  type: boolean
            avatar:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
                _delete:
                  type: boolean
            website:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
                _delete:
                  type: boolean
        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
                _delete:
                  type: boolean
            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
                _delete:
                  type: boolean
            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
                _delete:
                  type: boolean
        optedOut:
          type: object
          properties:
            marketing:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
                _delete:
                  type: boolean
            prestay:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
                _delete:
                  type: boolean
            app:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
                _delete:
                  type: boolean
            sendinblue:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
                _delete:
                  type: boolean
        customFields:
          type: object
          properties:
            text_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
                  maxLength: 2028
                _delete:
                  type: boolean
            numeric_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: number
                _delete:
                  type: boolean
            date_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
                  format: date
                _delete:
                  type: boolean
            boolean_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: boolean
                _delete:
                  type: boolean
            list_slug:
              type: object
              properties:
                from:
                  $ref: '#/components/schemas/from'
                value:
                  type: string
                _delete:
                  type: boolean
        tags:
          type: array
          items:
            type: string
        revenue:
          type: number
    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
  responses:
    ResourceWithLocation:
      description: Resource
      headers:
        location:
          description: Location of the resource
          schema:
            type: string
          example: >-
            /api/guestprofile/entities/8dfd708c-9584-4ed3-8e2c-415afb373a13/guests/55468764-64be-4fc1-a43f-e37239e012bf
    GuestInvalidQueryOrParams:
      description: URL Params/Request body error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Invalid params:
              value:
                code: system.invalidParams
                message: invalid property
                data:
                  entityId: must be a valid UUID
            Invalid query:
              value:
                code: system.invalidQuery
                message: invalid property
                data:
                  title: must be a string
    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.