Skip to main content

Navan API Data Source

The Navan API connector enables you to ingest travel booking records, admin reporting data, travel spend analytics, carbon emissions calculations, invoice data, and performance metrics from your Navan account. Follow the instructions below to create a new data flow that ingests data from a Navan API source in Nexla.
navan_api.png

Navan API

Create a New Data Flow

  1. To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Then, select the desired flow type from the list, and click the Create button.

  2. Select the Navan API connector tile from the list of available connectors. Then, select the credential that will be used to connect to your Navan account, and click Next; or, create a new Navan API credential for use in this flow.

  3. In Nexla, Navan API data sources can be created using pre-built endpoint templates, which expedite source setup for common Navan API endpoints. Each template is designed specifically for the corresponding Navan API endpoint, making source configuration easy and efficient.
    • To configure this source using a template, follow the instructions in Configure Using a Template.

    Navan API sources can also be configured manually, allowing you to ingest data from Navan API endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this source manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Navan API endpoints. Each template is designed specifically for the corresponding Navan endpoint, making data source setup easy and efficient.

Endpoint Settings

  • Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your data source for this endpoint.

Cancel Booking Invoice Task

Cancels an in-progress booking invoice generation task by its unique task UUID. Use this endpoint when a previously initiated invoice generation task must be stopped before it completes — for example, when it was started with incorrect parameters.

  • Enter the UUID of the invoice generation task to cancel in the Task UUID field. This UUID is returned when an invoice task is started using the Start Booking Invoice Task endpoint.

This endpoint performs a cancellation action (HTTP PUT) rather than retrieving data. It is primarily useful for operational workflows that manage multi-step invoice generation processes. Additional details about booking invoice tasks are available in the Navan Booking Invoice API documentation.

Get Carbon Calculations (Batch)

Calculates carbon emissions for multiple travel segments in a single request. Use this endpoint when you need to compute emissions data for a batch of trips simultaneously, which is more efficient than submitting segments one at a time.

  • This endpoint accepts a batch of travel segment objects in the request body. No additional template configuration parameters are required beyond selecting this endpoint. The request body is pre-configured by the template.
  • The endpoint returns an array of carbon emissions calculations in the $.data[*] path of the response, with one record per input travel segment.

Navan supports three globally recognized carbon calculation methodologies: DEFRA, ICAO, and TREMOD. The methodology used is determined by your Navan account configuration. For more details, see the Navan Carbon API documentation.

Get Carbon Calculations

Calculates carbon emissions for travel segments with a specified calculation method and reference identifier. Use this endpoint when you need detailed carbon calculations for individual travel segments and want to specify the calculation methodology.

  • Configure the following template parameters:

    • Reference — A unique reference string you assign to this calculation request, used to correlate the response with your input data.
    • Calculation Methods — The carbon calculation methodology or methodologies to apply (for example, DEFRA, ICAO, or TREMOD). Navan supports multiple globally recognized standards.
    • Segments — The travel segment or segments for which emissions should be calculated. Each segment typically includes origin, destination, travel class, and travel type.

For detailed information about supported calculation methods and segment formats, see the Navan Carbon API documentation.

Get Performance Summary

Retrieves performance metrics for a company, including spend, user adoption rates, and other key performance indicators. Use this endpoint to monitor overall travel program health and report on adoption and engagement trends.

  • Configure the following template parameters:

    • Company UUID — The unique identifier for your Navan company account. This value can be found in the Navan Admin portal under company settings.
    • Spend Params — Parameters defining the spend metrics to include in the summary.
    • Active Users Params — Parameters defining how active user metrics are calculated and filtered.
    • Adoption Params — Parameters controlling adoption rate calculations and thresholds.
    • Hotel Attachments Params — Parameters for hotel attachment rate metrics, which measure how often hotel bookings accompany flight bookings.

For more information about performance summary parameters and available metrics, see the Navan Admin Reporting API documentation.

Start Booking Invoice Task

