> ## 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.

# Quote a per-km delivery price

> Compute a delivery quote from the store to a destination. Requires the READ_SHIPPING scope.

An installed app is already bound to one store, so it must pass `lat` and `lng`. `domain` is used only for human callers, and `shippingAddressId` is refused for apps because a saved address belongs to a shopper.


## OpenAPI

````yaml apps-api/specs/shipping-fulfillment.json GET /shipping/delivery-price
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/delivery-price:
    get:
      tags:
        - Shipping
      summary: Quote a per-km delivery price
      description: >-
        Computes distance from the store to a destination and multiplies it by
        the per-km rate. For a human caller the store is resolved from `domain`
        and a saved address may be used. An installed app is already bound to
        one store, so it must pass `lat` and `lng`; `domain` is ignored and
        `shippingAddressId` is refused because a saved address belongs to a
        shopper. Requires the `READ_SHIPPING` scope.
      operationId: getDeliveryPrice
      parameters:
        - name: lat
          in: query
          required: false
          description: Destination latitude. Required for app callers.
          schema:
            type: number
            minimum: -90
            maximum: 90
        - name: lng
          in: query
          required: false
          description: Destination longitude. Required for app callers.
          schema:
            type: number
            minimum: -180
            maximum: 180
        - name: domain
          in: query
          required: false
          description: >-
            The storefront domain. Used only for human callers; an app resolves
            the store from its token.
          schema:
            type: string
        - name: shippingAddressId
          in: query
          required: false
          description: >-
            A saved shopper address. Human callers only; apps must use lat and
            lng.
          schema:
            type: string
      responses:
        '200':
          description: The quote.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EnvelopeBase'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          distanceKm:
                            type: number
                          pricePerKm:
                            type: number
                          shippingCost:
                            type: number
                          distanceSource:
                            type: string
        '400':
          description: Missing destination, or per-km pricing is not configured.
        '403':
          description: The app is missing `READ_SHIPPING`.
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.
  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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.