Append To Strategy Schedule
PATCH {{BASE_HABITAT_URL}}/api/dispatch/strategies_hours/263091ef-2f98-4f40-85e4-a44065ecd837
Required scope: strategies:write
Add ranges of hours for which a strategy is INACTIVE, meaning that the strategy will not be executed during those hours, and order must be manually placed with an external DSP by a dispatcher.
No conversion necessary for hour values - we interpret these on the fly during a request, converting the respective ranges and timestamp to UTC.
Request body
Section titled “Request body”{ "start": { "day": "wednesday", "hour": 12.75 }, "stop": { "day": "wednesday", "hour": 15 }}Examples
Section titled “Examples”curl --request PATCH '${BASE_HABITAT_URL}/api/dispatch/strategies_hours/263091ef-2f98-4f40-85e4-a44065ecd837' \ --data '{ "start": { "day": "wednesday", "hour": 12.75 }, "stop": { "day": "wednesday", "hour": 15 }}'const response = await fetch("${BASE_HABITAT_URL}/api/dispatch/strategies_hours/263091ef-2f98-4f40-85e4-a44065ecd837", { "method": "PATCH", "headers": {}, "body": "{\n \"start\": {\n \"day\": \"wednesday\",\n \"hour\": 12.75\n },\n \"stop\": {\n \"day\": \"wednesday\",\n \"hour\": 15\n }\n}"})const data = await response.json()import requests
response = requests.request( "PATCH", "${BASE_HABITAT_URL}/api/dispatch/strategies_hours/263091ef-2f98-4f40-85e4-a44065ecd837", headers={}, data="{\n \"start\": {\n \"day\": \"wednesday\",\n \"hour\": 12.75\n },\n \"stop\": {\n \"day\": \"wednesday\",\n \"hour\": 15\n }\n}",)response.raise_for_status()
