API Reference v1.0
Main Site Support

AutoSync API

Welcome to the AutoSync REST API. Access your shop's data programmatically — customers, vehicles, work orders, payments, inventory, appointments, and more.

Base URL: All API requests are made to:
https://api.autosyncshopmanager.com/v1

The 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
curl -X GET "https://api.autosyncshopmanager.com/v1/shops" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response · 200 OK
{
  "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.

Header
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.

Keep your keys secret. Never expose API keys in client-side code, public repositories, or browser requests. Use server-to-server calls only.

OAuth 2.0 (Platform Integrations)

For third-party integrations that act on behalf of multiple shops, use OAuth 2.0 authorization code flow:

OAuth 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:

Error Response
{
  "success": false,
  "error": {
    "code": "invalid_parameter",
    "message": "The 'email' field is required.",
    "status": 422
  }
}

Status Codes

CodeMeaning
200Success
201Created
400Bad request — check your parameters
401Unauthorized — invalid or missing API key
403Forbidden — insufficient permissions
404Not found
422Validation error
429Rate limited — too many requests
500Server error

Rate Limits

API requests are limited to 100 requests per minute per API key. Rate limit headers are included in every response:

Response Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1710432000


GET List Shops

Returns all shops accessible with the current API key.

GET/v1/shops
Response · 200
{
  "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/v1/shops/{shop_id}

GET List Customers

Returns customers for the specified shop. Supports search and filtering.

GET/v1/shops/{shop_id}/customers

Query Parameters

ParameterTypeDescription
searchstringoptionalSearch by name, email, or phone
is_businessbooleanoptionalFilter by business accounts
created_afterdateoptionalISO 8601 date string

GET Get Customer

GET/v1/shops/{shop_id}/customers/{customer_id}

POST Create Customer

POST/v1/shops/{shop_id}/customers

Request Body

FieldTypeDescription
first_namestringrequiredCustomer first name
last_namestringrequiredCustomer last name
emailstringoptionalEmail address
phonestringoptionalPhone number
is_businessbooleanoptionalBusiness account flag
addressobjectoptionalAddress with street, city, state, zip
Request · JSON
{
  "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

PUT/v1/shops/{shop_id}/customers/{customer_id}

Same body as Create. Only include fields you want to update.


GET List Vehicles

GET/v1/shops/{shop_id}/vehicles
ParameterTypeDescription
customer_idintegeroptionalFilter by customer
vinstringoptionalSearch by VIN
license_platestringoptionalSearch by plate number

GET Get Vehicle

GET/v1/shops/{shop_id}/vehicles/{vehicle_id}

POST Create Vehicle

POST/v1/shops/{shop_id}/vehicles
FieldTypeDescription
customer_idintegerrequiredOwner customer ID
yearintegerrequiredVehicle year
makestringrequiredVehicle make
modelstringrequiredVehicle model
vinstringoptional17-character VIN
license_platestringoptionalLicense plate
mileageintegeroptionalCurrent mileage

GET List Work Orders

GET/v1/shops/{shop_id}/workorders
ParameterTypeDescription
statusstringoptionaldraft, in_progress, waiting_parts, completed, invoiced
customer_idintegeroptionalFilter by customer
vehicle_idintegeroptionalFilter by vehicle
technician_idintegeroptionalFilter by assigned tech
created_afterdateoptionalISO 8601 date
Response · 200
{
  "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

GET/v1/shops/{shop_id}/workorders/{workorder_id}

Returns the full work order including all jobs, line items, and payment history.

POST Create Work Order

POST/v1/shops/{shop_id}/workorders
FieldTypeDescription
customer_idintegerrequiredCustomer ID
vehicle_idintegerrequiredVehicle ID
technician_idintegeroptionalAssigned technician
notesstringoptionalInternal notes

PUT Update Work Order

PUT/v1/shops/{shop_id}/workorders/{workorder_id}

GET List Jobs

Returns jobs (line item groups) for a specific work order.

GET/v1/shops/{shop_id}/workorders/{wo_id}/jobs

POST Create Job

POST/v1/shops/{shop_id}/workorders/{wo_id}/jobs
FieldTypeDescription
namestringrequiredJob name (e.g. "Oil Change")
line_itemsarrayoptionalArray of line item objects

GET List Appointments

GET/v1/shops/{shop_id}/appointments

POST Create Appointment

POST/v1/shops/{shop_id}/appointments
FieldTypeDescription
customer_idintegerrequiredCustomer ID
vehicle_idintegeroptionalVehicle ID
start_timedatetimerequiredISO 8601
end_timedatetimeoptionalISO 8601
notesstringoptionalAppointment notes

GET List Payments

GET/v1/shops/{shop_id}/payments

GET Get Payment

GET/v1/shops/{shop_id}/payments/{payment_id}

GET List Parts

GET/v1/shops/{shop_id}/inventory

PATCH Update Stock

PATCH/v1/shops/{shop_id}/inventory/{part_id}
FieldTypeDescription
quantityintegeroptionalSet stock quantity
costfloatoptionalUpdate unit cost
pricefloatoptionalUpdate retail price

GET List Employees

GET/v1/shops/{shop_id}/employees
ParameterTypeDescription
rolestringoptionaltechnician, service_writer, manager
statusstringoptionalactive, 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

EventDescription
workorder.createdA new work order was created
workorder.updatedA work order was modified
workorder.completedA work order status changed to completed
payment.receivedA payment was processed
customer.createdA new customer was added
appointment.createdA new appointment was booked
inspection.completedA DVI was completed and sent
inventory.low_stockA part fell below reorder threshold

Webhook Payload

POST to your URL
{
  "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" }
  }
}
Signature verification: Every webhook includes an X-AutoSync-Signature header containing an HMAC-SHA256 hash of the payload using your webhook secret key. Always verify this before processing.