This API Updates Working Hours / Business Timings of an existing Business Profile.

Endpoint

PUT https://enrollbusiness.com/Api/Timings/Profile/en

HTTP Headers

You must specify following HTTP Headers when making API call:

  • content-type: application/json
  • Referer: https://EnrollBusiness.com
  • APIKey: {YOUR_API_KEY}
  • Note: To know how to obtain API Key, Please refer to Getting Started page.

Request Body

      
      {
        "ProfileID": "678",
        "WorkingHours": [
          {
            "Day": "Monday",
            "24Hours": "false",
            "OpeningTime": "09:15",
            "ClosingTime": "20:00"
          },
          {
            "Day": "Tuesday",
            "24Hours": "false",
            "OpeningTime": "09:15",
            "ClosingTime": "20:00"
          },
          {
            "Day": "Wednesday",
            "24Hours": "false",
            "OpeningTime": "09:15",
            "ClosingTime": "20:00"
          },
          {
            "Day": "Thursday",
            "24Hours": "false",
            "OpeningTime": "09:15",
            "ClosingTime": "20:00"
          },
          {
            "Day": "Friday",
            "24Hours": "false",
            "OpeningTime": "09:15",
            "ClosingTime": "20:00"
          },
          {
            "Day": "Saturday",
            "24Hours": "true"
          }
        ]
      }
      
    
  • ProfileID [Mandatory] : Numeric ID of the of the existing valid profile. This must be a numeric value. If you have created profile using Create Business Profile API, you will get ProfileID as part of the successful response. Regardless, if you don't know ProfileID, here is how you can obtain it. Please refer to the following screenshot:

  • WorkingHours [Mandatory] : Working Hours of the business. It's an object containing following fields:
    • Day: Day of the Week. E.g., Sunday, Monday, Tuesday etc.
    • 24Hours: It can have either True or False values indicating whether the business is open for 24 hours on this day. If this value is True, values for OpeningTime and ClosingTime will be ignored.
    • OpeningTime: is the Time at which business opens. It accepts 24 hour time format with 15 minutes intervals. Some examples of valid OpeningTime are : 7:00, 9:15, 8:30, 13:45 etc. The value of this field must be earlier than ClosingTime. If the value of 24Hours is False, you must specify valid value for this field.
    • ClosingTime: is the Time at which business closes. It accepts 24 hour time format with 15 minutes intervals. Some examples of valid ClosingTime are : 18:15, 19:30, 20:45, 23:00 etc. The value of this field must be later than OpeningTime. If the value of 24Hours is False, you must specify valid value for this field.

    Note: If you want to clear/remove existing Working Hours, just pass empty Array like this - "WorkingHours" : []

Response

Success Response:

Once successful the response returns HTTP Status Code: 200. Response Body will look like this.

        
        {
          "ResultCode": 1,
          "Message": "Saved Successfully."
        }
        
        

Error Response:

HTTP Status Code: 401 Unauthorized:

If APIKey header has not been supplied or it's invalid, the call will return Http Status Code: 401 Unauthorized. Response Body might look like:
        
        {
          "ResultCode":5,
          "Message":"You are not authorized to perform this operation."
        }
        
        

HTTP Status Code: 400 Bad Request:

If we are not able to understand the request or some of the values are not valid, the call will return Http Status Code: 400 Bad Request. Response Body might look like:
        
        {
          "ResultCode": 6,
          "Errors": {
              "WorkingHours": "For Monday OpeningTime format is not valid. Valid time is 24 hour format. E.g. 08:00 for 8 AM and 20:00 for 8 PM"
          }
        }
        
        

HTTP Status Code: 500 Internal Server error:

If we are not able process the request for internal processing error, the call will return Http Status Code: 500 Internal Server error. Response Body might look like:
        
        {
          "ResultCode":3,
          "Message":"Unknown Error occurred. Please try again."
        }