AutoSync API
Welcome to the AutoSync REST API. Access your shop's data programmatically — customers, vehicles, work orders, payments, inventory, appointments, and more.
https://api.autosyncshopmanager.com/v1The API uses standard HTTP methods and returns JSON responses. All requests must include an API key or OAuth bearer token in the header.
Quick Start
curl -X GET "https://api.autosyncshopmanager.com/v1/shops" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
{
"success": true,
"data": [
{
"id": 1,
"name": "Johnson's Auto Care",
"slug": "johnsons-auto-care",
"status": "active",
"created_at": "2024-01-15T10:30:00Z"
}
],
"pagination": { "page": 1, "per_page": 25, "total": 1 }
}
Authentication
AutoSync uses Bearer Token authentication. Include your API key in the Authorization header of every request.
Authorization: Bearer sk_live_a1b2c3d4e5f6...
Getting Your API Key
API keys are generated in your AutoSync admin dashboard under Settings → API Keys. You can create multiple keys for different integrations and revoke them at any time.
OAuth 2.0 (Platform Integrations)
For third-party integrations that act on behalf of multiple shops, use OAuth 2.0 authorization code flow:
// 1. Redirect user to authorize GET https://autosyncshopmanager.com/oauth/authorize ?client_id=YOUR_CLIENT_ID &redirect_uri=https://yourapp.com/callback &response_type=code &scope=shops:read workorders:write customers:read // 2. Exchange code for token POST https://api.autosyncshopmanager.com/v1/oauth/token { "grant_type": "authorization_code", "code": "AUTH_CODE_FROM_REDIRECT", "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET" }
Errors & Rate Limits
AutoSync uses standard HTTP status codes. Errors return a consistent JSON structure:
{
"success": false,
"error": {
"code": "invalid_parameter",
"message": "The 'email' field is required.",
"status": 422
}
}
Status Codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad request — check your parameters |
401 | Unauthorized — invalid or missing API key |
403 | Forbidden — insufficient permissions |
404 | Not found |
422 | Validation error |
429 | Rate limited — too many requests |
500 | Server error |
Rate Limits
API requests are limited to 100 requests per minute per API key. Rate limit headers are included in every response:
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 87 X-RateLimit-Reset: 1710432000
Pagination
All list endpoints return paginated results. Use the page and per_page query parameters to navigate.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
per_page | integer | 25 | Results per page (max 100) |
sort | string | created_at | Sort field |
order | string | desc | asc or desc |
GET List Shops
Returns all shops accessible with the current API key.
{
"success": true,
"data": [
{
"id": 1,
"name": "Johnson's Auto Care",
"slug": "johnsons-auto-care",
"status": "active",
"location_count": 2,
"created_at": "2024-01-15T10:30:00Z"
}
]
}
GET Get Shop
GET List Customers
Returns customers for the specified shop. Supports search and filtering.
Query Parameters
| Parameter | Type | Description | |
|---|---|---|---|
search | string | optional | Search by name, email, or phone |
is_business | boolean | optional | Filter by business accounts |
created_after | date | optional | ISO 8601 date string |
GET Get Customer
POST Create Customer
Request Body
| Field | Type | Description | |
|---|---|---|---|
first_name | string | required | Customer first name |
last_name | string | required | Customer last name |
email | string | optional | Email address |
phone | string | optional | Phone number |
is_business | boolean | optional | Business account flag |
address | object | optional | Address with street, city, state, zip |
{
"first_name": "Mike",
"last_name": "Rodriguez",
"email": "mike@example.com",
"phone": "(555) 123-4567",
"address": {
"street": "123 Main St",
"city": "North Canton",
"state": "OH",
"zip": "44720"
}
}
PUT Update Customer
Same body as Create. Only include fields you want to update.
GET List Vehicles
| Parameter | Type | Description | |
|---|---|---|---|
customer_id | integer | optional | Filter by customer |
vin | string | optional | Search by VIN |
license_plate | string | optional | Search by plate number |
GET Get Vehicle
POST Create Vehicle
| Field | Type | Description | |
|---|---|---|---|
customer_id | integer | required | Owner customer ID |
year | integer | required | Vehicle year |
make | string | required | Vehicle make |
model | string | required | Vehicle model |
vin | string | optional | 17-character VIN |
license_plate | string | optional | License plate |
mileage | integer | optional | Current mileage |
GET List Work Orders
| Parameter | Type | Description | |
|---|---|---|---|
status | string | optional | draft, in_progress, waiting_parts, completed, invoiced |
customer_id | integer | optional | Filter by customer |
vehicle_id | integer | optional | Filter by vehicle |
technician_id | integer | optional | Filter by assigned tech |
created_after | date | optional | ISO 8601 date |
{
"data": [
{
"id": 1043,
"work_order_number": "1043",
"status": "in_progress",
"customer": { "id": 42, "name": "Sarah Thompson" },
"vehicle": { "id": 78, "year": 2021, "make": "Ford", "model": "F-150" },
"subtotal": 1080.00,
"tax": 86.40,
"total": 1166.40,
"technician": { "id": 5, "name": "Dave M." },
"created_at": "2024-03-14T09:15:00Z"
}
]
}
GET Get Work Order
Returns the full work order including all jobs, line items, and payment history.
POST Create Work Order
| Field | Type | Description | |
|---|---|---|---|
customer_id | integer | required | Customer ID |
vehicle_id | integer | required | Vehicle ID |
technician_id | integer | optional | Assigned technician |
notes | string | optional | Internal notes |
PUT Update Work Order
GET List Jobs
Returns jobs (line item groups) for a specific work order.
POST Create Job
| Field | Type | Description | |
|---|---|---|---|
name | string | required | Job name (e.g. "Oil Change") |
line_items | array | optional | Array of line item objects |
GET List Appointments
POST Create Appointment
| Field | Type | Description | |
|---|---|---|---|
customer_id | integer | required | Customer ID |
vehicle_id | integer | optional | Vehicle ID |
start_time | datetime | required | ISO 8601 |
end_time | datetime | optional | ISO 8601 |
notes | string | optional | Appointment notes |
GET List Payments
GET Get Payment
GET List Parts
PATCH Update Stock
| Field | Type | Description | |
|---|---|---|---|
quantity | integer | optional | Set stock quantity |
cost | float | optional | Update unit cost |
price | float | optional | Update retail price |
GET List Employees
| Parameter | Type | Description | |
|---|---|---|---|
role | string | optional | technician, service_writer, manager |
status | string | optional | active, inactive |
Webhook Events
AutoSync can send real-time webhook notifications to your server when events occur in a shop. Configure webhook URLs in Settings → Webhooks.
Available Events
| Event | Description |
|---|---|
workorder.created | A new work order was created |
workorder.updated | A work order was modified |
workorder.completed | A work order status changed to completed |
payment.received | A payment was processed |
customer.created | A new customer was added |
appointment.created | A new appointment was booked |
inspection.completed | A DVI was completed and sent |
inventory.low_stock | A part fell below reorder threshold |
Webhook Payload
{
"event": "workorder.completed",
"shop_id": 1,
"timestamp": "2024-03-14T15:30:00Z",
"data": {
"id": 1043,
"work_order_number": "1043",
"total": 1166.40,
"customer": { "id": 42, "name": "Sarah Thompson" }
}
}
X-AutoSync-Signature header containing an HMAC-SHA256 hash of the payload using your webhook secret key. Always verify this before processing.