This document provides instructions for using the Simpletalk webhook to retrieve active job information for a customer.
POST /webhooks/simpletalk/jobs
This endpoint is protected by an API key. You must include a valid API key in the X-API-KEY header of your request.
- Header:
X-API-KEY - Value: Your secret API key
The request body must be a JSON object containing the customer's phone number.
- Content-Type:
application/json
| Parameter | Type | Description |
|---|---|---|
phoneNumber |
String | The customer's phone number. |
Example:
{
"phoneNumber": "+15551234567"
}The webhook will return a JSON object containing the customer's information and a list of their active jobs.
Success (200 OK):
{
"customer": {
"name": "John Doe",
"phone": "+15551234567"
},
"activeJobs": [
{
"jobId": 123,
"status": "en_route",
"proxyNumber": "+15557654321",
"technician": {
"name": "Mike Smith"
},
"serviceLocation": {
"address": "123 Main St, Anytown, USA"
}
}
]
}Error Responses:
- 400 Bad Request: The
phoneNumberis missing from the request body. - 401 Unauthorized: The API key is missing.
- 403 Forbidden: The API key is invalid.
- 404 Not Found: The customer could not be found.
- 500 Internal Server Error: An unexpected error occurred.