Initiates an asynchronous task to generate invoices for bookings, with optional filters for date range and specific booking UUIDs. Use this endpoint to trigger invoice generation for a batch of bookings, then poll or retrieve the results once the task completes.

  • Configure the following optional filter parameters to control which bookings are included in the generated invoices:

    • Booking UUIDs — A list of specific booking UUIDs to include. Leave blank to include all bookings within the specified date range.
    • From Booking UUID — A cursor-based starting point for paginated invoice generation. Useful for resuming a large invoice task.
    • From Invoice Date — The start date (inclusive) for filtering bookings by invoice date, in YYYY-MM-DD format.
    • To Invoice Date — The end date (inclusive) for filtering bookings by invoice date, in YYYY-MM-DD format.
    • Page Size — The number of bookings to process per page in the invoice task.
  • The endpoint returns a task identifier in the $.data path of the response. Use this identifier with the Cancel Booking Invoice Task endpoint if you need to stop the task before it completes.

For more information about booking invoice tasks, see the Navan Booking Invoice API documentation.

Generate Unused Credits Report

Initiates a report generation task for unused travel credits, with filters for credit status, expiration date range, and export format. Unused travel credits represent airline credits from cancelled or changed bookings that have not yet been applied to new bookings.

  • Configure the following parameters to control report generation:

    • Role — The administrative role context for the report (for example, admin or superadmin). Determines the scope of data accessible in the report.
    • File Type — The output format for the generated report (for example, CSV or XLSX).
    • Statuses — Filter credits by their status (for example, active, expired, or redeemed).
    • Expiration Date From — The start date for filtering credits by expiration date, in YYYY-MM-DD format.
    • Expiration Date To — The end date for filtering credits by expiration date, in YYYY-MM-DD format.
    • Format Context — Additional formatting context for the report output.
    • Unused Tickets — Filter to include or exclude unused ticket records.
    • Create Elastic Scroller — Whether to create a server-side scroll context for large result sets.

For more information about unused credits reports and parameter formats, see the Navan Admin Reporting API documentation.

Generate Traveler Report

Initiates a traveler report generation task with filters and export configuration. Use this endpoint to produce reports summarizing traveler activity, booking patterns, and travel behavior for employees within your organization.

  • Configure the following parameters:

    • Role — The administrative role context for the report (for example, admin). Determines the scope of traveler data included.
  • The response data is returned in the $.data path. The report is generated asynchronously, and the response will include a task or download identifier for retrieving the completed report.

For more information about traveler report options and parameters, see the Navan Admin Reporting API documentation.

Generate Transactions Report

Initiates a transactions report with comprehensive filtering options, covering booking dates, travel dates, users, currency, and more. Use this endpoint to generate detailed transaction-level data for expense reconciliation, financial reporting, or audit purposes.

  • Configure the following filter parameters as needed:

    • Role — The administrative role context for the report (for example, admin).
    • From Epoch Seconds / To Epoch Seconds — Filter transactions by booking creation date, expressed as Unix epoch seconds.
    • From Epoch Seconds Updated Date / To Epoch Seconds Updated Date — Filter transactions by their last-updated date, expressed as Unix epoch seconds.
    • From Epoch Seconds Travel Date / To Epoch Seconds Travel Date — Filter transactions by the travel date, expressed as Unix epoch seconds.
    • Text — A free-text search string to filter transactions by traveler name, booking ID, or other text fields.
    • User UUIDs — Filter to include only transactions for specific user UUIDs.
    • Currency — The currency in which amounts should be reported (for example, USD or EUR).
    • Cascading — Whether to include data from subsidiary or child company accounts.
    • Manager Access Type / Manager Access Values — Parameters that control manager-level data access scope.
    • Filter By Traveller — Whether to filter results by individual traveler.
    • Booking IDs — Filter to specific booking identifiers.

For more information about transaction report filters and output formats, see the Navan Admin Reporting API documentation.

Get Travel Spend

Retrieves travel spend analytics with filtering, grouping, and carbon metrics. Use this endpoint to analyze spending patterns by category, department, date range, or other dimensions for financial planning and reporting.

  • Configure the following parameters to shape the analytics result:

    • Role — The administrative role context (for example, admin).
    • Booking Start Epoch Sec / Booking End Epoch Sec — Filter by booking creation date range, expressed as Unix epoch seconds.
    • Travel Start Date / Travel End Date — Filter by travel date range in YYYY-MM-DD format.
    • Type — The travel category to filter (for example, flight, hotel, or car).
    • Source — The booking source channel to filter.
    • Exclude Type — Travel categories to exclude from results.
    • Filter By / Exclude — Additional dimensional filters and exclusions.
    • Merchant Data Category — Filter by merchant category for expense-level analytics.
    • Date Range Type — Specify whether date ranges apply to the booking date or the travel date.
    • Group By — The dimension by which results should be aggregated (for example, by department, traveler, or category).
    • Currency — The output currency for spend amounts.
    • Amount Field — The spend field to use as the primary amount metric.
  • Results are returned as an array in the $.data[*] path of the response, with one record per grouping combination.

For more information about travel spend analytics parameters, see the Navan Admin Reporting API documentation.

Download Travel Spend

Downloads travel spend analytics as a file with filtering, grouping, and carbon metrics. Use this endpoint when you need a file-based export of travel spend data rather than a JSON response — for example, to deliver the data to a reporting team or load it into a data warehouse via file transfer.

  • This endpoint accepts the same filtering and grouping parameters as the Get Travel Spend endpoint, including Role, Booking date ranges, Travel date ranges, Type, Source, Exclude Type, Filter By, Exclude, Merchant Data Category, Date Range Type, Group By, Currency, and Amount Field. Configure these parameters to define the scope and structure of the export.
  • The response is returned at the $ root path and contains file content or a download reference.

For more information about travel spend download options, see the Navan Admin Reporting API documentation.

Get Average Rate

Retrieves average rate metrics for travel spend analysis, filtered by role and date range. Use this endpoint to track average hotel room rates, airfare, or other travel costs over time to benchmark against market rates or policy limits.

  • This endpoint accepts the same filtering and grouping parameters as the Get Travel Spend endpoint, including Role, Booking date ranges, Travel date ranges, Type, Source, Exclude Type, Filter By, Exclude, Merchant Data Category, Date Range Type, Group By, Currency, and Amount Field.
  • Results are returned as an array in the $.data[*] path of the response.

For more details about average rate metrics, see the Navan Reporting API documentation.

Download Average Rate

Downloads average rate metrics as a file with a configurable format and filters. Use this endpoint when you need a file-based export of average rate data for reporting or data transfer purposes.

  • This endpoint accepts the same filtering and grouping parameters as the Get Average Rate endpoint. Configure the Role, date ranges, grouping, and currency parameters to define the scope of the export.
  • The response is returned at the $ root path and contains file content or a download reference.

For more details, see the Navan Reporting API documentation.

Get Average Cost

Retrieves average cost metrics for travel spend analysis by role and date range. Use this endpoint to understand the average all-in cost of travel bookings across different categories, departments, or time periods.

  • This endpoint accepts the same filtering and grouping parameters as the Get Travel Spend endpoint, including Role, Booking date ranges, Travel date ranges, Type, Source, Exclude Type, Filter By, Exclude, Merchant Data Category, Date Range Type, Group By, Currency, and Amount Field.
  • Results are returned as an array in the $.data[*] path of the response.

For more details about average cost metrics, see the Navan Reporting API documentation.

Download Average Cost

Downloads average cost metrics as a file with a configurable format and filters. Use this endpoint when you need a file-based export of average cost data for reporting or downstream processing.

  • This endpoint accepts the same filtering and grouping parameters as the Get Average Cost endpoint. Configure the Role, date ranges, grouping, and currency parameters to define the scope of the export.
  • The response is returned at the $ root path and contains file content or a download reference.

For more details, see the Navan Reporting API documentation.

Initiate Query Download Report

Initiates a detailed query-based report download with extensive filtering options. Use this endpoint when you need a comprehensive, customizable export of booking and transaction data that goes beyond the standard reporting endpoints.

  • Configure the following filter parameters to scope the report:

    • Role — The administrative role context for the report.
    • From Epoch Seconds / To Epoch Seconds — Filter by booking creation date range, expressed as Unix epoch seconds.
    • From/To Epoch Seconds Updated Date — Filter by last-updated date range.
    • From/To Epoch Seconds Travel Date — Filter by travel date range.
    • Text — A free-text search string for filtering records.
    • User UUIDs — Filter to specific user UUIDs.
    • Currency — The output currency for amounts.
    • Cascading — Whether to include data from subsidiary accounts.
    • Manager Access Type / Manager Access Values — Manager-level data access scope controls.
    • Filter By Traveller — Whether to filter results by individual traveler.
    • Booking IDs — Filter to specific booking identifiers.
  • Results are returned as an array in the $.data[*] path of the response.

