Create Service Request
The Create Service Request endpoint allows you to programmatically create new service requests in VectorCare.
How It Works
Section titled “How It Works”Each service in VectorCare defines its own request schema, the set of fields required to create a request for that service. Because schemas vary by service, there is no single fixed request body. Instead, VectorCare provides interactive API documentation that shows the exact request body structure for each service available to your organization.
When you open the interactive docs, you’ll see each service listed with its service ID, name, and the full request body schema including all required and optional fields.
You must be logged in to VectorCare to access the interactive documentation:
| Environment | Interactive Docs |
|---|---|
| Production | https://hub.vectorcare.com/openapi/api-docs/create-request/ |
| UAT | https://hub-uat.vectorcare.com/openapi/api-docs/create-request/ |
Example
Section titled “Example”The interactive docs will show you one or more services, each with their own endpoint and request body. Here’s an example of what a simple service might look like. The service ID (2JV3RG9K in this example) is unique to each service and will be shown in the interactive documentation.
Request Body
Section titled “Request Body”The request body varies by service. A simple service might look like this:
{ "patient": { "id": "string", "last_name": "string", "first_name": "string" }, "request": { "test": "string" }}Other services may require additional fields such as pickup/dropoff addresses, appointment times, insurance information, or custom fields specific to that service. The interactive documentation shows the complete schema for each service, including which fields are required and which are optional.
Example Request
Section titled “Example Request”curl -X POST "https://hub.vectorcare.com/openapi/v2.0/requests/service/2JV3RG9K/" \ -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." \ -H "Content-Type: application/json" \ -d '{ "patient": { "id": "PAT-001", "last_name": "Smith", "first_name": "John" }, "request": { "test": "value" } }'Success (201 Created)
Section titled “Success (201 Created)”{ "request_id": "KP-ABCD1234", "service_request_web_url": "https://hub.vectorcare.com/service_request/o/X5318RVM/permalink/KP-ABCD1234/"}The service_request_web_url is a permalink to view this request in the VectorCare web application. The user following this link must be logged in to VectorCare with their web session credentials (this is not related to API client credentials).
Errors
Section titled “Errors”| Status | Cause |
|---|---|
| 400 | Invalid request body or missing required fields |
| 401 | Missing, invalid, or expired token |
| 403 | Organization does not have permission to create requests for this service |
| 404 | Service ID not found or invalid schema version |
| 406 | Unsupported API version |
| 429 | Rate limit exceeded |