Search for the best available slot

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://developers.praxedo.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Public REST apis MCP server": {
    "url": "https://developers.praxedo.com/mcp"
  }
}

Close
POST /rest/v1/slots/search/best


Mind to choose the dedicated server for this application.

Finds the best available slot for qualified field resources to carry out a given type of work order, based on the client's best slot policy. Given a work order type and a location, and a Best Slot Policy, the service allows to find a single slot during which field resource possessing the needed skills have enough time to travel to the work order site from the previous site, perform the work order, and travel to the site of the next work order.

Selection policy

Candidates slots are ranked according to an ordered list of criteria. As soon as a single candidate remains, it is returned; otherwise the next criterion applies.

Best value for each criterion :

TRAVEL_TIME : Lowest travel time added to the field resource's route

GAP_FILL : Highest workload of the field resource on the day of the slot

EARLIEST : Earliest start, regarding the beginning of the searched period

Default policy: TRAVEL_TIME > GAP_FILL > EARLIEST. It applies when bestSlotCriteria or criteriaOrder is not provided, null or empty. When only 1 or 2 criteria are provided, they come first (in the given order), followed by the remaining criteria in the default order.

If candidates are still tied after the three criteria, field resource ID is used to make a decision.

Options not available on this endpoint

The following options of /rest/v3/slots/search are ignored if provided:

  • slotSearchConfiguration.searchSize.maximumSlotNumber
  • slotSearchConfiguration.servedSlots.perTimeInterval
  • slotSearchConfiguration.servedSlots.perResource
application/json

