PMI Knowledge base

Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt
Filter by Custom Post Type
PMI Knowledge Base
Article contents (TOC)
Print

PMI API Best Practice Get Forecasted hours

Please Share Your Feedback
How Can We Improve This Article?

Property Management Integration Guide

Most requests to the PMI API require a property ID (guid) or a chain ID, which will be part of the URL. These IDs will be provided by d2o. In the following examples, we will use the chain ID 4f725e8a-d8e0-48bb-bb6e-84183edb581d and a property ID (h_id) of 41 as an example.

1. Retrieve a Complete List of Properties

To get a comprehensive list of properties, use the following URL:

https://integration.d2o.com/xml/Hierarchy/AllProperties/4f725e8a-d8e0-48bb-bb6e-84183edb581d

Where “xml” is the output format (also supports json) and “4f725e8a-d8e0-48bb-bb6e-84183edb581d” is the client_id.

Result:

  • ExternalCode = Code name for the property
  • Id = Internal PMI property id known as “h_id” (hierarchy_id)
  • MaxRooms = number of rooms.
  • Name = Property Name

 

2. Retrieve Related Departments

To get the departments related to each property, use this URL with an example property ID (h_id) of 41:

https://integration.d2o.com/xml/Mapping/TKS/Departments/4f725e8a-d8e0-48bb-bb6e-84183edb581d/?h_id=41

Parameters:

  • H_id = Property ID from the Hierarchy/AllProperties method

Response:

  • Hid = Internal deparment/cockpit ID in PMI
  • SourceDepartment = Imported department name (from your system)
  • SourceDepartmentIdentifier = Imported department id (from your system)
  • Status = 1 = Department is in use, 2 Department is not in use.

 

3. Retrieve Forecasted Hours

Once the relation between your department ID and the PMI department ID (Hid) is established, you can retrieve forecasted hours. Use the parameters as shown:

Parameters:

  • h_id = 62 (refers to “Breakfast” from the Mapping/TKS/Departments method).
  • from = date from
  • to = date to

Response:

Use the “SmartForecast” for forecasted hours.

Tags: