Oumla Ltd contract-interactions API

The contract-interactions API from Oumla Ltd — 4 operation(s) for contract-interactions.

OpenAPI Specification

oumla-ltd-contract-interactions-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Oumla Core Server addresses contract-interactions API
  description: 'Core API. Errors, request and response are documented per endpoint. Error response shape: code, category, message, statusCode, path, timestamp, requestId.'
  version: '1.0'
  contact: {}
servers:
- url: https://sandbox.oumla.com
  description: Mainnet
  x-fern-server-name: Mainnet
tags:
- name: contract-interactions
paths:
  /api/v1/contract-interactions/network/{networkId}/contract-address/{contractAddress}/functions:
    get:
      description: Get ABI and callable functions for a deployed contract.
      operationId: getDeployedContractAbi
      parameters:
      - name: networkId
        required: true
        in: path
        description: Network Id
        schema:
          type: string
      - name: contractAddress
        required: true
        in: path
        description: Contract address
        schema:
          type: string
      - $ref: '#/components/parameters/SdkVersionHeader'
      responses:
        '200':
          description: Deployed contract ABI / functions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDeployedContractAbiResponseDto'
        '401':
          description: 'Unauthorized – invalid or missing token.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-008 | You need to sign in to continue. |

            | ERR-011 | Your session is invalid or expired. Please sign in again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_008
                    - ERR_011
                    description: 'One of: ERR-008: You need to sign in to continue.; ERR-011: Your session is invalid or expired. Please sign in again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_008
                  message: You need to sign in to continue.
                  category: AUTHORIZATION
                  statusCode: 401
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '403':
          description: 'Forbidden – insufficient permissions.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-009 | You don''t have permission to do that. |

            | ERR-410 | Error occurred |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_009
                    - ERR_410
                    description: 'One of: ERR-009: You don''t have permission to do that.; ERR-410: Error occurred'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_009
                  message: You don't have permission to do that.
                  category: AUTHORIZATION
                  statusCode: 403
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '404':
          description: 'Resource not found.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-006 | The requested resource was not found. |

            | ERR-066 | Contract not found. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_006
                    - ERR_066
                    description: 'One of: ERR-006: The requested resource was not found.; ERR-066: Contract not found.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_006
                  message: The requested resource was not found.
                  category: RESOURCE
                  statusCode: 404
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '500':
          description: 'Internal server error.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-019 | Something went wrong on our side. |

            | ERR-204 | External service is currently unavailable. |

            | ERR-999 | An unexpected error occurred. Please try again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_019
                    - ERR_204
                    - ERR_999
                    description: 'One of: ERR-019: Something went wrong on our side.; ERR-204: External service is currently unavailable.; ERR-999: An unexpected error occurred. Please try again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_019
                  message: Something went wrong on our side.
                  category: SYSTEM
                  statusCode: 500
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
      security:
      - x-api-key: []
      summary: Get deployed contract ABI/functions
      tags:
      - contract-interactions
  /api/v1/contract-interactions/network/{networkId}/contract-address/{contractAddress}/functions/read:
    post:
      description: Execute a read-only contract call (no gas).
      operationId: readCallFunction
      parameters:
      - name: networkId
        required: true
        in: path
        description: Network Id
        schema:
          type: string
      - name: contractAddress
        required: true
        in: path
        description: Contract address
        schema:
          type: string
      - $ref: '#/components/parameters/SdkVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReadCallFunctionBody'
      responses:
        '200':
          description: Read call result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReadCallResultResponseDto'
        '400':
          description: 'Bad request or validation failed.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-010 | The request could not be processed. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_010
                    description: 'One of: ERR-010: The request could not be processed.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_010
                  message: The request could not be processed.
                  category: VALIDATION
                  statusCode: 400
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '401':
          description: 'Unauthorized – invalid or missing token.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-008 | You need to sign in to continue. |

            | ERR-011 | Your session is invalid or expired. Please sign in again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_008
                    - ERR_011
                    description: 'One of: ERR-008: You need to sign in to continue.; ERR-011: Your session is invalid or expired. Please sign in again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_008
                  message: You need to sign in to continue.
                  category: AUTHORIZATION
                  statusCode: 401
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '403':
          description: 'Forbidden – insufficient permissions.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-009 | You don''t have permission to do that. |

            | ERR-410 | Error occurred |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_009
                    - ERR_410
                    description: 'One of: ERR-009: You don''t have permission to do that.; ERR-410: Error occurred'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_009
                  message: You don't have permission to do that.
                  category: AUTHORIZATION
                  statusCode: 403
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '404':
          description: 'Resource not found.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-006 | The requested resource was not found. |

            | ERR-066 | Contract not found. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_006
                    - ERR_066
                    description: 'One of: ERR-006: The requested resource was not found.; ERR-066: Contract not found.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_006
                  message: The requested resource was not found.
                  category: RESOURCE
                  statusCode: 404
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '500':
          description: 'Internal server error.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-019 | Something went wrong on our side. |

            | ERR-204 | External service is currently unavailable. |

            | ERR-999 | An unexpected error occurred. Please try again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_019
                    - ERR_204
                    - ERR_999
                    description: 'One of: ERR-019: Something went wrong on our side.; ERR-204: External service is currently unavailable.; ERR-999: An unexpected error occurred. Please try again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_019
                  message: Something went wrong on our side.
                  category: SYSTEM
                  statusCode: 500
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
      security:
      - x-api-key: []
      summary: Call read function
      tags:
      - contract-interactions
  /api/v1/contract-interactions/network/{networkId}/contract-address/{contractAddress}/functions/write:
    post:
      description: Start a write/send transaction workflow. Requires interact contract policy.
      operationId: writeCallFunction
      parameters:
      - name: networkId
        required: true
        in: path
        description: Network Id
        schema:
          type: string
      - name: contractAddress
        required: true
        in: path
        description: Contract address
        schema:
          type: string
      - $ref: '#/components/parameters/SdkVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WriteCallFunctionBody'
      responses:
        '200':
          description: Write call started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteCallResultResponseDto'
        '400':
          description: 'Bad request or validation failed.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-010 | The request could not be processed. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_010
                    description: 'One of: ERR-010: The request could not be processed.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_010
                  message: The request could not be processed.
                  category: VALIDATION
                  statusCode: 400
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '401':
          description: 'Unauthorized – invalid or missing token.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-008 | You need to sign in to continue. |

            | ERR-011 | Your session is invalid or expired. Please sign in again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_008
                    - ERR_011
                    description: 'One of: ERR-008: You need to sign in to continue.; ERR-011: Your session is invalid or expired. Please sign in again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_008
                  message: You need to sign in to continue.
                  category: AUTHORIZATION
                  statusCode: 401
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '403':
          description: 'Forbidden – insufficient permissions.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-009 | You don''t have permission to do that. |

            | ERR-410 | Error occurred |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_009
                    - ERR_410
                    description: 'One of: ERR-009: You don''t have permission to do that.; ERR-410: Error occurred'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_009
                  message: You don't have permission to do that.
                  category: AUTHORIZATION
                  statusCode: 403
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '404':
          description: 'Resource not found.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-006 | The requested resource was not found. |

            | ERR-066 | Contract not found. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_006
                    - ERR_066
                    description: 'One of: ERR-006: The requested resource was not found.; ERR-066: Contract not found.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_006
                  message: The requested resource was not found.
                  category: RESOURCE
                  statusCode: 404
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '500':
          description: 'Internal server error.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-019 | Something went wrong on our side. |

            | ERR-036 | Failed to send transaction. |

            | ERR-999 | An unexpected error occurred. Please try again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_019
                    - ERR_036
                    - ERR_999
                    description: 'One of: ERR-019: Something went wrong on our side.; ERR-036: Failed to send transaction.; ERR-999: An unexpected error occurred. Please try again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_019
                  message: Something went wrong on our side.
                  category: SYSTEM
                  statusCode: 500
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
      security:
      - x-api-key: []
      summary: Call write function
      tags:
      - contract-interactions
  /api/v1/contract-interactions/network/{networkId}/tx/{txId}:
    get:
      description: Get the receipt for a contract write transaction.
      operationId: getTransactionReceipt
      parameters:
      - name: networkId
        required: true
        in: path
        description: Network Id
        schema:
          type: string
      - name: txId
        required: true
        in: path
        description: Transaction ID
        schema:
          example: '0x5f8c2a1e3d9b4e1c7f8a0c6e4d9a2b1c3f6e7a9b8d4e5c1a2b3c4d5e6f7a'
          type: string
      - $ref: '#/components/parameters/SdkVersionHeader'
      responses:
        '200':
          description: Transaction receipt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTransactionReceiptResponseDto'
        '401':
          description: 'Unauthorized – invalid or missing token.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-008 | You need to sign in to continue. |

            | ERR-011 | Your session is invalid or expired. Please sign in again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_008
                    - ERR_011
                    description: 'One of: ERR-008: You need to sign in to continue.; ERR-011: Your session is invalid or expired. Please sign in again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_008
                  message: You need to sign in to continue.
                  category: AUTHORIZATION
                  statusCode: 401
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '403':
          description: 'Forbidden – insufficient permissions.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-009 | You don''t have permission to do that. |

            | ERR-410 | Error occurred |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_009
                    - ERR_410
                    description: 'One of: ERR-009: You don''t have permission to do that.; ERR-410: Error occurred'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_009
                  message: You don't have permission to do that.
                  category: AUTHORIZATION
                  statusCode: 403
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '404':
          description: 'Resource not found.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-046 | Transaction receipt not found. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_046
                    description: 'One of: ERR-046: Transaction receipt not found.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_046
                  message: Transaction receipt not found.
                  category: RESOURCE
                  statusCode: 404
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '500':
          description: 'Internal server error.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-019 | Something went wrong on our side. |

            | ERR-046 | Transaction receipt not found. |

            | ERR-999 | An unexpected error occurred. Please try again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_019
                    - ERR_046
                    - ERR_999
                    description: 'One of: ERR-019: Something went wrong on our side.; ERR-046: Transaction receipt not found.; ERR-999: An unexpected error occurred. Please try again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_019
                  message: Something went wrong on our side.
                  category: SYSTEM
                  statusCode: 500
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
      security:
      - x-api-key: []
      summary: Get transaction receipt
      tags:
      - contract-interactions
