Update a scheduler
Update an existing scheduler’s name or cron expression.
For information about cron expressions, see Cron expression format.
Endpoints
| Environment | Method and URL |
|---|---|
| Staging | PUT https://api.staging.vitesse.io/v1/payment-initiation/paymentSchedulers/{id} |
| Production – UK Hub | PUT https://api.vitesse.io/v1/payment-initiation/paymentSchedulers/{id} |
| Production – US Hub | PUT https://api.us.vitesse.io/v1/payment-initiation/paymentSchedulers/{id} |
Replace {id} with the scheduler's PaymentSchedulerId.
For help choosing an environment, see Environment.
Access requirements
Configure the following access:
| OAuth scope | Identity client role |
|---|---|
payment-requests | payment-requests.manager |
For more information about scopes, see Authentication. For information about the access granted by specific roles, see Identity client roles.
Before you begin
- Obtain the scheduler’s
PaymentSchedulerId. Use List schedulers to find it. - Decide on the scheduler’s name and cron expression. For the cron format and timing guidance, see Scheduler timing.
Send the request
Send the scheduler’s Name and CronExpression in the request body.
This example uses the Staging environment:
curl --request PUT \
--url 'https://api.staging.vitesse.io/v1/payment-initiation/paymentSchedulers/<payment-scheduler-id>' \
--header 'Authorization: Bearer <access-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"Name": "Every six hours",
"CronExpression": "0 */6 * * *"
}'Replace <access-token> with a valid access token that contains the required scope, and any example values with your own details.
Example response
A successful request returns either 200 OK or 204 No Content. Both return an empty body.
Verify the update
Use List schedulers to check the scheduler's updated name and cron expression.
Updating a scheduler does not change the schedule already applied to existing payment requests. For guidance on assigning a scheduler when creating a payment request, see Make a payment using Vendor Pay.
Troubleshoot requests
If the request fails, use the returned HTTP status code to identify the likely cause and corrective action.
Check that:
- The
PaymentSchedulerIdis correct. - The request includes
NameandCronExpression. - The access token and identity client have the required access.
For error response formats, additional HTTP status codes and error-handling guidance, see Error responses.
Next steps
To view all schedulers, see List schedulers. To create another scheduler, see Create a scheduler.
Updated 15 days ago