put https://api.gomotive.com/v1/messages?ids=&status=
Purpose: Use this API to update the status of a message that you sent to your driver. You must specify the ID of the message for which you want to update the status in the query parameters. Refer to the query parameters section for more info.
require 'uri'
require 'net/http'
require 'json'
url = URI('https://api.gomotive.com/v1/messages')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"
request['X-User-Id'] = <api user id>
request['Content-Type'] = 'application/json'
params = {
:ids => ['layer:///messages/06adc4a7-80c1-4026-9328-2d123d0f31c8'],
:status => 'delivered',
}
request.body = params.to_json
response = http.request(request)
puts response.read_body
Response Parameters
success
- Type: Boolean
- Description: Denotes if the status of the message was updated or not. In most cases, the bool value will be "true".