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

# Create a guest

> Create a guest profile on an entity



## OpenAPI

````yaml crm-api/open-api/crm-api.json POST /api/guestprofile/entities/{entity_id}/guests/create
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/create:
    post:
      tags:
        - Guest
      summary: Create
      description: Create guest on entity
      operationId: createGuest
      parameters:
        - name: entity_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/guest'
            examples:
              guest:
                $ref: '#/components/examples/new_guest'
      responses:
        '200':
          $ref: '#/components/responses/CreatedResourceWithLocation'
        '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:
    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:
    new_guest:
      value:
        title:
          value: MRS
          from: pms
        gender:
          value: M
          from: system
        pmsId:
          value:
            id: '139569'
            pms: protelio
          from: pms
        lastname:
          value: Dupont
          from: pms
        firstname:
          value: Martin
          from: pms
        middlename:
          value: Fitzgerlad
          from: guest
        birthdate:
          value:
            birthdate: '1987-02-20'
          from: guest
        birthplace:
          value:
            city: La Rochelle
            zipcode: '17000'
            country: FR
          from: pms
        company:
          value:
            title: Web developer
            company: D-EDGE CRM
          from: guest
        loyalty:
          value:
            program: hotelrewards
            id: '123456789'
            status: gold
            points: 107
          from: guest
        optedOut:
          marketing:
            value: true
            from: guest
          prestay:
            value: false
            from: agent
        addresses:
          - value:
              street: 12 avenue de l'Europe
              zipcode: '31520'
              city: Ramonville Saint-Agne
              state: Occitanie
              country: FR
            from: guest
          - value:
              street: 21 rue de Rocroy
              zipcode: '75000'
              city: Paris
              state: Ile-de-France
              country: FR
            from: agent
        emails:
          - value:
              email: martin.dupont@example.com
            from: guest
        nationalities:
          - value: FR
            from: guest
          - value: ES
            from: guest
        languages:
          - value: fr
            from: guest
          - value: es
            from: guest
        customFields:
          guest_status:
            value: DIAMOND
            from: guest
          option:
            value: '2022-02-19'
            from: guest
          lunch:
            value: true
            from: guest
          spa_revenus:
            value: 888
            from: guest
        socials:
          avatar:
            value: https://www.example.com/avatars/martin-dupont.png
            from: agent
          website:
            value: https://www.example.com
            from: system
          facebook:
            value: https://www.facebook.com/example
            from: agent
          linkedin:
            value:
              url: https://www.linkedin.com/in/example
            from: system
          twitter:
            value:
              url: https://twitter.com/example
              followers: 500
            from: system
        documents:
          identity_card:
            value:
              id: '123456789'
            from: pms
          passport:
            value:
              id: '123456789'
            from: pms
          driving_licence:
            value:
              id: '123456789'
            from: pms
  responses:
    CreatedResourceWithLocation:
      description: Resource
      headers:
        location:
          description: Location of the newly created 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.