Set Branch Operating Hour API

Description Calling this endpoint by providing token of admin user to set branch operating hour for a company.
Endpoint {DataManagerAPI}/action/SetBranchOperatingHour
Method POST
Headers
  1. AToken: Token value return from API 'GenerateAccessToken' by providing the user name & password
Body - JSON Example
{
        "BranchOperatingHour": [
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T01:00:00",
                "Day": 0,
                "IsDayOff": false
            },
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "StartTime": "2022-05-19T01:00:00",
                "EndTime": "2022-05-19T11:00:00",
                "Day": 1,
                "IsDayOff": false
            },
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "StartTime": "2022-05-19T11:00:00",
                "EndTime": "2022-05-19T23:10:00",
                "Day": 1,
                "IsDayOff": false
            },            
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:30:00",
                "Day": 2,
                "IsDayOff": false
            },
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:10:00",
                "Day": 3,
                "IsDayOff": false
            },
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:10:00",
                "Day": 4,
                "IsDayOff": false
            },
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:10:00",
                "Day": 5,
                "IsDayOff": false
            },
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:10:00",
                "Day": 6,
                "IsDayOff": false
            },
            {
                "BranchName": "site2",
                "BranchCode": "1002",
                "BranchId": 530,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:59:00",
                "Day": 0,
                "IsDayOff": false
            },
            {
                "BranchName": "site2",
                "BranchCode": "1002",
                "BranchId": 530,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:59:00",
                "Day": 1,
                "IsDayOff": false
            },
            {
                "BranchName": "site2",
                "BranchCode": "1002",
                "BranchId": 530,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:59:00",
                "Day": 2,
                "IsDayOff": false
            },
            {
                "BranchName": "site2",
                "BranchCode": "1002",
                "BranchId": 530,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:59:00",
                "Day": 3,
                "IsDayOff": false
            },
            {
                "BranchName": "site2",
                "BranchCode": "1002",
                "BranchId": 530,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:59:00",
                "Day": 4,
                "IsDayOff": false
            },
            {
                "BranchName": "site2",
                "BranchCode": "1002",
                "BranchId": 530,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:59:00",
                "Day": 5,
                "IsDayOff": false
            },
            {
                "BranchName": "site2",
                "BranchCode": "1002",
                "BranchId": 530,
                "StartTime": "2022-05-19T00:00:00",
                "EndTime": "2022-05-19T23:59:00",
                "Day": 6,
                "IsDayOff": true
            }
        ],
        "BranchSpecialOperatingHour": [
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "Date": "2022-06-29T00:00:00",
                "StartTime": "2022-06-29T00:00:00",
                "EndTime": "2022-06-29T00:00:00",
                "IsDayOff": true,
                "Comment": "Test special 1"
            },
            {
                "BranchName": "site1",
                "BranchCode": "1001",
                "BranchId": 420,
                "Date": "2022-07-12T00:00:00",
                "StartTime": "2022-07-12T00:00:00",
                "EndTime": "2022-07-12T00:00:00",
                "IsDayOff": true,
                "Comment": "Test special 2"
            }
        ]
    }
Body Description
  1. BranchOperatingHour
    1. May only include branch operating hour that need to be updated.
    2. 'BranchId' is unique key for identifying branch, do not simply modify this value
      1. 'BranchId' can be retrieve / refer from 'Sites API'
    3. 'StartTime' and 'EndTime' is starting and ending time of branch operating time period
      1. The date portion in these 2 fields are not important, only time portion will be used
    4.  'Day':
      1. 0 = Sunday, 1 = Monday, 2 = Tuesday, etc
    5. 'IsDayOff' indicate whether that branch does not operate on specific day of week
  2. BranchSpecialOperatingHour
    1. If no special operating hour need to add, just leave this list empty
    2. 'BranchId' is unique key for identifying branch, do not simply modify this value
      1. 'BranchId' can be retrieve / refer from 'Sites API'
    3. 'Date' is the specific date that this special operating will apply to this branch
    4. 'IsDayOff' indicate whether that branch does not operate on specific day of week
    5. 'Comment'
Response - JSON Example
{
    "Status": 200,
    "Error": "",
    "Message": "Operating Hour updated",
    "Data": null
}
Updated on July 8, 2022