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

# Get recommended shipping rates

> Retrieves recommended shipping rates from configured carriers for the provided shipment details



## OpenAPI

````yaml /openapi/openapi_fulfillment.json post /commerce/rate-shopping/recommend
openapi: 3.0.0
info:
  description: |-
    <div id="overview_FULFILLMENT">
                <h2>FULFILLMENT</h2>
                <p>The Fulfillment APIs support order management and fulfillment workflows based on the Shipment API and its
                    packages, including supporting needs such as pick waves and manifests. Once an order has been placed, it
                    generally
                    cannot be edited at the order-level. Instead, changes to the items, pricing, and other information must
                    be done at the
                    shipment level with the Shipment API. See the <a href="/concept-guides/fulfillment">Fulfillment user guides</a> for more information about fulfillment in UCP.</p>
                <p>When using the Shipment API to transition a shipment through each stage of its fulfillment process, it
                    can be
                    difficult to remember how to format the next step's endpoint and the expected parameters on-the-fly.
                    Additionally,
                    if a call such as cancellation, adding tracking information, or marking the shipment as fulfilled needs
                    to be performed
                    outside of the usual fulfillment flow, it may be confusing to determine how to perform the action
                    without referring to the
                    documentation. To assist with this, the Shipment API provides guidelines within the response body. This
                    response
                    includes two objects, workflowState and _links, that detail the shipment's next step in the workflow as
                    well as all
                    possible actions currently available to the shipment. Use 
                    <a href="/pages/fulfillment-api-overview">this walkthrough</a> to better 
                    understand how to work with this response data.</p>
                    <p>Use the <strong>Customer Survey</strong> resource to create surveys and gather data from your customers.</p>
                    <p>Use the <strong>Manifests</strong> resource to create shipping manifests for fulfillment partners such as Canada Post that require manifests for groups of shipments.</p>
                    <p>Use the <strong>Pick Wave</strong> resource to generate and process pick waves for picking groups of items at a fulfillment locations.</p>
                    <p>Use the <strong>Shipment</strong>, <strong>Shipment Attributes</strong>, <strong>Shipment Data</strong>, and <strong>Shipment Notification</strong> resources to manage the actual shipments being fulfilled and perform actions on them.</p>
                    <p>Use the <strong>Shipment Packages</strong> resource to create, update, and delete the individual packages within a shipment.</p>
                    <p>Use the <strong>Storefront</strong> resource to retrieve shipment information for the storefront.</p>
                    <p>Use the <strong>Workflow Process</strong> resource to retrieve BPM configurations and the fulfillment steps based on shipment type.</p>
            </div>
  title: Fulfillment  - Production Profile
  version: 0.0.1
servers:
  - description: Kibo Base URL
    url: '{baseUrl}/api'
    variables:
      baseUrl:
        default: https://t1000000.sb.usc1.gcp.kibocommerce.com
        description: Base URL
security:
  - bearerAuth: []
tags:
  - name: CustomerSurvey
  - name: Fulfillment
  - name: FutureShipment
  - name: GiftReceipt
  - name: Manifest
  - name: PickWave
  - name: Rendition
  - name: ShipmentAttributes
  - name: ShipmentContact
  - name: Shipment
  - name: ShipmentData
  - name: ShipmentHold
  - name: ShipmentNotes
  - name: ShipmentPackages
  - name: ShipmentResendEmail
  - name: ShippingNotification
  - name: Storefront
  - name: Substitutions
  - name: WorkflowProcess
paths:
  /commerce/rate-shopping/recommend:
    post:
      tags:
        - RateShopping
      summary: Get recommended shipping rates
      description: >-
        Retrieves recommended shipping rates from configured carriers for the
        provided shipment details
      parameters:
        - allowEmptyValue: false
          description: Package ID
          in: query
          name: packageId
          required: false
          schema:
            type: string
        - allowEmptyValue: false
          description: Ship Date
          in: query
          name: shipDate
          required: false
          schema:
            format: date-time
            type: string
        - allowEmptyValue: false
          description: Shipment number
          in: query
          name: shipmentNumber
          required: true
          schema:
            format: int32
            type: integer
        - in: header
          name: x-vol-site
          required: false
          schema:
            format: int32
            type: integer
        - in: header
          name: x-vol-tenant
          required: true
          schema:
            format: int32
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RateShoppingRequestDto'
        description: Rate shopping request
      responses:
        '200':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/EntityModelOfRateShoppingResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/EntityModelOfRateShoppingResponseDto'
            application/xml:
              schema:
                $ref: '#/components/schemas/EntityModelOfRateShoppingResponseDto'
          description: Rates retrieved successfully
        '201':
          description: Created
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '422':
          description: Validation error
        '500':
          description: Internal server error
      deprecated: false