For more details about query download report options, see the Navan Reporting API documentation.

Initiate Carrier Share Download Report

Initiates a carrier share analysis report download with airline and alliance filters. Use this endpoint to analyze what percentage of your company's air travel is booked with preferred carriers or alliances, which is important for negotiating corporate airfare agreements.

  • Configure the following parameters:

    • Role — The administrative role context for the report.
    • File Type — The output format for the report (for example, CSV or XLSX).
    • From/To Epoch Seconds — Filter by booking creation date range, expressed as Unix epoch seconds.
    • From/To Epoch Seconds Updated Date — Filter by last-updated date range.
    • From/To Epoch Seconds Travel Date — Filter by travel date range.
    • Text — A free-text search string for filtering records.
    • User UUIDs — Filter to specific user UUIDs.
    • Currency — The output currency for amounts.
    • Cascading — Whether to include data from subsidiary accounts.
    • Manager Access Type / Manager Access Values — Manager-level data access scope controls.
    • Filter By Traveller — Whether to filter results by individual traveler.
  • Results are returned as an array in the $.data[*] path of the response.

For more details, see the Navan Reporting API documentation.

Get Travel Spend for Team Event

Retrieves travel spend metrics for a specific team event identified by its UUID. Use this endpoint to analyze spending for a particular offsite, conference, or team gathering — enabling event-level cost tracking and budget management.

  • Configure the following parameters:

    • Team Event UUID — The unique identifier of the team event. This value can be found in the Navan Admin portal under the Team Events section.
    • Booking Start/End Epoch Sec — Filter by booking date range for the event.
    • Travel Start/End Date — Filter by travel date range in YYYY-MM-DD format.
    • Type, Source, Exclude Type, Filter By, Exclude, Merchant Data Category — Additional filters to refine which spend records are included.
    • Date Range Type, Group By, Currency, Amount Field — Controls for how results are grouped and expressed.
  • Results are returned as an array in the $.data[*] path of the response.

For more details about team event spend reporting, see the Navan Reporting API documentation.

Get Facet Search for Team Event

Retrieves faceted search results showing the available filter dimensions for a specific team event. Use this endpoint to discover what filter values are available before querying team event spend data, which helps ensure accurate filtering.

  • Configure the following parameters:

    • Team Event UUID — The unique identifier of the team event to query.
    • Booking Start/End Epoch Sec — The booking date range for the facet search.
    • Travel Start/End Date — The travel date range in YYYY-MM-DD format.
    • Type, Source, Exclude Type, Filter By, Exclude, Merchant Data Category, Date Range Type — Filters that shape which facet values are returned.
  • Results are returned as an array in the $.data[*] path of the response.

Get Facet Search Bar for Team Event

Retrieves faceted search bar results with text search support for a specific team event. Use this endpoint to perform free-text searches within the available filter facets for a team event, enabling dynamic filter population in reporting dashboards.

  • Configure the following parameters, in addition to the standard facet search parameters:

    • Team Event UUID — The unique identifier of the team event to query.
    • Text — The free-text search string to apply within the facet values.
    • Field — The facet field on which the text search should be performed (for example, department or traveler name).
    • Booking Start/End Epoch Sec, Travel Start/End Date, Type, Source, Exclude Type, Filter By, Exclude, Merchant Data Category, Date Range Type — Standard filters for scoping the facet search.
  • Results are returned as an array in the $.data[*] path of the response.

Get Average Trip Cost for Team Event

Retrieves average trip cost metrics for a specific team event by its UUID. Use this endpoint to understand the average per-person travel cost for a team event, which is useful for budgeting and benchmarking future events.

  • Configure the following parameters:

    • Team Event UUID — The unique identifier of the team event.
    • Booking Start/End Epoch Sec, Travel Start/End Date, Type, Source, Exclude Type, Filter By, Exclude, Merchant Data Category, Date Range Type, Group By, Currency, Amount Field — Filters and grouping options to shape the average trip cost calculation.
  • Results are returned as an array in the $.data[*] path of the response.

For more details about team event cost reporting, see the Navan Reporting API documentation.

Download Average Trip Cost Report

Generates and downloads the average trip costs report for a team event. Use this endpoint when you need a file-based export of average trip cost data for a specific event, for use in presentations, budget reviews, or financial reporting.

  • Configure the following parameters:

    • Team Event ID — The unique identifier of the team event for which the report should be generated.
    • Booking Start/End Epoch Sec, Travel Start/End Date, Type, Source, Exclude Type, Filter By, Exclude, Merchant Data Category, Date Range Type, Group By, Currency, Amount Field — Filters and grouping options for the report.
  • The response is returned at the $ root path and contains file content or a download reference.

Download Average Trip Report

Generates and downloads the average trip metrics report for a team event. Use this endpoint when you need a file-based export of average trip data for analysis or sharing outside of the Navan platform.

  • Configure the following parameters:

    • Team Event ID — The unique identifier of the team event for which the report should be generated.
    • Booking Start/End Epoch Sec, Travel Start/End Date, Type, Source, Exclude Type, Filter By, Exclude, Merchant Data Category, Date Range Type, Group By, Currency, Amount Field — Filters and grouping options for the report.
  • The response is returned at the $ root path and contains file content or a download reference.

Rebook Travel Alert

Triggers a rebook action for a specific travel alert, with an optional message. Use this endpoint to programmatically initiate rebooking for travelers affected by flight disruptions, cancellations, or other travel alerts managed through the Navan platform.

  • Configure the following parameters:

    • Alert ID — The unique identifier of the travel alert for which a rebook should be triggered. Travel alert IDs can be retrieved from the Navan Admin portal under Travel Alerts.
    • Message — An optional message to include with the rebook action, which may be communicated to the affected traveler.

This endpoint performs an action (HTTP POST) rather than retrieving data. It is intended for operational workflows that automate traveler rebooking in response to disruptions.

Update Impacted Users

Updates the list of impacted users associated with a specific travel alert. Use this endpoint to add or modify the list of travelers who are affected by a given travel alert, enabling targeted communications and rebooking actions.

  • Configure the following parameters:

    • Travel Alert UUID — The unique identifier of the travel alert to update.
    • User Emails — A list of email addresses for the users who should be marked as impacted by this alert.
    • Overridden By — The identifier of the administrator or system overriding the impacted user list.

Import Travel Alerts

Imports travel alerts in bulk from a provided data source. Use this endpoint to programmatically create multiple travel alerts at once, for example when ingesting disruption data from an external travel intelligence feed.

  • This endpoint submits a bulk import request (HTTP POST) to the Navan travel alert import endpoint. The request body should contain the alert data in the format expected by the Navan API. No additional template-level parameters are required beyond selecting this endpoint.

This endpoint performs a write action. It is intended for operational workflows that automate the creation of travel alerts from external data sources.

Get Spend Summary

Retrieves aggregated spend metrics and performance analytics for a specified date range. Use this endpoint for executive-level summaries of total travel spend, including breakdowns by period and category, as well as carbon-related spend metrics.

  • Configure the following parameters:

    • From Epoch Seconds / To Epoch Seconds — Filter by booking creation date range, expressed as Unix epoch seconds.
    • Start Date From Epoch Seconds / Start Date To Epoch Seconds — Filter by travel start date range, expressed as Unix epoch seconds.
    • Currency — The currency in which spend amounts should be reported.
    • Date Range Type — Whether date ranges apply to the booking date or the travel start date.
    • Source — Filter by booking source channel.
    • Filter By — Additional dimensional filters for the summary.
    • Period — The time period granularity for the summary (for example, monthly or quarterly).
    • Carbon Settings — Configuration for including carbon-related spend metrics in the summary.

For more details about spend summary parameters, see the Navan Admin Reporting API documentation.

Get Point of Sales Data