components:
  schemas:
    ContractFunDto:
      type: object
      properties:
        name:
          type: string
        stateMutability:
          allOf:
          - $ref: '#/components/schemas/ContractTemplateFunctionVisibilityType'
        type:
          allOf:
          - $ref: '#/components/schemas/ContractTemplateFunctionType'
        inputs:
          type: array
          items:
            allOf:
            - $ref: '#/components/schemas/InputOutputDto'
        outputs:
          type: array
          items:
            allOf:
            - $ref: '#/components/schemas/InputOutputDto'
        description:
          type: string
        anonymous:
          type: boolean
      required:
      - type
      - inputs
    ReadCallResultDataDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ReadCallDataDto'
        success:
          type: boolean
        status:
          type: number
    WriteCallFunctionBody:
      type: object
      properties:
        addressId:
          type: string
        clientShare:
          type: string
        abiFunction:
          $ref: '#/components/schemas/ContractFunDto'
        amount:
          type: string
        feeLevel:
          type: string
          enum:
          - LOW
          - MEDIUM
          - HIGH
      required:
      - addressId
      - clientShare
      - abiFunction
    ApiErrorResponseDto:
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message for the client (see ErrorClientMessage per code)
          example: Organization not found.
        code:
          type: string
          enum:
          - ERR_000
          - ERR_001
          - ERR_002
          - ERR_003
          - ERR_006
          - ERR_008
          - ERR_009
          - ERR_010
          - ERR_011
          - ERR_012
          - ERR_013
          - ERR_014
          - ERR_015
          - ERR_016
          - ERR_017
          - ERR_018
          - ERR_019
          - ERR_020
          - ERR_021
          - ERR_022
          - ERR_888
          - ERR_999
          - ERR_023
          - ERR_026
          - ERR_036
          - ERR_046
          - ERR_056
          - ERR_066
          - ERR_068
          - ERR_067
          - ERR_076
          - ERR_086
          - ERR_096
          - ERR_106
          - ERR_116
          - ERR_126
          - ERR_136
          - ERR_146
          - ERR_147
          - ERR_156
          - ERR_166
          - ERR_176
          - ERR_186
          - ERR_196
          - ERR_200
          - ERR_201
          - ERR_202
          - ERR_203
          - ERR_204
          - ERR_205
          - ERR_206
          - ERR_207
          - ERR_208
         

# --- truncated at 32 KB (39 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/oumla-ltd/refs/heads/main/openapi/oumla-ltd-contract-interactions-api-openapi.yml