Skip to content

Create Service Request

The Create Service Request endpoint allows you to programmatically create new service requests in VectorCare.

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.

POST https://hub.vectorcare.com/openapi/v2.0/requests/service/{service_id}/

You must be logged in to VectorCare to access the interactive documentation:

EnvironmentInteractive Docs
Productionhttps://hub.vectorcare.com/openapi/api-docs/create-request/
UAThttps://hub-uat.vectorcare.com/openapi/api-docs/create-request/

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.

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.

Terminal window
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"
}
}'
{
"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).

StatusCause
400Invalid request body or missing required fields
401Missing, invalid, or expired token
403Organization does not have permission to create requests for this service
404Service ID not found or invalid schema version
406Unsupported API version
429Rate limit exceeded