POST data

Updated by Daniel Sjögren

Upload / Edit data

To be able to create a prediction and especially an automated one Quinyx needs to have data to be able to calculate trends and patterns. To be able to have guidelines or budgets for different levels of the organisation this data needs to be added to Quinyx as well.

Api-docs for rc : https://api-rc.quinyx.com/v2/docs

Api-docs : https://api.quinyx.com/v2/docs

POST /actual-data

This is the actual data for the variable that you want to use and have configured a forecast for. Actual data is sent to Quinyx through REST API and a POST call will add the actual-data to Quinyx.

  • externalForecastVariableId​ - The External ID for the Forecast variables are found under Optimisation settings -> Input Data field -> External ID
  • ​externalUnitId​ - External ID for a unit as set up for units in Account Settings Group Management *Unit Name* Unit Integration Keys
  • externalSectionId​ - External ID for a section as set up for sections in Account Settings → Group Management → *Section Name* → Section Integration Keys
  • ​forecastDataPayload​ - Array of data and timestamp that will be uploaded
  • data - the amount of the variable to be posted
  • timestamp - The time of where the data should be allocated to ex 2019-09-03T17:00:00Z (UTC time should be used for consistency when it comes to time handling and timezones).
    The time allocation works depending on the resolution set on the variable. Eg you have chosen a 15 minute resolution. That would mean that data sent with timestamp sent as 2019-09-03T17:00:00Z will be allocated to the "slot" 17:00-17:15. Data sent with timestamp sent as 2019-09-03T17:15:00Z will be allocated to the "slot" 17:15-17:30
    Limit is set for 366 payloads per request. If more than 366 is sent in you will receive an error stating input is too large. You are also not allowed to use more than 5 concurrent requests (eg. running more than 5 threads simultaneously per unique customer regardless of endpoint).

POST /aggregated-data

Operation used to upload data already grouped at input data resolution

This is used to upload data already grouped at the input data's resolution. Aggregated forecast data is sent to Quinyx through REST API and a POST call will add the budget-data to Quinyx.

  • externalForecastVariableId​ - The External ID for the Forecast variables are found under Optimisation settings -> Input Data field -> External ID
  • ​externalUnitId​ - External ID for a unit as set up for units in Account Settings Group Management *Unit Name* Unit Integration Keys
  • ​externalSectionId​ - External ID for a section as set up for sections in Account Settings → Group Management → *Section Name* → Section Integration Keys
  • ​forecastDataPayload​ - Array of data and timestamp that will be uploaded
  • data - the amount of the variable to be posted
  • timestamp - The time of where the data should be allocated to ex 2019-09-03T17:00:00Z (UTC time should be used for consistency when it comes to time handling and timezones).
Limit is set for 366 payloads per request. If more than 366 is sent in you will receive an error stating input is too large. You are also not allowed to use more than 5 concurrent requests (eg. running more than 5 threads simultaneously per unique customer regardless of endpoint).

​POST /budget-data

This is the forecast to be used as a budget or a forecast coming from a third party supplies for the variable that you want to use and have configured a forecast for. External forecast data is sent to Quinyx through REST API and a POST call will add the budget-data to Quinyx.

Optional appendData=true string can be used to add the newly sent data to the existing figures. Without this string, newly sent data will override the existing data if sent with same timestamp.

  • externalForecastVariableId​ - The External ID for the Forecast variables are found under Optimisation settings -> Input Data field -> External ID
  • ​externalUnitId​ - External ID for a unit as set up for units in Account Settings Group Management *Unit Name* Unit Integration Keys
  • externalSectionId​ - External ID for a section as set up for sections in Account Settings → Group Management → *Section Name* → Section Integration Keys
    ​forecastDataPayload​ - Array of data and timestamp that will be uploaded
  • data - the amount of the variable to be posted
  • timestamp - The time of where the data should be allocated to.
The time allocation works depending on the resolution set on the variable. Eg you have chosen a 15 minute resolution. That would mean that data sent with timestamp sent as 2019-09-03T17:00:00Z will be allocated to the "slot" 17:00-17:15. Data sent with timestamp sent as 2019-09-03T17:15:00Z will be allocated to the "slot" 17:15-17:30
Limit is set for 366 payloads per request. If more than 366 is sent in you will receive an error stating input is too large. You are also not allowed to use more than 5 concurrent requests (eg. running more than 5 threads simultaneously per unique customer regardless of endpoint).

POST ../edit-forecast

With this operation you can edit the calculated forecast through the API. Usage for this is if you want to edit a forecast configuration for a specific time with data you have externally and not to amend through the GUI in Neo Forecast.

Full URL is : /forecast-variables/{externalForecastVariableId}/forecast-configurations/{externalForecastConfigurationId}/edit-forecast?externalUnitId={externalUnitId}?externalSectionId={externalSectionId}

  • externalForecastVariableId​ - The External ID for the Forecast variables are found under Optimisation settings -> Input Data field -> External ID
  • ​externalUnitId​ - External ID for a unit as set up for units in Account Settings Group Management *Unit Name* Unit Integration Keys
  • ​externalSectionId​ - External ID for a section as set up for sections in Account Settings → Group Management → *Section Name* → Section Integration Keys
  • forecastDataModifier​
    • startTime - timestamp from what full hour the edit should be made on
    • endTime - timestamp to what full hour the edit should be made to
    • percentageModification - if you want to modify with a percentage value
    • newValueForPeriod - to set a new value for the chosen period.
newValueForPeriod : If data exists the new value will replace the current value as a percentage of the already existing values. If no value exists it will allocate the data evenly over the resolution of the variable

POST /predicted-data

Operation used for uploading predictions from external tools used for predicting sales, transactions, or similar that then later on through optimal staffing rules defines staffing needs:

  • externalForecastVariableId​ - The External ID for the Forecast variables are found under Optimisation settings -> Input Data field -> External ID
  • externalForecastConfigurationId - External ID for the forecast configuration set up in Account settings→Statistics→Variable settings→ <select your Forecast configuration> → External ID
  • externalUnitId - External ID for a unit as set up for units in Account Settings Group Management *Unit Name* Unit Integration Keys
  • externalSectionId​ - External ID for a section as set up for sections in Account Settings → Group Management → *Section Name* → Section Integration Keys
  • runIdentifier - A value to be set if external system sends multiple predictions for the same date range
  • runTimestamp - A value to be set to define when the predicted data was generated. Quinyx will in the future use this value to compare different predictions if they exist
  • forecastDataPayload
    • data - the amount of the external prediction
    • timestamp - the time of where the amount should be placed in UTC format 2020-04-09T20:45:00+01:00
You are not allowed to use more than 5 concurrent requests (eg. running more than 5 threads simultaneously).

POST/dynamic-rules

Creates new dynamic rules for a group, under Group Settings Dynamic Rules

  • ​externalUnitId​ - External ID for a unit as set up for units in Account Settings Group Management *Unit Name* Unit Integration Keys
  • externalSectionId​ - External ID for a section as set up for sections in Account Settings → Group Management → *Section Name* → Section Integration Keys
  • dynamicRule
    • amount - the number you wish to trigger the rule up to
    • endTime - the time of day that the rule no longer applies
      • hour
      • minute
      • nano
      • second
    • externalID - External ID for the variable set up in Optimization settings→Variables→Variable settings→ <select your Input Data(Variable)> → External ID
    • forecastExternalVariableId - external ID for the variable set up in Optimization settings → Variables →Variable settings→ <select your Input Data(Variable)> → External ID
    • shifttypes - the shift type name found under Group Settings → Shift Types
      • amount - the number of shifts to create when this rule is triggered
      • externalShiftTypeId - Currently found in the URL when clicking on Account Settings → Shift Types → Edit
    • startTime - the time of day that the rules starts applying
      • hour
      • minute
      • nano
      • second
    • weekdays - which weekday(s) the rule applies for

POST/static-rules

Creates new dynamic rules for a group, under Group Settings Static Rules

  • ​externalUnitId​ - External ID for a unit as set up for units in Account Settings Group Management *Unit Name* Unit Integration Keys
  • externalSectionId​ - External ID for a section as set up for sections in Account Settings → Group Management → *Section Name* → Section Integration Keys
  • staticRule
    • Comment - commentary that appears in the UI to explain the purpose of the static rule
    • endDate - the date the rule expires and no longer applies
    • endTime
      • hour
      • minute
      • nano
      • second
    • externalID - External ID for the variable set up in Account settings→Statistics→Variable settings→ <select your Input Data(Variable)> → External ID
    • repeatPeriod - Repeat every x number of weeks
    • shifttypes - the shift type name found under Group Settings → Shift Types
      • amount - the number of shifts to create when this rule is triggered
      • externalShiftTypeId - Currently found in the URL when clicking on Account Settings → Shift Types → Edit
    • startDate - the date the rule starts to apply
      • startTime
        • hour
        • minute
        • nano
        • second
      • weekdays - which weekday(s) the rule applies for


How Did We Do?