v1

latestOpenAPI 3.1.02026-07-2617501.1 MB

List all the Motive Card transactions (v2)

get/motive_card/v2/transactions

Query parameters

driver_ids[]integer[]

Specify the driver IDs for whom you want to fetch the Motive card transactions.

vehicle_ids[]integer[]

Specify a list of the vehicles for which you are checking the Motive card transactions.

date_range_filter_typestring

Narrow your search range by specifying either the date range or a transaction time. Allowed values are <b>transaction_time</b>, or <b>posted_at</b>.

start_datestring date

Specify the start date from which you want to list out the transactions. <b>Default</b>: 1 Week ago.

end_datestring date

Specify an end date before which you want to check the transactions. <b>Default</b>: Current date. <b>NOTE</b>: Start Date and End Date are optional. If using, enter both the values. Else, leave them both blank.

last_four_digitsstring

Specify the Motive card's last 4 digits to fetch the details pertaining to that particular card.

card_idstring

Specify the ID of the card for which you want to view all the transactions.

transaction_status_liststring[]

Filter by a specific transaction that you want to check for the Motive card transactions. Allowed values are <ul><li>posted</li><li>pending</li><li>reversed</li><li>refunded</li><li>declined</li><li>disputed_opened</li><li>disputed_closed</li></ul>

sort_directionstring

Sort the Motive card transactions either in an ascending order or a descending order based on the date range filter type. Default Value: Descending. Allowed values are: asc, desc.

page_numberstring

Specify the page number to view the transactions.

per_pagestring

Denotes the number of results per page. Default is 1000 per page.

Headers

X-Time-Zonestring required

Specify the timezone for formatting the timestamps.

X-API-Keystring required

Specify the API key of the company for which you are using this endpoint.

Authorizationstring

Specify the authorisation to invoke the endpoint. <b>NOTE</b>: Specify either the API Key or the Authorization.

Response

200

company_idinteger

Example response

{
  "transactions": [
    {
      "transaction": {
        "id": "d96ec3f5-6e9c-4550-8824-c6e5e4ff55dd",
        "transaction_status": "posted",
        "transaction_time": "2023-02-01T07:00:01.000Z",
        "posted_at": "2023-02-01T07:00:01.000Z",
        "updated_at": "2023-02-01T07:00:00.000Z",
        "driver_id": 4,
        "vehicle_id": 2,
        "last_four_digits": "1234",
        "authorized_amount_in_micros": 10000000,
        "total_amount_before_rebate_in_micros": 5660000,
        "total_amount_after_rebate_in_micros": 5660000,
        "merchant_info": {
          "name": "Shell",
          "city": "Berkeley",
          "state": "CA",
          "street": "111 Main St",
          "country": "USA",
          "zip_code": "94702",
          "address": "111 Main St",
          "full_address": "111 Main St, Berkeley, CA 94702, USA"
        },
        "pre_transaction_metadata": {
          "odometer_reading": 120088,
          "odometer_unit": "km",
          "custom_info": [
            {
              "name": "project_id_1",
              "value_type": "free_text",
              "current_value": "random value"
            }
          ]
        },
        "post_transaction_metadata": {
          "receipt_available": true,
          "comment": "testing deferred rebates",
          "custom_info": [
            {
              "name": "optional_project_id_1",
              "value_type": "free_text",
              "current_value": "random value"
            }
          ]
        },
        "order_items": [
          {
            "quantity": 5,
            "unit_price": 50.5,
            "gross_amount": 252.5,
            "product_type": "Diesel",
            "unit_of_measure": "gal"
          }
        ]
      }
    }
  ],
  "company_id": 4,
  "pagination": {
    "per_page": 50,
    "page_no": 1,
    "total": 1
  }
}