Retrieves point of sales metrics and booking channel performance analytics. Use this endpoint to understand what proportion of bookings are made through Navan's platform versus other booking channels, which is useful for tracking adoption and optimizing travel program management.

  • This endpoint accepts the same filtering parameters as the Get Spend Summary endpoint, including From/To Epoch Seconds, Start Date From/To Epoch Seconds, Currency, Date Range Type, Source, Filter By, Period, and Carbon Settings.

For more details about point of sales analytics, see the Navan Admin Reporting API documentation.

Get Compliance Metrics

Retrieves compliance and policy adherence metrics for travel bookings. Use this endpoint to measure how consistently travelers are booking within company travel policy, which is a key input for travel program management and savings analysis.

  • This endpoint accepts the same filtering parameters as the Get Spend Summary endpoint, including From/To Epoch Seconds, Start Date From/To Epoch Seconds, Currency, Date Range Type, Source, Filter By, Period, and Carbon Settings.

For more details about compliance metrics and policy adherence reporting, see the Navan Admin Reporting API documentation.

List Company Bookings

Retrieves a paginated list of all company bookings with optional filtering. This is one of the primary endpoints for extracting booking-level data from Navan, making it suitable for downstream financial reconciliation, analytics, and reporting workflows.

  • This endpoint supports pagination automatically — Nexla will iterate through all available pages, fetching up to 50 records per page, until all bookings have been retrieved or the configured page limit is reached.
  • The response returns booking records in the $.bookings[*] path of the response. Each record contains booking details such as booking ID, traveler, travel dates, amount, status, and more.
  • Bookings can be filtered by date range using the createdFrom and createdTo parameters, which accept date values in YYYY-MM-DD format or as Unix epoch timestamps.

For more information about the bookings endpoint, including the full list of available response fields and filter parameters, see the Navan Bookings API documentation.

Query TDS Data

Queries the Navan Travel Data Store (TDS) with filters and facet parameters for advanced reporting. The TDS provides a unified, queryable view of all travel data in your Navan account, enabling complex, ad-hoc data extraction beyond what standard reporting endpoints offer.

  • Configure the following parameters:

    • Role — The administrative role context for the query (for example, admin).
  • This endpoint supports pagination — Nexla will automatically iterate through pages starting at page 0, fetching up to 50 records per page, until all matching records have been retrieved.
  • Results are returned as an array in the $.data[*] path of the response.

For more details about TDS query parameters and available fields, see the Navan Admin Reporting API documentation.

Endpoint Testing

Once the selected endpoint template has been configured, Nexla can retrieve a sample of the data that will be fetched according to the current settings. This allows users to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched and displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Configure Manually

Navan API data sources can be manually configured to ingest data from any valid Navan API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations, such as chained calls or custom request bodies.

API Method

  1. To manually configure this source, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Navan API from the Method pulldown menu. The most common methods for Navan endpoints are:

    • GET: For retrieving paginated lists of records (for example, the List Company Bookings and Query TDS endpoints).
    • POST: For endpoints that accept filter parameters in the request body and return analytics results (for example, Get Travel Spend, Get Compliance Metrics, and most admin reporting endpoints).
    • PUT: For endpoints that perform update or cancellation actions (for example, Cancel Booking Invoice Task).

API Endpoint URL

  1. Enter the URL of the Navan API endpoint from which this source will fetch data in the Set API URL field. Use the full URL including the protocol and any required path parameters.

The Navan API base URL is https://app.navan.com by default. Most admin reporting endpoints follow the pattern https://app.navan.com/api/adminreporting/v2/{'{role}'}/..., where {'{role}'} is replaced with the appropriate role value such as admin or superadmin. The bookings API uses the base https://app.navan.com/v1/bookings.

Date/Time Macros (API URL)

Optional

Optionally, the API URL can be customized using macros — all macros added to the API URL will be converted into values when Nexla executes the API call. Macros are dynamic placeholders that allow you to create flexible API endpoints that can adapt to different time periods or data requirements.

