WEX Fleet Management API ## Sections • [Overview](https://fleetapi.wexinc.com/fleet-management/fleet-management-api-beta/overview.md): What Fleet Services V3 Enables Fleet Services V3 is WEX’s modern, API-first platform that allows partners and large fleets to embed fleet account , card , driver , vehicle , and payment capabilities directly into their own systems , reducing manual processes and enabling scalable digital experiences. At a high level, V3 enables partners to: Automate fleet operations that historically required portals, files, or manual requests. Integrate WEX fleet functionality into their own UIs and workflows. Scale implementations across large and complex fleet portfolios. Core Business Capabilities End-to-End Fleet Account Management Partners can programmatically: Search fleet accounts and fleet hierarchies Retrieve live account status, balances, and account management details Business value : Fewer manual touchpoints, faster onboarding, and consistent data across systems. Card Lifecycle Automation V3 supports the full lifecycle of fleet cards, including: Issuing and provisioning cards Updating card attributes Ordering new and replacement cards and batch shipments Managing fulfillment and logistics Business value : Faster card issuance, reduced operational overhead, and improved driver readiness. Driver & Vehicle Management Partners can: Create and maintain driver and vehicle records Keep driver and vehicle data in sync across systems Business value : Cleaner data, reduced reconciliation effort, and better visibility across the fleet. Payments & Financial Operations for Direct Fleet ONLY V3 enables: Programmatic management of bank accounts (list, create, retrieve, update) and payments of WEX statements Business value : Streamlined WEX statement payment workflows Location & Network Discovery Partners can access: Fuel sites, fuel pricing, depots, EV sites, EV sites' charger in use status, and related metadata Brand, fuel type, and site information Location data for routing, discovery, and driver experiences Business value : Enables embedded mapping, routing, and fueling experiences in partner applications. Note: Location and site metadata are sourced from merchants and partners; WEX continously works to validate and improve data quality. Platform Characteristics (Why Partners & Fleets Choose v3) API-first & modern - RESTful, secure, scalable Flexible querying - partners retrieve only the data they need Enterprise-ready - supports large portfolios, multiple account structures, and complex workflows Extensible - designed to support new domains (for example, cardless, fraud, EV, loyalty) over time Consistent patterns - commons behaviours across domains reduce implementation friction • [Benefits](https://fleetapi.wexinc.com/fleet-management/fleet-management-api-beta/benefits.md): ### Efficiency The Fleet Service API acts as a single gateway, providing both external and internal users with unified access to a range of fleet management data. Access multiple endpoints through one API, eliminating the need to log into separate systems. ### Availability The Fleet Services API offers uninterrupted availability, providing 24/7/365 access to both external and internal users. ### Flexibility Unleash the full potential of your data with the Fleet Services API's powerful search capabilities. Search any attribute within the response model, including partial matches. Build dynamic, unrestricted queries using numerous parameters and leverage Lucene-style syntax for advanced filtering and sorting. ### RESTful Design Adhering to established RESTful principles, the API offers a lightweight, straightforward, and widely adopted architecture. ### Empowerment Take control of your fleet card management by building your own system at your own speed, leveraging the flexibility and independence offered by our API. • [Getting Started](https://fleetapi.wexinc.com/fleet-management/fleet-management-api-beta/getting-started.md): The Fleet Service API is organized around REST, uses standard verbs and returns HTTP status codes and JSON-encoded responses. Every call to a Fleet Service API requires authentication with a bearer token. **Step 1: Account Setup** Work with your WEX account team to onboard you to the platform. WEX will create your account, provision a testing environment and provide you with a client\_id and client\_secret. Be sure to keep your credentials secure, and do not share them in publicly accessible areas. **Step 2: Authentication** The Fleet Service API uses OAuth 2 and requires a bearer access token, specifically, a JSON WEB Token (JWT), in the header of every request. To get a bearer access token for the Fleet Service API, you must successfully make a POST request to our OAuth API to exchange your client\_id and secret for a token. A cURL request demonstrating an Authorization request, exchanging your client\_id/secret\_id for an access token in the “XC” testing environment. curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' A successful response from this request will have an access\_token field populated as part of the JSON response. Use this value in your future calls to the Fleet Service API. All API requests must be made over HTTPS. API requests without authentication will fail. **Generaral Authentication Notes:** * Do not add Scope to your Authorization request. * The JWT has a token expiration time, after which the Fleet Service API will respond with a 401 server code. * A JWT will invalidate if the same client credentials are used to create another token. * You should resuse your JWT until expiration of invalidation, regenerating your token after receiving a 401 server code. **Step 3: Making API Calls** Now that you have a bearer token, you're ready to start making API requests. The Fleet Services API allows you to make a variety of API calls depending upon your desired task. To begin exploring using the API, let's look at two scenarios and multiple examples to illustrate making API calls. Check out the [Recipes](69a640c769334cee44822f40) section for more use case examples. The Fleet Services API allows you to make a variety of API calls depending upon your desired task. This guide uses two scenarios and multiple examples to illustrate making API calls. **Scenario 1:** I am a Fleet Manager. I want to update my driver’s cell phone number. How do I update the phone number? **Example A:** **Assumption: The user has a driverId and the new phone number.** **Step 1**. Provide the driverId and the new phone number as body parameters to the PATCH/drivers/{driverId} endpoint. **Example B**: **Assumption**: The user does not know the driverId but knows the phone number and accountId \[1-1JA826S\]. **Step 1.** Use the GET/drivers endpoint by providing the following query parameter: `query_string:account_id`“1-1JA826S” AND `phone_number` : “2125551212”. **Step 2**. Get the driver\_id in the response from Step 1. **Step 3**. Provide the `driver_id` and the new phone number as body parameters to the PATCH/driver/{driverId} endpoint. **Example C:** **Assumption: The user does not know the accountId and driverId but knows the phone number.** **Step 1.** Use the GET/accounts endpoint to retrieve a list of all the accounts to which the user has access. **Step 2.** Get an account\_id on the response from Step 1. **Step 3.** Use the GET/drivers endpoint by providing the following query parameter. `query_string:account_id.keyword:` from step #2. **Step 4.** Get the `driver_id` in the response from Step 3. **Step 5.** Provide a driver\_id and the new phone number as body parameters to the PATCH/drivers/{driverId} endpoint. **Scenario 2:** I am a Fleet Manager. I want to search for a vehicle using a vehicle identification number (VIN). How do I find the vehicle? **Example A:** **Assumption**: The user does not know the `account_id` but knows the VIN number. **Step 1**. Use the GET/accounts endpoint to retrieve a list of all accounts to which the user has access. **Step 2**. Get an `account_id` on the response from Step 1. **Step 3**. Use the GET/vehicles endpoint by providing the following query parameter: `query_string:account_id.keyword`: from step #2> AND vin:JMVINAUTO12495615 • [General Behaviors](https://fleetapi.wexinc.com/fleet-management/fleet-management-api-beta/general-behaviors.md): The Fleet Service API is based on REST principles. The Fleet Service API uses JSON (Content-Type: application/json) content and the HTTP protocol to access resources as HTTP verbs. HTTP Headers The Fleet Service API expects the JSON content type. All requests must include the Content-Type header with a value of “application/json”. Read-Only Fields The Fleet Service API will ignore read-only resource fields so you can easily submit GET bodies for PUT operations without changing anything other than the desired writable values to update. HTTP Status Codes The Fleet Service API uses standard HTTP response codes to indicate the success or failure of an API request. In addition, most operations will return a JSON body as the Response Content. Title Description Method Description GET Retrieves a resource POST Creates a resource PUT Updates a resource PATCH Partially updates a resource DELETE Removes a resource Successful Requests Fleet Service API returns HTTP 2xx status codes for successful requests. Title Description Title Status Code Text Description 200 OK The request succeeded. 201 Created A POST method successfully created a resource. 202 Accepted The WEX server accepted the request and will execute it later. 204 No Content The WEX server successfully executed the method but does not return any response body. Failed Requests 4xx Codes Fleet Service returns HTTP 4xx status codes for unsuccessful requests, specifically, for the client-side errors. Title Description Status Code Description 400 Bad Request - Generic/unknown error. 401 Unauthorized - The users must log in. Also often means the user is unauthenticated. 403 Forbidden - The user is not authorized to use this resource. 404 Not Found - The resource does not exist. 405 Method not Allowed - WEX does not support the HTTP method. 406 Not Acceptable - The resource can only generate content not acceptable according to the Accept headers sent in the request. 429 Rate Limiting - You have exceeded your write and read requests. Wait a few seconds and try again. Failed Requests 5xx Codes Fleet Service returns HTTP 5xx status codes for unsuccessful requests, specifically, for the server-side errors. Title Description Status Code Description 500 Internal Server Error - A generic error indication for an unexpected server execution problem. 501 Not Implemented - The server cannot fulfill the request. 502 Bad Gateway 503 Service Unavailable - The server is (temporarily) not available. Rate Limiting The API implements rate limiting to manage traffic: 60 write requests and 120 read requests per minute. Before you hit a limit, the X-Rate-Limit-Remaining header will tell you how many requests you have left. If you exceed a limit, expect a “429 Too Many Requests” response. The X-Rate-Limit-Retry-After-Seconds header in this error will suggest a retry delay. Because this delay is rounded to seconds (potentially to 0), ensure you wait at least one second after receiving a 429 before retrying your request. Results Limiting Responses are limited to 10,000 items in a paginated dataset. The API will return a “x-total-count” header (also in metadata in body). If this value is 10,000, this indicates the result set limit was reached. Use filtering to narrow your results to smaller data sets. ODATA OData (Open Data Protocol) is an ISO/IEC-approved OASIS standard that defines a set of best practices for building and consuming powerful RESTful APIs. While traditional REST APIs often treat data as simple resources, OData extends standard web protocols (like HTTP verbs GET, POST, etc.) to transform the API into a highly queryable data source. This saves developers significant time by offloading complex filtering and sorting logic from the application and pushing it back to the server. OData vs. Traditional Query Parameters The core value of OData lies in its standardized approach to querying, which replaces custom, proprietary query parameters with a few well-defined, globally recognized system query options. To illustrate OData’s powerful query capabilities, let’s use an example of a client who is seeking to query for unleaded regular gas using the Fleet Service GET/sites endpoint. In a traditional API, complex queries often involve nested, custom URL parameters that require the API server to write custom code to parse and execute. OData solves this by standardizing five primary system query options: Title Description Title OData Parameter Traditional Function Purpose in OData $filter queryString Allows clients to specify criteria for selecting a subset of resources. $orderby sort Specifies the order in which items should be returned (ascending or descending). $skip page Determines the number of items to skip for pagination (for example, skip 25 to get page 2). $top size Limits the maximum number of items to return in the response. $select (No equivalent) Allows clients to specify which properties of a resource to include in the response, reducing payload size. Important Note : If an OData parameter is specified in the request, the API will typically ignore or override any non-OData query parameters to ensure standardized processing. Powerful Querying with $filter and Lambda The $filter parameter offers extensive capabilities, particularly when dealing with complex, nested data structures. Simple Filtering The $filter command uses logical operators (like eq , ne , gt , lt , ge , le ) to perform comparisons. Title Description Title Query Goal Lucene Query OData $filter Equivalent $Find active sites status:Active status eq 'Active' Find prices greater than $3 price:[3 TO *] price gt 3 Find prices less than $4 price:[0 TO 4] price lt 4 Advanced Filtering with Lambda Expressions For data models involving collections (like an array of fuel types or prices within a single site record), OData uses Lambda expressions (specifically the any and all operators) to query nested data. The Challenge : In a traditional API model, searching for sites where at least one product (in a collection of products) meets specific criteria (for example, “Unleaded Regular” with a price between $3 and $4) is difficult, often requiring custom server-side logic. The OData Solution: Lambda allows you to use a single expression to evaluate conditions across a collection. Example Lambda Query: $filter=fuel_types/any(f:f/fuel_price gt 4 and f/fuel_price lt 5 and (f/fuel_type eq 'Mid/Plus' or contains(f/fuel_type,'Regular'))) and brand eq 'VALERO' This query translates to: “Find sites where the fuel_types collection contains any entry ( f ) such that the price ( f/fuel_price ) is between $4 and $5 AND the fuel type ( f/fuel_type ) is ‘Mid/Plus’ or contains ‘Unleaded Regular’ and the fuel brand is ”VALERO." This provides a robust, self-describing way to query nested fields without custom code. Optimizing Responses with **$select** Another OData powerful feature is $select . This lets you explicitly choose which properties you want returned in the response object. Benefit : If a resource object contains 50 fields, but your application only needs the account_id and site_name , using $select dramatically reduces the data payload size and improves network performance. Example : $select=account_id, site_name (This tells the server to only return those two properties for the requested entity.) HATEOAS: Hypermedia As The Engine Of Application State HATEOAS (Hypermedia As The Engine Of Application State) is the key architectural constraint that differentiates a truly RESTful API from a simple HTTP-based service. It mandates that a client application should not rely on pre-configured, hardcoded URLs to navigate the API. Instead, the client must discover and interact with the API solely by following links dynamically provided in the server’s responses. Core Principle and Benefits The fundamental concept of HATEOAS mimics how a human browses a website: you only need the starting page, and every subsequent action (clicking a link, submitting a form) is guided by the document in front of you. Title Description Title Feature Description Benefit $Server Response The server returns the requested resource (data) along with associated hypermedia controls (links, typically under a _links attribute). Discoverability: The client immediately knows what actions or related resources are available for that specific object. $Dynamic Navigation The links provided reflect the current state of the resource. The client transitions its state by using these provided URIs. Loose Coupling: The server can change its underlying URI structure (e.g., from /v1/cards to /v2/new-cards) without breaking the client, as the client only relies on the link's relationship name (rel), not the URL itself. HATEOAS in Practice: Fleet Service API Examples The use of HATEOAS ensures that the client’s knowledge is limited to the initial entry point and the meaning of the link relationships (rel), making the system robust and evolvable. Scenario A: Fetching Resource Details (Discovering Links) When interacting with a resource collection, HATEOAS enables easy self-discovery of individual resource details: Client Request: You call the collection endpoint, such as GET/accounts Server Response: The API returns a list of accounts. For each account object in the response, the server includes a set of links, typically including a self link. Client Action: By reading the _links:"self" object and retrieving its href URL, the client can fetch the full, specific details for that individual account (for example, GET/accounts/1-A1BAJ2 ). The server dynamically provided the exact URL needed. Scenario B: Confirming and Retrieving New Resources HATEOAS is critical for confirming successful state transitions (like creating a resource) and providing the immediate next action. Client Request: You successfully call the creation endpoint, such as POST/cards , passing the necessary vehicle and account data. Server Response : The response confirms the card creation and, under the _links: “self" attribute, provides the URL for the newly created card resource. Client Action : The client can immediately use that provided link to verify the card’s details, status, or ID ( GET/cards/{new-card-id} ). This process confirms successful execution and gives the client a direct, server-verified path to the new resource. Mock Data in the XC Sandbox Environment The sandbox environment has limited connectivity to external systems. With the goal of providing for basic development and testing, certain endpoints will return randomly generated or statically defined data for read operations, and provide limited emulation of production functionality for write and querying operations. It’s important to be aware of these limitations as your code may not return expected results and will behave differently in production. Enforcement of certain business rules, such as same-account on retrieved or patched payments, will not be enforced. This is because the returned data is mocked/generated and thus may not correlate to a valid account for the client. OData parameters $skip and $top will be respected, but others will not. Any mocked endpoint that returns a PDF will return placeholder files. These endpoints return mocked data: Banks Payments Invoices DateTime DateTime values are represented as strings in the ISO 8601 format. You can localize the DateTime depending on the user’s timezone. All DateTimes are stored in UTC only and include a Z at the end. For example, midnight UTC on April 19, 2023, would be “2023-04-19T00:00:00.000Z”. • [Cards](https://fleetapi.wexinc.com/fleet-management/business-rules/cards.md): This section provides a detailed overview of the Fleet Service API's card operational logic. **account\_id** - The Account ID is fundamental to the Fleet Service API, serving as the primary identifier for all entities. Every request to the API requires a valid Account ID to locate specific information. **authorization\_control\_id** - If you omit the authorization control ID, the system will automatically apply the default ID associated with the specified account. To use a different authorization control ID, you can retrieve a list of available IDs for the account using the Account endpoint (`account/{accountId}/authorization profiles`), select your preferred ID, and include it in your request. **batch\_order\_number** - To have the system automatically generate a batch order number, initiate a batch order by creating your first card and leaving the batch order number field empty. The system will return a card object containing the newly generated batch order number. For all subsequent cards intended for the same address within that batch, simply assign this same batch order number. All cards for a specific account ordered on the same day and sharing the same batch order number will be grouped together for shipping to the client. **card\_address** - The shipping address is linked to a specific card. The `card_address` functionality is governed by the following business rules: * `card_address` must be enabled at the account level before it can be used. * When replacing a lost or stolen card, if the "use address on card" option is selected, the replacement card will always be shipped to the existing `card_address`. **card\_profile\_id** - The `card_profile_id` is a mandatory field that specifies the physical characteristics of the card, including the number of embossed fields, color, and logos. To obtain a valid `card_profile_id`for an account, use the `GET/accounts/{accountId}/card-profiles` endpoint. This will return a list of available card profiles; select the desired profile and use its id in this field. **Note**: Changing the `card_profile_id` will result in the card being reissued. **Embossing** - The card profile will automatically populate these fields with default values from predefined sources. However, you have the flexibility to override these defaults and enter custom values for any of the string fields provided. **employee\_number** - The `employee_number` field is optional. You can enter any value you choose in this field. **enhanced\_profile\_id** - This field is optional and can typically be left blank unless you have a specific need for it. **ev\_requested** - The `ev_requested` setting is configured at the account level. If your account has EV (Electric Vehicle) functionality enabled, you can set this `ev_requested` field to true. Doing so will associate an EV RFID tag with the card. **produce\_card** - The `produce_card` field should generally be set to true. This action will both create the card record and initiate an order for its physical production and shipment. If you set `produce_card` to false, the card record will be created, but no physical card will be ordered or shipped. **Exception**: When batch ordering cards, you must set `produce_card` to false. The batch order endpoint will handle the creation of a single order for all cards in the batch, assigning them the same batch number and arranging for their shipment together. **order\_id** - When you create a card and set`produce_card` to `true` (indicating a physical card should be produced), the system will generate an order, and its unique identifier will be populated in the `order_id` field. **reference\_id** - You can enter whatever you want in this field. **renewal\_period** - This setting is configured at the account level and cannot be modified for individual cards. **use\_address\_on\_card** - This setting can be configured for individual cards. When creating a card, if you set this field to `true`, the Fleet Service API will use the specific address associated with that card for shipping purposes. **usage\_type**\- There are two types of cards - Vehicle and Driver cards. * **Vehicle Cards:** Vehicle cards are assigned to specific vehicles or assets. This allows the fleet to monitor vehicle-related expenses, such as fuel costs, and track performance metrics like mileage, fuel efficiency (MPG), and cost per mile. * **Vehicle/Multi-Driver Card: 1:M** This card is linked to a single vehicle. Each authorized driver using the card must enter their unique Authorization Prompt ID, enabling the system to track both vehicle-related expenses and individual driver purchase activity. * **Vehicle/Single Driver Card 1:1 Plus** This card is dedicated to a specific vehicle and is associated with a single, unique Authorization Prompt ID, which is known only to one designated driver. This one-to-one assignment provides a high level of security for transactions. * **Vehicle Card 1:1** Dedicated to a specific vehicle or asset, this card operates with a single Authorization Prompt ID. Drivers using this card do not enter their own unique IDs; instead, they utilize the shared Authorization Prompt ID linked to the card. * **Driver Cards:** Driver cards are issued to and remain with individual drivers, enabling the tracking of purchases and expenses specifically associated with that driver. * **Driver/Multi-Vehicle Card 1:M** This card, carried by the driver, offers the flexibility to make purchases for multiple vehicles or assets. Although the Authorization Prompt ID identifies the specific vehicle or asset at the time of purchase, the system can track both the driver and the individual vehicle/asset involved in the transaction. * **Driver/Single-Vehicle Card 1:1 Plus** This card is uniquely assigned to both a specific driver (with their individual Authorization Prompt ID) and a single vehicle for an extended timeframe. * **Driver Card 1:1** This card is assigned to a specific driver and functions similarly to a traditional debit card, requiring the driver to swipe the card and enter their unique Authorization Prompt ID (akin to a PIN) for authorization. **user\_defined\_fields** - You can enter whatever information you want in these fields. **vehicle** - You can only associate a vehicle with a card if it's a designated vehicle card (also referred to as an asset card). A vehicle card is defined by having a vehicle linked to it. There are three types of vehicle cards: 1:1, 1:many, and 1:1 plus. Notably, if you are using a 1:1 plus vehicle card, both a vehicle and a driver assignment are mandatory (_See_\_**Vehicle Cards**\_ _for more information_). You can enter the desired information in the provided fields but note that the Vehicle Identification Number (VIN) will undergo validation. **driver** - The requirement for a driver association depends on the card's usage type. Driver cards necessitate the assignment of a driver, while "plus" cards require both a driver and a vehicle association. (_See_ _**Driver Cards**_ _for more information_). **prompt\_id** - The `prompt_id` is only required for 1:1 cards when it's customer-defined. For all 1:1 cards, the `prompt_id` is associated directly with the card entity. For instance, on a 1:1 vehicle card, you would enter a vehicle-specific prompt, and on a 1:1 driver card, you would enter a driver-specific prompt. **card\_order** - Is optional. If you leave it empty, the system will automatically use the default shipping information configured for the account. However, if you provide any data in this field, the system will attempt to map and use that information. * **requested\_by** - Is optional. If you provide information in this field, WEX will use it to identify who made the request. If you leave this field blank, WEX will automatically use your client ID. * **requested\_by** - Is optional. If you provide information in this field, WEX will use it to identify who made the request. If you leave this field blank, WEX will automatically use your client ID. * **address\_type** - The `address_type` field determines the kind of shipping address being used for the order, which affects how the address information is processed. If you choose `SPECIAL`as the `address_type` , you are required to fill out all the address fields provided. * **SPECIAL address** - Selecting the `SPECIAL`address type means you are providing a temporary shipping address. This address will only be used for this single card order and will not be saved, stored, or used for any subsequent orders. * **ADMIN, MAILING, BILLING** - When ordering a card, you can select `ADMIN`, `MAILING`, or `BILLING`to use one of the addresses already associated with your account. Choosing `ADMIN` will ship the card to the address on file. * **CARD\_SHIPPING** - The default address for every account. If you do not enter any address, the API will automatically ship the card to the address on file. * **CARD ADDRESS** - You can designate a specific shipping address for an individual card using `CARD ADDRESS`. When a card is ordered, and if the relevant account flag is active, the system will automatically use this card-specific address for shipment. **shipping\_information** - The `shipping_information` section defines the card's shipping destination. You should only provide address details here if you have chosen the `SPECIAL`address type. For all other shipping options (like `ADMIN`, `MAILING`, `BILLING`, address input in this section is unnecessary. The following three fields within `shipping_information` are mandatory: * **carrier name** - All cards are shipped using USPS by default. Specify an alternative carrier if needed. * **shipping\_method** - You must select the shipping method. * **use\_customer\_shipping** - You must select this boolean. • [Drivers](https://fleetapi.wexinc.com/fleet-management/business-rules/drivers.md): This section a detailed overview of the Fleet Service API's driver operational logic. **account\_id**: The account to which drivers are linked is also known as the "root account." **program\_driver\_id**: This ID represents the driver's association with a particular fuel or card program, such as ExxonUniversal or WEX Universal. **prompt\_id**:This field is required if your vehicle is associated with 1:M cards or if you are using any other driver type that requires a driver prompt ID. **purchase\_device\_id**: This field only applies if you have a driver 1:1 card. **contact**: **department**: The `department_id` and `department_name` fields are only relevant if your account's hierarchy has been configured to include departments. **efs**: These fields are reserved for future functionality and are currently not implemented. **ev**: These fields are used to facilitate reimbursement for drivers who charge their electric vehicles at home. * **ev\_provider**: Electric vehicle provider. * **home**: Driver’s home information. * **device**: Driver home device information. * **home\_device\_id** : Home device Id. * **home\_device\_status**: Home device status. * **home\_reimbursement\_requested\_status**: This field indicates the status of a driver's request for home electric vehicle (EV) charging reimbursement, provided the account has EV functionality enabled. You can use the `REQUESTED`and `DISABLED`values to modify the reimbursement status. Other status values are for informational purposes only. • [Vehicles](https://fleetapi.wexinc.com/fleet-management/business-rules/vehicles.md): This section provides a detailed overview of the Fleet Service API's vehicle operational logic. **company\_vehicle\_id**: This is a user-provided field where you can enter any value. **vehicle\_number**: You can enter whatever information you want. • [Accounts](https://fleetapi.wexinc.com/fleet-management/business-rules/accounts.md): This section provides a detailed overview of the Fleet Service API's accounts operational logic. **revolver\_account**: Refers to revolving credit. **billing**: * **Cycle**: We provide various billing cycles. The cycle assigned to your account is determined by your monthly billing statement date. **card\_info**: * **wex\_account\_number**: This field represents your internal account number, and it is different from your card number. * **renewal\_period**: Specifies the interval at which WEX issues replacement cards. **card\_shipping\_info**: * **shipping\_company\_name**: WEX will use this company name on all mail sent to you. * **shipping\_product\_id**: This allows you to choose between overnight and regular shipping options. * **allow\_card\_level\_shipping**: Enables shipping cards to the address on the card. **customization**: * **alias**:This corresponds to your account's short name, also known as your "doing business as" (DBA) name. * **reports**: * **custom\_ftp\_account**: This specifies the account to which your reports will be sent using FTP. * **custom\_ftp\_server**: This specifies the server to which your reports will be sent. * **report\_sub\_total\_type**: The type of report you will receive. **vehicle\_info**: * **vehicle\_id\_length**: The vehicle prompt length. * **driver\_id\_length**: The driver prompt length, typically 4 - 6 digits. * **has\_customer\_assigned\_driver\_id**: If you are creating cards and using customer-assigned IDs, you can provide your own driver prompt IDs. However, if the system-assigned ID option is enabled (boolean is false), the driver prompt IDs will be system-generated, and you do not need to enter any. * **has\_customer\_assigned\_vehicle\_id**: If you are creating cards and using customer-assigned IDs, you can provide your own driver prompt IDs. However, if the system-assigned ID option is enabled (boolean is false), the driver prompt IDs will be system-generated, and you do not need to enter any. * **association\_root**: This is a WEX internal field. * **financially\_liable\_account\_number**: If you are the financially liable account holder, you are responsible for paying all charges incurred by any of your child entities. * **funder**: The funder is the entity that covers the expenses until you make payment. Typically, this is WEX. * **Id**: Your internal Id. * **parent\_account\_id**: The parent Id in the hierarchy. * **short\_name**: This is a shorter version of your account's name. * **ultimate\_parent\_account\_id**: In your account hierarchy, this is the highest-level account. Many configurations, such as EV settings, are typically applied at this level and then inherited by all child accounts. **balance**: * **balance**: Account balance, not including any pending transactions. * **open\_to\_buy\_balance**: Represents the current amount of credit available for making purchases. **balance\_config**: * **direct\_debit**: WEX directly debits the customer's bank account for payment. * **distributor**: A distributor manages multiple service stations (often with various brands) and may also distribute other petroleum products like heating oil and lubricants. * **funded**: WEX Bank provides funding and servicing for this card program and is responsible for managing receivables and assuming credit risk on its fleet accounts. * **account\_number**: The WEX-assigned external account number, also called the Program Account Number. * **account\_status**: Pending, Active, Suspended, Terminated * **scheduled\_bank\_id**: Identifies the bank from which the money will be drawn. **card\_profile**: Creating a card requires your `card_profile_id` . This profile defines the card's characteristics, such as embossing details (location, lines), logos, and swipe prompts. **usage\_type**: _See the business rules outlined earlier in Appendix A - Cards_. • [Sites](https://fleetapi.wexinc.com/fleet-management/business-rules/sites.md): This section provides a detailed overview of the Fleet Service API's sites operational logic. **latitude**: Required for site searches, this field represents the fueling or EV charging location's latitude. **longitude**: Required for site searches, this field represents the fueling or EV charging location's longitude. **radius**: Defines the search area by specifying the distance from the provided latitude and longitude. This parameter is required to perform a site search. However, if you do not provide a radius value, the API will automatically use a default radius for the search. **query\_string**: Accepts a [Lucene-style search](https://lucene.apache.org/core/2_9_4/queryparsersyntax.html) query. This type of query allows you to search specific fields with both precision and flexibility. • [Card Status and Status Reason](https://fleetapi.wexinc.com/fleet-management/business-rules/card-status-and-status-reason.md): Card status types and conditions for FS ASSET CONDITION with parent card status, reasons, and usage notes. Title Description Title Description Title Type Parent Card Status Card Status Reason Notes Comment FS ASSET CONDITION Test Test PD Not used FS ASSET CONDITION Terminated Not Approved Used FS ASSET CONDITION Terminated Convert Used FS ASSET CONDITION Terminated Out of Service Used FS ASSET CONDITION Terminated Converted Used FS ASSET CONDITION Terminated Stolen Used FS ASSET CONDITION Terminated Online Termination Used FS ASSET CONDITION Terminated Do Not Renew Used FS ASSET CONDITION Terminated Fraud Used FS ASSET CONDITION Terminated Lost Used FS ASSET CONDITION Terminated Online Order Canceled Used FS ASSET CONDITION Terminated Declined by Distributor Used FS ASSET CONDITION Suspended Under Review Used FS ASSET CONDITION Suspended Invalid Prompt ID Used FS ASSET CONDITION Suspended Lost/Misplaced Used FS ASSET CONDITION Suspended Out Of Service Used FS ASSET CONDITION Pending Set-Up Not used FS ASSET CONDITION Order Order Used Not sent to RDW and ODS when the card is still in Order Status. FS ASSET CONDITION Active Accept Used FS ASSET CONDITION Active Converted Used FS ASSET CONDITION Active Prompt Used FS ASSET CONDITION Active Active Used FS ASSET CONDITION Active Suspected Fraud Used FS ASSET CONDITION Active Design Used • [Card Status and Reason Transition](https://fleetapi.wexinc.com/fleet-management/business-rules/card-status-and-reason-transition.md): Title Description Title Card Status Status Reason Notes Terminated Convert Card Status can be changed back to Active Terminated Out of Service Card Status can be changed back to Active Terminated Declined by Distributor Card Status can be changed back to Active Terminated Fraud Card Status can be changed back to Active Terminated Stolen Card Status can't be changed back to Active Terminated Lost Card Status can't be changed back to Active Terminated Online Termination Card Status can be changed back to Active Terminated Not Approved Card Status can be changed back to Active Terminated Do Not Renew Card Status can be changed back to Active Terminated Converted Card Status can be changed back to Active Terminated Online Order Canceled Card Status can't be changed back to Active Suspended Out of Service Card Status can be changed back to Active Suspended Under Review Card Status can be changed back to Active Suspended Lost/Misplaced Card Status can be changed back to Active Suspended Invalid Prompt ID Card Status can be changed back to Active • [Card Status State Model](https://fleetapi.wexinc.com/fleet-management/business-rules/card-status-state-model.md): Card status state transition models showing valid state changes and their required conditions Title Description Title Description Title From State To Category To State Rule Expression Notes Active Suspended Active Terminated Order Active Suspended Active [FLA Account Status] = "Active" and [Account Status] = "Active" For this transition to be allowed, both FLA Status and Account Status need to be Active Suspended Terminated [FLA Account Status] = "Active" and [Account Status] = "Active" For this transition to be allowed, both FLA Status and Account Status need to be Active Terminated Active [FLA Account Status] = "Active" and [Account Status] = "Active" and [Card Status Reason] <> "Lost" and [Card Status Reason] <> "Stolen" and [Card Status Reason] <> "Online Order Canceled" • [Create Account](https://fleetapi.wexinc.com/fleet-management/recipes/create-account.md): Create a new child account by leveraging information from an existing parent account. #### Step 1: Fetch your Bearer Token Use the WEX-provided client\_id and client\_secret to request for your bearer token. curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' #### Step 2: Find your account 1. Fetch the list of accounts. 2. Choose the parent account you want to use to create the child account. curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' #### Step 3: Create the account 1. Copy the values from the parent account's `card_shipping_info` that were returned in the response from **Step 2**. 2. Enter your customization values. 3. Use the address Ids from your parent account to fill in the `address_info`. 4. Use the contact Ids from your parent account to fill in the `contact_info`. 5. Use the carrier `account_number` and name from the parent account to complete your `carrier_info`. 6. Use the `default_auth_profile_id` from the parent account. 7. Add whatever name you want for `account_name`. 8. Use the Id that was returned in the response from **Step 2**. curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer' \ --data-raw '{ "card_shipping_info" : { "shipping_company_name" : "Company Name", "shipping_contact_id" : "1-3344D", "shipping_address_id" : "1-387A", "shipping_product_id" : "1-28KHF", "allow_card_level_shipping_address" : true }, "customization" : { "locale" : "EN_US", "alias" : "Short Company Name", "description" : "My account" }, "address_info" : { "primary_address_id" : "1-CD3223", "billing_address_id" : "1-83873A" }, "contact_info" : { "billing_contact_id" : "1-AFE33", "fleet_contact_id" : "1-IUUY22" }, "carrier_info" : { "account_number" : "123456", "name" : "FedEx" }, "default_auth_profile_id" : "12345", "account_name" : "Company Name", "parent_account_id" : "1-ABD23" }' • [Create Driver](https://fleetapi.wexinc.com/fleet-management/recipes/create-driver.md): Learn how to create a driver in the Fleet Management Services API. #### Step 1: Fetch your Bearer Token Use the WEX-provided client\_id and client\_secret to request for your bearer token. curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' #### Step 2: Find your account 1. Find your account. 2. Fetch the list of accounts and pick the one that you want to use to create a driver. curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=account_name.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' #### Step 3: Create the driver 1. Fill out the information as necessary using the accountId (fetched in **Step 2**). **Note**: `driver_prompt_id` is only editable if your account is configured for customer-assigned prompt IDs. Also defined on the account record is the size of the promptId , which can be 4 or 6 digits. curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/drivers' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer' \ --data '{ "account_id": "1-AF33", "contact": { "job_title": "Captain", "first_name": "Jim", "last_name": "Kirk", "middle_name": "Tiberious", "email": "jim@trek.com", "employee_number": "NC-107", "badge_number": "1", "phone_number": "1234567890", "cell_phone_number": "1234567890", "zip_code": "1234" }, "driver_license": { "license_number": "ABCD", "license_state": "ME", "license_country": "US" }, "driver_prompt_id": "1234" }' "license_number": "ABCD", "license_state": "ME", "license_country": "US" }, "driver_prompt_id": "1234" }' • [Create Vehicle](https://fleetapi.wexinc.com/fleet-management/recipes/create-vehicle.md): Learn how to create a vehicle in the Fleet Management Services API. #### Step 1: Fetch your Bearer Token Use the WEX-provided client\_id and client\_secret to request for your bearer token. curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' #### Step 2: Find your account 1. Find your account. 2. Fetch the list of accounts and pick the one that you want to use to create a vehicle. curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=account_name.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' #### Step 3: Create the vehicle 1. Fill out the information as necessary using the accountId (fetched in **Step 2**). **Note**: `vehicle_prompt_id` is only editable if your account is configured for customer-assigned prompt IDs. Also defined on the account record is the size of the `prompt_id` , which can be 4 or 6 digits. curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/vehicles' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer' \ --data '{ "account_id": "1-AD334", "asset_type": "ASSET", "company_vehicle_id": "Your vehicle id", "description": "Van", "vehicle_prompt_id": "1234", "license_plate": { "license_plate_number": "2838A", "license_plate_state": "AZ", "license_plate_country": "US" }, "detail": { "make": "Toyota", "model": "Prius", "vin": "12347463536738373", "year": "2020", "start_odometer": 0 }, "fuel": { "tank_capacity": 20, "unit_of_measure": "GALLONS", "mpg": 60 } }' • [Create a Vehicle Card with Default Values](https://fleetapi.wexinc.com/fleet-management/recipes/create-a-vehicle-card-with-default-values.md): Learn how to create a vehicle card in the Fleet Management Services API. #### Step 1: Fetch your Bearer Token Use the WEX-provided client\_id and client\_secret to request for your bearer token. curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' #### Step 2: Find your account 1. Fetch the list of accounts. 2. Choose the account you want to use for the new card. curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' #### Step 3: Find your card profile 1. Fetch the list of card profiles. 2. Choose the card profile you want to use for the new card. curl --location --request GET 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/1-A1BAJ2/card-profiles?page=0&size=25' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' #### Step 4: Create the card To successfully create the card, you'll need the following: 1. The Account ID (fetched in **Step 2**). 2. The Card Profile ID (fetched in **Step 3**). 3. To have the physical card created and mailed, set `produce_card` to true. 4. The `usage_type`must be set to "Asset". 5. Vehicle Information (Recommended): To attach a specific vehicle to this card, provide the vehicle details as shown in the code example. * If you omit vehicle information: A new vehicle will be created and attached automatically; you can edit its details later. **Note on Shipping**: Since no address is provided during card creation, WEX will ship the card to the default card shipping address configured on the account. curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/v3/cards' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'userId: 12345' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer' \ --data '{ "account_id" : "1-A1BAJ2", "card_profile_id" : "1-KH2P1X", "produce_card" : true, "usage_type" : "Asset", "vehicle" : { "license_plate" : { "license_plate_number" : "abc123", "license_plate_state" : "AB", "license_plate_country" : "CA" }, "detail" : { "make" : "ford", "model" : "f150", "vin" : "18218237393038727278", "year" : "2020", "start_odometer" : 0 }, "company_vehicle_id" : "1234", "vehicle_description" : "truck", "distance_per_unit" : "10", "uom" : "Gallon", "tank_capacity" : "35" } }' }' • [Create a Vehicle Card with Card Address](https://fleetapi.wexinc.com/fleet-management/recipes/create-a-vehicle-card-with-card-address.md): Learn how to create a vehicle card with a card address in the Fleet Management Services API. Step 1: Fetch your Bearer Token Use the WEX-provided client_id and client_secret to request for your bearer token. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' Step 2: Find your account Fetch the list of accounts. Choose the account you want to use for the new card. CURL curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 3: Find your card profile Fetch the list of card profiles. Choose the card profile you want to use for the new card. CURL curl --location --request GET 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/1-A1BAJ2/card-profiles?page=0&size=25' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 4: Create the card To successfully create the card, you'll need the following: The Account ID (fetched in Step 2 ). The Card Profile ID (fetched in Step 3 ). To have the physical card created and mailed, set produce_card to true. The usage_type must be set to "Asset". Vehicle Information (Recommended): To attach a specific vehicle to this card, provide the vehicle details as shown in the code example. Note : If you omit vehicle information: A new vehicle will be created and attached automatically; you can edit its details later. 6. If you want this card to have a permanent address, you must add the address as shown in the code example. Note on shipping : Because you have set use_address_on_card to true and provided a card address, WEX will mail any reissued cards to this permanent address. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/cards' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'userId: 12345' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ' \ --data '{ "account_id" : "1-A1BAJ2", "card_profile_id" : "1-KH2P1X", "produce_card" : true, "use_address_on_card" : true, "usage_type" : "Asset", "card_address" : { "card_address_line1" : "street 1", "card_address_city" : "city", "card_address_state" : "ME", "card_address_postal_code" : "12345", "card_address_country_code" : "US", "card_address_contact_name" : "Contact", "card_address_phone_number" : "123-3456", "card_address_company_name" : "Company" }, "vehicle" : { "license_plate" : { "license_plate_number" : "abc123", "license_plate_state" : "AB", "license_plate_country" : "CA" }, "detail" : { "make" : "ford", "model" : "f150", "vin" : "18218237393038727278", "year" : "2020", "start_odometer" : 0 }, "company_vehicle_id" : "1234", "vehicle_description" : "truck", "distance_per_unit" : "10", "uom" : "Gallon", "tank_capacity" : "35" } }' }' • [Create a Vehicle Card with Special Address](https://fleetapi.wexinc.com/fleet-management/recipes/create-a-vehicle-card-with-special-address.md): Learn how to create a vehicle card with a special address in the Fleet Management Services API. Step 1: Fetch your Bearer Token Use the WEX-provided client_id and client_secret to request for your bearer token. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' Step 2: Find your account Fetch the list of accounts. Choose the account you want to use for the new card. CURL curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 3: Fetch your card profile Fetch the list of card profiles. Choose the card profile you want to use for the new card. CURL curl --location --request GET 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/1-A1BAJ2/card-profiles?page=0&size=25' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 4: Create the card To successfully create the card, you'll need the following: The Account ID (fetched in Step 2 ). The Card Profile ID (fetched in Step 3 ). To have the physical card created and mailed, set produce_card to true. The usage_type must be set to "Asset". Vehicle Information (Recommended): To attach a specific vehicle to this card, provide the vehicle details as shown in the code example. Note : If you omit vehicle information: A new vehicle will be created and attached automatically; you can edit its details later. Note on shipping : This special address is a one-time use shipping address for this card only. It is not saved anywhere, so you must re-enter it for any future card orders. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/cards' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'userId: 12345' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ' \ --data '{ "account_id": "1-A1BAJ2", "card_profile_id": "1-KH2P1X", "produce_card": true, "usage_type": "Asset", "card_order": { "shipping_information": { "address": { "address_line1": "street 1", "care_of": "CareOf", "city": "Portland", "contact_name": "Contact", "contact_phone_number": "123-3456", "country_code": "US", "postal_code": "12345", "residential_indicator": false, "state": "ME" }, "address_type": "Special" } }, "vehicle": { "license_plate": { "license_plate_number": "abc123", "license_plate_state": "AB", "license_plate_country": "CA" }, "detail": { "make": "ford", "model": "f150", "vin": "18218237393038727278", "year": "2020", "start_odometer": 0 }, "company_vehicle_id": "1234", "vehicle_description": "truck", "distance_per_unit": "10", "uom": "Gallon", "tank_capacity": "35" } }' • [Create Driver Card with Default Values](https://fleetapi.wexinc.com/fleet-management/recipes/create-driver-card-with-default-values.md): Learn how to create a driver card with default values in the Fleet Management Services API. Step 1: Fetch your Bearer Token Use the WEX-provided client_id and client_secret to request for your bearer token. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' Step 2: Find your account Fetch the list of accounts. Choose the account you want to use for the new card. CURL curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 3: Fetch your card profile Fetch the list of card profiles. Choose the card profile you want to use for the new card. CURL curl --location --request GET 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/1-A1BAJ2/card-profiles?page=0&size=25' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 4: Create the card To successfully create the card, you'll need the following: The Account ID (fetched in Step 2 ). The Card Profile ID (fetched in Step 3 ). To have the physical card created and mailed, set produce_card to true. The usage_type must be set to "Driver". Driver Information (Recommended): To attach a specific driver to this card, provide the driver details as shown in the code example. Note : If you omit driver information: A new driver will be created and attached automatically; you can edit its details later. Note on Shipping : Since no address is provided during card creation, WEX will ship the card to the default card shipping address configured on the account. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/cards' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'user_id: 12345' \ --header 'content-type: application/json' \ --header 'authorization: Bearer ' \ --data-raw '{ "account_id": "1-A1BAJ2", "card_profile_id": "1-KH2P1X", "produce_card": true, "usage_type": "Driver", "driver": { "license": { "license_number": "1234", "license_state": "CA", "license_country": "US" }, "contact": { "first_name": "first", "last_name": "last", "middle_name": "middle", "email": "email@email.com", "phone_number": "2091234567", "job_title": "driver", "employee_number": "12345" }, "company_driver_id": "12345" } }' }' • [Create Driver Card with Card Address](https://fleetapi.wexinc.com/fleet-management/recipes/create-driver-card-with-card-address.md): Learn how to create a driver card with a card address in the Fleet Management Services API. Step 1: Fetch your Bearer Token Use the WEX-provided client_id and client_secret to request for your bearer token. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' Step 2: Find your account Fetch the list of accounts. Choose the account you want to use for the new card. CURL curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 3: Find your card profile Fetch the list of card profiles. Choose the card profile you want to use for the new card. CURL curl --location --request GET 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/1-A1BAJ2/card-profiles?page=0&size=25' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 4: Create the card To successfully create the card, you'll need the following: The Account ID (fetched in Step 2 ). The Card Profile ID (fetched in Step 3 ). To have the physical card created and mailed, set produce_card to true. The usage_type must be set to "Driver". Driver Information (Recommended): To attach a specific driver to this card, provide the driver details as shown in the code example. Note : If you omit driver information: A new driver will be created and attached automatically; you can edit its details later. If you want this card to have a permanent address, you must add the address as shown in the code example. Note on shipping : Because you have set use_address_on_card to true and provided a card address, WEX will mail any reissued cards to this permanent address. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/cards' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'user_id: 12345' \ --header 'content-type: application/json' \ --header 'authorization: Bearer ' \ --data '{ "account_id": "1-A1BAJ2", "card_profile_id": "1-KH2P1X", "produce_card": true, "use_address_on_card": true, "usage_type": "Driver", "card_address": { "card_address_line1": "street 1", "card_address_city": "city", "card_address_state": "ME", "card_address_postal_code": "12345", "card_address_country_code": "US", "card_address_contact_name": "Contact", "card_address_phone_number": "123-3456", "card_address_company_name": "Company" }, "driver": { "license": { "license_number": "1234", "license_state": "CA", "license_country": "US", }, "contact": { "first_name": "first", "last_name": "last", "middle_name": "middle", "email": "email@email.com", "phone_number": "2091234567", "job_title": "driver", "employee_number": "12345" }, "company_driver_id": "12345" } }' }' • [Create Driver Card with Special Address](https://fleetapi.wexinc.com/fleet-management/recipes/create-driver-card-with-special-address.md): Learn how to create a driver card with a special address in the Fleet Management Services API. Step 1: Fetch your Bearer Token Use the WEX-provided client_id and client_secret to request for your bearer token. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' Step 2: Find your account Fetch the list of accounts. Choose the account you want to use for the new card. CURL curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 3: Find your card profile Fetch the list of card profiles. Choose the card profile you want to use for the new card. CURL curl --location --request GET 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/1-A1BAJ2/card-profiles?page=0&size=25' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 4: Create the card To successfully create the card, you'll need the following: The Account ID (fetched in Step 2 ). The Card Profile ID (fetched in Step 3 ). To have the physical card created and mailed, set produce_card to true. The usage_type must be set to "Driver". Driver Information (Recommended): To attach a specific driver to this card, provide the driver details as shown in the code example. Note : If you omit driver information: A new driver will be created and attached automatically; you can edit its details later. Note on shipping : This special address is a one-time use shipping address for this card only. It is not saved anywhere, so you must re-enter it for any future card orders. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/cards' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'user_id: 12345' \ --header 'content-type: application/json' \ --header 'authorization: Bearer' \ --data '{ "account_id": "1-A1BAJ2", "card_profile_id": "1-KH2P1X", "produce_card": true, "usage_type": "Driver", "card_order": { "shipping_information": { "address": { "address_line1": "street 1", "care_of": "CareOf", "city": "Portland", "contact_name": "Contact", "contact_phone_number": "123-3456", "country_code": "US", "postal_code": "12345", "residential_indicator": false, "state": "ME" }, "address_type": "Special" } }, "driver": { "license": { "license_number": "1234", "license_state": "CA", "license_country": "US" }, "contact": { "first_name": "first", "last_name": "last", "middle_name": "middle", "email": "email@email.com", "phone_number": "2091234567", "job_title": "driver", "employee_number": "12345" }, "company_driver_id": "12345" } }' • [Create Batch Order of Cards](https://fleetapi.wexinc.com/fleet-management/recipes/create-batch-order-of-cards.md): Learn how to create a batch order of cards in the Fleet Management Services API. Step 1: Fetch your Bearer Token Use the WEX-provided client_id and client_secret to request for your bearer token. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' Step 2: Find your account Fetch the list of accounts. Choose the account you want to use for the new card. CURL curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 3: Find your card profile Fetch the list of card profiles. Choose the card profile you want to use for the new card. CURL curl --location --request GET 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/1-A1BAJ2/card-profiles?page=0&size=25' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' Step 4: Create the first card To successfully create the card, you'll need the following: The Account ID (fetched in Step 2 ). The Card Profile ID (fetched in Step 3 ). To have the physical card created and mailed, set produce_card to false. The usage_type must be set to "Asset". Vehicle Information (Recommended): To attach a specific vehicle to this card, provide the vehicle details as shown in the code example. Note : If you omit vehicle information: A new vehicle will be created and attached automatically; you can edit its details later. Note : Do not add shipping information at this time. It will be added after the batch order is created. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/cards' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'user_id: 12345' \ --header 'content-type: application/json' \ --header 'authorization: Bearer ' \ --data '{ "account_id": "1-A1BAJ2", "card_profile_id": "1-KH2P1X", "produce_card": false, "usage_type": "Asset", "vehicle": { "license_plate": { "license_plate_number": "abc123", "license_plate_state": "AB", "license_plate_country": "CA" }, "detail": { "make": "ford", "model": "f150", "vin": "18218237393038727278", "year": "2020", "start_odometer": 0 }, "company_vehicle_id": "1234", "vehicle_description": "truck", "distance_per_unit": "10", "uom": "Gallon", "tank_capacity": "35" } }' }' Response CURL { "cardId" : "1-IFBXYZ", "accountId" : "1-A1BAJ2", "accountName" : "Phathom", "authorizationControl" : "Custom Control", "authorizationControlId" : "1-6DUDSA", "authorizationProfileName" : "Unrestricted", "bankIdentificationNumber" : "690046", "batchOrderNumber" : 6417225, "cardLocked" : false, "cardNumber" : "1521", "cardProfileId" : "1-KH2P1X", "cardProfileName" : "Vehicle 1:M", "cardType" : "Unrestricted", "ccn" : true, "designCode" : "1WHL", "displayCardType" : "Unrestricted", "driverCardAddress" : { }, "embossedNumber" : "*************15219", "embossing" : [ { "source" : "Asset Description", "value" : "STRING", "position" : 1, "readOnly" : false }, { "source" : "Account Short Name", "value" : "PHATHOM", "position" : 2, "readOnly" : false }, { "position" : 3 } ], "evRequested" : false, "expirationDate" : "2030-10-14T04:00:00Z", "lastIssueDate" : "2025-10-15T04:00:00Z", "lastUpdated" : "2025-10-15T15:20:14.492062367Z", "magStripNumber" : "*******************15219", "orderId" : "1-IFBABD", "originalCardId" : "1-IFB456", "posDisplayPrompt" : "Odometer & Driver ID", "posOverridePrompt" : "Odometer & Driver ID", "productId" : "1-79489”, "renewalFlag" : false, "renewalPeriod" : "60", "rfids" : [ ], "status" : { "status" : "Active", "statusReason" : "Active" }, "usageType" : "Asset", "userDefinedFields" : [ ], "vehicleId" : "1-IFB123", "vehicleCustomerId" : "1234", "vehicleDescription" : "truck", "vin" : "18218237393038727278", "licensePlateNumber" : "abc123" } } Step 5: Create the second card To successfully create the second card, you'll need the following: The Account ID (fetched in Step 2 ). The Card Profile ID (fetched in Step 3 ). To have the physical card created and mailed, set produce_card to true. The usage_type must be set to "Asset". Create subsequent cards using the POST /cards endpoint, including the batch_order_number obtained from the first card response in Step 3 . Repeat this for all additional cards, using the same batch_order_number . Vehicle Information (Recommended): To attach a specific vehicle to this card, provide the vehicle details as shown in the code example. Note : If you omit vehicle information: A new vehicle will be created and attached automatically; you can edit its details later. Note : Do not add shipping information at this time. It will be added after the batch order is created. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/cards' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'user_id: 36702' \ --header 'content-type: application/json' \ --header 'authorization: Bearer' \ --data '{ "account_id": "1-A1BAJ2", "card_profile_id": "1-KH2P1X", "produce_card": false, "usage_type": "Asset", "batch_order_number": 6417225, "vehicle": { "license_plate": { "license_plate_number": "123abc", "license_plate_state": "AB", "license_plate_country": "CA" }, "detail": { "make": "chevy", "model": "camaro", "vin": "182182373930381234", "year": "2020", "start_odometer": 0 }, "company_vehicle_id": "532321", "vehicle_description": "sport", "distance_per_unit": "10", "uom": "Gallon", "tank_capacity": "20" } }' }' Step 6: Create the Batch Order Use the POST/cards/orders endpoint to complete your batch order. Use the batch_order_number that you used to order the cards for the batch. Fill in the shipping information for the order. CURL curl -X POST "https://wmd.xc.wexonline.com/fleet-service/v3/cards/orders" \ -H 'accept: application/json' \ -H 'authorization: Bearer Token' \ -H 'content-type: application/json' \ -d '{ "requested_by": "Batch Test", "batch_order_number": 6711351, "account_id": "1-DPIOH6", "address_type": "Special", "shipping_information": { "address": { "address_line1": "A Street", "city": "Portland", "country_code": "US", "postal_code": "04121", "residential_indicator": true, "state": "ME" } } }' • [Replace Card with Special Address](https://fleetapi.wexinc.com/fleet-management/recipes/replace-card-with-special-address.md): Learn how to replace a card with a special address in the Fleet Management Services API. Step 1: Fetch your Bearer Token Use the WEX-provided client_id and client_secret to request for your bearer token. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' Step 2: Replace card To successfully replace the card, ensure you have your card_id handy. The card_id is required as a path parameter. Note on shipping : This special address is a one-time use shipping address for this card only. It is not saved anywhere, so you must re-enter it for any future card orders. CURL curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/cards/replacements' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'user_id: test-replace' \ --header 'content-type: application/json' \ --header 'authorization: Bearer' \ --data-raw '{ "replacement_reason": "Card Refresh", "address_type": "Special", "special_address": { "address_line1": "Street 1", "city": "City Z", "contact_name": "Jon Doh", "contact_phone_number": "1231231234", "country_code": "US", "postal_code": "29881", "residential_indicator": false, "state": "CA" } }' • [Create bank account and make payment](https://fleetapi.wexinc.com/fleet-management/recipes/create-bank-account-and-make-payment.md): Learn how to create a bank account and make a payment in the Fleet Management Services API. #### Step 1: Fetch your Bearer Token Use the WEX-provided client\_id and client\_secret to request for your bearer token. curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' #### Step 2: Find your account 1. Fetch the list of accounts. 2. Choose the account you want to use for the new bank account. curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer --header 'Content-Length: 0' #### Step 3: Create bank account 1. Fetch the `account_id`from **Step 2**. 2. Add your `bank_account_name`. 3. Add your `bank_account_number`. 4. Add your `routing_number`. **Note**: To make this your default bank, change `default_bank`to "true". Otherwise, leave it "false". curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/banks' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'content-type: application/json' \ --header 'authorization: Bearer' \ --data-raw '{ "account_id": "1234", "bank_account_name": "string", "bank_account_number": "1234", "routing_number": "string", "default_bank": false }' #### Step 4: Create the payment 1. Enter the `account_number`that matches the `account_id` created in **Step 3**. 2. Enter your `payment_amount`, up to your current balance but not over. 3. Enter your `payment_scheduled_bank_id`, which matches the `bank_id` returned in **Step 2**. 4. Enter your `payment_scheduled_date`. The cutoff is 3:30 p.m. EST. 5. Your payment amount will be checked against your current balance to ensure it does not go over your current balance. The API will flag and cancel any payment above your current balance. curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/payments' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'content-type: application/json' \ --header 'authorization: Bearer' \ --data-raw '{ "account_number": "1234", "payment_amount": 1.5, "payment_scheduled_bank_id": 1234, "payment_scheduled_date": "2015-07-20T15:49:04-07:00", "payment_type": "CURRENT_BALANCE" }' #### **Response** { "bank_id": "1234", "bank_account_name": "bank name", "bank_account_last_four_digits": "3455", "bank_account_status": "Active", "routing_number": "312323", "default_bank": false } • [Create Vehicle with UDFs](https://fleetapi.wexinc.com/fleet-management/recipes/create-vehicle-with-udfs.md): Learn how to create a vehicle with user defined fields (UDFs) in the Fleet Management Services API. #### Step 1: Fetch your Bearer Token Use the WEX-provided client\_id and client\_secret to request for your bearer token. curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' #### Step 2: Find your account 1. Find your account. 2. Fetch the list of accounts and pick the one that you want to use to create a vehicle with UDFs. curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' #### Step 3: Create vehicle with UDFs * Complete the necessary information using the `account_id`that was fetched in **Step 2**. **Note**: `vehicle_prompt_id`is editable only for accounts enabled for customer-assigned prompt IDs. The accepted length for this ID (either 4 or 6 digits) is defined on the account record. UDFs are defined by a specific position (from UDF1 to UDF20). You can add them in any order, allowing for any user-defined value, provided the value does not exceed 50 characters in length. curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/vehicles' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'content-type: application/json' \ --header 'authorization: Bearer' \ --data '{ "account_id": "1-29JJK", "asset_type": "ASSET", "company_vehicle_id": "Your vehicle id", "description": "Van", "vehicle_prompt_id": "123433", "license_plate": { "license_plate_number": "2838A", "license_plate_state": "AZ", "license_plate_country": "US" }, "detail": { "make": "Toyota", "model": "Prius", "vin": "12347463536738373", "year": "2020", "start_odometer": 0 }, "fuel": { "tank_capacity": 20, "unit_of_measure": "GALLONS", "mpg": 60 }, "user_defined_fields": [ { "field_name":"UDF1", "position": 0, "value": "Your Data 1" }, { "field_name": "UDF11", "position": 10, "value": "Your Data 11" }, { "field_name": "UDF14", "position": 13, "value": "Your Data 14" } ] }’ • [Create Driver with UDFs](https://fleetapi.wexinc.com/fleet-management/recipes/create-driver-with-udfs.md): Learn how to create a driver with user defined fields (UDFs) in the Fleet Management Services API. #### Step 1: Fetch your Bearer Token Use the WEX-provided client\_id and client\_secret to request for your bearer token. curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept-Encoding: gzip,deflate,br' \ --data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id' #### Step 2: Find your account 1. Fetch the list of accounts. 2. Choose the account you want to use for the new card. curl --request GET \ 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts?page=0&size=25&sort=accountName.keyword' \ --header 'Accept-Encoding: gzip,deflate,br' \ --header 'Authorization: Bearer' \ --header 'Content-Length: 0' #### Step 3: Create driver with UDFs * Complete the necessary information using the `accountId` that was fetched in **Step 2**. **Note**: `driver_prompt_id`is editable only for accounts enabled for customer-assigned prompt IDs. The accepted length for this ID (either 4 or 6 digits) is defined on the account record. UDFs are defined by a specific position (from UDF1 to UDF20). You can add them in any order, allowing for any user-defined value, provided the value does not exceed 50 characters in length. curl --location --request POST 'https://wmd.xc.wexonline.com/fleet-service/v3/drivers' \ --header 'accept-encoding: gzip,deflate,br' \ --header 'content-type: application/json' \ --header 'authorization: Bearer' \ --data '{ "account_id": "1-AF33", "contact": { "job_title": "Captain", "first_name": "Jim", "last_name": "Kirk", "middle_name": "Tiberious", "email": "jim@trek.com", "employee_number": "NC-107", "badge_number": "1", "phone_number": "1234567890", "cell_phone_number": "1234567890", "zip_code": "1234" }, "driver_license": { "license_number": "ABCD", "license_state": "ME", "license_country": "US" }, "driver_prompt_id": "1234", "user_defined_fields": [ { "field_name":"UDF1", "position": 0, "value": "Your Data 1" }, { "field_name": "UDF11", "position": 10, "value": "Your Data 11" }, { "field_name": "UDF14", "position": 13, "value": "Your Data 14" } ] }' • [account](https://fleetapi.wexinc.com/fleet-management/account.md): The Account API allows you to create, update, and fetch accounts. These accounts are mainly just placeholders in the account hierarachy where you can attach vehicles, drivers, and cards. • [Get an account by id](https://fleetapi.wexinc.com/fleet-management/account/get-an-account-by-id.md) • [Update an account](https://fleetapi.wexinc.com/fleet-management/account/update-an-account.md) • [Get account balance information](https://fleetapi.wexinc.com/fleet-management/account/get-account-balance-information.md) • [Find card profiles by account](https://fleetapi.wexinc.com/fleet-management/account/find-card-profiles-by-account.md) • [Find accounts by ODATA](https://fleetapi.wexinc.com/fleet-management/account/find-accounts-by-odata.md) • [Create an account of type Org Unit](https://fleetapi.wexinc.com/fleet-management/account/create-an-account-of-type-org-unit.md) • [Retrieve a list of purchase controls available to the account](https://fleetapi.wexinc.com/fleet-management/account/retrieve-a-list-of-purchase-controls-available-to-the-account.md): The purpose of this endpoint is to provide a list of purchase controls that can be used to choose a profile for card creation or update. The response object is a minimal representation of the purchase controls. • [bank](https://fleetapi.wexinc.com/fleet-management/bank.md): The Bank API allows you to create, update, and fetch bank accounts. • [Get information about a bank](https://fleetapi.wexinc.com/fleet-management/bank/get-information-about-a-bank.md) • [Update a bank](https://fleetapi.wexinc.com/fleet-management/bank/update-a-bank.md) • [Create a new bank](https://fleetapi.wexinc.com/fleet-management/bank/create-a-new-bank.md) • [Get information about banks for an account](https://fleetapi.wexinc.com/fleet-management/bank/get-information-about-banks-for-an-account.md) • [payment](https://fleetapi.wexinc.com/fleet-management/payment.md): The Payments API allows you to create, update, and fetch updates. • [Get information about a payment](https://fleetapi.wexinc.com/fleet-management/payment/get-information-about-a-payment.md) • [Update a payment](https://fleetapi.wexinc.com/fleet-management/payment/update-a-payment.md) • [Create a new payment](https://fleetapi.wexinc.com/fleet-management/payment/create-a-new-payment.md) • [Search payments for an account using OData.](https://fleetapi.wexinc.com/fleet-management/payment/search-payments-for-an-account-using-odata.md) • [Update a payment.](https://fleetapi.wexinc.com/fleet-management/payment/update-a-payment-1.md) • [address](https://fleetapi.wexinc.com/fleet-management/address.md): The Address API allows you to fetch addresses. • [Get an address](https://fleetapi.wexinc.com/fleet-management/address/get-an-address.md) • [Find Addresses by query string](https://fleetapi.wexinc.com/fleet-management/address/find-addresses-by-query-string.md) • [contact](https://fleetapi.wexinc.com/fleet-management/contact.md): The Contact API allows you to fetch contacts. • [Get a contact](https://fleetapi.wexinc.com/fleet-management/contact/get-a-contact.md) • [Find Contacts by query string](https://fleetapi.wexinc.com/fleet-management/contact/find-contacts-by-query-string.md) • [card](https://fleetapi.wexinc.com/fleet-management/card.md): The Card API allows you to create, update, fetch cards. You can also create a batch order of cards and order a replacement card. • [Get a card](https://fleetapi.wexinc.com/fleet-management/card/get-a-card.md) • [Update a card record](https://fleetapi.wexinc.com/fleet-management/card/update-a-card-record.md) • [Create a Card](https://fleetapi.wexinc.com/fleet-management/card/create-a-card.md) • [Find cards by ODATA](https://fleetapi.wexinc.com/fleet-management/card/find-cards-by-odata.md) • [Create a batch order of cards](https://fleetapi.wexinc.com/fleet-management/card/create-a-batch-order-of-cards.md): This endpoint creates a batch order of cards. The process involves two steps: 1. **Card Creation (POST /cards):** Create individual cards using the /cards endpoint. For each card intended for a batch, include the desired `batch_order_number` in the request. The /cards endpoint will return a `batch_order_number`. Use this returned `batch_order_number` for all subsequent cards that belong in the same batch. Crucially, set the `produce_card` attribute to false and _do not_ include shipping information in these individual card creation requests. 2. **Batch Order Creation (POST /cards/orders):** Once all cards in the batch have been created, use this /cards/orders endpoint to finalize the batch order. Provide the following data: * `batch_order_number`: The `batch_order_number` that was returned from the /cards endpoint. This ties all the individual cards together into a batch. * `account_id`: The account associated with the cards in the batch. * `shippingInfo`: The shipping information for the _entire_ batch order. This endpoint will then process the entire batch and initiate shipping. • [Order a replacement card](https://fleetapi.wexinc.com/fleet-management/card/order-a-replacement-card.md) • [department](https://fleetapi.wexinc.com/fleet-management/department.md): The Department API allows you to fetch departments. • [Get a department](https://fleetapi.wexinc.com/fleet-management/department/get-a-department.md) • [Find Departments by account id](https://fleetapi.wexinc.com/fleet-management/department/find-departments-by-account-id.md) • [driver](https://fleetapi.wexinc.com/fleet-management/driver.md): The Driver API allows you to create, update, and fetch drivers. • [Create a new driver](https://fleetapi.wexinc.com/fleet-management/driver/create-a-new-driver.md) • [Find drivers by ODATA](https://fleetapi.wexinc.com/fleet-management/driver/find-drivers-by-odata.md) • [Get a driver](https://fleetapi.wexinc.com/fleet-management/driver/get-a-driver.md) • [Update a Driver by id](https://fleetapi.wexinc.com/fleet-management/driver/update-a-driver-by-id.md) • [site](https://fleetapi.wexinc.com/fleet-management/site.md): The Site API allows you to fetch sites. • [Find sites by ODATA](https://fleetapi.wexinc.com/fleet-management/site/find-sites-by-odata.md) • [Get site by ID](https://fleetapi.wexinc.com/fleet-management/site/get-site-by-id.md) • [Get a list of charge point operators (CPO) supported](https://fleetapi.wexinc.com/fleet-management/site/get-a-list-of-charge-point-operators-cpo-supported.md) • [Get a list of supported ev operators](https://fleetapi.wexinc.com/fleet-management/site/get-a-list-of-supported-ev-operators.md) • [Get a list of site brands](https://fleetapi.wexinc.com/fleet-management/site/get-a-list-of-site-brands.md) • [Get a list of fuel-types and the NACS product codes that represent them](https://fleetapi.wexinc.com/fleet-management/site/get-a-list-of-fuel-types-and-the-nacs-product-codes-that-represent-them.md) • [Search for Webhook Subscriptions](https://fleetapi.wexinc.com/fleet-management/webhook/search-for-webhook-subscriptions.md) • [Create a new Webhook Subscription.](https://fleetapi.wexinc.com/fleet-management/webhook/create-a-new-webhook-subscription.md) • [Get a Webhook Subscription](https://fleetapi.wexinc.com/fleet-management/webhook/get-a-webhook-subscription.md) • [Update a Webhook Subscription](https://fleetapi.wexinc.com/fleet-management/webhook/update-a-webhook-subscription.md) • [Delete a Webhook Subscription](https://fleetapi.wexinc.com/fleet-management/webhook/delete-a-webhook-subscription.md) • [vehicle](https://fleetapi.wexinc.com/fleet-management/vehicle.md): The Vehicle API allows you to create, update, and fetch vehicles. • [Create a new vehicle](https://fleetapi.wexinc.com/fleet-management/vehicle/create-a-new-vehicle.md) • [Find vehicles by ODATA](https://fleetapi.wexinc.com/fleet-management/vehicle/find-vehicles-by-odata.md) • [Get a vehicle by ID](https://fleetapi.wexinc.com/fleet-management/vehicle/get-a-vehicle-by-id.md) • [Update a vehicle](https://fleetapi.wexinc.com/fleet-management/vehicle/update-a-vehicle.md): Properties that can be updated for a Vehicle. Only non-null attribute values are used when patching attributes. • [Get a UDF field by ID.](https://fleetapi.wexinc.com/fleet-management/udf/get-a-udf-field-by-id.md) • [Find UDF fields by account id.](https://fleetapi.wexinc.com/fleet-management/udf/find-udf-fields-by-account-id.md) • [authorization](https://fleetapi.wexinc.com/fleet-management/authorization.md): The Authorization API allows you to fetch authorizations. • [Find authorized transactions](https://fleetapi.wexinc.com/fleet-management/authorization/find-authorized-transactions.md) • [Get an authorization](https://fleetapi.wexinc.com/fleet-management/authorization/get-an-authorization.md) • [invoice](https://fleetapi.wexinc.com/fleet-management/invoice.md): The Invoice API allows you to fetch and download invoices. • [Get a list of invoices for an account](https://fleetapi.wexinc.com/fleet-management/invoice/get-a-list-of-invoices-for-an-account.md) • [Download invoices in a ZIP archive by date range](https://fleetapi.wexinc.com/fleet-management/invoice/download-invoices-in-a-zip-archive-by-date-range.md) • [Get a single invoice by ID](https://fleetapi.wexinc.com/fleet-management/invoice/get-a-single-invoice-by-id.md) • [Download a single invoice PDF by ID](https://fleetapi.wexinc.com/fleet-management/invoice/download-a-single-invoice-pdf-by-id.md) • [Terms and Definitions](https://fleetapi.wexinc.com/fleet-management/glossary/terms-and-definitions.md): A account_id The Account ID is fundamental to the Fleet Service API, serving as the primary identifier for all entities. Every request to the API requires a valid Account ID to locate specific information. The account to which drivers are linked is also known as the “root account.” authorization control id If you omit the authorization control ID, the system will automatically apply the default ID associated with the specified account. To use a different authorization control ID, you can retrieve a list of available IDs for the account using the Account endpoint ( account/{accountId}/authorization profiles ), select your preferred ID, and include it in your request. B balance balance: Account balance, not including any pending transactions. open to buy_balance: Represents the current amount of credit available for making purchases. balance_config account_number : The WEX-assigned external account number, also called the Program Account Number. account_status : Pending, Active, Suspended, Terminated direct_debit: WEX directly debits the customer’s bank account for payment. distributor: A distributor manages multiple service stations (often with various brands) and may also distribute other petroleum products like heating oil and lubricants. funded: WEX Bank provides funding and servicing for this card program and is responsible for managing receivables and assuming credit risk on its fleet accounts. scheduled bank id : Identifies the bank from which the money will be drawn. batch order number To have the system automatically generate a batch order number, initiate a batch order by creating your first card and leaving the batch order number field empty. The system will return a card object containing the newly generated batch order number. For all subsequent cards intended for the same address within that batch, simply assign this same batch order number. All cards for a specific account ordered on the same day and sharing the same batch order number will be grouped together for shipping to the client. billing Cycle: We provide various billing cycles. The cycle assigned to your account is determined by your monthly billing statement date. C card_address The shipping address is linked to a specific card. The card_address functionality is governed by the following business rules: card_address must be enabled at the account level before it can be used. When replacing a lost or stolen card, if the “use address on card” option is selected, the replacement card will always be shipped to the existing card_address . card_info wex account number: This field represents your internal account number, and it is different from your card number. renewal_period: Specifies the interval at which WEX issues replacement cards. card_order Is optional. If you leave it empty, the system will automatically use the default shipping information configured for the account. However, if you provide any data in this field, the system will attempt to map and use that information. requested_by - Is optional. If you provide information in this field, WEX will use it to identify who made the request. If you leave this field blank, WEX will automatically use your client ID. requested_by - Is optional. If you provide information in this field, WEX will use it to identify who made the request. If you leave this field blank, WEX will automatically use your client ID. address_type - The address_type field determines the kind of shipping address being used for the order, which affects how the address information is processed. If you choose SPECIAL as the address_type , you are required to fill out all the address fields provided. SPECIAL address - Selecting the SPECIAL address type means you are providing a temporary shipping address. This address will only be used for this single card order and will not be saved, stored, or used for any subsequent orders. ADMIN, MAILING, BILLING - When ordering a card, you can select ADMIN , MAILING , or BILLING to use one of the addresses already associated with your account. Choosing ADMIN will ship the card to the address on file. CARD_SHIPPING - The default address for every account. If you do not enter any address, the API will automatically ship the card to the address on file. CARD ADDRESS - You can designate a specific shipping address for an individual card using CARD ADDRESS . When a card is ordered, and if the relevant account flag is active, the system will automatically use this card-specific address for shipment. card_profile Creating a card requires your card_profile_id . This profile defines the card’s characteristics, such as embossing details (location, lines), logos, and swipe prompts. card profile id The card_profile_id is a mandatory field that specifies the physical characteristics of the card, including the number of embossed fields, color, and logos. To obtain a valid card_profile_id for an account, use the GET/accounts/{accountId}/card-profiles endpoint. This will return a list of available card profiles; select the desired profile and use its id in this field. Note : Changing the card_profile_id will result in the card being reissued. card shipping info shipping company name: WEX will use this company name on all mail sent to you. shipping product id: This allows you to choose between overnight and regular shipping options. allow card level_shipping: Enables shipping cards to the address on the card. company vehicle id This is a user-provided field where you can enter any value. contact: department The department_id and department_name fields are only relevant if your account’s hierarchy has been configured to include departments. customization alias : This corresponds to your account’s short name, also known as your “doing business as” (DBA) name. reports : custom ftp account : This specifies the account to which your reports will be sent using FTP. custom ftp server : This specifies the server to which your reports will be sent. report sub total_type : The type of report you will receive. D driver The requirement for a driver association depends on the card’s usage type. Driver cards necessitate the assignment of a driver, while “plus” cards require both a driver and a vehicle association. (See Driver Cards for more information). E efs These fields are reserved for future functionality and are currently not implemented. embossing The card profile will automatically populate these fields with default values from predefined sources. However, you have the flexibility to override these defaults and enter custom values for any of the string fields provided. employee_number The employee_number field is optional. You can enter any value you choose in this field. enhanced profile id This field is optional and can typically be left blank unless you have a specific need for it. ev These fields are used to facilitate reimbursement for drivers who charge their electric vehicles at home. ev_provider: Electric vehicle provider. home: Driver’s home information. device: Driver home device information. home device id : Home device Id. home device status: Home device status. home reimbursement requested_status: This field indicates the status of a driver’s request for home electric vehicle (EV) charging reimbursement, provided the account has EV functionality enabled. You can use the REQUESTED and DISABLED values to modify the reimbursement status. Other status values are for informational purposes only. ev_requested The ev_requested setting is configured at the account level. If your account has EV functionality enabled, you can set this ev_requested field to true. Doing so will associate an EV RFID tag with the card. I Id Your internal Id. L latitude Required for site searches, this field represents the fueling or EV charging location’s latitude. longitude Required for site searches, this field represents the fueling or EV charging location’s longitude. O order_id When you create a card and setproduce_card to true (indicating a physical card should be produced), the system will generate an order, and its unique identifier will be populated in the order_id field. P produce_card The produce_card field should generally be set to true. This action will both create the card record and initiate an order for its physical production and shipment. If you set produce_card to false, the card record will be created, but no physical card will be ordered or shipped. Exception : When batch ordering cards, you must set produce_card to false. The batch order endpoint will handle the creation of a single order for all cards in the batch, assigning them the same batch number and arranging for their shipment together. program driver id This ID represents the driver’s association with a particular fuel or card program, such as ExxonUniversal or WEX Universal. prompt_id The prompt id is only required for 1:1 cards when it’s customer-defined. For all 1:1 cards, the prompt id is associated directly with the card entity. For instance, on a 1:1 vehicle card, you would enter a vehicle-specific prompt, and on a 1:1 driver card, you would enter a driver-specific prompt. purchase device id This field only applies if you have a driver 1:1 card. Q query_string Accepts a Lucene-style search query. This type of query allows you to search specific fields with both precision and flexibility. R radius Defines the search area by specifying the distance from the provided latitude and longitude. This parameter is required to perform a site search. However, if you do not provide a radius value, the API will automatically use a default radius for the search. reference_id You can enter whatever you want in this field. renewal_period This setting is configured at the account level and cannot be modified for individual cards. reports custom ftp account: This specifies the account to which your reports will be sent using FTP. custom ftp server: This specifies the server to which your reports will be sent. report sub total_type: The type of report you will receive. requested_by Is optional. If you provide information in this field, WEX will use it to identify who made the request. If you leave this field blank, WEX will automatically use your client ID. revolver_account Refers to revolving credit. S scheduled bank id Identifies the bank from which the money will be drawn. shipping_information The shipping information section defines the card’s shipping destination. You should only provide address details here if you have chosen the SPECIALaddress type. For all other shipping options (like ADMIN, MAILING, BILLING, address input in this section is unnecessary. The following three fields within shipping information are mandatory: carrier name: All cards are shipped using USPS by default. Specify an alternative carrier if needed. shipping_method: You must select the shipping method. use customer shipping: You must select this boolean. short_name This is a shorter version of your account’s name. U ultimate parent account_id In your account hierarchy, this is the highest-level account. Many configurations, such as EV settings, are typically applied at this level and then inherited by all child accounts. usage_type usage_type- There are two types of cards - Vehicle and Driver cards. Vehicle Cards: Vehicle cards are assigned to specific vehicles or assets. This allows the fleet to monitor vehicle-related expenses, such as fuel costs, and track performance metrics like mileage, fuel efficiency (MPG), and cost per mile. Vehicle/Multi-Driver Card: 1:M This card is linked to a single vehicle. Each authorized driver using the card must enter their unique Authorization Prompt ID, enabling the system to track both vehicle-related expenses and individual driver purchase activity. Vehicle/Single Driver Card 1:1 Plus This card is dedicated to a specific vehicle and is associated with a single, unique Authorization Prompt ID, which is known only to one designated driver. This one-to-one assignment provides a high level of security for transactions. Vehicle Card 1:1 Dedicated to a specific vehicle or asset, this card operates with a single Authorization Prompt ID. Drivers using this card do not enter their own unique IDs; instead, they utilize the shared Authorization Prompt ID linked to the card. Driver Cards: Driver cards are issued to and remain with individual drivers, enabling the tracking of purchases and expenses specifically associated with that driver. Driver/Multi-Vehicle Card 1:M This card, carried by the driver, offers the flexibility to make purchases for multiple vehicles or assets. Although the Authorization Prompt ID identifies the specific vehicle or asset at the time of purchase, the system can track both the driver and the individual vehicle/asset involved in the transaction. Driver/Single-Vehicle Card 1:1 Plus This card is uniquely assigned to both a specific driver (with their individual Authorization Prompt ID) and a single vehicle for an extended timeframe. Driver Card 1:1 This card is assigned to a specific driver and functions similarly to a traditional debit card, requiring the driver to swipe the card and enter their unique Authorization Prompt ID (akin to a PIN) for authorization. use address on_card This setting can be configured for individual cards. When creating a card, if you set this field to true , the Fleet Service API will use the specific address associated with that card for shipping purposes. user defined fields You can enter whatever information you want in these fields. V vehicle You can only associate a vehicle with a card if it’s a designated vehicle card (also referred to as an asset card). A vehicle card is defined by having a vehicle linked to it. There are three types of vehicle cards: 1:1, 1:many, and 1:1 plus. Notably, if you are using a 1:1 plus vehicle card, both a vehicle and a driver assignment are mandatory (See Vehicle Cards for more information). You can enter the desired information in the provided fields but note that the Vehicle Identification Number (VIN) will undergo validation. vehicle_info association_root : This is a WEX internal field. driver id length : The driver prompt length, typically 4 - 6 digits. financially liable account_number : If you are the financially liable account holder, you are responsible for paying all charges incurred by any of your child entities. funder : The funder is the entity that covers the expenses until you make payment. Typically, this is WEX. has customer assigned driver id : If you are creating cards and using customer-assigned IDs, you can provide your own driver prompt IDs. However, if the system-assigned ID option is enabled (boolean is false), the driver prompt IDs will be system-generated, and you do not need to enter any. has customer assigned vehicle id : If you are creating cards and using customer-assigned IDs, you can provide your own driver prompt IDs. However, if the system-assigned ID option is enabled (boolean is false), the driver prompt IDs will be system-generated, and you do not need to enter any. Id : Your internal Id. parent account id : The parent Id in the hierarchy. short_name : This is a shorter version of your account’s name. ultimate parent account_id : In your account hierarchy, this is the highest-level account. Many configurations, such as EV settings, are typically applied at this level and then inherited by all child accounts. vehicle id length: The vehicle prompt length. vehicle_number You can enter whatever information you want.