The base URL of the API is https://api.myrapidi.com/api/v2
All GET, POST, PUT, PATCH and DELETE requests are JSON or JSON APIencoded and must have content type of application/json or application/vnd.api+json respectively, or the API will return a 415 Unsupported Media Type status code.
In the HTTP Header you must set "Accept" for all requests and you must set "Content-Type" for POST, PUT and PATCH request (all requests that include json data). See the example below.
curl -H "Authorization: Bearer [API SECURITY TOKEN]" -H "Content-Type: application/json" -H "Accept: application/json" -X PATCH -d "{\"code\":\"INVOICE\",\"description\":\"Invoice Transfers\"}" https://api.myrapidi.com/api/v2/service/[SERVICE ID]/groups/[GROUP ID]
The out-put for this example would be:
{ "code": "INVOICE", "description": "Invoice Transfers", "comments": }
curl -H "Authorization: Bearer [API SECURITY TOKEN]" -H "Content-Type: application/vnd.api+json" -H "Accept: application/vnd.api+json" -X PATCH -d "{\"data\":{\"id\":\"5\",\"type\":\"groups\",\"attributes\":{\"code\":\"INVOICE\",\"description\":\"Invoice Transfers\"} }}" https://api.myrapidi.com/api/v2/service/[SERVICE ID]/groups/[GROUP ID]
The out-put for this example would be:
{ "data":{ "id":"5" "type":"groups", "attributes":{ "code": "INVOICE", "description": "Invoice Transfers" }, "relationships":{ "comments": { "data": [ ] } } }
We use standard HTTP verbs to indicate the intent of a request:
If you are using an HTTP client that doesn't support PUT, PATCH, or DELETE requests, send a POST request with an X-HTTP-Method-Override header specifying the desired verb.
curl -H Authorization: Bearer [API SECURITY TOKEN] -H "Content-Type: application/json" -H "Accept: application/json" -X POST -H "X-HTTP-Method-Override: DELETE" https://api.myrapidi.com/api/v2/service/[SERVICE ID]/groups/[GROUP ID]
curl -H Authorization: Bearer [API SECURITY TOKEN] -H "Content-Type: application/vnd.api+json" -H "Accept: application/vnd.api+json" -X POST -H "X-HTTP-Method-Override: DELETE" https://api.myrapidi.com/api/v2/service/[SERVICE ID]/groups/[GROUP ID]