Update Schedule
PUT https://api.letpay.io/myreports/schedule/:{id}
Edit Schedule
This endpoint is used to edit an existing schedule.
Authorization
AUTHORIZATION | API Key |
---|---|
Key | X-Auth-Token |
Value | MY_ACCESS_TOKEN |
Body Raw(json)
json
{
"report": {
"id": {{reportId}}
},
"run_every": "MONTHLY",
"day_of_month": 1,
"run_at": "08:35:00",
"recipient":"[email protected]",
"enable": true
}
Example Request
- 200 - OK
- 401 - Unauthorized
Example Request
200 - OK
curl --location -g --request PUT 'https://api.letpay.io/myreports/schedule/21' \
--params 'id=21' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN' \
--data-raw '{
"report": {
"id": 186
},
"run_every": "MONTHLY",
"day_of_month": 1,
"run_at": "08:00:00",
"recipient":"[email protected]",
"enable": true
}'
Example Response
Header
Content-Type: application/json
Body
{
"id": 21,
"report": {
"id": 186,
"name": "MC-ALL"
},
"run_every": "MONTHLY",
"day_of_week": null,
"day_of_month": 1,
"run_at": "08:00:00",
"recipient": "[email protected]",
"next_execution": "2025-01-01T08:00:00",
"last_execution": null,
"enable": true
}
Example Request
401 - Unauthorized
curl --location -g --request PUT 'https://api.letpay.io/myreports/schedule/21' \
--params 'id=21' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN' \
--data-raw '{
"report": {
"id": 186
},
"run_every": "MONTHLY",
"day_of_month": 1,
"run_at": "08:00:00",
"recipient":"[email protected]",
"enable": true
}'
Example Response
Header
Content-Type: application/json
Body
{
"message": "Invalid or expired token",
"code": 0,
"details": {}
}