Create a Time Group

This API allows you to create a new Time Group.

Sample Request

This API allows you to create a new Time Group.

curl --request POST \
     --url https://api-smartflo.tatateleservices.com/v1/timegroup \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

📘Important

Before we begin, note that the * sign denotes the mandatory variables in each table.

Request Variables (Body Params)

Variable Name

Description

Data Type

name

Name for the time group

string

from_time

List of starting times for the time group.

Format: 24-hour time format (e.g., "09:00", "22:00").

array of strings

to_time

List of ending times corresponding to from_time.

Format: 24-hour time format (e.g., "09:00", "22:00").

array of strings

days

Applicable days of the week for the time group.

Format: Abbreviated lowercase day names (e.g., mon, tue, wed, thu, fri, sat, sun).

array of strings

dates

Specific dates on which the time group applies.

Format: Numerical values from (1 to 31).

array of strings

months

Applicable months for the time group.

Format: First three lowercase letters of the month name (e.g., jan, feb, mar, etc.).

array of strings

Response Variables

After the execution of the API, you will get the following response:

Variable NameDescriptionData Type
successThe request success status, the possible values are: True (default) for success. False for failure.Boolean
messageThe message corresponding to the success status. For example, in 400 Response where the "success" variable pops as True, the message displayed is shown here.String

Request Body Example

"This example demonstrates how a time group condition request would look based on the above time group criteria."

curl --request POST \
     --url https://api-smartflo.tatateleservices.com/v1/timegroup \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "name": "TEST",
  "from_time": [
    "10:00",
    "11:00"
  ],
  "to_time": [
    "18:00",
    "20:00"
  ],
  "days": [
    "mon,tue,wed",
    "thu,fri"
  ],
  "dates": [
    "1,2,3",
    "10,11,12"
  ],
  "months": [
    "jan,feb",
    "Mar,jul,aug,sep"
  ]
}
'

"This example demonstrates how a time group condition request would look based on the above time group criteria."

curl --request POST \
     --url https://api-smartflo.tatateleservices.com/v1/timegroup \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "name": "TEST",
  "from_time": [
    "10:00"
  ],
  "to_time": [
    "18:00"
  ],
  "days": [
    "mon"
  ],
  "dates": [
    "1"
  ],
  "months": [
    "jan"
  ]
}
'
Language
Click Try It! to start a request and see the response here!