Oumla Ltd contract-templates API

The contract-templates API from Oumla Ltd — 5 operation(s) for contract-templates.

OpenAPI Specification

oumla-ltd-contract-templates-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Oumla Core Server addresses contract-templates 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-templates
paths:
  /api/v1/contract-templates:
    get:
      description: List contract templates for the organization with pagination.
      operationId: getContracts
      parameters:
      - name: skip
        required: false
        in: query
        schema:
          default: 0
          example: 0
          type: number
      - name: take
        required: false
        in: query
        schema:
          default: 10
          example: 10
          type: number
      - $ref: '#/components/parameters/SdkVersionHeader'
      responses:
        '200':
          description: Contract templates (paginated)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetContractsResponseDto'
        '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. |

            | ERR-022 | Invalid pagination parameters. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_010
                    - ERR_022
                    description: 'One of: ERR-010: The request could not be processed.; ERR-022: Invalid pagination parameters.'
                  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
        '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-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_999
                    description: 'One of: ERR-019: Something went wrong on our side.; 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: List contract templates
      tags:
      - contract-templates
    post:
      description: Create a new contract template (ABI, bytecode, metadata).
      operationId: createContract
      parameters:
      - $ref: '#/components/parameters/SdkVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContractRequestBodyDTO'
      responses:
        '200':
          description: Contract template created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateContractResponseDto'
        '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. |

            | ERR-300 | Invalid input provided. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_010
                    - ERR_300
                    description: 'One of: ERR-010: The request could not be processed.; ERR-300: Invalid input provided.'
                  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
        '409':
          description: 'Conflict – resource already exists or state conflict.


            **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-501 | Resource conflict |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_501
                    description: 'One of: ERR-501: Resource conflict'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_501
                  message: Resource conflict
                  category: CONFLICT
                  statusCode: 409
                  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-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_999
                    description: 'One of: ERR-019: Something went wrong on our side.; 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: Create contract template
      tags:
      - contract-templates
  /api/v1/contract-templates/{templateId}:
    get:
      description: Get a contract template by its ID.
      operationId: getContractById
      parameters:
      - name: templateId
        required: true
        in: path
        description: Contract template ID
        schema:
          type: string
      - $ref: '#/components/parameters/SdkVersionHeader'
      responses:
        '200':
          description: Contract template by ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetContractByIdResponseDto'
        '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-066 | Contract not found. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_066
                    description: 'One of: ERR-066: Contract not found.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_066
                  message: Contract 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-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_999
                    description: 'One of: ERR-019: Something went wrong on our side.; 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 contract template by ID
      tags:
      - contract-templates
    delete:
      description: Delete a contract template by ID.
      operationId: deleteContract
      parameters:
      - name: templateId
        required: true
        in: path
        description: Contract template ID
        schema:
          type: string
      - $ref: '#/components/parameters/SdkVersionHeader'
      responses:
        '200':
          description: Contract template deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteContractResponseDto'
        '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-066 | Contract not found. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_066
                    description: 'One of: ERR-066: Contract not found.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_066
                  message: Contract 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-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_999
                    description: 'One of: ERR-019: Something went wrong on our side.; 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: Delete contract template
      tags:
      - contract-templates
  /api/v1/contract-templates/{templateId}/getConstructorInfo:
    get:
      description: Get constructor info (params, ABI) for a contract template.
      operationId: getContractConstructorById
      parameters:
      - name: templateId
        required: true
        in: path
        description: Contract template ID
        schema:
          type: string
      - $ref: '#/components/parameters/SdkVersionHeader'
      responses:
        '200':
          description: Contract constructor by template ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetContractConstructorResponseDto'
        '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-066 | Contract not found. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_066
                    description: 'One of: ERR-066: Contract not found.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_066
                  message: Contract 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-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_999
                    description: 'One of: ERR-019: Something went wrong on our side.; 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.
     

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