Date/Time macros are particularly useful for Navan reporting endpoints that accept date range parameters in the URL or query string. Many Navan endpoints accept fromEpochSeconds and toEpochSeconds parameters, which can be populated using Nexla macros to create rolling date-range queries.

  1. To add a macro, type { at the appropriate position in the API URL (within the Set API URL field), and select the desired macro from the dropdown list.

    • {now} – The current datetime
    • {now-1} – The datetime one time unit before the current datetime
    • {now+1} – The datetime one time unit after the current datetime
    • custom – Datetime macros can reference any number of time units before or after the current datetime — for example, enter (now-4) to indicate the datetime four time units before the current datetime
  2. Select the format that will be applied to datetime macros from the Date Format for Date/Time Macro pulldown menu. This format will be applied to the base datetime value of the macro — i.e., the value of {now} in {now-1}.

  3. Select the datetime unit that will be used to perform mathematical operations in the included macro(s) from the Time Unit for Operations pulldown menu — for example, for the macro {now-1}, when Day is selected, {now-1} will be converted to the datetime one day before the current datetime.

Lookup-Based Macros (API URL)

Optional

Column values from existing lookups can also be included as macros in the API URL. Lookup-based macros allow you to reference data from previously configured data sources or lookups, enabling dynamic API endpoints that adapt based on existing data.

Lookup-based macros are useful for Navan endpoints that require path parameters such as a Company UUID or Team Event UUID. You can populate these values from another Nexla data source rather than hardcoding them in the URL.

  1. To include a lookup column value macro, select the relevant lookup from the Add Lookups to Supported Macros pulldown menu.

  2. Type { at the appropriate position in the API URL, and select the lookup column-based macro from the dropdown list. Lookup-based macros are automatically populated into the macro list when a lookup is selected in the Add Lookups to Supported Macros pulldown menu.

Path to Data

Optional

If only a subset of the data returned by a Navan API endpoint is needed, you can designate the relevant part of the response by specifying the path to that data. Most Navan reporting endpoints return their primary data in a data array at the top level of the JSON response.

For example, when the Get Travel Spend endpoint is called, the API returns an object containing a data array of spend records along with metadata. By entering the path $.data[*], you configure Nexla to treat each element of the data array as an individual record.

Path to Data is essential for Navan API responses that wrap result records within a nested structure. The correct path for most Navan admin reporting endpoints is $.data[*] or $.data. The List Company Bookings endpoint returns records in $.bookings[*].

  • To specify which data should be treated as relevant in responses from this source, enter the path to the relevant data in the Set Path to Data in Response field using JSON path notation (for example, $.data[*]).

    Path to Data Example:

    For a Navan API response that includes a top-level array named data containing the relevant records, enter the path as $.data[*]. For the bookings endpoint, enter $.bookings[*].

Autogenerate Path Suggestions

Nexla can also autogenerate data path suggestions based on the response from the API endpoint. These suggested paths can be used as-is or modified to exactly suit your needs.

  • To use this feature, click the Test button next to the Set API URL field to fetch a sample response from the API endpoint. Suggested data paths generated based on the content and format of the response will be displayed in the Suggestions box below the Set Path to Data in Response field.

  • Click on a suggestion to automatically populate the Set Path to Data in Response field with the corresponding path. The populated path can be modified directly within the field if further customization is needed.

    PathSuggestions.png

Metadata

If metadata is included in the Navan API response but is located outside of the defined path to relevant data, you can configure Nexla to include this data as common metadata in each record. For example, many Navan responses include a top-level totalCount or pagination metadata alongside the data array — this information can be preserved for each record using the Metadata path.

Metadata paths are useful for preserving Navan API response context such as total record counts, pagination tokens, or request timestamps that apply to all records in the response.

  • To specify the location of metadata that should be included with each record, enter the path to the relevant metadata in the Path to Metadata in Response field using JSON path notation.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this source, enter the headers and corresponding values as comma-separated pairs in the Request Headers field (for example, header1:value1,header2:value2).

    You do not need to include Authorization headers — these are automatically managed by Nexla using the OAuth 2.0 Bearer token from your Navan API credential. Additional headers may be required for specific Navan API versions or custom integrations.

Endpoint Testing

After configuring all settings for the selected endpoint, Nexla can retrieve a sample of the data that will be fetched according to the current configuration. This allows you to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched and displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Save & Activate the Source

  1. Once all of the relevant steps in the above sections have been completed, click the Create button in the upper right corner of the screen to save and create the new Navan API data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.