Call Requests

Managing Call Requests

The Call Requests API allows you to manage customer callback requests submitted through your storefront. This feature enables you to track, respond to, and manage customer inquiries that require phone support.

Base URL: https://your-store.venddor.com/api/call_requests

Available Endpoints

GET /call_requests

Retrieves a list of all call requests with optional filtering parameters.

Query Parameters

Parameter Type Required Description
status string No Filter by status: new, in_progress, completed
date_from string No Filter by date (format: YYYY-MM-DD)
date_to string No Filter by date (format: YYYY-MM-DD)
page integer No Page number for pagination. Default: 1
items_per_page integer No Number of items per page. Default: 20, Maximum: 100
{
  "call_requests": [
    {
      "request_id": "123",
      "name": "John Smith",
      "phone": "+1 (555) 123-4567",
      "status": "new",
      "notes": "Customer has questions about product availability",
      "timestamp": "2025-04-14T15:30:00Z",
      "user_id": "45",
      "email": "john.smith@example.com",
      "preferred_time": "2025-04-15T10:00:00Z"
    },
    {
      "request_id": "124",
      "name": "Jane Doe",
      "phone": "+1 (555) 987-6543",
      "status": "completed",
      "notes": "Customer needed help with order #12345",
      "timestamp": "2025-04-13T09:15:00Z",
      "user_id": "67",
      "email": "jane.doe@example.com",
      "preferred_time": null
    }
  ],
  "pagination": {
    "total": 45,
    "current_page": 1,
    "items_per_page": 20,
    "total_pages": 3
  }
}
POST /call_requests

Creates a new call request in the system.

Request Parameters

Parameter Type Required Description
name* string Yes Customer's full name
phone* string Yes Customer's phone number
email string No Customer's email address
notes string No Additional information about the request
preferred_time string No Preferred callback time (ISO 8601 format)
user_id string No ID of the registered user (if applicable)
{
  "name": "Robert Johnson",
  "phone": "+1 (555) 234-5678",
  "email": "robert.johnson@example.com",
  "notes": "Interested in bulk pricing for corporate order",
  "preferred_time": "2025-04-16T14:00:00Z"
}

Response

{
  "success": true,
  "request_id": "125",
  "message": "Call request created successfully"
}
PUT /call_requests/{id}

Updates an existing call request.

Path Parameters

Parameter Type Description
id* string The unique identifier of the call request

Request Parameters

Parameter Type Required Description
status string No Request status: new, in_progress, completed
notes string No Updated notes or comments
{
  "status": "completed",
  "notes": "Spoke with customer on 2025-04-15. Provided information about bulk pricing and sent quote via email."
}

Response

{
  "success": true,
  "message": "Call request updated successfully"
}

Error Responses

When an error occurs, the API will return an appropriate HTTP status code and a JSON response with error details.

{
  "error": {
    "code": "validation_error",
    "message": "The request parameters are invalid.",
    "details": [
      {
        "field": "phone",
        "message": "Phone number is required and cannot be empty."
      }
    ]
  }
}

Best Practices

Tip: When integrating with the Call Requests API, consider implementing automatic notifications to your support team when new requests are received to minimize response time.