openapi: 3.0.1
info:
  title: MSD API
  version: 1.0.0
  x-product-id: DrillPlan-MSD-API
  description: |
    Provides access to MSD data reading/writing.  
    ```plain {% title="Client ID" %}
    fwk-drillplan.slbservice.com
    ```
tags:
  - name: Well V1
    description: >-
      Access MSD wells through service endpoints. This version will be retired
      by December 1, 2025. Use Well v2 moving forward.
  - name: Wellbore V1
    description: >-
      Access MSD wellbores through service endpoints. This version will be
      retired by December 1, 2025. Use Wellbore v2 moving forward.
  - name: Survey V1
    description: >-
      Access MSD surveys through service endpoints. This version will be retired
      by December 1, 2025. Use Survey v2 moving forward.
  - name: Structure V2
    description: Service endpoints to access MSD structures.
  - name: Well V2
    description: Service endpoints to access MSD wells.
  - name: Wellbore V2
    description: Service endpoints to access MSD wellbores.
  - name: Survey V2
    description: Service endpoints to access MSD surveys.
security:
  - bearer: []
    appkey: []
paths:
  /v1/countries:
    get:
      tags:
        - Well V1
      summary: Get countries
      description: Get countries to filter wells.
      parameters:
        - $ref: '#/components/parameters/dataPartitionHeader'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountryResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v1/fields:
    get:
      tags:
        - Well V1
      summary: Get fields
      description: Get fields to filter wells.
      parameters:
        - $ref: '#/components/parameters/dataPartitionHeader'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldsResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v1/surveys/by-wellbore/{wellboreId}:
    get:
      tags:
        - Survey V1
      summary: Get surveys by wellbore id
      description: Get surveys by wellbore id
      parameters:
        - $ref: '#/components/parameters/dataPartitionHeader'
        - name: wellboreId
          in: path
          description: The wellbore id
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SurveyResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v1/wellbores/by-well/{wellId}:
    get:
      tags:
        - Wellbore V1
      summary: Get wellbores by well id
      description: Get wellbores by well id
      parameters:
        - $ref: '#/components/parameters/dataPartitionHeader'
        - name: wellId
          in: path
          description: The well id
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WellboreResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v1/wells:
    parameters:
      - $ref: '#/components/parameters/dataPartitionHeader'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
    post:
      tags:
        - Well V1
      summary: Get wells
      description: Get wells
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WellRequestDto'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WellResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/countries:
    get:
      tags:
        - Well V2
      summary: Get countries
      description: Get countries to filter wells.
      parameters:
        - $ref: '#/components/parameters/dataPartitionHeader'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountryResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/fields:
    get:
      tags:
        - Well V2
      summary: Get fields
      description: Get fields to filter wells.
      parameters:
        - $ref: '#/components/parameters/dataPartitionHeader'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldsResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/wellbores:
    parameters:
      - $ref: '#/components/parameters/dataPartitionHeader'
    post:
      tags:
        - Wellbore V2
      summary: Create a new Wellbore
      description: Create a new Wellbore
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWellboreDtoV2'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWellboreResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/wellbores/by-well/{wellId}:
    get:
      tags:
        - Wellbore V2
      summary: Get wellbores by well id
      description: Get wellbores by well id
      parameters:
        - $ref: '#/components/parameters/dataPartitionHeader'
        - name: wellId
          in: path
          description: The well id
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WellboreResponseV2Dto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/surveys/by-wellbore/{wellboreId}:
    get:
      tags:
        - Survey V2
      summary: Get surveys by wellbore id
      description: Get surveys by wellbore id
      parameters:
        - $ref: '#/components/parameters/dataPartitionHeader'
        - name: wellboreId
          in: path
          description: The wellbore id
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SurveyResponseV2Dto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/surveys:
    parameters:
      - $ref: '#/components/parameters/dataPartitionHeader'
    post:
      tags:
        - Survey V2
      summary: Create a new Survey
      description: Create a new Survey
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSurveyDtoV2'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSurveyResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/wells/query:
    parameters:
      - $ref: '#/components/parameters/dataPartitionHeader'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
    post:
      tags:
        - Well V2
      summary: Get wells
      description: Get wells
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WellRequestDto'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WellResponseDtoV2'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/wells:
    parameters:
      - $ref: '#/components/parameters/dataPartitionHeader'
    post:
      tags:
        - Well V2
      summary: Create a new well
      description: Create a new well
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWellDtoV2'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWellResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/structures/{id}:
    get:
      tags:
        - Structure V2
      summary: Get structure by structure id
      description: Get structure by structure id
      parameters:
        - $ref: '#/components/parameters/dataPartitionHeader'
        - name: id
          in: path
          description: The structure id
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StructureResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
  /v2/structures:
    parameters:
      - $ref: '#/components/parameters/dataPartitionHeader'
    post:
      tags:
        - Structure V2
      summary: Create a new structure
      description: Create a new structure
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StructureCreateDto'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateStructureResponseDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
components:
  parameters:
    dataPartitionHeader:
      name: slb-data-partition-id
      in: header
      description: The data partition id.
      required: true
      schema:
        type: string
    Page:
      name: page
      in: query
      description: Page index starts from 1
      schema:
        type: integer
    PageSize:
      name: page_size
      in: query
      description: Number of wells per page
      schema:
        type: integer
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: User Token from SLB Authenticator Service
    appkey:
      type: apiKey
      name: appkey
      in: header
  schemas:
    SimpleResponse:
      type: object
      properties:
        message:
          type: string
    CountryResponseDto:
      type: array
      items:
        type: string
      example:
        - str1
        - str2
        - str3
      additionalProperties: false
    FieldsResponseDto:
      type: array
      items:
        type: string
      example:
        - str1
        - str2
        - str3
      additionalProperties: false
    WellboreResponseDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        well_id:
          type: string
        api:
          type: string
        ubhi:
          type: string
        business_system_id:
          type: string
    WellboreResponseV2Dto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        well_id:
          type: string
        api:
          type: string
        ubhi:
          type: string
        business_system_id:
          type: string
        parent_wellbore_id:
          type: string
        external_tag:
          type: string
    SurveyResponseDto:
      type: array
      items:
        $ref: '#/components/schemas/MSDSurveyDto'
    MSDSurveyDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        wellbore_id:
          type: string
        survey_type:
          type: string
          enum:
            - DefinitiveSurvey
            - NonDefinitiveSurvey
            - WorkingSurvey
            - DefinitivePlan
            - NonDefinitivePlan
        depth_reference:
          type: number
        stations:
          type: array
          items:
            $ref: '#/components/schemas/StationDto'
    StationDto:
      type: object
      properties:
        md:
          type: number
        incl:
          type: number
        azi:
          type: number
        tvd:
          type: number
        ns:
          type: number
        ew:
          type: number
        dls:
          type: number
        tool_code:
          type: string
        calc_method:
          type: string
          enum:
            - Min-Curvature
            - Inc-Only
    SurveyResponseV2Dto:
      type: array
      items:
        $ref: '#/components/schemas/MSDSurveyV2Dto'
    MSDSurveyV2Dto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        wellbore_id:
          type: string
        survey_type:
          type: string
          enum:
            - DefinitiveSurvey
            - NonDefinitiveSurvey
            - WorkingSurvey
            - DefinitivePlan
            - NonDefinitivePlan
        depth_reference:
          type: number
        stations:
          type: array
          items:
            $ref: '#/components/schemas/StationDto'
        survey_date:
          type: string
          format: date-time,
        external_tag:
          type: string
        geomag_settings:
          $ref: '#/components/schemas/GeomagSettingsDto'
        tie_in:
          $ref: '#/components/schemas/TieInDto'
        hole_section:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              end_md:
                type: number
              hole_size:
                type: number
              casing_size:
                type: number
    GeomagSettingsDto:
      type: object
      properties:
        declination_date:
          type: string
          format: date-time
        geomagnetic_model:
          type: string
        field_strength:
          type: number
        dip_angle:
          type: number
        declination:
          type: number
    TieInDto:
      type: object
      properties:
        tie_in_survey_id:
          type: string
        tie_in_md:
          type: number
    WellRequestDto:
      allOf:
        - type: object
          properties:
            field:
              type: string
              description: Field name.
            country:
              type: string
              description: Country name.
    WellResponseDto:
      type: array
      items:
        $ref: '#/components/schemas/WellDto'
    WellDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        structure_id:
          type: string
        structure:
          type: string
        ground_level:
          type: number
        is_offshore:
          type: boolean
        field:
          type: string
        country:
          type: string
        uwi:
          type: string
        source:
          type: string
        north_reference:
          type: string
          enum:
            - Grid
            - 'True'
        wgs84_location:
          $ref: '#/components/schemas/Wgs84Dto'
        location:
          $ref: '#/components/schemas/LocationDto'
    Wgs84Dto:
      type: object
      properties:
        longitude:
          type: number
        latitude:
          type: number
    LocationDto:
      type: object
      properties:
        northing:
          type: number
        easting:
          type: number
        crs:
          type: string
        grid_convergence:
          type: number
        scale_factor:
          type: number
        crs_unit:
          type: string
    WellResponseDtoV2:
      type: array
      items:
        $ref: '#/components/schemas/WellDtoV2'
    WellDtoV2:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        structure_id:
          type: string
        structure:
          type: string
        slot_id:
          type: string
        client_name:
          type: string
        ground_level:
          type: number
        wgs84_location:
          type: object
          properties:
            longitude:
              type: number
            latitude:
              type: number
        IsOffshore:
          type: boolean
        field:
          type: string
        country:
          type: string
        uwi:
          type: string
        source:
          type: string
        location:
          type: object
          properties:
            crs:
              type: string
            crs_unit:
              type: string
            coordinates_type:
              type: string
            northing:
              type: number
            easting:
              type: number
            latitude:
              type: number
            longitude:
              type: number
            grid_convergence:
              type: number
            scale_factor:
              type: number
            ns:
              type: number
            ew:
              type: number
            distance:
              type: number
            azimuth:
              type: number
        north_reference:
          type: string
          enum:
            - Grid
            - 'True'
        uncertainty:
          $ref: '#/components/schemas/Uncertainty'
        external_tag:
          type: string
    CreateWellDtoV2:
      type: object
      properties:
        name:
          type: string
        slot_id:
          type: string
        structure_id:
          type: string
        location:
          type: object
          properties:
            crs:
              type: string
            ns:
              type: number
            ew:
              type: number
            distance:
              type: number
            azimuth:
              type: number
            coordinates_type:
              type: string
            northing:
              type: number
            easting:
              type: number
            latitude:
              type: number
            longitude:
              type: number
        ground_level:
          type: number
        external_tag:
          type: string
        country:
          type: string
        client_name:
          type: string
        uwi:
          type: string
        uncertainty:
          $ref: '#/components/schemas/Uncertainty'
      required:
        - name
        - structure_id
        - location
        - ground_level
    CreateWellResponseDto:
      type: object
      properties:
        CreatedId:
          type: string
    CreateWellboreDtoV2:
      type: object
      properties:
        name:
          type: string
        well_id:
          type: string
        api:
          type: string
        ubhi:
          type: string
        parent_wellbore_id:
          type: string
        external_tag:
          type: string
      required:
        - name
        - well_id
    CreateWellboreResponseDto:
      type: object
      properties:
        CreatedId:
          type: string
    StructureResponseDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        is_offshore:
          type: boolean
        location:
          $ref: '#/components/schemas/GlobalLocationDto'
        wgs84_location:
          $ref: '#/components/schemas/Wgs84Dto'
        ground_level:
          type: number
        source:
          type: string
        external_tag:
          type: string
        field:
          type: string
        north_reference:
          type: string
          enum:
            - Grid
            - 'True'
        uncertainty:
          $ref: '#/components/schemas/Uncertainty'
        slot_set:
          type: array
          items:
            $ref: '#/components/schemas/SlotDto'
    GlobalLocationDto:
      type: object
      properties:
        coordinates_type:
          type: string
        latitude:
          type: number
        longitude:
          type: number
        crs:
          type: string
        crs_unit:
          type: string
        northing:
          type: number
        easting:
          type: number
        grid_convergence:
          type: number
        scale_factor:
          type: number
    Uncertainty:
      type: object
      properties:
        confidence:
          type: number
        radius:
          type: number
    SlotDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        wgs84_location:
          $ref: '#/components/schemas/Wgs84Dto'
        location:
          $ref: '#/components/schemas/ExtendMsdLocationDto'
        diameter:
          type: number
        external_tag:
          type: string
    ExtendMsdLocationDto:
      type: object
      properties:
        ns:
          type: number
        ew:
          type: number
        distance:
          type: number
        azimuth:
          type: number
        northing:
          type: number
        easting:
          type: number
        grid_convergence:
          type: number
        scale_factor:
          type: number
        coordinates_type:
          type: string
        latitude:
          type: number
        longitude:
          type: number
    StructureCreateDto:
      type: object
      properties:
        name:
          type: string
        is_offshore:
          type: boolean
        location:
          $ref: '#/components/schemas/InputGlobalLocationDto'
        ground_level:
          type: number
        field:
          type: string
        external_tag:
          type: string
        uncertainty:
          $ref: '#/components/schemas/Uncertainty'
        north_reference:
          type: string
          enum:
            - Grid
            - 'True'
        slot_set:
          type: array
          items:
            $ref: '#/components/schemas/InputSlotDto'
      required:
        - name
        - is_offshore
        - location
        - ground_level
        - field
        - north_reference
    InputGlobalLocationDto:
      type: object
      properties:
        coordinates_type:
          type: string
        northing:
          type: number
        easting:
          type: number
        latitude:
          type: number
        longitude:
          type: number
        crs:
          type: string
    InputSlotDto:
      type: object
      properties:
        name:
          type: string
        diameter:
          type: number
        external_tag:
          type: string
        location:
          type: object
          properties:
            ns:
              type: number
            ew:
              type: number
            distance:
              type: number
            azimuth:
              type: number
            coordinates_type:
              type: string
            northing:
              type: number
            easting:
              type: number
            latitude:
              type: number
            longitude:
              type: number
    CreateStructureResponseDto:
      type: object
      properties:
        CreatedId:
          type: string
    CreateSurveyDtoV2:
      type: object
      properties:
        name:
          type: string
        wellbore_id:
          type: string
        survey_type:
          type: string
          enum:
            - DefinitiveSurvey
            - NonDefinitiveSurvey
            - WorkingSurvey
        survey_date:
          type: string
          format: date-time,
        north_reference:
          type: string
          enum:
            - Grid
            - 'True'
        depth_reference:
          type: number
        stations:
          type: array
          items:
            $ref: '#/components/schemas/CreateSurveyInputStationDto'
        geomag_settings:
          $ref: '#/components/schemas/GeomagSettingsDto'
        external_tag:
          type: string
        tie_in:
          $ref: '#/components/schemas/TieInDto'
        hole_section:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              end_md:
                type: number
              hole_size:
                type: number
              casing_size:
                type: number
      required:
        - name
        - survey_date
        - survey_type
        - north_reference
        - depth_reference
        - stations
        - geomag_settings
    CreateSurveyInputStationDto:
      type: object
      properties:
        md:
          type: number
        incl:
          type: number
        azi:
          type: number
        tvd:
          type: number
        ns:
          type: number
        ew:
          type: number
        tool_code:
          type: string
    CreateSurveyResponseDto:
      type: object
      properties:
        CreatedId:
          type: string
servers:
  - url: https://eu-api.delfi.slb.com/drillplan/msd
    description: ProdEU
  - url: https://api.delfi.slb.com/drillplan/msd
    description: ProdUS
