MyRapidi
MyRapidi

Search our Wiki

REST API Schedule Tags Create Schedule Tags

Below you see an example of how to create new Schedule Tags on a specific Schedule. Examples both in JSON and JSONAPI are provided.

NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SERVICE ID]" below) to your own token and service id and remember also to replace the Schedule Id (171) with your own Id.

JSON:

curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json"   
  -H "Accept: application/json"
  -X POST
  data = "{\"code\":\"DS\",\"value\":\"NAV003\"}"
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/schedules/171/tags

The out-put for this example would be:

{
  "id": "103",
  "code": "DS",
  "value": "NAV003"
}

JSONAPI:

Create new Schedule Tags on a specific Schedule:

curl
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/vnd.api+json" 
  -H "Accept: application/vnd.api+json"
  -X POST
  data = "{\"data\":{\"type\":\"schedule_tags\",\"attributes\": {\"code\":\"DS\",\"value\":\"NAV003\"} }}"
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/schedules/171/tags

The out-put for this example would be:

{
  "data":{
    "id": "103",
    "type": "schedule_tags",
    "attributes": {
      "code": "DS",
      "value": "NAV003"
    }
  }
}