Spiko Distributor investor contracts API

The Distributor investor contracts API from Spiko — 4 operation(s) for distributor investor contracts.

OpenAPI Specification

spiko-distributor-investor-contracts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Spiko Distributor Account transactions Distributor investor contracts API
  version: v0
  description: The Distributor API allows third parties like SaaS providers, fintechs or Web3 companies to distribute the Spiko Funds to their customers. With this API, you can programmatically manage investors, send subscription and redemption orders, and access real-time portfolio information.
servers:
- url: https://distributor-api.spiko.io
  description: Production Server
- url: https://distributor-api.preprod.spiko.io
  description: Pre-production Server
security: []
tags:
- name: Distributor investor contracts
paths:
  /v0/distributor-investor-contracts/{id}:
    get:
      tags:
      - Distributor investor contracts
      operationId: distributorInvestorContracts.getDistributorInvestorContract
      parameters:
      - name: id
        in: path
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - distributorId
                - investorId
                - shareClassId
                - annualFee
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  distributorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  investorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  shareClassId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  annualFee:
                    type: string
                    title: annual fee
                    description: annual fee paid by the investor to the distributor, expressed as a yearly rate (e.g. "0.0025" for 0.25%)
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Unauthorized'
                - $ref: '#/components/schemas/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
      description: Retrieve information about a distributor investor contract (investor, share class, annual fee).
      summary: Get distributor investor contract
  /v0/distributor-investor-contracts/investor:
    get:
      tags:
      - Distributor investor contracts
      operationId: distributorInvestorContracts.getDistributorInvestorContractOfInvestorAndShareClass
      parameters:
      - name: investorId
        in: query
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      - name: shareClassId
        in: query
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - distributorId
                - investorId
                - shareClassId
                - annualFee
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  distributorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  investorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  shareClassId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  annualFee:
                    type: string
                    title: annual fee
                    description: annual fee paid by the investor to the distributor, expressed as a yearly rate (e.g. "0.0025" for 0.25%)
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Unauthorized'
                - $ref: '#/components/schemas/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
      description: Get a distributor investor contract informations of the given investor.
      summary: Get distributor investor contract of investor
  /v0/distributor-investor-contracts:
    post:
      tags:
      - Distributor investor contracts
      operationId: distributorInvestorContracts.createDistributorInvestorContract
      parameters: []
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - distributorId
                - investorId
                - shareClassId
                - annualFee
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  distributorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  investorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  shareClassId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  annualFee:
                    type: string
                    title: annual fee
                    description: annual fee paid by the investor to the distributor, expressed as a yearly rate (e.g. "0.0025" for 0.25%)
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Unauthorized'
                - $ref: '#/components/schemas/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
        '405':
          description: MethodNotAllowed
      description: Create a new contract that defines the annual fee paid by the investor to the distributor for a share class.
      summary: Create a contract
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - investorId
              - shareClassId
              - annualFee
              properties:
                investorId:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
                shareClassId:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
                annualFee:
                  type: string
                  title: annual fee
                  description: annual fee paid by the investor to the distributor, expressed as a yearly rate (e.g. "0.0025" for 0.25%)
              additionalProperties: false
        required: true
    put:
      tags:
      - Distributor investor contracts
      operationId: distributorInvestorContracts.updateDistributorInvestorContractFee
      parameters: []
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - distributorId
                - investorId
                - shareClassId
                - annualFee
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  distributorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  investorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  shareClassId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  annualFee:
                    type: string
                    title: annual fee
                    description: annual fee paid by the investor to the distributor, expressed as a yearly rate (e.g. "0.0025" for 0.25%)
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Unauthorized'
                - $ref: '#/components/schemas/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
      description: Update the annual fee of an existing distributor investor contract.
      summary: Update a distributor investor contract
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              - annualFee
              properties:
                id:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
                annualFee:
                  type: string
                  title: annual fee
                  description: annual fee paid by the investor to the distributor, expressed as a yearly rate (e.g. "0.0025" for 0.25%)
              additionalProperties: false
        required: true
  /v0/distributor-investor-contracts/{distributorInvestorContractId}/paid-fees:
    get:
      tags:
      - Distributor investor contracts
      operationId: distributorInvestorContracts.getPaidFees
      parameters:
      - name: distributorInvestorContractId
        in: path
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      - name: from
        in: query
        schema:
          type: string
          title: Day
          description: a day formatted as "yyyy-MM-dd"
        required: false
        description: a day formatted as "yyyy-MM-dd"
      - name: to
        in: query
        schema:
          type: string
          title: Day
          description: a day formatted as "yyyy-MM-dd"
        required: false
        description: a day formatted as "yyyy-MM-dd"
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                  - distributorInvestorContractId
                  - day
                  - paidFee
                  - paidFeeInShares
                  properties:
                    distributorInvestorContractId:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    day:
                      type: string
                      title: Day
                      description: a day formatted as "yyyy-MM-dd"
                    paidFee:
                      $ref: '#/components/schemas/NonNegativeAmount'
                    paidFeeInShares:
                      type: string
                      title: non-negative decimal number as a string
                      description: a string representation of a non-negative decimal number e.g. "10000", "0.00" or "3420.92"
                  additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Unauthorized'
                - $ref: '#/components/schemas/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
      description: "\n**Retrieve the fees paid for the given distributor investor contract.**\n\n- Returns an array of paid fees both in amount and in number of shares, sorted by day.\n- `from` and `to` query parameters are optional and used to filter the results by day range.\n          "
      summary: Get the fees paid for the given distributor investor contract