components:
  schemas:
    RateShoppingRequestDto:
      description: Rate shopping request containing shipment details
      properties:
        packagesOverride:
          description: Packages override
          items:
            $ref: '#/components/schemas/RateShoppingPackage'
          type: array
      title: RateShoppingRequestDto
      type: object
    EntityModelOfRateShoppingResponseDto:
      properties:
        _links:
          $ref: '#/components/schemas/Links'
        metadata:
          $ref: '#/components/schemas/RateShoppingMetadataDto'
        rates:
          description: List of shipping rates from carriers
          items:
            $ref: '#/components/schemas/ShippingRateDto'
          type: array
        recommendedRate:
          $ref: '#/components/schemas/RecommendedRateDto'
          description: Recommended shipping rate for rate shopping
      required:
        - rates
        - recommendedRate
      title: EntityModelOfRateShoppingResponseDto
      type: object
    RateShoppingPackage:
      properties:
        measurements:
          $ref: '#/components/schemas/FulfillmentAPIPackageMeasurements'
        packageId:
          type: string
      title: RateShoppingPackage
      type: object
    Links:
      properties:
        empty:
          type: boolean
      title: Links
      type: object
    RateShoppingMetadataDto:
      properties:
        destinationZip:
          description: Destination ZIP code
          type: string
        expectedDeliveryDate:
          description: Expected delivery date used for rate shopping
          format: date-time
          type: string
        originZip:
          description: Origin ZIP code
          type: string
        packageCount:
          description: Number of packages in the shipment
          format: int32
          type: integer
        scoringWeights:
          $ref: '#/components/schemas/RateShoppingWeightsDto'
          description: Rate shopping scoring weights
        shipDate:
          description: Ship Date used for rate shopping
          format: date-time
          type: string
      required:
        - destinationZip
        - expectedDeliveryDate
        - originZip
        - packageCount
        - scoringWeights
        - shipDate
      title: RateShoppingMetadataDto
      type: object
    ShippingRateDto:
      description: Shipping rate from a carrier
      properties:
        carrier:
          description: Carrier code
          example: FEDEX
          type: string
        currency:
          description: Currency code
          example: USD
          type: string
        estimatedDeliveryDate:
          description: Estimated delivery date
          format: date-time
          type: string
        exclusionCode:
          description: Exclusion code
          type: string
        exclusionMessage:
          description: Exclusion message
          type: string
        normalizedCost:
          description: Normalized cost
          type: number
        normalizedSpeed:
          description: Normalized speed
          type: number
        serviceType:
          description: Service Type code
          example: fedex_FEDEX_GROUND
          type: string
        serviceTypeName:
          description: Service Type Name
          example: FedEx Ground
          type: string
        totalRate:
          description: Total rate
          type: number
        transitDays:
          description: Transit time in business days
          format: int32
          type: integer
        weightedScore:
          description: Weighted score
          type: number
      required:
        - carrier
        - currency
        - estimatedDeliveryDate
        - exclusionCode
        - exclusionMessage
        - normalizedCost
        - normalizedSpeed
        - serviceType
        - totalRate
        - transitDays
        - weightedScore
      title: ShippingRateDto
      type: object
    RecommendedRateDto:
      properties:
        carrier:
          description: Carrier code
          example: FEDEX
          type: string
        estimatedDeliveryDate:
          description: Estimated delivery date
          format: date-time
          type: string
        serviceType:
          description: Service type code
          example: 1_DAY
          type: string
        totalRate:
          description: Total rate
          type: number
      required:
        - carrier
        - estimatedDeliveryDate
        - serviceType
        - totalRate
      title: RecommendedRateDto
      type: object
    FulfillmentAPIPackageMeasurements:
      properties:
        attributes:
          additionalProperties:
            type: object
          type: object
        height:
          $ref: '#/components/schemas/FulfillmentAPIMeasurement'
        length:
          $ref: '#/components/schemas/FulfillmentAPIMeasurement'
        weight:
          $ref: '#/components/schemas/FulfillmentAPIMeasurement'
        width:
          $ref: '#/components/schemas/FulfillmentAPIMeasurement'
      title: PackageMeasurements
      type: object
    RateShoppingWeightsDto:
      title: RateShoppingWeightsDto
      type: object
    FulfillmentAPIMeasurement:
      properties:
        attributes:
          additionalProperties:
            type: object
          type: object
        unit:
          type: string
        value:
          type: number
      title: Measurement
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````