> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cargado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get border crossing recommendations

> Get recommended US-Mexico border crossings for one or more routes.
Returns recommended crossings filtered by confidence threshold, in the same order as the input requests.
Routes that do not cross the US-Mexico border will return an error result.



## OpenAPI

````yaml /openapi.yml post /border-crossings/recommendations
openapi: 3.1.0
info:
  title: Cargado API
  version: 1.0.0
  description: Cargado's API
  termsOfService: https://cargado.com/terms/
  contact:
    email: dev-support@cargado.com
servers:
  - url: https://api.cargado.com
    description: The production Cargado API server
security: []
tags:
  - name: Border Crossings
  - name: Loads
  - name: Rates
  - name: CarrierRelationship
  - name: User
  - name: Team
  - name: Webhooks
  - name: Bids
paths:
  /border-crossings/recommendations:
    post:
      tags:
        - Border Crossings
      summary: Get border crossing recommendations
      description: >-
        Get recommended US-Mexico border crossings for one or more routes.

        Returns recommended crossings filtered by confidence threshold, in the
        same order as the input requests.

        Routes that do not cross the US-Mexico border will return an error
        result.
      operationId: GetBorderCrossingRecommendations
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BorderCrossingRecommendationsInput'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorderCrossingRecommendationsOutput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody'
              examples:
                Example 1:
                  value:
                    message: Unauthorized
      security:
        - apiKey: []
