Fetching Account Information as a Company User

All account endpoints can be used by anyone with a user_company token, if a PV.On_Behalf_Of header is included in the request.

The value of the header should be the customer_id of the customer you are trying to access the information for.

Customer Upcoming Schedule

Use this endpoint to fetch upcoming bookings (appointments, reservations, events) for a customer

Endpoint: /api/account/my-schedule Header: PV.On_Behalf_Of Query Params:

ParamValueDefaultNotes

type

appointment, reservation, event

n/a

date

Date

n/a

upcoming

boolean

true

Will fetch up to 120 days in the future

include_global

boolean

n/a

Include global network bookings and events. Default is true if a valid PV.GLOBAL_NETWORK value is provided in the request header.

Response

This endpoint will return a array of upcoming bookings, set as a generic booking object.\

  • The type of booking can be determined with the type property

  • The block_type property is only populated if the type is appointment | reservation

  • company is included because there is a possibility this booking was created in a company that is part of the global network

  • location is a nullable property - It will only be populated if the booking is attached to a business location

[{
  "id": number,
  "title": string,
  "description": string,
  "quantity": number,
  "type": "appointment" | "reservation" | "event",
  "block_type": "multi" | "daily" | "dining" | "spa" | "activity" | "one",
  "status": string,
  "start_date": string,
  "end_date": string,
  "start_date_local": {
    "date": Date,
    "timezone": string,
    "name": string,
    "offset": string
  },
  "end_date_local": {
    "date": Date,
    "timezone": string,
    "name": string,
    "offset": string
  },
  "company": {
    "id": number,
    "name": string,
    "logo_url": string,
    "icon_url": string,
    "wallet_logo": string,
    "address": string,
    "address2": string,
    "city": string,
    "state": string,
    "zip_code": string,
    "country": string,
  },
  "location": {
    "id": number,
    "name": string,
    "address": string,
    "address2": string,
    "city": string,
    "state": string,
    "zip_code": string,
    "country": string,
    "latitude": string,
    "longitude": string,
    "address": {
      "address": string,
      "address2": string,
      "city": string,
      "state": string,
      "zip_code": string,
      "country": string,
      "full_address": string
    }
  },
  "guest": {
    "id": number,
    "company_name": string,
    "company_title": string,
    "first_name": string,
    "middle_name": string,
    "last_name": string,
    "full_name": string,
    "mobile": {
      "country_code": string,
      "number": string,
      "full": string
    },
    "phone": {
      "country_code": string,
      "number": string,
      "full": string
    },
    "email": string,
    "profile_photo": string,
    "vip": boolean,
    "birthdate": Date,
    "anniversary_date": Date,
    "created_on": Date
  }
  }]

Last updated