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

# Fetch live courier rates for an order

> Fetch live courier rates for an order. Requires the READ_SHIPPING scope.

Fetches live courier shipping rates from the connected carrier aggregator for the given order and buyer shipping address, and caches them so a shipment can subsequently be created with a selected rate. Returns a bare array of courier rate objects as `data`. Requires the `READ_SHIPPING` scope.


## OpenAPI

````yaml GET /shipping/rates
openapi: 3.1.0
info:
  title: Salesive Apps API — Shipping & Fulfillment
  version: 1.0.0
  description: >-
    Manage shipping options, live courier rates, shipments and labels, and the
    ShipDay delivery integration from an installed third-party app. Every
    endpoint authenticates with an installed-app access token (prefix `app_`)
    and requires a specific OAuth scope. The target store is bound to the token
    server-side from the installation — never send a shop id.
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /shipping/rates:
    get:
      tags:
        - Shipping
      summary: Fetch live courier rates for an order
      description: >-
        Fetches live courier shipping rates from the connected carrier
        aggregator for the given order and buyer shipping address, and caches
        them so a shipment can subsequently be created with a selected rate.
        Returns a bare array of courier rate objects as `data`. Requires the
        `READ_SHIPPING` scope.
      operationId: getShippingRates
      parameters:
        - name: shippingAddressId
          in: query
          required: true
          description: ObjectId of the buyer's shipping address.
          schema:
            type: string
        - name: orderId
          in: query
          required: true
          description: ObjectId of the order to rate.
          schema:
            type: string
      responses:
        '200':
          description: Fetch live courier rates for an order.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EnvelopeBase'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/CourierRate'
              example:
                status: 200
                success: true
                message: Fetch live courier rates for an order
                data:
                  - courier_id: dhl
                    courier_name: DHL Express
                    courier_image: https://cdn.example.com/dhl.png
                    service_code: dhl_express
                    service_type: express
                    total: 2500
                    delivery_eta: 1-2 days
                    delivery_eta_time: '2026-06-30T17:00:00.000Z'
                    is_cod_available: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    EnvelopeBase:
      type: object
      description: >-
        Standard Salesive response envelope. The operation-specific payload is
        carried in `data`.
      required:
        - status
        - success
        - message
      properties:
        status:
          type: integer
          description: HTTP status code, echoed in the body.
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Human-readable result message.
    CourierRate:
      type: object
      description: A live courier rate returned by the carrier aggregator.
      additionalProperties: true
      properties:
        courier_id:
          type: string
          description: Courier code.
        courier_name:
          type: string
          description: Human-readable courier name.
        courier_image:
          type:
            - string
            - 'null'
          description: Courier logo URL.
        service_code:
          type: string
          description: Service identifier used as `rateId` when creating a shipment.
        service_type:
          type: string
          description: Service tier (e.g. express, standard).
        total:
          type: number
          description: Total quoted cost.
        delivery_eta:
          type:
            - string
            - 'null'
          description: Human-readable delivery estimate.
        delivery_eta_time:
          type:
            - string
            - 'null'
          format: date-time
          description: Estimated delivery timestamp.
        is_cod_available:
          type: boolean
          description: Whether cash-on-delivery is available.
    Envelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              description: Operation-specific payload (object, array, or null).
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 401
            success: false
            message: Authentication required
            data: null
    Forbidden:
      description: The app token is missing the OAuth scope required for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 403
            success: false
            message: Insufficient scope
            data: null
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side — never send a shop
        id.

````