Import fuel purchases via CSV upload

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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 which the fuel purchase was imported. Accepted values are:

  • efs-integration
  • comdata-integration
  • wex-integration
  • gir
  • relay-payment-integration
  • fluidsecure-integration
  • fleetcor-integration
  • fuelcloud-integration
  • voyager-integration
  • smartfill-integration
  • quikq-integration
  • shell-integration
  • allstar-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
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json