Body Required

  • endCustomer object Required
    Hide endCustomer attributes Show endCustomer attributes object
    • need object Required
      Hide need attributes Show need attributes object
      • workOrder object Required

        The code of the work order type for which to look for slots.

        Hide workOrder attribute Show workOrder attribute object
        • code string
      • overrides object

        Replaces default values defined in the work order, regarding the duration and skill requirements, by custom ones for this search.

        Hide overrides attributes Show overrides attributes object
        • duration string

          Replaces the forecast duration of the work order which is the subject of the slot search, in ISO-8601 duration format.

          Format should match the following pattern: PnDTnHnMn.nS..

        • skillsRequirement object
          One of:
      • dispatchLocation object Required

        The location of the work order to be scheduled.

        One of:
    • availabilities object Required
      One of:
  • schedulerRequirements object
    Hide schedulerRequirements attributes Show schedulerRequirements attributes object
    • fieldResourceScheduled object
      Hide fieldResourceScheduled attributes Show fieldResourceScheduled attributes object
      • inArea object

        Allows to filter the field resources that can perform the work order, based on geographical constraints.

        Hide inArea attributes Show inArea attributes object
        • circle object

          The circle zone describing the working area of the work order.

          Hide circle attributes Show circle attributes object
          • radius object Required

            The radius of this circle area.

            Hide radius attributes Show radius attributes object
            • value number(double) Required

              The distance value.

            • unit string Required

              The distance unit.

              Values are KILOMETERS, METERS, or INTERNATIONAL_MILES.

          • center object Required

            The center of this circle area.

            Hide center attributes Show center attributes object
            • latitude number(double) Required

              WGS84 latitude of the coordinates.

            • longitude number(double) Required

              WGS84 longitude of the coordinates.

        • zipZone object

          The zone described by a zip code for the working area of the work order.

          Hide zipZone attributes Show zipZone attributes object
          • zipCode string Required

            Postal/ZIP code of the dispatch location. Only field resources set as available to work in this area can be dispatched to this area.

          • areaScope string

            Defines the level at which the ZIP code filter is applied: *'RESOURCE': Returns slots for resources whose area, defined on their details page, matches the requested zipCode. *'TIMESLOT': Returns slots only if the resource has a reserved time slot with an area matching the zipCode.

            Values are TIMESLOT or RESOURCE. Default value is RESOURCE.

      • nearDispatchLocation object

        Allows to filter the field resources that can perform the work order, based on travel time/distance constraints and according to their current schedule.

        Hide nearDispatchLocation attributes Show nearDispatchLocation attributes object
        • maximumDistanceToLocation object

          Filters out field resources that are too distant from the dispatch location.

          Hide maximumDistanceToLocation attributes Show maximumDistanceToLocation attributes object
          • value number(double) Required

            The distance value.

          • unit string Required

            The distance unit.

            Values are KILOMETERS, METERS, or INTERNATIONAL_MILES.

        • maximumTravelTimeToLocation string

          Filter out slots that would imply the field resource to travel more than this duration.

          Format should match the following pattern: PnDTnHnMn.nS..

        • maximumAddedTravelTime string

          Ignore slots for which the travel time exceeds the travel time allowed for this day, taking into account the value in maximumAddedTravelTime.

          Format should match the following pattern: PnDTnHnMn.nS..

      • excludeFieldResourceWithoutSubscription boolean

        Excludes field resources without an activated subscription from the candidates, before any slot selection (and, on the best slot endpoint, before the policy criteria and the tie-break). false or absent: every field resource is evaluated, subscribed or not.

        Default value is false.

    • fieldResourceWorkingFor object
      Hide fieldResourceWorkingFor attributes Show fieldResourceWorkingFor attributes object
      • customerPortalUser string

        The customer portal user who asks for the dispatching. All slots will match a time slot linked to this customer portal user.

      • offices array[object]

        The list of offices from which field resources can be dispatched to this work order.

        Default value is Root office of the enterprise.

        Hide offices attribute Show offices attribute object
        • code string

          The code of an office from which field resources can be dispatched to this work order.

      • childrenOfficesIncluded boolean

        Whether the children offices of the offices indicated are part of the slot search, or only the given offices are targeted. If true, children offices in the office hierarchy are eligible to dispatch a field resource to perform the work order.

        Default value is true.

    • workingHours object
      Hide workingHours attributes Show workingHours attributes object
      • ignoreFieldResourceOwnWorkingHours boolean

        Considers that the field resource's working time is the same as the hours defined at the company level. In consequence, it can return time slots that do not respect the custom working hours of the field resource.

        Default value is false.

      • ignoreFieldResourceBreak boolean

        Ignores the field resources' break, returning slots that run through it.

        Default value is false.

      • ignoreFieldResourceCapacityModel boolean

        Ignores the field ressources' capacity models in the returned slots calculation.

        Default value is false.

  • slotSearchConfiguration object

    Configuration of the best slot search. searchSize is not available on this endpoint and is ignored if provided.

    Hide slotSearchConfiguration attributes Show slotSearchConfiguration attributes object
    • servedSlots object

      Allows to configure some aspects of the slot in the result.

      Hide servedSlots attribute Show servedSlots attribute object
      • startingHours object

        Allows to configure which slots are eligible based on their starting hour.

        One of:
    • bestSlotCriteria object

      Policy used to select the best slot among all eligible candidates.

      Hide bestSlotCriteria attribute Show bestSlotCriteria attribute object
      • criteriaOrder array[string]

        Ordered list of criteria used to select the best slot. The first criterion has the highest priority.

        • TRAVEL_TIME: prefer the lowest travel time added to the field resource's route.
        • GAP_FILL: prefer the slot of the field resource with the highest workload on the day of the slot.
        • EARLIEST: prefer the earliest start, regarding the beginning of the searched period.

        If not provided, null or empty, the default policy applies (TRAVEL_TIME, GAP_FILL, EARLIEST). If only 1 or 2 criteria are provided, the missing ones are added after them, in the default order. An unknown criterion (2016) or a duplicated criterion (2017) is rejected.

        Not more than 3 elements. Values are GAP_FILL, EARLIEST, or TRAVEL_TIME. Default value is ["TRAVEL_TIME", "GAP_FILL", "EARLIEST"].