components:
  schemas:
    BorderCrossingRecommendationsInput:
      description: >-
        Input for looking up recommended border crossings for one or more
        routes.
      properties:
        requests:
          items:
            $ref: '#/components/schemas/BorderCrossingRecommendationsRequest'
          type: array
          description: A list of routes to get border crossing recommendations for.
          minItems: 1
          maxItems: 50
      required:
        - requests
      type: object
      additionalProperties: true
    BorderCrossingRecommendationsOutput:
      description: >-
        Output containing border crossing recommendations for each requested
        route,

        in the same order as the input requests.
      properties:
        results:
          items:
            $ref: '#/components/schemas/BorderCrossingRecommendationResult'
          type: array
      required:
        - results
      type: object
      additionalProperties: true
    ErrorResponseBody:
      properties:
        code:
          type: string
        name:
          type: string
        message:
          type: string
        userReadableMessage:
          type: string
        details: {}
        fingerprint:
          type: string
      type: object
      additionalProperties: true
    BorderCrossingRecommendationsRequest:
      properties:
        stops:
          items:
            anyOf:
              - $ref: '#/components/schemas/PickupStopInput'
              - $ref: '#/components/schemas/DeliveryStopInput'
          type: array
          description: >-
            The list of stops for the route. The first stop is the origin and
            the last stop is the destination.

            The first stop must be a pickup and the last must be a delivery.
          minItems: 2
          maxItems: 64
        trailerRequirements:
          properties:
            allowedTypes:
              items:
                $ref: '#/components/schemas/TrailerType'
              type: array
              description: Which types of trailers are allowed for the route.
              minItems: 1
              examples:
                - - DRY_VAN
          required:
            - allowedTypes
          type: object
          description: The trailer requirements for the route.
      required:
        - stops
        - trailerRequirements
      type: object
      additionalProperties: true
    BorderCrossingRecommendationResult:
      anyOf:
        - $ref: '#/components/schemas/BorderCrossingRecommendationData'
        - $ref: '#/components/schemas/BorderCrossingRecommendationError'
    PickupStopInput:
      properties:
        type:
          type:
            - string
            - 'null'
          enum:
            - PICKUP
        placeDetails:
          $ref: '#/components/schemas/PlaceDetailsInput'
          description: The location of the stop.
      required:
        - type
        - placeDetails
      type: object
      additionalProperties: true
    DeliveryStopInput:
      properties:
        type:
          type:
            - string
            - 'null'
          enum:
            - DELIVERY
        placeDetails:
          $ref: '#/components/schemas/PlaceDetailsInput'
          description: The location of the stop.
      required:
        - type
        - placeDetails
      type: object
      additionalProperties: true
    TrailerType:
      type: string
      enum:
        - DRY_VAN
        - DRY_VAN_DOUBLE
        - DRY_VAN_TRIPLE
        - DRY_VAN_MULTI_AXLE
        - REEFER
        - REEFER_DOUBLE
        - REEFER_MULTI_AXLE
        - HEATED
        - HEATED_MULTI_AXLE
        - FLATBED
        - FLATBED_DOUBLE
        - FLATBED_MULTI_AXLE
        - STEPDECK
        - DOUBLE_DROP
        - RGN
        - CONESTOGA
        - STEPDECK_CONESTOGA
        - DOUBLE_DROP_CONESTOGA
        - STRAIGHT_TRUCK_DRY
        - STRAIGHT_TRUCK_REEFER
        - TORTON
        - RABON
        - HALF_TON
        - ONE_TON
        - ONE_AND_HALF_TON
        - THREE_AND_HALF_TON
        - FOUR_AND_HALF_TON
    BorderCrossingRecommendationData:
      properties:
        type:
          type:
            - string
            - 'null'
          enum:
            - DATA
        stops:
          items:
            anyOf:
              - $ref: '#/components/schemas/PickupStopInput'
              - $ref: '#/components/schemas/DeliveryStopInput'
          type: array
          description: The stops from the request.
        trailerRequirements:
          properties:
            allowedTypes:
              items:
                $ref: '#/components/schemas/TrailerType'
              type: array
          required:
            - allowedTypes
          type: object
          description: The trailer requirements from the request.
        recommendedBorderCrossings:
          items:
            $ref: '#/components/schemas/UsMxBorderCrossing'
          type: array
          description: >-
            The recommended border crossing ports for this route, filtered by
            confidence threshold.

            May be empty if no crossing meets the confidence threshold.
      required:
        - type
        - stops
        - trailerRequirements
        - recommendedBorderCrossings
      type: object
      additionalProperties: true
    BorderCrossingRecommendationError:
      properties:
        type:
          type:
            - string
            - 'null'
          enum:
            - ERROR
        stops:
          items:
            anyOf:
              - $ref: '#/components/schemas/PickupStopInput'
              - $ref: '#/components/schemas/DeliveryStopInput'
          type: array
          description: The stops from the request.
        trailerRequirements:
          properties:
            allowedTypes:
              items:
                $ref: '#/components/schemas/TrailerType'
              type: array
          required:
            - allowedTypes
          type: object
          description: The trailer requirements from the request.
        message:
          type: string
          description: A human-readable description of the error.
        code:
          type: string
          description: A machine-readable error code.
      required:
        - type
        - stops
        - trailerRequirements
        - message
        - code
      type: object
      additionalProperties: true
    PlaceDetailsInput:
      properties:
        place:
          $ref: '#/components/schemas/Place'
        coordinates:
          $ref: '#/components/schemas/Coordinates'
          description: >-
            The GPS coordinates of the location. If omitted, Cargado will
            determine the coordinates to use via geocoding.
      type: object
      additionalProperties: true
    UsMxBorderCrossing:
      type: string
      enum:
        - LAREDO_INTL_BRIDGE
        - LAREDO_COLUMBIA
        - BROWNSVILLE
        - CALEXICO_EAST
        - DEL_RIO
        - DOUGLAS
        - EAGLE_PASS
        - EL_PASO
        - HIDALGO
        - NOGALES
        - OTAY_MESA
        - SAN_LUIS
        - TECATE
    Place:
      anyOf:
        - $ref: '#/components/schemas/AddressString'
        - $ref: '#/components/schemas/Address'
        - $ref: '#/components/schemas/PostalCode'
        - $ref: '#/components/schemas/City'
    Coordinates:
      description: GPS coordinates for a geographic location.
      properties:
        latitude:
          type: number
          format: double
          description: The latitude of the place.
          minimum: -90
          maximum: 90
          examples:
            - 49.280455
        longitude:
          type: number
          format: double
          description: The longitude of the place.
          minimum: -180
          maximum: 180
          examples:
            - -123.118842
      required:
        - latitude
        - longitude
      type: object
      additionalProperties: true
    AddressString:
      properties:
        address:
          type: string
        type:
          type:
            - string
            - 'null'
          enum:
            - ADDRESS_STRING
      required:
        - address
        - type
      type: object
      description: >-
        The place as a formatted string. Should be at the level of an address,
        postal code, city, or neighborhood.
    Address:
      properties:
        country:
          $ref: '#/components/schemas/CountryCode'
        state:
          $ref: '#/components/schemas/StateCode'
        city:
          type: string
        postalCode:
          type: string
        streetTwo:
          type: string
        street:
          type: string
        type:
          type:
            - string
            - 'null'
          enum:
            - ADDRESS
      required:
        - country
        - state
        - city
        - postalCode
        - street
        - type
      type: object
      description: The full address of the place as structured data.
    PostalCode:
      description: >-
        A postal code in country-specific format (called a ZIP code in the
        United States).
      properties:
        type:
          type:
            - string
            - 'null'
          enum:
            - POSTAL_CODE
        postalCode:
          type: string
        country:
          $ref: '#/components/schemas/CountryCode'
      required:
        - type
        - postalCode
        - country
      type: object
      additionalProperties: true
    City:
      description: >-
        A city or neighborhood. You may use the name of the neighborhood as the
        value of the `city` field.
      properties:
        type:
          type:
            - string
            - 'null'
          enum:
            - CITY
        city:
          type: string
        state:
          $ref: '#/components/schemas/StateCode'
        country:
          $ref: '#/components/schemas/CountryCode'
      required:
        - type
        - city
        - state
        - country
      type: object
      additionalProperties: true
    CountryCode:
      type: string
      enum:
        - US
        - MX
        - CA
      description: The ISO 3166-1 alpha-2 country code of the place.
    StateCode:
      anyOf:
        - $ref: '#/components/schemas/StateCodeCA'
        - $ref: '#/components/schemas/StateCodeMX'
        - $ref: '#/components/schemas/StateCodeUS'
    StateCodeCA:
      type: string
      enum:
        - CA_AB
        - CA_BC
        - CA_MB
        - CA_NB
        - CA_NL
        - CA_NT
        - CA_NS
        - CA_NU
        - CA_ON
        - CA_PE
        - CA_QC
        - CA_SK
        - CA_YT
    StateCodeMX:
      type: string
      enum:
        - MX_AGU
        - MX_BCN
        - MX_BCS
        - MX_CAM
        - MX_CMX
        - MX_COA
        - MX_COL
        - MX_CHP
        - MX_CHH
        - MX_DUR
        - MX_GUA
        - MX_GRO
        - MX_HID
        - MX_JAL
        - MX_MEX
        - MX_MIC
        - MX_MOR
        - MX_NAY
        - MX_NLE
        - MX_OAX
        - MX_PUE
        - MX_QUE
        - MX_ROO
        - MX_SLP
        - MX_SIN
        - MX_SON
        - MX_TAB
        - MX_TAM
        - MX_TLA
        - MX_VER
        - MX_YUC
        - MX_ZAC
    StateCodeUS:
      type: string
      enum:
        - US_AK
        - US_AL
        - US_AZ
        - US_AR
        - US_CA
        - US_CO
        - US_CT
        - US_DE
        - US_FL
        - US_GA
        - US_HI
        - US_ID
        - US_IL
        - US_IN
        - US_IA
        - US_KS
        - US_KY
        - US_LA
        - US_ME
        - US_MD
        - US_MA
        - US_MI
        - US_MN
        - US_MS
        - US_MO
        - US_MT
        - US_NE
        - US_NV
        - US_NH
        - US_NJ
        - US_NM
        - US_NY
        - US_NC
        - US_ND
        - US_OH
        - US_OK
        - US_OR
        - US_PA
        - US_RI
        - US_SC
        - US_SD
        - US_TN
        - US_TX
        - US_UT
        - US_VT
        - US_VA
        - US_WA
        - US_WV
        - US_WI
        - US_WY
        - US_DC
        - US_AS
        - US_GU
        - US_MP
        - US_PR
        - US_UM
        - US_VI
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: api-key

````