Diagnostic Questionnaire

Collect structured symptom data from customers before booking. Returns categories, question chains, and accepts completed answers as a diagnostic request.

Configuration

Select your API key to authenticate all playground requests on this page.

List Categories

Returns all active diagnostic problem categories in display order. Use the slug from each category to fetch its question chain.

GET /api/v1/diagnostic/categories

Response Fields

FieldTypeDescription
idintegerUnique category ID.
slugstringURL-safe identifier used to fetch questions.
namestringHuman-readable category name.
descriptionstringShort description shown to the customer.
iconstringFont Awesome icon class (e.g. fa-key).

Example Request

curl -X GET https://dev.api.aiadmin.quickmechs.com/api/v1/diagnostic/categories \
  -H "Authorization: Bearer YOUR_API_KEY"
Try it

No parameters required. Fetches all active categories.

Request
GET /api/v1/diagnostic/categories
Response
// Click "Fetch Categories" to see results

Get Question Chain

Returns the ordered list of questions for a given category slug. Walk through these questions sequentially to collect the customer's symptoms.

GET /api/v1/diagnostic/categories/{slug}/questions

Path Parameters

ParameterTypeRequiredDescription
slugstringYesCategory slug from the list endpoint (e.g. starting_issue).

Response Fields

FieldTypeDescription
idintegerQuestion ID — used in the submit payload.
question_textstringThe question to display to the customer.
answer_typestringsingle_choice or yes_no.
optionsarrayList of answer options to show.
orderintegerDisplay order (ascending).

Example Request

curl -X GET https://dev.api.aiadmin.quickmechs.com/api/v1/diagnostic/categories/starting_issue/questions \
  -H "Authorization: Bearer YOUR_API_KEY"
Try it
Fetch categories first to populate this list.
Request
GET /api/v1/diagnostic/categories/{slug}/questions
Response
// Select a category and click Fetch Questions

Submit Diagnostic

Saves the customer's completed answers and creates a diagnostic request record. Returns a unique reference number. Auth is optional — if the user is authenticated their ID is attached automatically.

POST /api/v1/diagnostic/submit

Request Parameters

ParameterTypeRequiredDescription
category_slugstringYesThe category the customer selected.
vehicle_idintegerNoID of a saved vehicle on the platform.
vehicle_infostringNoFree-text vehicle description (e.g. "2019 Toyota Camry").
answersarrayYesArray of { question_id, question_text, answer } objects.
additional_notesstringNoAny extra context from the customer.

Example Request

curl -X POST https://dev.api.aiadmin.quickmechs.com/api/v1/diagnostic/submit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "category_slug": "starting_issue",
    "vehicle_info": "2019 Toyota Camry",
    "answers": [
      { "question_id": 1, "question_text": "What do you experience while trying to start the vehicle?", "answer": "Vehicle has a hard time starting" },
      { "question_id": 2, "question_text": "Do lights come on when the ignition is in the on position?", "answer": "No" },
      { "question_id": 3, "question_text": "Is there a strange noise when you try to start the vehicle?", "answer": "Yes" }
    ],
    "additional_notes": "Happens every morning in cold weather"
  }'
Try it — Interactive Questionnaire
Request
POST /api/v1/diagnostic/submit

{}
Response
// Answer all questions and click Submit