Available Dates
Retrieves the available dates for performing a specific service, based on the requested location, service variant, and optional provider parameters.
/api/integration/dates/checkRequest
curl -X POST "https://dev.integration.cl.sodtrack-shared.sodtrack.com/api/integration/dates/check" \
-H "Authorization: Bearer $SODTRACK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"location": { //Required
"type": "string", //"coordinates" | "areaId" | "areaReference",
"value": "number | Object" //number | { lat: number, lng: number }
},
"variant": { //Required
"type": "string", //'variantSku' | 'variantId'
"value": "string"
},
"provider": {
"type": "string", //'providerId' | 'providerReference'
"value": "string"
},
"startDate": "YYYY-MM-dd", //Optional, default now()
"quantityOfDays": "number" //Optional, default 5
}'Base URL: https://dev.integration.cl.sodtrack-shared.sodtrack.com · other environments
Request body
{
"location": { //Required
"type": "string", //"coordinates" | "areaId" | "areaReference",
"value": "number | Object" //number | { lat: number, lng: number }
},
"variant": { //Required
"type": "string", //'variantSku' | 'variantId'
"value": "string"
},
"provider": {
"type": "string", //'providerId' | 'providerReference'
"value": "string"
},
"startDate": "YYYY-MM-dd", //Optional, default now()
"quantityOfDays": "number" //Optional, default 5
}Responses
{
"dates": [
"2025-01-01",
"2025-01-02",
"2025-01-03",
]
}Error responses for this endpoint follow the shared error reference.
Purpose
Retrieves the available dates for performing a specific service, based on the requested location, service variant, and optional provider parameters.
This endpoint allows client systems to display valid scheduling options to customers, ensuring that the selected date corresponds to Sodtrack’s real-time contractor availability.
Field Definitions
| Field | Type | Required | Description |
|---|---|---|---|
location | object | ✅ | Defines the geographical reference for checking service availability. |
location.type | string | ✅ | Determines how the location is identified. Accepted values: |
• "coordinates" — Uses geographic coordinates. | |||
• "areaId" — Uses the internal Sodtrack area identifier. | |||
• "areaReference" — Uses the SKU associated with a predefined service area. | |||
location.value | object or number or string | ✅ | The value corresponding to the selected location.type: |
If type = "coordinates" → must be an object:
{ "lat": number, "lng": number }
If type = "areaReferenceId" → must be a number representing the internal area ID.
If type = "areaReference" → must be a string representing the area Reference. |
| variant | object | ✅ | Identifies the specific service variant to check availability for. |
| variant.type | string | ✅ | Type of variant identifier. Options: "variantSku" or "variantId". |
| variant.value | string | ✅ | The SKU or ID of the variant, matching the selected variant.type. |
| provider | object | ❌ | (Optional) Restricts availability to a specific contractor. |
| provider.type | string | ❌ | Type of provider identifier. Options: "providerId" or "providerReference". |
| provider.value | string | ❌ | The corresponding provider ID or external reference. |
| startDate | string | ❌ | The first date (inclusive) to begin checking for availability. Format: YYYY-MM-DD. Default: current date. |
| quantityOfDays | number | ❌ | Number of consecutive days (from startDate) to check for availability. Default: 5. |
Response Fields
| Field | Type | Description |
|---|---|---|
dates | array[string] | List of available dates (in YYYY-MM-DD format) where the service can be scheduled. |
Error Responses
| HTTP Status | Error Code / Key | Description |
|---|---|---|
400 Bad Request | InvalidParameters | Missing or invalid request parameters. |
401 Unauthorized | — | Missing or expired authentication token. |
403 Forbidden | — | The API key or origin is not authorized to access this resource. |
404 Not Found | — | The specified variant or provider does not exist or is not linked to the given location. |
500 Internal Server Error | — | Unexpected server error. Contact support if the issue persists. |
Business Logic Notes
-
Availability is determined based on contractor coverage, variant eligibility, and existing bookings.
-
When
provideris omitted, the API returns aggregate availability across all eligible providers. -
If
location.type = "coordinates", the system automatically determines the coverage area based on geolocation. -
Returned dates are always formatted as ISO 8601 (
YYYY-MM-DD). -
If no available dates are found, an empty array is returned: