Update a scheduler

Update an existing scheduler’s name or cron expression.

For information about cron expressions, see Cron expression format​.

Endpoints

EnvironmentMethod and URL
StagingPUT https://api.staging.vitesse.io/v1/payment-initiation/paymentSchedulers/{id}
Production – UK HubPUT https://api.vitesse.io/v1/payment-initiation/paymentSchedulers/{id}
Production – US HubPUT 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 scopeIdentity client role
payment-requestspayment-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 PaymentSchedulerId is correct.
  • The request includes Name and CronExpression.
  • 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.