GetLivePass.com
  • Get Started
  • Reference
    • Membership Card API
    • Appointments API
    • Reservations API
Powered by GitBook
On this page
  • Create or Update Appointment
  • Get Appointment
  1. Reference

Appointments API

Create or Update Appointment

POST https://api.getlivepass.com/appointment/<id>

Create or update Appointment. Email notification will be sent when email is valid and silent=false

Headers

Name
Value

Content-Type

application/json

Authorization

API_KEY <your_api_key>

Body

Name
Type
Description

full_name

string

Full Name of the customer

email

string

Email Address of the customer

phone_number

string

Phone Number (International)

silent

bool

Set to true to NOT send any communication. Set to false to send email or push update.

title

string

Appointment Title

date

string

Appointment Date (any format)

time

string

Appointment Time (any format)

duration

string

Appointment Duration (any format)

url

string

URL to view, update, cancel Appointment

location_name

string

Name of the Location

location_address

string

Address of the Location

location_url

string

Link to the Location (Google Maps, etc)

location_lat

string

Latitude of the Location (Pass will be displayed when phone close to the Location)

location_lng

string

Longitude of the Location (Pass will be displayed when phone close to the Location)

barcode_type

enum

Allowed values: qr

barcode_data

string

String to encode with selected barcode_type (Usually equal to id)

Request

curl 'https://api.getlivepass.com/appointment/1003' \
  -H 'Authorization: API_KEY <your_api_key>' \
  --data-raw '{"full_name":"John Appleseed","email":"john.appleseed@getlivepass.com","phone_number":"","barcode_type":"qr","barcode_data":"1003","silent":false,"balance_amount":"","balance_currency":"","membership_tier":"","title":"Health Check-up","date":"Nov 6, 2024","time":"10:00am","duration":"60min","url":"https://example.com/appointments/edit/1003","location_name":"Mainland Hospital","location_address":"LivePass Street, 12","location_url":"https://example.com/address/mainland-hospital"}'
const axios = require('axios');

const apiKey = '<your_api_key>';
const id = '1003';
const data = {
  full_name: "John Appleseed",
  email: "john.appleseed@getlivepass.com",
  phone_number:"",
  barcode_type: "qr",
  barcode_data:"1003",
  silent:false,
  title: "Health Check-up",
  date: "Nov 6, 2024",
  time: "10:00am",
  duration: "60min",
  url: "https://example.com/appointments/edit/1003",
  location_name: "Mainland Hospital",
  location_address: "LivePass Street, 12",
  location_url: "https://example.com/address/mainland-hospital"
};

axios.post(`https://api.getlivepass.com/appointment/${id}`, data, {
  headers: {
    'Authorization': `API_KEY ${apiKey}`,
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error('Error making request:', error);
});

Response

{
  "type": "appointment",
  "id": "1003",
  "body": {
    "full_name": "John Appleseed",
    "email": "john.appleseed@getlivepass.com",
    "phone_number": "",
    "barcode_type": "qr",
    "barcode_data": "1003",
    "silent": false,
    "title": "Health Check-up",
    "date": "Nov 6, 2024",
    "time": "10:00am",
    "duration": "60min",
    "url": "https://example.com/appointments/edit/1003",
    "location_name": "Mainland Hospital",
    "location_address": "LivePass Street, 12",
    "location_url": "https://example.com/address/mainland-hospital"
  },
  "message": "Pass requested"
}
{
  "message": {
    "_original": {
      "full_name": "John Appleseed",
      "email": "john.appleseed@getlivepass.com",
      "phone_number": "",
      "barcode_type": "q",
      "barcode_data": "1003",
      "silent": false,
      "balance_amount": "",
      "balance_currency": "",
      "membership_tier": "",
      "title": "Health Check-up",
      "date": "Nov 6, 2024",
      "time": "10:00am",
      "duration": "60min",
      "url": "https://example.com/appointments/edit/1003",
      "location_name": "Mainland Hospital",
      "location_address": "LivePass Street, 12",
      "location_url": "https://example.com/address/mainland-hospital"
    },
    "details": [
      {
        "message": "\"barcode_type\" must be [qr]",
        "path": [
          "barcode_type"
        ],
        "type": "any.only",
        "context": {
          "valids": [
            "qr"
          ],
          "label": "barcode_type",
          "value": "q",
          "key": "barcode_type"
        }
      }
    ]
  }
}
{
  "Message": "User is not authorized to access this resource with an explicit deny"
}

Use this endpoint to send Appointment or update information on existing pass. User will be notified when you change:

  • title

  • date

  • time

  • duration

  • location_name

  • location_address

  • location_url


Get Appointment

GET https://api.getlivepass.com/appointment/<id>

Get Appointment info including links to preview or download.

Headers

Name
Value

Content-Type

application/json

Authorization

API_KEY <your_api_key>

Request

curl 'https://api.getlivepass.com/appointment/1003' \
  -H 'Authorization: API_KEY <your_api_key>'
const axios = require('axios');

const apiKey = '<your_api_key>';
const id = '1003';

axios.get(`https://api.getlivepass.com/appointment/${id}`, {
  headers: {
    'Authorization': `API_KEY ${apiKey}`
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error('Error making request:', error);
});

Response

{
  "message": "Pass retrieved",
  "body": {
    "version": 1,
    "created_at": 1728203404,
    "barcode_data": "1003",
    "location_url": "https://example.com/address/mainland-hospital",
    "barcode_type": "qr",
    "time": "10:00am",
    "silent": false,
    "full_name": "John Appleseed",
    "url": "https://example.com/appointments/edit/1003",
    "email": "john.appleseed@getlivepass.com",
    "location_name": "Mainland Hospital",
    "date": "Nov 6, 2024",
    "token": "[REDACTED]",
    "last_updated_at": 1728203629,
    "phone_number": "",
    "duration": "60min",
    "location_address": "LivePass Street, 12",
    "title": "Health Check-up",
    "type": "appointment"
  },
  "links": {
    "web": "https://app.getlivepass.com/view/...",
    "apple": "https://app.getlivepass.com/apple/..."
  },
  "id": "1003",
  "type": "appointment"
}
{
  "message": "Pass not found"
}
{
  "Message": "User is not authorized to access this resource with an explicit deny"
}

PreviousMembership Card APINextReservations API

Last updated 7 months ago

Do you have any questions, feedback or ideas? Contact us by or .

email
live chat