MyRapidi
MyRapidi

Search our Wiki

REST API RTI Create RTI

Below you see an example of how to create RTI values. 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.

JSON:

curl
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json" 
  -H "Accept: application/json"
  -X POST
  data = "{\"transfer\":\"A_NAV_TEST_CUSTOMERS\",\"source\":\"NAV002\",\"destination\":\"NAV003\",\"source_control\":\"151030\" }"
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/rtis

The output for this example would be:

{
  "id": "51",
  "transfer": "A_NAV_TEST_CUSTOMERS",
  "source": "NAV002",
  "destination": "NAV003",
  "source_control": 151030
}

JSONAPI:

Update excisting RTIs:

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\":\"rtis\",\"attributes\": 
           {\"transfer\":\"A_NAV_TEST_CUSTOMERS\",\"source\":\"NAV002\", 
            \"destination\":\"NAV003\",\"source_control\":\"151030\"} }}"
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/rtis

The output for this example would be:

{
  "data":{
    "id": "51",
    "type":"rtis",
    "attributes":{
      "transfer": "A_NAV_TEST_CUSTOMERS",
      "source": "NAV002",
      "destination": "NAV003",
      "source_control": 151030 
    }
  }
}