# Appointment types

You can use the /v2/vytemes/:nickname/types endpoints to manage the appointment types of your users.

This API is an extension of the Vyteme API, that's why all url are prefixed with /vyteme/:nickname/. You can refer to the Vyteme API reference to have more informations about Vyteme creation.

# The Appointment type object

Attributes

  • vyteme ObjectId

    The id of Vyteme page connected with this Appointment type.

  • availability ObjectId

    The id of Availability page connected with this Appointment type.

  • name string

    Name of the Appointment type

  • handle string

    Handle is used at the endpoints as a identificator of the Appointment type. Created atomatically from the name by urlifying. For example, name Conference lunch will be transfomed into conference-lunch. Handle is unique within Vyteme page, but not globally. It means that several users with vytemes can have conference-lunch appointment types, but one user will have only one appountment type with that handle.

  • active boolean

    Whether or not the Appointment type is active.

  • message string

    Message shown on the Appointment type page.

  • description string

    Description shown on the Appointment type page.

  • custom hash

    Custom settings for the user Appointment type.

    + Show child attributes

    • custom. auto_message string

      Auto response message when someone book a meeting at this Appointment type.

    • custom. auto_title string

      Auto title for the event.

    • custom. ask_phone boolean

      Whether or not the user must the user must provide their phone number.

    • custom. ask_company boolean

      Whether or not the user must the user must provide their company.

    • custom. block_new_invitee boolean

      If enabled, it prevents people that have booked events on that Vyte booking page to add other invitees to those events. Defaults to false.

    • custom. duration number

      Default duration for the event.

    • custom. set_lang boolean

      Only use if you only accept bookings in one language.

    • custom. enable_api boolean

      To enable API variables.

    • custom. fixed_lang string

      Fixed lang expressed according to ISO 639-1 and the available languages are : fr, en, es, it, pt, de, sv, nl.

    • custom. set_timezone boolean

      Only use if you only accept bookings from people on your own timezone.

    • custom. fixed_timezone string

      Fixed timezone expressed according to TZ database name.

    • custom. event_hide_decline number

      Allow you to set how long (in hours) before the begining of the event the decline button will be hidden. Ex: if set to 24, the decline button will be hidden on the event page 24h before the confirmed date of the event.

    • custom. hide_places boolean

      Hide places from the booking page.

    • custom. hide_support boolean

      Hide support button from the booking page (recommended for an integration).

    • custom. hide_title boolean

      Whether or not people booking can set a title / subject for the event.

    • custom. forbid_add_places boolean

      Whether or not you forbid from suggesting other places from the booking page.

    • custom. min_dates number

      Enforces a minimum number of slots on the booking page (only works for calendar view, not slots view).

    • custom. one_slot boolean

      Whether or not only one slot can be suggested on the calendar view.

    • custom. auto_confirm boolean

      Whether or not the event will be booked as confirmed automatically.

    • custom. invite_title string

      Customize the wording on the booking page.

    • custom. redirect_url string

      Url to redirect people after the booking is made.

    • custom. fixed_places array of hashes

      Set up a list of places on the booking page

THE APPOINTMENT TYPE OBJECT

{
  "vyteme": "5f1b018dc1ac5dc46efc8763",
  "name": "Lunch or dinner",
  "handle": "lunch-or-dinner",
  "message": "Welcome to my booking page",
  "active": true,
  "availability": "5f1b018dc1ac5dc46efc64b8",
  "public": true,
  "description": "My conference appointment type",
  "custom": {
    "auto_message": "Thank you for your booking. See you soon.",
    "auto_title": "RDV {{invitee}} / {{me}}",
    "ask_phone": true,
    "ask_company": false,
    "block_new_invitee": false,
    "duration": 30,
    "set_lang": true,
    "enable_api": true,
    "fixed_lang": "en",
    "set_timezone": true,
    "fixed_timezone": "Europe/London",
    "event_hide_decline": false,
    "hide_places": false,
    "hide_support": true,
    "hide_title": true,
    "forbid_add_places": true,
    "min_dates": 1,
    "one_slot": true,
    "auto_confirm": true,
    "invite_title": "Book a short appointment with",
    "redirect_url": "https://www.example.com/thanks-for-booking",
    "fixed_places": [
      {
        "name": "Office",
        "address": "Office address"
      },
      {
        "name": "Phone",
        "address": "0102030405"
      }
    ]
  }
}

