MyRapidi
MyRapidi

Search our Wiki

REST API Schedules Delete Schedule

If you want to delete a schedule please see below for both JSON and JSONAPI example.

NOTE: Remember to substitute the token (after Bearer) and the service id (the [SERVICE ID] below) to your own token and service id.

JSON:

curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json" 
  -H "Accept: application/json"
  -X DELETE
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]>/schedules/19

JSONAPI:

curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/vnd.api+json" 
  -H "Accept: application/vnd.api+json"
  -X DELETE
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/schedules/19

The output for both JSON and JSONAPI on successful deletion is that the response code Status: 204 No Content is returned.

For both JSON and JSONAPI the output when your deletion has failed (ex. schedule has already been deleted) the response code Status: 404 Not Found is returned + an error message:

{"errors":
  [{"source":
    {
      "pointer": "/data/attributes/id"},
      "detail": "Could not find Schedule with id 19"
    }
  ]
}