Responses

  • 200 application/json

    OK. The best slot, or an empty slot list if no slot is eligible.

    Hide response attribute Show response attribute object
    • slot array[object]

      The best slot found. Contains at most one slot. Empty if no slot is eligible.

      Not more than 1 element.

      Hide slot attributes Show slot attributes object
      • start string(date-time)

        Date time in ISO format indicating the start of the slot.

        Format should match the following pattern: yyyy-MM-dd'T'HH:mm:ss.SSSZ.

      • end string(date-time)

        Date time in ISO format indicating the end of the slot.

        Format should match the following pattern: yyyy-MM-dd'T'HH:mm:ss.SSSZ.

      • fieldResource array[object]

        The field resource selected for the slot.

        Not more than 1 element.

        Hide fieldResource attributes Show fieldResource attributes object
        • fieldResource object

          The field resource selected for the slot.

          Hide fieldResource attribute Show fieldResource attribute object
          • code string

            The code of the field resource.

        • office object

          The office of the selected field resource.

          Hide office attribute Show office attribute object
          • code string

            The code of the office.

        • hasActivatedSubscription boolean

          Whether the field resource has an active subscription or not.

        • selection object

          The values used to select this slot.

          Hide selection attributes Show selection attributes object
          • addedTravelTime string

            The travel time added to the field resource's route by inserting the work order. Used by the TRAVEL_TIME criterion.

            Format should match the following pattern: PnDTnHnMn.nS..

          • travelTimeToLocation string

            The field resource's travel time to get to the work order from his previous location.

            Format should match the following pattern: PnDTnHnMn.nS..

          • distanceToLocation object

            The distance from the field resource's previous location to the work order.

            Hide distanceToLocation attributes Show distanceToLocation attributes object
            • value number(double) Required

              The distance value.

            • unit string Required

              The distance unit.

              Values are KILOMETERS, METERS, or INTERNATIONAL_MILES.

          • workLoad string

            The field resource's workload in percentage on the day of the slot. Used by the GAP_FILL criterion.

          • optionalSkillCount integer

            The number of work order's unneeded skills the field resource has.

  • 400 application/json

    Bad request

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 1001 application/json

    The work order type is missing

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 1002 application/json

    A list of time ranges or a an appointment date is missing

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 1003 application/json

    Received a request requesting slots related to field resources in charge of an area (enableZoneFilter = 'true'). However, no zip code has been provided to help identify the area in which the work order will take place

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2001 application/json

    The provided work order type does not exist

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2002 application/json

    At least one of the provided offices does not exist

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2003 application/json

    The provided dates are in the past

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2004 application/json

    The end date of the search interval is earlier than the start date

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2005 application/json

    The slot search period is too long. The maximum is 200 weeks

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2006 application/json

    The 'offices' list accepts either 'codes' or 'ids', but not both. Please provide only one

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2007 application/json

    The provided areas do not exist

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2009 application/json

    The skills list accepts either 'codes' or 'ids', but not both. Please provide only one

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2010 application/json

    The 'workOrder' can either be a code or an id. Please provide only one

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2011 application/json

    Invalid value '%s' for parameter 'areaScope'. Allowed values are: 'RESOURCE', 'TIMESLOT'

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2012 application/json

    The parameter 'customerPortalUser' cannot be used with the 'RESOURCE' area scopes

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2016 application/json

    Invalid value '%s' for parameter 'criteriaOrder'. Allowed values are: 'GAP_FILL', 'EARLIEST', 'TRAVEL_TIME'

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 2017 application/json

    The criteria '%s' is duplicated in 'criteriaOrder'. Each criteria can only be provided once

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 3011 application/json

    The provided address couldn't be geocoded

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 3021 application/json

    The provided [latitude, longitude] is out of range : [%s, %s]. Expected values : -90 < latitude < 90 and -180 < longitude < 180

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 3022 application/json

    Coordinates (0,0) are not accepted

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 3031 application/json

    The travel times and distances could not be computed

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

  • 3032 application/json

    No route could be found to reach the work order destination (e.g. closed road, unreachable area)

    Hide response attributes Show response attributes object
    • errorCode string

      The error code.

    • errorMessage string

      The error message.