# List all appointment types

ENDPOINT Authorization apiKey

GET /v2/vytemes/:nickname/types HTTP/1.1

Path parameters

  • nickname string

    The nickname of the Vyte Page.

Query parameters

No parameters.

    Returns

    All Appointment type objects of this Vyteme if there is no error.

    CODE SAMPLE

    curl \
    --request GET 'https://api.vyte.in/v2/vytemes/john-doe/types' \
    --header 'Authorization: vkjvi2bvfo54ssbybmcts0x42z1sbzm6t0mot8trh8i03reno0' \
    

    RESPONSE SAMPLE

    {
      "name": "Lunch or dinner",
      "handle": "lunch-or-dinner",
      "message": "Welcome to my booking page",
      "active": true,
      "availability": "5f1b018dc1ac5dc46efc64b8",
      "public": true,
      "description": "My conference appointment type",
      "custom": {
        "auto_message": "Thank you for your booking. See you soon.",
        "auto_title": "RDV {{invitee}} / {{me}}",
        "ask_phone": true,
        "ask_company": false,
        "block_new_invitee": false,
        "duration": 30,
        "set_lang": true,
        "enable_api": true,
        "fixed_lang": "en",
        "set_timezone": true,
        "fixed_timezone": "Europe/London",
        "event_hide_decline": false,
        "hide_places": false,
        "hide_support": true,
        "hide_title": true,
        "forbid_add_places": true,
        "min_dates": 1,
        "one_slot": true,
        "auto_confirm": true,
        "invite_title": "Book a short appointment with",
        "redirect_url": "https://www.example.com/thanks-for-booking",
        "fixed_places": [
          {
            "name": "Office",
            "address": "Office address"
          },
          {
            "name": "Phone",
            "address": "0102030405"
          }
        ]
      }
    }
    

    # Create an appointment type

    ENDPOINT Authorization apiKey

    POST /v2/vytemes/:nickname/types HTTP/1.1
    

    Path parameters

    • nickname string

      The nickname of the Vyte Page.

    Query parameters

    No parameters.

      Body parameters

      • nickname string

        Nickname for the user Vyte Page. Appointment types are created within Vyteme pages. Ex: if the nickname is john-doe, the appointment type page will be accessible at https://vyte.in/john-doe/types/:handle.

      • availability ObjectId

        The id of Availability page connected with this Appointment type.

      • name string

        Name of the Appointment type

      • handle string

        Handle is used at the endpoints as a unique identificator of the Appointment type. Created atomatically from the name by urlifying. For example, name Conference lunch will be transfomed into conference-lunch.

      • active boolean

        Whether or not the Appointment type is active.

      • message string

        Message shown on the Appointment type page.

      • description string

        Description shown on the Appointment type page.

      • public boolean

        Whether or not the Appointment type is public.

      • custom hash

        Custom settings for the user Appointment type.

        + Show child attributes

        • custom. auto_message string

          Auto response message when someone book a meeting at this Appointment type.

        • custom. auto_title string

          Auto title for the event.

        • custom. ask_phone boolean

          Whether or not the user must the user must provide their phone number.

        • custom. ask_company boolean

          Whether or not the user must the user must provide their company.

        • custom. block_new_invitee boolean

          If enabled, it prevents people that have booked events on that Vyte booking page to add other invitees to those events. Defaults to false.

        • custom. duration number

          Default duration for the event.

        • custom. set_lang boolean

          Only use if you only accept bookings in one language.

        • custom. enable_api boolean

          To enable API variables.

        • custom. fixed_lang string

          Fixed lang expressed according to ISO 639-1 and the available languages are : fr, en, es, it, pt, de, sv, nl.

        • custom. set_timezone boolean

          Only use if you only accept bookings from people on your own timezone.

        • custom. fixed_timezone string

          Fixed timezone expressed according to TZ database name.

        • custom. event_hide_decline number

          Allow you to set how long (in hours) before the begining of the event the decline button will be hidden. Ex: if set to 24, the decline button will be hidden on the event page 24h before the confirmed date of the event.

        • custom. hide_places boolean

          Hide places from the booking page.

        • custom. hide_support boolean

          Hide support button from the booking page (recommended for an integration).

        • custom. hide_title boolean

          Whether or not people booking can set a title / subject for the event.

        • custom. forbid_add_places boolean

          Whether or not you forbid from suggesting other places from the booking page.

        • custom. min_dates number

          Enforces a minimum number of slots on the booking page (only works for calendar view, not slots view).

        • custom. one_slot boolean

          Whether or not only one slot can be suggested on the calendar view.

        • custom. auto_confirm boolean

          Whether or not the event will be booked as confirmed automatically.

        • custom. invite_title string

          Customize the wording on the booking page.

        • custom. redirect_url string

          Url to redirect people after the booking is made.

        • custom. fixed_places array of hashes

          Set up a list of places on the booking page

      Returns

      The created Appointment type object if no error occurred.

      CODE SAMPLE

      curl \
      --request POST 'https://api.vyte.in/v2/vytemes/john-doe/types' \
      --header 'Authorization: vkjvi2bvfo54ssbybmcts0x42z1sbzm6t0mot8trh8i03reno0' \
      --header 'Content-Type: application/json' \
      --data-raw '{
      
        "name": "Lunch or dinner",
        "handle": "lunch-or-dinner",
        "message": "Welcome to my booking page",
        "active": true,
        "availability": "5f1b018dc1ac5dc46efc64b8"
        "public": true
        "description": "My conference appointment type"
        "custom": {
          "auto_message": "Thank you for your booking. See you soon.",
          "auto_title": "RDV {{invitee}} / {{me}}",
          "ask_phone": true,
          "ask_company": false,
          "block_new_invitee": false,
          "duration": 30,
          "set_lang": true,
          "enable_api": true,
          "fixed_lang": "en",
          "set_timezone": true,
          "fixed_timezone": "Europe/London",
          "event_hide_decline": false,
          "hide_places": false,
          "hide_support": true,
          "hide_title": true,
          "forbid_add_places": true,
          "min_dates": 1,
          "one_slot": true,
          "auto_confirm": true,
          "invite_title": "Book a short appointment with",
          "redirect_url": "https://www.example.com/thanks-for-booking",
          "fixed_places": [
            {
              "name": "Office",
              "address": "Office address"
            },
            {
              "name": "Phone",
              "address": "0102030405"
            }
          ]
        }
      }'
      

      RESPONSE SAMPLE

      {
        "name": "Lunch or dinner",
        "handle": "lunch-or-dinner",
        "message": "Welcome to my booking page",
        "active": true,
        "availability": "5f1b018dc1ac5dc46efc64b8",
        "public": true,
        "description": "My conference appointment type",
        "custom": {
          "auto_message": "Thank you for your booking. See you soon.",
          "auto_title": "RDV {{invitee}} / {{me}}",
          "ask_phone": true,
          "ask_company": false,
          "block_new_invitee": false,
          "duration": 30,
          "set_lang": true,
          "enable_api": true,
          "fixed_lang": "en",
          "set_timezone": true,
          "fixed_timezone": "Europe/London",
          "event_hide_decline": false,
          "hide_places": false,
          "hide_support": true,
          "hide_title": true,
          "forbid_add_places": true,
          "min_dates": 1,
          "one_slot": true,
          "auto_confirm": true,
          "invite_title": "Book a short appointment with",
          "redirect_url": "https://www.example.com/thanks-for-booking",
          "fixed_places": [
            {
              "name": "Office",
              "address": "Office address"
            },
            {
              "name": "Phone",
              "address": "0102030405"
            }
          ]
        }
      }
      

      # Retrieve an Appointment type

      ENDPOINT Authorization apiKey

      PUT /v2/vytemes/:nickname/types/:handle HTTP/1.1
      

      Path parameters

      • nickname string

        The nickname of the Vyte Page.

      • handle string

        The handle of the Appointment type (urlified from the name par default).

      Query parameters

      No parameters.

        Returns

        The particular Appointment type object if no error occurred.

        CODE SAMPLE

        curl \
        --request GET 'https://api.vyte.in/v2/vytemes/john-doe/types' \
        --header 'Authorization: vkjvi2bvfo54ssbybmcts0x42z1sbzm6t0mot8trh8i03reno0' \
        

        RESPONSE SAMPLE

        {
          "name": "Lunch or dinner",
          "handle": "lunch-or-dinner",
          "message": "Welcome to my booking page",
          "active": true,
          "availability": "5f1b018dc1ac5dc46efc64b8",
          "public": true,
          "description": "My conference appointment type",
          "custom": {
            "auto_message": "Thank you for your booking. See you soon.",
            "auto_title": "RDV {{invitee}} / {{me}}",
            "ask_phone": true,
            "ask_company": false,
            "block_new_invitee": false,
            "duration": 30,
            "set_lang": true,
            "enable_api": true,
            "fixed_lang": "en",
            "set_timezone": true,
            "fixed_timezone": "Europe/London",
            "event_hide_decline": false,
            "hide_places": false,
            "hide_support": true,
            "hide_title": true,
            "forbid_add_places": true,
            "min_dates": 1,
            "one_slot": true,
            "auto_confirm": true,
            "invite_title": "Book a short appointment with",
            "redirect_url": "https://www.example.com/thanks-for-booking",
            "fixed_places": [
              {
                "name": "Office",
                "address": "Office address"
              },
              {
                "name": "Phone",
                "address": "0102030405"
              }
            ]
          }
        }
        

        # Update an Appointment type

        ENDPOINT Authorization apiKey

        PUT /v2/vytemes/:nickname/types/:handle HTTP/1.1
        

        Path parameters

        • nickname string

          The nickname of the Vyte Page.

        • handle string

          The handle of the Appointment type (urlified from the name par default).

        Query parameters

        No parameters.

          Body parameters

          • nickname string

            Nickname for the user Vyte Page. Appointment types are created within Vyteme pages. Ex: if the nickname is john-doe, the appointment type page will be accessible at https://vyte.in/john-doe/types/:handle.

          • availability ObjectId

            The id of Availability page connected with this Appointment type.

          • name string

            Name of the Appointment type

          • handle string

            Handle is used at the endpoints as a unique identificator of the Appointment type. Created atomatically from the name by urlifying. For example, name Conference lunch will be transfomed into conference-lunch.

          • active boolean

            Whether or not the Appointment type is active.

          • message string

            Message shown on the Appointment type page.

          • description string

            Description shown on the Appointment type page.

          • public boolean

            Whether or not the Appointment type is public.

          • custom hash

            Custom settings for the user Appointment type.

            + Show child attributes

            • custom. auto_message string

              Auto response message when someone book a meeting at this Appointment type.

            • custom. auto_title string

              Auto title for the event.

            • custom. ask_phone boolean

              Whether or not the user must the user must provide their phone number.

            • custom. ask_company boolean

              Whether or not the user must the user must provide their company.

            • custom. block_new_invitee boolean

              If enabled, it prevents people that have booked events on that Vyte booking page to add other invitees to those events. Defaults to false.

            • custom. duration number

              Default duration for the event.

            • custom. set_lang boolean

              Only use if you only accept bookings in one language.

            • custom. enable_api boolean

              To enable API variables.

            • custom. fixed_lang string

              Fixed lang expressed according to ISO 639-1 and the available languages are : fr, en, es, it, pt, de, sv, nl.

            • custom. set_timezone boolean

              Only use if you only accept bookings from people on your own timezone.

            • custom. fixed_timezone string

              Fixed timezone expressed according to TZ database name.

            • custom. event_hide_decline number

              Allow you to set how long (in hours) before the begining of the event the decline button will be hidden. Ex: if set to 24, the decline button will be hidden on the event page 24h before the confirmed date of the event.

            • custom. hide_places boolean

              Hide places from the booking page.

            • custom. hide_support boolean

              Hide support button from the booking page (recommended for an integration).

            • custom. hide_title boolean

              Whether or not people booking can set a title / subject for the event.

            • custom. forbid_add_places boolean

              Whether or not you forbid from suggesting other places from the booking page.

            • custom. min_dates number

              Enforces a minimum number of slots on the booking page (only works for calendar view, not slots view).

            • custom. one_slot boolean

              Whether or not only one slot can be suggested on the calendar view.

            • custom. auto_confirm boolean

              Whether or not the event will be booked as confirmed automatically.

            • custom. invite_title string

              Customize the wording on the booking page.

            • custom. redirect_url string

              Url to redirect people after the booking is made.

            • custom. fixed_places array of hashes

              Set up a list of places on the booking page

          Returns

          The updated Appointment type object if no error occurred.

          CODE SAMPLE

          curl \
          --request PUT 'https://api.vyte.in/v2/vytemes/john-doe/types/lunch-or-dinner' \
          --header 'Authorization: vkjvi2bvfo54ssbybmcts0x42z1sbzm6t0mot8trh8i03reno0' \
          --header 'Content-Type: application/json' \
          --data-raw '{
                "name": "Lunch or dinner",
                "handle": "lunch-or-dinner",
                "message": "Welcome to my VERY NEW page",
                "active": true,
                "availability": "5f1b018dc1ac5dc46efc64b8"
                "public": true
                "description": "My ANOTHER appointment type"
                "custom": {
                  "auto_message": "Thank you for your booking. See you soon IN 2021.",
                  "auto_title": "RDV {{invitee}} / {{me}}",
                  "ask_phone": true,
                  "ask_company": false,
                  "block_new_invitee": false,
                  "duration": 30,
                  "set_lang": true,
                  "enable_api": true,
                  "fixed_lang": "en",
                  "set_timezone": true,
                  "fixed_timezone": "Europe/London",
                  "event_hide_decline": false,
                  "hide_places": false,
                  "hide_support": true,
                  "hide_title": true,
                  "forbid_add_places": true,
                  "min_dates": 1,
                  "one_slot": true,
                  "auto_confirm": true,
                  "invite_title": "Book a short appointment with",
                  "redirect_url": "https://www.example.com/thanks-for-booking",
                  "fixed_places": [
                    {
                      "name": "Office",
                      "address": "Office address"
                    },
                    {
                      "name": "Phone",
                      "address": "0102030405"
                    }
                  ]
                }
              }'
          

          RESPONSE SAMPLE

          {
                "name": "Lunch or dinner",
                "handle": "lunch-or-dinner",
                "message": "Welcome to my VERY NEW page",
                "active": true,
                "availability": "5f1b018dc1ac5dc46efc64b8",
                "public": true,
                "description": "My ANOTHER appointment type",
                "custom": {
                  "auto_message": "Thank you for your booking. See you soon IN 2021.",
                  "auto_title": "RDV {{invitee}} / {{me}}",
                  "ask_phone": true,
                  "ask_company": false,
                  "block_new_invitee": false,
                  "duration": 30,
                  "set_lang": true,
                  "enable_api": true,
                  "fixed_lang": "en",
                  "set_timezone": true,
                  "fixed_timezone": "Europe/London",
                  "event_hide_decline": false,
                  "hide_places": false,
                  "hide_support": true,
                  "hide_title": true,
                  "forbid_add_places": true,
                  "min_dates": 1,
                  "one_slot": true,
                  "auto_confirm": true,
                  "invite_title": "Book a short appointment with",
                  "redirect_url": "https://www.example.com/thanks-for-booking",
                  "fixed_places": [
                    {
                      "name": "Office",
                      "address": "Office address"
                    },
                    {
                      "name": "Phone",
                      "address": "0102030405"
                    }
              ]
            }
          }
          

          # Delete an Appointment type

          ENDPOINT Authorization apiKey

          DELETE /v2/vytemes/:nickname/types/:handle HTTP/1.1
          

          Path parameters

          • nickname string

            The nickname of the Vyte Page.

          • handle string

            The handle of the Appointment type (urlified from the name par default).

          Query parameters

          No parameters.

            Returns

            If everything is alright deleting returns 204 status, if nothing was deleted (number of affected rows is 0) - returns 404. In case of error returns 500 and error message.

            curl --request DELETE 'https://api.vyte.in/v2/vytemes/john-doe/types/lunch-or-dinner' \
            --header 'Authorization: vkjvi2bvfo54ssbybmcts0x42z1sbzm6t0mot8trh8i03reno0'