Import fuel purchases via CSV upload

Purpose: Use this API to import bulk fuel purchases into the Motive system either via a CSV or by uploading the Motive Template.

OAuth Token

# using source ‘efs-integration’ for EFS cards only.

require 'uri'
require 'net/http'
require 'json'

url = URI('https://api.gomotive.com/v1/fuel_purchase_imports')

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"
request['Content-Type'] = 'application/json'
params = {
  :source   => 'efs-integration',
  :import   => ["file_name.csv","base64_encoded_csv"]
}
request.body = params.to_json

response = http.request(request)
puts response.read_body

Response Parameters

status:

  • Type: String
  • Description: Denotes the status of the import of the fuel purchase transactions.

Body Params
string
required

Specify the source from where you are importing this fuel purchase. Allowed values are as follows:

  • EFS_INTEGRATION
  • COMDATA_INTEGRATION
  • WEX_INTEGRATION
  • GIR
  • RELAY_PAYMENT_INTEGRATION
  • FLUID_SECURE_INTEGRATION
  • FLEET_COR_INTEGRATION

import
array of strings
required

Enter the file name and the Base64 encoded CSV to import fuel purchases into the system.

import*
Response

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json