# Post External Enquiry

The `external_dms_id` to use with the external enquiry endpoint will be provided by AutoGrab, if you do not currently have an ID please reach out to AutoGrab to obtain one.

## Post an external enquiry.

> Post an external enquiry.

```json
{"openapi":"3.1.1","info":{"title":"AutoGrab API","version":"2.0.0"},"servers":[{"url":"https://api.autograb.com.au"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"ApiKey"}},"schemas":{"ExternalEnquiry":{"type":"object","properties":{"successful_ids":{"type":"array","items":{"type":"string"},"description":"List of successfully processed external enquiry IDs"},"failed_ids":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the enquiry that failed"},"reason":{"type":"string","description":"The reason why the enquiry failed"}},"required":["id","reason"]},"description":"List of failed enquiries with reasons for failure"}},"required":["successful_ids","failed_ids"]},"ErrorSchema":{"type":"object","properties":{"error":{"type":"boolean","default":true},"message":{"type":"string","description":"Error message"}}}}},"paths":{"/v2/external-enquiry/{external_dms_id}/{external_dealership_id}":{"post":{"summary":"Post an external enquiry.","description":"Post an external enquiry.","parameters":[{"schema":{"type":"string"},"name":"external_dms_id","required":true,"in":"path"},{"schema":{"type":"string"},"name":"external_dealership_id","required":true,"in":"path"},{"schema":{"type":"string","enum":["au","nz","uk","my"]},"name":"region","description":"The region to perform this request in","in":"query"},{"schema":{"type":"string"},"name":"reference_id","required":false,"description":"An optional reference id which will be stored against usage records if supplied","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalEnquiry"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}}},"tags":["Pipeline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","source_id","region","enquirer","vehicle"],"properties":{"id":{"type":"string","description":"The unique ID of the enquiry from the external DMS"},"source_id":{"type":"string","description":"The source ID provided by the external DMS"},"region":{"type":"string","description":"The external enquiry region"},"stock_number":{"type":"string","description":"The stock number of the vehicle being enquired about"},"rego":{"type":"string","description":"Vehicle registration number"},"vin":{"type":"string","description":"Vehicle VIN number"},"comment":{"type":"string","description":"Any comments provided by the enquirer"},"enquirer":{"type":"object","properties":{"first_name":{"type":"string","description":"First name of the enquirer"},"last_name":{"type":"string","description":"Last name of the enquirer"},"email":{"type":"string","format":"email","description":"Email address of the enquirer"},"mobile":{"type":"string","description":"Mobile number of the enquirer"}},"description":"Details of the person making the enquiry"},"vehicle":{"type":"object","required":["make","model","badge","series","year"],"properties":{"make":{"type":"string","description":"Vehicle make"},"model":{"type":"string","description":"Vehicle model"},"badge":{"type":"string","description":"Vehicle badge"},"series":{"type":"string","description":"Vehicle series"},"year":{"type":"number","description":"Vehicle manufacture year"}},"description":"Details of the vehicle being enquired about"}}}}},"description":"request body"}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devhub.autograb.com/pipeline/post-external-enquiry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
