Skip to content

Save the brand's business hours and out-of-hours auto-reply (replaces the previous ones). Requires brand.manage

PUT
/v1/brands/{brand}/business-hours
curl --request PUT \
--url https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/business-hours \
--header 'Content-Type: application/json' \
--data '{ "weekly": { "mon": [ { "from": "example", "to": "example" } ], "tue": [ { "from": "example", "to": "example" } ], "wed": [ { "from": "example", "to": "example" } ], "thu": [ { "from": "example", "to": "example" } ], "fri": [ { "from": "example", "to": "example" } ], "sat": [ { "from": "example", "to": "example" } ], "sun": [ { "from": "example", "to": "example" } ] }, "closedDates": [], "timezone": "America/Mexico_City", "autoReply": { "enabled": true, "text": "example" } }'
brand
required
string
/^brd_[a-z0-9]{26}$/

Example

brd_01hx0000000000000000000000
Media typeapplication/json
object
weekly
required

Per weekday (mon..sun), 0, 1 or 2 slots HH:MM–HH:MM in the brand time zone. No slot in any day = no schedule (always open).

object
mon
required
Array<object>
<= 2 items
object
from
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
to
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
tue
required
Array<object>
<= 2 items
object
from
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
to
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
wed
required
Array<object>
<= 2 items
object
from
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
to
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
thu
required
Array<object>
<= 2 items
object
from
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
to
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
fri
required
Array<object>
<= 2 items
object
from
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
to
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
sat
required
Array<object>
<= 2 items
object
from
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
to
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
sun
required
Array<object>
<= 2 items
object
from
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
to
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
closedDates

Closed days (holidays), YYYY-MM-DD.

Array<string>
default: <= 400 items
timezone

IANA zone. Null = the brand time zone.

string
nullable

Example

America/Mexico_City
autoReply
required
object
enabled
required
boolean
text

Free text (≤ 1000). Null = the default text in the brand language. {horario} is replaced by the schedule.

string
nullable >= 1 characters <= 1000 characters

Business hours

Media typeapplication/json
object
brandId
required
string
configured
required

False when no day has a slot: the brand counts as always open and nothing is auto-replied.

boolean
weekly
required
object
key
additional properties
Array<object>
object
from
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
to
required
string
/^([01]\d|2[0-3]):[0-5]\d$/
closedDates
required
Array<string>
timezone
required
string
nullable
effectiveTimezone
required
string
autoReply
required
object
enabled
required
boolean
text
required
string
nullable
defaultText
required

Default text in the brand language, with the {horario} marker.

string
sendsOnlyEveryHours
required

At most one auto-reply per conversation in this many hours (12).

number
updatedAt
required
string
nullable

Example generated

{
"brandId": "example",
"configured": true,
"weekly": {
"additionalProperty": [
{
"from": "example",
"to": "example"
}
]
},
"closedDates": [
"example"
],
"timezone": "example",
"effectiveTimezone": "example",
"autoReply": {
"enabled": true,
"text": "example",
"defaultText": "example",
"sendsOnlyEveryHours": 1
},
"updatedAt": "example"
}

Invalid data

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

No session, expired session, or invalid, expired or revoked API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Does not exist or is not visible to you

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Internal error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}