Service Hours
The schedule is part of the agent's supportInformation. The PATCH supports a per-day merge: you can update a single day without having to resend the rest.
Get Schedule
GET https://api.platica.mx/v1/agents/{agentId}/schedule URL parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Unique identifier of the agent | ✓ |
Response
{
"outOfServiceBehavior": "limited",
"serviceHours": {
"monday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"tuesday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"wednesday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"thursday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"friday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"saturday": { "availability": "Cerrado", "start": "Cerrado", "end": "Cerrado" },
"sunday": { "availability": "Cerrado", "start": "Cerrado", "end": "Cerrado" }
}
} Response fields
| Field | Description |
|---|---|
outOfServiceBehavior | What the agent does outside service hours: "limited", "full", or "none" |
serviceHours.{day}.availability | "Abierto" or "Cerrado" |
serviceHours.{day}.start | Opening time (free-form, e.g. "9:00am"). Convention: "Cerrado" when availability is "Cerrado". |
serviceHours.{day}.end | Closing time (same rules as start) |
Update Schedule
At least one of outOfServiceBehavior or serviceHours must be present. The server performs a per-day merge inside serviceHours, so days not included in the body keep their existing configuration.
PATCH https://api.platica.mx/v1/agents/{agentId}/schedule URL parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Unique identifier of the agent | ✓ |
Request body
Change Saturday's schedule only (other days stay the same):
{
"serviceHours": {
"saturday": { "availability": "Abierto", "start": "10:00am", "end": "2:00pm" }
}
} Change the out-of-service behavior without touching the hours:
{
"outOfServiceBehavior": "none"
} | Parameter | Type | Description |
|---|---|---|
outOfServiceBehavior | "limited" \| "full" \| "none" | Agent behavior outside service hours |
serviceHours | object | Partial map of days (monday..sunday) to their new configuration |
| Value | Description |
|---|---|
limited | The agent answers but warns it is outside service hours |
full | The agent answers normally, ignoring the schedule |
none | The agent does not answer outside service hours |
Response
{
"status": "success",
"message": "Agent schedule updated successfully",
"data": {
"outOfServiceBehavior": "none",
"serviceHours": {
"monday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"tuesday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"wednesday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"thursday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"friday": { "availability": "Abierto", "start": "9:00am", "end": "5:00pm" },
"saturday": { "availability": "Abierto", "start": "10:00am", "end": "2:00pm" },
"sunday": { "availability": "Cerrado", "start": "Cerrado", "end": "Cerrado" }
}
}
} data always returns the full seven days after the merge.