components:
  schemas:
    ForbiddenError:
      type: object
      required:
      - reason
      - _tag
      properties:
        reason:
          type: string
        customErrorCode:
          type: string
          enum:
          - AccountDoesNotBelongToInvestor
          - SessionIsNot2FA
          - InvestorDocumentLinkedToActiveBankAccount
          - AtLeastTwoAdminUsersRequired
          - InvestorNotPendingOnboarding
          - ShareClassNotAvailableForDistributor
        _tag:
          type: string
          enum:
          - ForbiddenError
      additionalProperties: false
      description: Forbidden
    Issue:
      type: object
      required:
      - _tag
      - path
      - message
      properties:
        _tag:
          type: string
          enum:
          - Pointer
          - Unexpected
          - Missing
          - Composite
          - Refinement
          - Transformation
          - Type
          - Forbidden
          description: The tag identifying the type of parse issue
        path:
          type: array
          items:
            $ref: '#/components/schemas/PropertyKey'
          description: The path to the property where the issue occurred
        message:
          type: string
          description: A descriptive message explaining the issue
      additionalProperties: false
      description: Represents an error encountered while parsing a value to match the schema
    HttpApiDecodeError:
      type: object
      required:
      - issues
      - message
      - _tag
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/Issue'
        message:
          type: string
        _tag:
          type: string
          enum:
          - HttpApiDecodeError
      additionalProperties: false
      description: The request did not match the expected schema
    DistributorAuthenticationError:
      type: object
      required:
      - reason
      - _tag
      properties:
        reason:
          type: string
        _tag:
          type: string
          enum:
          - DistributorAuthenticationError
      additionalProperties: false
      description: Authentication Error
    NonNegativeAmount:
      type: object
      required:
      - value
      - currency
      properties:
        value:
          type: string
          title: non-negative decimal number as a string
          description: a string representation of a non-negative decimal number e.g. "10000", "0.00" or "3420.92"
        currency:
          type: string
          enum:
          - EUR
          - USD
          - GBP
          - CHF
          - JPY
          - SGD
          title: Currency code
          identifier: CurrencyCode
          description: a currency code among "EUR", "USD", "GBP", "CHF", "JPY", "SGD"
      additionalProperties: false
      title: Non-Negative Amount
    Unauthorized:
      $id: /schemas/void
      title: Unauthorized
    PropertyKey:
      anyOf:
      - type: string
      - type: number
      - type: object
        required:
        - _tag
        - key
        properties:
          _tag:
            type: string
            enum:
            - symbol
          key:
            type: string
        additionalProperties: false
        description: an object to be decoded into a globally shared symbol
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use your API client_id as username and client_secret as password.