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

# Apply Shipping Rate to Cart

> **Host**: http://qshop.ng



## OpenAPI

````yaml post /shops/{shopId}/applyshipping/cart/{cartId}
openapi: 3.1.0
info:
  title: OpenAPI Specification
  version: 1.0.0
  description: >-
    QShop storefront API.  This API is used to build a storefront for a QShop
    store
  contact:
    name: QShop
    url: https://qshop.ng
    email: hello@qshop.ng
servers:
  - url: http://staging.qshop.ng/apiv2
    description: Staging server
  - url: http://qshop.ng/api
    description: Production server
security: []
paths:
  /shops/{shopId}/applyshipping/cart/{cartId}:
    post:
      tags:
        - Shops
        - Delivery Rates
      summary: Apply Shipping Rate to Cart
      description: '**Host**: http://qshop.ng'
      parameters:
        - name: shopId
          in: path
          required: true
          schema:
            type: string
        - name: cartId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                shippingRate:
                  type: string
              required:
                - shippingRate
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      entityId:
                        type: string
                      shop:
                        type: string
                      email:
                        type: string
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            _id:
                              type: string
                            tags:
                              type: array
                              items:
                                type: object
                                properties:
                                  _id:
                                    type: string
                                  name:
                                    type: string
                                  tempId:
                                    type: string
                                  shop:
                                    type: string
                                  __v:
                                    type: integer
                                  slug:
                                    type: string
                                  productCount:
                                    type: integer
                                  imageUrl:
                                    type: string
                                required:
                                  - _id
                                  - name
                                  - tempId
                                  - shop
                                  - __v
                                  - slug
                                  - productCount
                                  - imageUrl
                            stock:
                              type: integer
                            digital:
                              type: boolean
                            media:
                              type: string
                            media_type:
                              type: string
                            name:
                              type: string
                            price:
                              type: integer
                            shop:
                              type: string
                            sale_price:
                              type: integer
                            __v:
                              type: integer
                            draft:
                              type: boolean
                            alwaysInStock:
                              type: boolean
                            costPrice:
                              type: integer
                            sku:
                              type: string
                            type:
                              type: string
                            slug:
                              type: string
                            dimension:
                              type: object
                              properties:
                                unit:
                                  type: string
                                length:
                                  type: integer
                                width:
                                  type: integer
                                height:
                                  type: integer
                              required:
                                - unit
                                - length
                                - width
                                - height
                            weight:
                              type: object
                              properties:
                                base:
                                  type: object
                                  properties:
                                    unit:
                                      type: string
                                    value:
                                      type: integer
                                  required:
                                    - unit
                                    - value
                                unit:
                                  type: string
                                value:
                                  type: integer
                              required:
                                - base
                                - unit
                                - value
                            variantsInheritPrice:
                              type: boolean
                            setAttributesForVariants:
                              type: boolean
                            qty:
                              type: integer
                            variant:
                              type: object
                              properties:
                                _id:
                                  type: string
                                price:
                                  type: integer
                                sale_price:
                                  type: integer
                                costPrice:
                                  type: integer
                                stock:
                                  type: integer
                                alwaysInStock:
                                  type: boolean
                                isActive:
                                  type: boolean
                                sku:
                                  type: string
                                weight:
                                  type: object
                                  properties:
                                    base:
                                      type: object
                                      properties:
                                        unit:
                                          type: string
                                        value:
                                          type: integer
                                      required:
                                        - unit
                                        - value
                                    unit:
                                      type: string
                                    value:
                                      type: integer
                                  required:
                                    - base
                                    - unit
                                    - value
                                media:
                                  type: string
                                digital_download:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    url:
                                      type: string
                                    uuid:
                                      type: string
                                    size:
                                      type: 'null'
                                    maxDownloadsPerOrder:
                                      type: 'null'
                                  required:
                                    - name
                                    - url
                                    - uuid
                                    - size
                                    - maxDownloadsPerOrder
                                media_type:
                                  type: string
                                dimension:
                                  type: object
                                  properties:
                                    unit:
                                      type: string
                                    length:
                                      type: integer
                                    width:
                                      type: integer
                                    height:
                                      type: integer
                                  required:
                                    - unit
                                    - length
                                    - width
                                    - height
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        type: string
                                      name:
                                        type: string
                                      id:
                                        type: string
                                    required:
                                      - label
                                      - name
                                      - id
                              required:
                                - _id
                                - price
                                - sale_price
                                - costPrice
                                - stock
                                - alwaysInStock
                                - isActive
                                - sku
                                - weight
                                - media
                                - digital_download
                                - media_type
                                - dimension
                                - options
                            originalPrice:
                              type: integer
                            finalPrice:
                              type: integer
                            subTotal:
                              type: integer
                            cartItemId:
                              type: string
                          required:
                            - _id
                            - tags
                            - stock
                            - digital
                            - media
                            - media_type
                            - name
                            - price
                            - shop
                            - sale_price
                            - __v
                            - draft
                            - alwaysInStock
                            - costPrice
                            - sku
                            - type
                            - slug
                            - dimension
                            - weight
                            - variantsInheritPrice
                            - setAttributesForVariants
                            - qty
                            - variant
                            - originalPrice
                            - finalPrice
                            - subTotal
                            - cartItemId
                      subTotal:
                        type: integer
                      total:
                        type: number
                      created:
                        type: string
                      _id:
                        type: string
                      discountsApplied:
                        type: array
                      discountAmount:
                        type: integer
                      shipping:
                        type: number
                      shippingRate:
                        type: object
                        properties:
                          id:
                            type: string
                          _id:
                            type: string
                          name:
                            type: string
                          media:
                            type: string
                          rateType:
                            type: string
                          amount:
                            type: number
                          serviceType:
                            type: string
                          currency:
                            type: string
                          estimatedDeliveryETA:
                            type: string
                          estimatedPickupETA:
                            type: string
                          estimatedDeliveryETADateTime:
                            type: string
                          estimatedPickupETADateTime:
                            type: string
                          description:
                            type: string
                          courier:
                            type: string
                          provider:
                            type: string
                          type:
                            type: string
                          platform:
                            type: string
                          ratings:
                            type: number
                          meta:
                            type: object
                            properties:
                              courier_id:
                                type: string
                              courier_name:
                                type: string
                              courier_image:
                                type: string
                              service_code:
                                type: string
                              insurance:
                                type: object
                                properties:
                                  code:
                                    type: string
                                  fee:
                                    type: integer
                                required:
                                  - code
                                  - fee
                              discount:
                                type: object
                                properties:
                                  percentage:
                                    type: integer
                                  symbol:
                                    type: string
                                  discounted:
                                    type: integer
                                required:
                                  - percentage
                                  - symbol
                                  - discounted
                              service_type:
                                type: string
                              waybill:
                                type: boolean
                              is_cod_available:
                                type: boolean
                              tracking_level:
                                type: integer
                              ratings:
                                type: number
                              votes:
                                type: integer
                              connected_account:
                                type: boolean
                              rate_card_amount:
                                type: number
                              pickup_eta:
                                type: string
                              pickup_eta_time:
                                type: string
                              dropoff_station:
                                type: 'null'
                              pickup_station:
                                type: 'null'
                              delivery_eta:
                                type: string
                              delivery_eta_time:
                                type: string
                              info:
                                type: array
                                items:
                                  type: string
                              currency:
                                type: string
                              vat:
                                type: integer
                              total:
                                type: number
                              tracking:
                                type: object
                                properties:
                                  bars:
                                    type: integer
                                  label:
                                    type: string
                                required:
                                  - bars
                                  - label
                              token:
                                type: string
                            required:
                              - courier_id
                              - courier_name
                              - courier_image
                              - service_code
                              - insurance
                              - discount
                              - service_type
                              - waybill
                              - is_cod_available
                              - tracking_level
                              - ratings
                              - votes
                              - connected_account
                              - rate_card_amount
                              - pickup_eta
                              - pickup_eta_time
                              - dropoff_station
                              - pickup_station
                              - delivery_eta
                              - delivery_eta_time
                              - info
                              - currency
                              - vat
                              - total
                              - tracking
                              - token
                          preferenceStatus:
                            type: string
                          actualAmount:
                            type: number
                          markup:
                            type: integer
                          markupMeta:
                            type: 'null'
                        required:
                          - id
                          - _id
                          - name
                          - media
                          - rateType
                          - amount
                          - serviceType
                          - currency
                          - estimatedDeliveryETA
                          - estimatedPickupETA
                          - estimatedDeliveryETADateTime
                          - estimatedPickupETADateTime
                          - description
                          - courier
                          - provider
                          - type
                          - platform
                          - ratings
                          - meta
                          - preferenceStatus
                          - actualAmount
                          - markup
                          - markupMeta
                      user:
                        type: 'null'
                      exclusiveDiscount:
                        type: boolean
                      order:
                        type: 'null'
                    required:
                      - entityId
                      - shop
                      - email
                      - items
                      - subTotal
                      - total
                      - created
                      - _id
                      - discountsApplied
                      - discountAmount
                      - shipping
                      - shippingRate
                      - user
                      - exclusiveDiscount
                      - order
                  success:
                    type: boolean
                required:
                  - msg
                  - data
                  - success
          description: ''

````