openapi: 3.0.3
info:
  title: 'Bound.re API Documentation'
  description: 'Bound.re API allows you to manage your products and location items, as well as perform geospatial searches.'
  version: 1.0.0
servers:
  -
    url: 'https://bound.re'
paths:
  /api/v1/products:
    get:
      summary: ''
      operationId: getApiV1Products
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - 'Product management'
    post:
      summary: ''
      operationId: postApiV1Products
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Product management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: kkcbgasgvc
                  nullable: false
                description:
                  type: string
                  description: 'Must not be greater than 1000 characters.'
                  example: 'Quisquam ea enim illo aperiam voluptas.'
                  nullable: false
                external_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: ewoatfstfd
                  nullable: false
                currency_code:
                  type: string
                  description: 'Must be 3 characters.'
                  example: vbu
                  nullable: false
                max_exposure_allowed:
                  type: number
                  description: ''
                  example: 2.9256408
                  nullable: false
                search_radius_unit:
                  type: string
                  description: ''
                  example: mi
                  nullable: false
                  enum:
                    - mi
                    - km
                search_radius_distance:
                  type: number
                  description: ''
                  example: 5.14208
                  nullable: false
              required:
                - title
                - external_id
                - currency_code
                - max_exposure_allowed
                - search_radius_unit
                - search_radius_distance
  '/api/v1/products/{id}':
    get:
      summary: ''
      operationId: getApiV1ProductsId
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - 'Product management'
    put:
      summary: ''
      operationId: putApiV1ProductsId
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Product management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: fiuamoq
                  nullable: false
                description:
                  type: string
                  description: 'Must not be greater than 1000 characters.'
                  example: 'Dolor fugit dolorum sit.'
                  nullable: false
                external_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: szleqtwtdolgjaiogt
                  nullable: false
                currency_code:
                  type: string
                  description: 'Must be 3 characters.'
                  example: bsq
                  nullable: false
                max_exposure_allowed:
                  type: number
                  description: ''
                  example: 457.36
                  nullable: false
                search_radius_unit:
                  type: string
                  description: ''
                  example: km
                  nullable: false
                  enum:
                    - mi
                    - km
                search_radius_distance:
                  type: number
                  description: ''
                  example: 1476.60115584
                  nullable: false
              required:
                - title
                - external_id
                - currency_code
                - max_exposure_allowed
                - search_radius_unit
                - search_radius_distance
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the product.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/v1/products/{product_id}/location-items':
    put:
      summary: "Search for location items within the product's exposure area."
      operationId: searchForLocationItemsWithinTheProductsExposureArea
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n    \"outcome\": \"added\" | \"not_added\",\n    \"search_radius_unit\": \"km\" | \"mi\",\n    \"search_radius_distance\": 100,\n    \"max_exposure_allowed\": 1000000,\n    \"max_exposure_from_date\": \"2024-05-01\",\n    \"max_exposure_to_date\": \"2024-10-20\",\n    \"max_exposure_amount_including_item\": 754300,\n    \"max_exposure_amount_excluding_item\": 704300,\n    \"total_exposure_amount_currency\": \"GBP\"\n}"
      tags:
        - 'Upsert location item'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                external_id:
                  type: string
                  description: ''
                  example: quasi
                  nullable: false
                cover_status:
                  type: string
                  description: ''
                  example: quotation
                  nullable: false
                  enum:
                    - quotation
                    - on_cover
                    - cancelled
                coverage_amount:
                  type: number
                  description: 'Must be between 0 and 9999999999999.99.'
                  example: 0
                  nullable: false
                cover_start_date:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d\TH:i:sP</code>.'
                  example: '2025-02-28T13:59:12+00:00'
                  nullable: false
                cover_end_date:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d\TH:i:sP</code>. Must be a date after <code>cover_start_date</code>.'
                  example: '2071-07-30'
                  nullable: false
                location:
                  type: object
                  description: ''
                  example: []
                  nullable: false
                  properties:
                    line1:
                      type: string
                      description: 'Must not be greater than 255 characters.'
                      example: cgbpzdnzbhi
                      nullable: false
                    line2:
                      type: string
                      description: 'Must not be greater than 255 characters.'
                      example: jdqwwtwfpueozxjblqyuydw
                      nullable: true
                    town:
                      type: string
                      description: 'Must not be greater than 255 characters.'
                      example: eydpxxncpswhenym
                      nullable: false
                    county:
                      type: string
                      description: 'Must not be greater than 255 characters.'
                      example: hmozd
                      nullable: true
                    country:
                      type: string
                      description: 'Must not be greater than 255 characters.'
                      example: unhc
                      nullable: false
                    postal_code:
                      type: string
                      description: 'Must not be greater than 255 characters.'
                      example: szqpyzsgvohj
                      nullable: false
                  required:
                    - line1
                    - town
                    - country
                    - postal_code
                max_exposure_allowed:
                  type: number
                  description: 'Must be between 0 and 9999999999999.99.'
                  example: 1
                  nullable: false
                search_radius_unit:
                  type: string
                  description: 'This field is required when <code>search_radius_distance</code> is present.'
                  example: km
                  nullable: false
                  enum:
                    - mi
                    - km
                search_radius_distance:
                  type: number
                  description: 'This field is required when <code>search_radius_unit</code> is present. Must be between 0 and 9999999999999.99.'
                  example: 0
                  nullable: false
              required:
                - external_id
                - cover_status
                - coverage_amount
                - cover_start_date
                - cover_end_date
                - location
    parameters:
      -
        in: path
        name: product_id
        description: 'The ID of the product.'
        example: 1
        required: true
        schema:
          type: integer
tags:
  -
    name: 'Product management'
    description: 'APIs for managing products'
  -
    name: 'Upsert location item'
    description: 'APIs for upserting location items'
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your token by visiting the <a target="_blank" href="/user/api-tokens">API Tokens page</a> in your account settings.'
security:
  -
    default: []
