# Overview

The AutoLeap API uses the REST standard, which means you interact with it by making requests over HTTP.  

A request usually includes:
- An **HTTP method** (like `GET` or `POST`)  
- A **path** (the address of the resource)  
- Optional **headers** and **parameters** (in the path, query string, or request body)  

When you send a request, the API responds with:
- A **status code** (to indicate success or failure)  
- **Response headers**  
- Sometimes a **response body** with useful data  

The API reference describes the method, path, and parameters for each endpoint, and includes sample requests and responses you can use as a guide.



## Servers

Production
```
https://partnerapi.myautoleap.com/v2
```

## Security

### BearerAuth

Use the accessToken returned by /partners/login (Authorization: Bearer token).

Type: http
Scheme: bearer
Bearer Format: JWT

## Download OpenAPI description

[Overview](https://developers.myautoleap.com/_bundle/openapi.yaml)

## Authentication

Authenticate with the AutoLeap Partner API to obtain access tokens.  
All other endpoints require a valid access token.


### Partner login

 - [POST /partners/login](https://developers.myautoleap.com/openapi/authentication/paths/~1partners~1login/post.md): Authenticates a partner and issues Access token

### Refresh tokens

 - [POST /partners/generateNewAccessToken](https://developers.myautoleap.com/openapi/authentication/paths/~1partners~1generatenewaccesstoken/post.md): Generates a new access token using the refresh token.

### Invalidate tokens

 - [POST /partners/logout](https://developers.myautoleap.com/openapi/authentication/paths/~1partners~1logout/post.md): Logs out the partner and invalidates both the login and refresh tokens.

## Profile

Retrieve partner profile details, including the companies and accounts you are authorized to access.


### Get partner profile

 - [GET /partners/profile](https://developers.myautoleap.com/openapi/profile/paths/~1partners~1profile/get.md): Fetches the partner details, including the companies and locations the partner has access to.

## Customers

Retrieve and manage customer records for a given company.  
Useful for syncing customer information across systems.


### Create customer(s)

 - [POST /customers](https://developers.myautoleap.com/openapi/customers/paths/~1customers/post.md): Creates one or more customers in the specified company.  
Supports bulk creation.  

Notes:  
- Create/Update APIs are in beta and may still evolve.

### Get customers

 - [GET /customers](https://developers.myautoleap.com/openapi/customers/paths/~1customers/get.md): Retrieves a paginated list of the customers for the specified locations and other matching parameters.

### Update customers

 - [PUT /customers](https://developers.myautoleap.com/openapi/customers/paths/~1customers/put.md): Updates one or more existing customers (bulk supported) for the specified company. Only the fields specified in the request body will be updated

### Archive Customer(s)

 - [PATCH /customers](https://developers.myautoleap.com/openapi/customers/paths/~1customers/patch.md): Archive (inativate) customers in bulk by providing a list of customerIds agsint the specified company

### Get single customer details

 - [GET /customers/{customerId}](https://developers.myautoleap.com/openapi/customers/paths/~1customers~1%7Bcustomerid%7D/get.md)

## Vehicles

Retrieve and manage vehicles associated with customers.  
Supports bulk creation and individual vehicle lookups.


### Create vehicle(s)

 - [POST /vehicles](https://developers.myautoleap.com/openapi/vehicles/paths/~1vehicles/post.md): Creates one or more vehicles for the specified customer.  
Supports bulk creation.

### Get vehicles (list or filtered)

 - [GET /vehicles](https://developers.myautoleap.com/openapi/vehicles/paths/~1vehicles/get.md): Retrieve a paginated list of vehicles. Supports filtering, searching, and sorting.

### Update vehicles (bulk)

 - [PUT /vehicles](https://developers.myautoleap.com/openapi/vehicles/paths/~1vehicles/put.md)

### Archive vehicles (bulk) — sets vehicleStatus to Inactive

 - [PATCH /vehicles](https://developers.myautoleap.com/openapi/vehicles/paths/~1vehicles/patch.md)

### Get vehicle by id

 - [GET /vehicles/{vehicleId}](https://developers.myautoleap.com/openapi/vehicles/paths/~1vehicles~1%7Bvehicleid%7D/get.md)

## Items

Access and manage items (parts, tires, labor, etc.) available within a company.  
Includes bulk creation and detailed item retrieval.


### Create Items (bulk)

 - [POST /items](https://developers.myautoleap.com/openapi/items/paths/~1items/post.md): Creates one or more Parts or Tires for the specified company.
- Only itemType: "part" or itemType: "tire" are allowed.
- For part, include partDetails.
- For tire, include tireDetails.

### Get items

 - [GET /items](https://developers.myautoleap.com/openapi/items/paths/~1items/get.md)

### Update Items (bulk)

 - [PUT /items](https://developers.myautoleap.com/openapi/items/paths/~1items/put.md): Updates one or more Parts or Tires for the specified company.
- Only itemType: "part" or itemType: "tire" are allowed.
- Each item must include its itemId.
- For part, include partDetails.
- For tire, include tireDetails.

### Archive items (bulk) — set status to Inactive

 - [PATCH /items](https://developers.myautoleap.com/openapi/items/paths/~1items/patch.md)

### Get item by id

 - [GET /items/{itemId}](https://developers.myautoleap.com/openapi/items/paths/~1items~1%7Bitemid%7D/get.md)

## Inventory Levels

View and update inventory levels for items across one or more locations.


### Get inventory levels (for stocked items)

 - [GET /inventoryLevels](https://developers.myautoleap.com/openapi/inventory-levels/paths/~1inventorylevels/get.md)

### Update inventory levels (bulk)

 - [PUT /inventoryLevels/update](https://developers.myautoleap.com/openapi/inventory-levels/paths/~1inventorylevels~1update/put.md)

### Get inventory levels for a single item

 - [GET /inventoryLevels/{itemId}](https://developers.myautoleap.com/openapi/inventory-levels/paths/~1inventorylevels~1%7Bitemid%7D/get.md)

## Item Pricing

Retrieve and update pricing information for items.  
Useful for keeping partner systems in sync with AutoLeap’s catalog pricing.


### Get item pricing (parts, tires, labor)

 - [GET /itemPricing](https://developers.myautoleap.com/openapi/item-pricing/paths/~1itempricing/get.md)

### Get item pricing by itemId

 - [GET /itemPricing/{itemId}](https://developers.myautoleap.com/openapi/item-pricing/paths/~1itempricing~1%7Bitemid%7D/get.md)

## Appointments

Create and retrieve customer appointment requests across locations.  
Enables seamless scheduling and booking integrations.


### Create appointment request

 - [POST /appointmentRequests/create](https://developers.myautoleap.com/openapi/appointments/paths/~1appointmentrequests~1create/post.md): Creates Appointment Requests against the given Company and Location.

### Get appointment requests

 - [GET /appointmentRequests](https://developers.myautoleap.com/openapi/appointments/paths/~1appointmentrequests/get.md): Fetches Appointment Requests for a given Company and Location.  
Supports filtering by status, date ranges, and pagination.

## Repair Orders

Retrieve detailed information about repair orders (ROs).  
Supports fetching all orders or a specific order by RO number.


### List Repair Orders

 - [GET /repairOrders](https://developers.myautoleap.com/openapi/repair-orders/paths/~1repairorders/get.md): Retrieves a paginated list of Repair orders for the specified company and optional filters.
If repairOrderNumber is provided as a query param, returns that specific RO (but use /repairOrders/{roNumber} for clarity).

### Create Repair Order(s) (bulk)

 - [POST /repairOrders](https://developers.myautoleap.com/openapi/repair-orders/createrepairorders.md): Creates one or more Repair Orders (ROs) in AutoLeap.

Key Behaviors:
- Supports bulk creation with partial success model (each RO processed independently)
- If taxId is omitted: uses customer's tax profile → falls back to location default tax → fails if neither exists
- Passthrough fees: costPerUnit is auto-set to match pricePerUnit; taxable is forced to false
- Default store fees are auto-applied; send overrides in orderFees to modify/remove them

Validations:
- companyId/locationId must be valid and within partner scope
- If vehicleId provided, it must belong to customerId
- serviceAdvisor.email must belong to an active admin/service advisor at the location
- Percentage discounts/fees: value must be between 0–100

### Get Repair Order by RO number

 - [GET /repairOrders/{roNumber}](https://developers.myautoleap.com/openapi/repair-orders/paths/~1repairorders~1%7Bronumber%7D/get.md)

## Payments

Access payment details linked to repair orders.  
Useful for reconciling transactions and financial reporting. 


### List payments

 - [GET /payments](https://developers.myautoleap.com/openapi/payments/paths/~1payments/get.md): Retrieves a paginated list of payments for the specified company and optional filters.

## Technician Timesheets

Retrieve detailed timesheet logs for technicians within a company and an optional location, filtered by a date range.


### Get Technician Timesheet Logs

 - [GET /technicians/timesheetLogs](https://developers.myautoleap.com/openapi/technician-timesheets/paths/~1technicians~1timesheetlogs/get.md): Retrieve detailed timesheet logs for technicians within a company and an optional location, filtered by a date range.
- startDate and endDate must both be provided.
- If locationId is omitted, logs from all locations within the company are returned.

## Taxes

Retrieve detailed information about a Company's Taxes.


### Get Taxes

 - [GET /taxes](https://developers.myautoleap.com/openapi/taxes/gettaxes.md): Fetches the list of available taxes for a specific company and location.

