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
Print

PMI API Best Practice Get Forecasted hours

Please Share Your Feedback
How Can We Improve This Article?

Most request to the PMI API requires a property id (guid) or a chain id which will be part of the url.

These will be provided by d2o. In the following examples we will use “4f725e8a-d8e0-48bb-bb6e-84183edb581d” as chain id (in the end of all urls) and property id (h_id) 41

1. To get a complete list of properties you use

 

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. To get “your” departments related to these PMI departments/cockpits you use the xml/Mapping/TKS/Departments for each property/hotel, like:

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. Once you have the relation between your department id and the department id in PMI (Hid), above, you can retrieve forecasted hours.

 

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: