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

# Apply for open cover

> Applies for a marine open cover: a one-year policy that the business declares its shipments under, instead of insuring each on its own. The application describes the goods it ships, the routes, the value it expects to ship in the year and the most any one shipment will be worth.

The answer is always `201`; read its `status`, which works as it does for a single shipment. When it is `approved`, `quote` holds the terms: the rate every declared shipment is charged at (`declaration_rate_percent`) and the deposit paid up front to start the policy (`total_price`, VAT included).



## OpenAPI

````yaml /cargo-api-reference/openapi.json post /open-cover-applications
openapi: 3.0.1
info:
  title: OpenAPI For Cargo Insurance
  description: >-
    APIs to insure a single shipment or run a marine open cover for your
    customers
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://sandbox.yasmina.ai/api/v1/cargo
security:
  - bearerAuth: []
paths:
  /open-cover-applications:
    post:
      tags:
        - Open cover
      summary: Apply for open cover
      description: >-
        Applies for a marine open cover: a one-year policy that the business
        declares its shipments under, instead of insuring each on its own. The
        application describes the goods it ships, the routes, the value it
        expects to ship in the year and the most any one shipment will be worth.


        The answer is always `201`; read its `status`, which works as it does
        for a single shipment. When it is `approved`, `quote` holds the terms:
        the rate every declared shipment is charged at
        (`declaration_rate_percent`) and the deposit paid up front to start the
        policy (`total_price`, VAT included).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: integer
                  description: A customer you registered.
                policy_period:
                  type: object
                  properties:
                    start_date:
                      type: string
                      description: >-
                        The first day of cover, today or later. The policy runs
                        for one year from this day.
                      format: date
                  required:
                    - start_date
                goods:
                  type: array
                  description: The kinds of goods the business ships.
                  minItems: 1
                  items:
                    type: object
                    properties:
                      description:
                        type: string
                        description: What the goods are, in plain words.
                        maxLength: 500
                      category:
                        type: string
                        description: >-
                          The kind of goods. One of the `goods_categories`
                          values from Get the options.
                      packaging:
                        type: string
                        description: >-
                          How the goods are packed. One of the `packaging`
                          values from Get the options.
                      characteristics:
                        type: array
                        description: >-
                          Anything about the goods that changes the risk. Each
                          one of the `characteristics` values from Get the
                          options.
                        items:
                          type: string
                    required:
                      - description
                      - category
                      - packaging
                estimated_annual_value:
                  type: object
                  properties:
                    import:
                      type: number
                    export:
                      type: number
                    domestic:
                      type: number
                  description: >-
                    The value the business expects to ship in the year, in
                    `currency`. At least one of the three must be above zero.
                currency:
                  type: string
                  description: >-
                    The currency of the values in the application. One of the
                    `currencies` values from Get the options.
                routes:
                  type: array
                  description: The routes the business ships on.
                  minItems: 1
                  items:
                    type: object
                    properties:
                      origin_country:
                        type: string
                        example: CN
                      destination_country:
                        type: string
                        example: SA
                      transport_mode:
                        type: string
                        description: >-
                          How the goods travel on this route. One of the
                          `transport_modes` values from Get the options.
                    required:
                      - origin_country
                      - destination_country
                      - transport_mode
                storage_locations:
                  type: array
                  description: Where goods are stored along the way.
                  items:
                    type: object
                    properties:
                      country:
                        type: string
                      city:
                        type: string
                      description:
                        type: string
                    required:
                      - country
                max_value_per_shipment:
                  type: number
                  description: >-
                    The most any one shipment will be worth, in `currency`. A
                    declared shipment above it is referred.
                coverage:
                  type: string
                  description: >-
                    The cover wanted. One of the `coverages` values from Get the
                    options.
                extensions:
                  type: array
                  description: >-
                    Extra cover on top. Each one of the `extensions` values from
                    Get the options.
                  items:
                    type: string
                valuation_basis:
                  type: string
                  description: >-
                    How the shipment is valued. Defaults to `cif_plus_10`. One
                    of the `valuation_bases` values from Get the options.
                insurance_history:
                  type: object
                  properties:
                    first_policy:
                      type: boolean
                      description: '`true` when the business has never held cargo insurance.'
                    previous_insurer:
                      type: string
                      description: Required when `first_policy` is `false`.
                    claims:
                      type: array
                      items:
                        type: object
                        properties:
                          year:
                            type: integer
                          amount:
                            type: number
                          description:
                            type: string
                        required:
                          - year
                          - amount
                  required:
                    - first_policy
              required:
                - customer_id
                - policy_period
                - goods
                - estimated_annual_value
                - currency
                - routes
                - max_value_per_shipment
                - coverage
                - insurance_history
            example:
              customer_id: 2
              policy_period:
                start_date: '2026-12-03'
              estimated_annual_value:
                import: 12000000
              currency: SAR
              max_value_per_shipment: 1500000
              coverage: icc_a
              insurance_history:
                first_policy: true
              goods:
                - description: Consumer electronics
                  category: electronics
                  packaging: cartons
                  characteristics:
                    - fragile
              routes:
                - origin_country: CN
                  destination_country: SA
                  transport_mode: sea
              extensions:
                - war
      responses:
        '201':
          description: The application, with its decision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenCoverApplication'
              example:
                id: a34af109-af12-46b9-bef6-ecb2e9137510
                type: open_cover
                status: approved
                customer_id: 2
                application:
                  policy_period:
                    start_date: '2026-12-03'
                  estimated_annual_value:
                    import: 12000000
                    export: 0
                    domestic: 0
                  currency: SAR
                  max_value_per_shipment: 1500000
                  coverage: icc_a
                  insurance_history:
                    first_policy: true
                  goods:
                    - description: Consumer electronics
                      category: electronics
                      packaging: cartons
                      characteristics:
                        - fragile
                  routes:
                    - origin_country: CN
                      destination_country: SA
                      transport_mode: sea
                  extensions:
                    - war
                quote:
                  insurance_provider: walaa
                  insurance_provider_name: Walaa Cooperative Insurance
                  coverage: icc_a
                  extensions:
                    - war
                  valuation_basis: cif_plus_10
                  cover_start: '2026-12-03'
                  cover_end: '2027-12-02'
                  estimated_annual_value_sar: 12000000
                  max_value_per_shipment: 1500000
                  currency: SAR
                  max_value_per_shipment_sar: 1500000
                  declaration_rate_percent: 0.425
                  estimated_annual_premium: 51000
                  deposit_premium: 12750
                  premium: 12750
                  vat: 1912.5
                  total_price: 14662.5
                  price_currency: SAR
                  valid_until: '2026-12-23'
                reasons: []
                policy_id: null
                decided_at: '2026-11-23T08:31:08.000000Z'
                created_at: '2026-11-23T08:31:08.000000Z'
                updated_at: '2026-11-23T08:31:08.000000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
components:
  schemas:
    OpenCoverApplication:
      type: object
      properties:
        id:
          type: string
          description: The request's id.
          format: uuid
        type:
          type: string
          enum:
            - single_shipment
            - open_cover
        status:
          type: string
          description: >-
            `approved`: `quote` holds the price and a policy can be issued.
            `referred`: an underwriter is reviewing it; read the request again
            until the status changes. `rejected`: it cannot be insured.
          enum:
            - approved
            - referred
            - rejected
        customer_id:
          type: integer
        application:
          type: object
          properties:
            policy_period:
              type: object
              properties:
                start_date:
                  type: string
                  description: >-
                    The first day of cover, today or later. The policy runs for
                    one year from this day.
                  format: date
              required:
                - start_date
            goods:
              type: array
              description: The kinds of goods the business ships.
              minItems: 1
              items:
                type: object
                properties:
                  description:
                    type: string
                    description: What the goods are, in plain words.
                    maxLength: 500
                  category:
                    type: string
                    description: >-
                      The kind of goods. One of the `goods_categories` values
                      from Get the options.
                  packaging:
                    type: string
                    description: >-
                      How the goods are packed. One of the `packaging` values
                      from Get the options.
                  characteristics:
                    type: array
                    description: >-
                      Anything about the goods that changes the risk. Each one
                      of the `characteristics` values from Get the options.
                    items:
                      type: string
                required:
                  - description
                  - category
                  - packaging
            estimated_annual_value:
              type: object
              properties:
                import:
                  type: number
                export:
                  type: number
                domestic:
                  type: number
              description: >-
                The value the business expects to ship in the year, in
                `currency`. At least one of the three must be above zero.
            currency:
              type: string
              description: >-
                The currency of the values in the application. One of the
                `currencies` values from Get the options.
            routes:
              type: array
              description: The routes the business ships on.
              minItems: 1
              items:
                type: object
                properties:
                  origin_country:
                    type: string
                    example: CN
                  destination_country:
                    type: string
                    example: SA
                  transport_mode:
                    type: string
                    description: >-
                      How the goods travel on this route. One of the
                      `transport_modes` values from Get the options.
                required:
                  - origin_country
                  - destination_country
                  - transport_mode
            storage_locations:
              type: array
              description: Where goods are stored along the way.
              items:
                type: object
                properties:
                  country:
                    type: string
                  city:
                    type: string
                  description:
                    type: string
                required:
                  - country
            max_value_per_shipment:
              type: number
              description: >-
                The most any one shipment will be worth, in `currency`. A
                declared shipment above it is referred.
            coverage:
              type: string
              description: >-
                The cover wanted. One of the `coverages` values from Get the
                options.
            extensions:
              type: array
              description: >-
                Extra cover on top. Each one of the `extensions` values from Get
                the options.
              items:
                type: string
            valuation_basis:
              type: string
              description: >-
                How the shipment is valued. Defaults to `cif_plus_10`. One of
                the `valuation_bases` values from Get the options.
            insurance_history:
              type: object
              properties:
                first_policy:
                  type: boolean
                  description: '`true` when the business has never held cargo insurance.'
                previous_insurer:
                  type: string
                  description: Required when `first_policy` is `false`.
                claims:
                  type: array
                  items:
                    type: object
                    properties:
                      year:
                        type: integer
                      amount:
                        type: number
                      description:
                        type: string
                    required:
                      - year
                      - amount
              required:
                - first_policy
        quote:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/OpenCoverQuote'
        reasons:
          type: array
          description: >-
            Why the request was referred or rejected, in plain sentences. Stays
            on a referral after it is approved.
          items:
            type: string
        policy_id:
          type: integer
          description: The policy issued from this request, once there is one.
          nullable: true
        decided_at:
          type: string
          description: >-
            When the request was approved or rejected. `null` while it is
            referred.
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    OpenCoverQuote:
      type: object
      properties:
        insurance_provider:
          type: string
          description: The insurance company behind the quote.
          example: walaa
        insurance_provider_name:
          type: string
          example: Walaa Cooperative Insurance
        coverage:
          type: string
        extensions:
          type: array
          items:
            type: string
        valuation_basis:
          type: string
        cover_start:
          type: string
          format: date
        cover_end:
          type: string
          format: date
        estimated_annual_value_sar:
          type: number
        max_value_per_shipment:
          type: number
        currency:
          type: string
        max_value_per_shipment_sar:
          type: number
        declaration_rate_percent:
          type: number
          description: >-
            The rate every declared shipment is charged at, as a percentage of
            its insured amount.
        estimated_annual_premium:
          type: number
          description: The premium the estimated annual value would come to, in SAR.
        deposit_premium:
          type: number
          description: >-
            The part of the annual premium paid up front to start the policy, in
            SAR.
        premium:
          type: number
          description: The premium before VAT, in SAR.
        vat:
          type: number
          description: 15% VAT, in SAR.
        total_price:
          type: number
          description: What is paid, in SAR.
        price_currency:
          type: string
          example: SAR
        valid_until:
          type: string
          format: date
      description: >-
        The terms of the open cover. `premium`, `vat` and `total_price` are the
        deposit paid to start the policy. `null` unless the application is
        approved.
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          description: >-
            On `42201`, the messages for each field that failed, keyed by the
            field's path.
        missing_fields:
          type: array
          description: On `40033`, the shipment details still needed.
          items:
            type: string
        policy_id:
          type: integer
          description: On `40026`, the policy the quote was already issued as.
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: '40101'
            message: Unauthenticated
    UnprocessableEntity:
      description: A field is missing or not valid. `details` names each one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: '42201'
            message: >-
              The shipment.goods.description field cannot be empty. (and 1 more
              error)
            details:
              shipment.goods.description:
                - The shipment.goods.description field cannot be empty.
              shipment.goods.category:
                - The selected shipment.goods.category is invalid.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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