POST /rest/v1/slots/search/best
curl \
 --request POST 'https://availableslots-production-1.praxedo.com/rest/v1/slots/search/best' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "endCustomer": {
    "need": {
      "workOrder": {
        "code": "MAINTENANCE"
      },
      "dispatchLocation": {
        "address": "28 rue de Mogador, 75009 Paris"
      }
    },
    "availabilities": {
      "ranges": [
        {
          "start": "2026-11-03 07:00:00 UTC",
          "end": "2026-11-05 17:00:00 UTC"
        }
      ]
    }
  }
}'
Request examples
{
  "endCustomer": {
    "need": {
      "workOrder": {
        "code": "MAINTENANCE"
      },
      "dispatchLocation": {
        "address": "28 rue de Mogador, 75009 Paris"
      }
    },
    "availabilities": {
      "ranges": [
        {
          "start": "2026-11-03 07:00:00 UTC",
          "end": "2026-11-05 17:00:00 UTC"
        }
      ]
    }
  }
}
{
  "endCustomer": {
    "need": {
      "workOrder": {
        "code": "SAV_FIBER"
      },
      "overrides": {
        "duration": "PT40M",
        "skillsRequirement": {
          "additionalSkills": [
            {
              "code": "FIBER",
              "constraint": "MANDATORY"
            },
            {
              "code": "COPPER",
              "constraint": "OPTIONAL"
            }
          ]
        }
      },
      "dispatchLocation": {
        "address": "4 rue du Rhin, 75019 Paris"
      }
    },
    "availabilities": {
      "ranges": [
        {
          "start": "2026-11-03 07:00:00 UTC",
          "end": "2026-11-04 17:00:00 UTC"
        }
      ]
    }
  },
  "schedulerRequirements": {
    "fieldResourceScheduled": {
      "nearDispatchLocation": {
        "maximumAddedTravelTime": "PT2H30M"
      }
    },
    "fieldResourceWorkingFor": {
      "offices": [
        {
          "code": "PARISOFFICE"
        },
        {
          "code": "NANTERREOFFICE"
        }
      ]
    },
    "workingHours": {
      "ignoreFieldResourceBreak": true
    }
  },
  "slotSearchConfiguration": {
    "servedSlots": {
      "startingHours": {
        "allowSlotOverlap": false,
        "pattern": "HALF"
      }
    },
    "bestSlotCriteria": {
      "criteriaOrder": [
        "GAP_FILL",
        "EARLIEST",
        "TRAVEL_TIME"
      ]
    }
  }
}
{
  "endCustomer": {
    "need": {
      "workOrder": {
        "code": "MAINTENANCE"
      },
      "dispatchLocation": {
        "coordinates": {
          "latitude": 48.8755905,
          "longitude": 2.3287881
        }
      }
    },
    "availabilities": {
      "ranges": [
        {
          "start": "2026-11-10 08:00:00 UTC",
          "end": "2026-11-14 18:00:00 UTC"
        }
      ]
    }
  },
  "slotSearchConfiguration": {
    "bestSlotCriteria": {
      "criteriaOrder": [
        "EARLIEST"
      ]
    }
  }
}
{
  "endCustomer": {
    "need": {
      "workOrder": {
        "code": "MAINTENANCE"
      },
      "dispatchLocation": {
        "address": "28 rue de Mogador, 75009 Paris"
      }
    },
    "availabilities": {
      "ranges": [
        {
          "start": "2026-11-03 07:00:00 UTC",
          "end": "2026-11-05 17:00:00 UTC"
        }
      ]
    }
  },
  "schedulerRequirements": {
    "fieldResourceScheduled": {
      "excludeFieldResourceWithoutSubscription": true
    }
  },
  "slotSearchConfiguration": {
    "bestSlotCriteria": {
      "criteriaOrder": [
        "TRAVEL_TIME",
        "GAP_FILL",
        "EARLIEST"
      ]
    }
  }
}
Response examples (200)
{
  "slot": [
    {
      "start": "2026-11-03 09:30:00 +0100",
      "end": "2026-11-03 10:10:00 +0100",
      "fieldResource": [
        {
          "fieldResource": {
            "code": "MAINT_SERV"
          },
          "office": {
            "code": "PARISOFFICE"
          },
          "hasActivatedSubscription": true,
          "selection": {
            "addedTravelTime": "PT33M53S",
            "travelTimeToLocation": "PT17M45S",
            "distanceToLocation": {
              "value": 3.539,
              "unit": "KILOMETERS"
            },
            "workLoad": "50%",
            "optionalSkillCount": 0
          }
        }
      ]
    }
  ]
}
{
  "slot": []
}
Response examples (400)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (1001)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (1002)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (1003)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2001)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2002)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2003)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2004)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2005)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2006)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2007)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2009)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2010)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2011)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2012)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2016)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (2017)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (3011)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (3021)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (3022)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (3031)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response examples (3032)
{
  "errorCode": "string",
  "errorMessage": "string"
}