Spiko Investor Documents API

The Investor Documents API from Spiko — 2 operation(s) for investor documents.

OpenAPI Specification

spiko-investor-documents-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Spiko Distributor Account transactions Investor Documents 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: Investor Documents
paths:
  /v0/investor-documents:
    get:
      tags:
      - Investor Documents
      operationId: investorDocuments.getInvestorDocuments
      parameters:
      - name: investorId
        in: query
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      - name: documentTypes
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - proof-of-bank-account-ownership
            - certificate-of-incorporation
            - articles-of-association
            - certificate-of-good-standing
            - official-id
            - proof-of-address
            - proof-of-funds
            - extract-of-ubo-register
            - screening-report
            - power-of-attorney
            - other-document
            - unknown
            - imprime-fiscal-unique
            - cash&carry-suitability-assessment
            - cash&carry-appropriateness-assessment
            - regulatory-information
        required: false
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                  - id
                  - investorId
                  - documentType
                  - contentType
                  - s3FilePath
                  - originalFileName
                  - createdAt
                  - createdBy
                  - status
                  properties:
                    id:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    investorId:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    documentType:
                      type: string
                      enum:
                      - proof-of-bank-account-ownership
                      - certificate-of-incorporation
                      - articles-of-association
                      - certificate-of-good-standing
                      - official-id
                      - proof-of-address
                      - proof-of-funds
                      - extract-of-ubo-register
                      - screening-report
                      - power-of-attorney
                      - other-document
                      - unknown
                      - imprime-fiscal-unique
                      - cash&carry-suitability-assessment
                      - cash&carry-appropriateness-assessment
                      - regulatory-information
                    contentType:
                      type: string
                    s3FilePath:
                      type: string
                    originalFileName:
                      type: string
                    createdAt:
                      type: string
                      title: valid range date
                      description: A valid date within the range 2020-2100
                    createdBy:
                      anyOf:
                      - type: object
                        required:
                        - userId
                        - type
                        properties:
                          userId:
                            type: string
                            description: a Universally Unique Identifier
                            format: uuid
                          type:
                            type: string
                            enum:
                            - investor
                        additionalProperties: false
                      - type: object
                        required:
                        - userId
                        - type
                        properties:
                          userId:
                            type: string
                            description: a Universally Unique Identifier
                            format: uuid
                          type:
                            type: string
                            enum:
                            - user
                        additionalProperties: false
                      - type: object
                        required:
                        - userId
                        - type
                        properties:
                          userId:
                            type: string
                            description: a Universally Unique Identifier
                            format: uuid
                          type:
                            type: string
                            enum:
                            - admin
                        additionalProperties: false
                      - type: object
                        required:
                        - userId
                        - type
                        properties:
                          userId:
                            type: string
                            description: a Universally Unique Identifier
                            format: uuid
                          type:
                            type: string
                            enum:
                            - distributor-client
                        additionalProperties: false
                      - type: object
                        required:
                        - userId
                        - type
                        properties:
                          userId:
                            type: string
                            description: a Universally Unique Identifier
                            format: uuid
                          type:
                            type: string
                            enum:
                            - distributor-user
                        additionalProperties: false
                      - type: object
                        required:
                        - type
                        properties:
                          type:
                            type: string
                            enum:
                            - system
                        additionalProperties: false
                    rejectionReason:
                      type: string
                    status:
                      type: string
                      enum:
                      - pending
                      - pending_review
                      - active
                      - rejected
                      - archived
                  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 all documents for an investor.**\n\n- Returns a list of documents uploaded for the specified investor.\n- Only active (non-archived) documents are returned.\n- Optionally filter by `documentTypes` (e.g. [`official-id`, `proof-of-address`, `imprime-fiscal-unique`]).\n          "
      summary: Get investor documents
    post:
      tags:
      - Investor Documents
      operationId: investorDocuments.uploadInvestorDocument
      parameters: []
      security:
      - basicAuth: []
      responses:
        '200':
          description: a Universally Unique Identifier
          content:
            application/json:
              schema:
                type: string
                description: a Universally Unique Identifier
                format: uuid
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/HttpApiDecodeError'
                - $ref: '#/components/schemas/BadRequest'
                - $ref: '#/components/schemas/ApplicationError'
        '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**Upload document (official ID / proof of address / screening report etc.) related to an investor.**\n\n- Supported extensions are: pdf, jpg, png, doc, docx, xls, xlsx.\n- Returns the ID of the created investor document.\n        "
      summary: Upload investor document
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - investorId
              - type
              - file
              properties:
                investorId:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
                type:
                  $ref: '#/components/schemas/UploadableInvestorDocumentType'
                file:
                  type: array
                  items:
                    $ref: '#/components/schemas/PersistedFile'
                  description: an array of exactly 1 item(s)
                  title: itemsCount(1)
                  minItems: 1
                  maxItems: 1
              additionalProperties: false
        required: true
  /v0/investor-documents/{investorDocumentId}:
    get:
      tags:
      - Investor Documents
      operationId: investorDocuments.downloadInvestorDocument
      parameters:
      - name: investorDocumentId
        in: path
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      security:
      - basicAuth: []
      responses:
        '200':
          description: a string
          content:
            application/json:
              schema:
                type: string
        '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**Get a signed URL to download a specific investor document.**\n\n- Returns a pre-signed URL that can be used to download the document.\n- The URL is valid for a limited time.\n          "
      summary: Download investor document
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
    BadRequest:
      $id: /schemas/void
      title: BadRequest
    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
    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
    ApplicationError:
      type: object
      required:
      - reason
      - _tag
      properties:
        reason:
          type: string
        customErrorCode:
          type: string
          enum:
          - MissingNAV
          - NonBusinessDay
          - OrderInTheFuture
          - InitialDepositTooLow
          - InitialSubscriptionTooLow
          - SubsequentDepositTooLow
          - SubsequentSubscriptionTooLow
          - NewWalletSignatureNotProvided
          - NewWalletSignatureNotValid
          - CurrencyNotSupported
          - StablecoinNotSupported
          - AutopilotSynchronizedToBroken
          - IncomingBankTransferNotFound
          - IncomingBankTransferNotReceived
          - IncomingBankTransferAlreadyHandled
          - IncomingBankTransferAmountMismatch
        _tag:
          type: string
          enum:
          - ApplicationError
      additionalProperties: false
      description: Application Error
    PersistedFile:
      type: string
      format: binary
    DistributorAuthenticationError:
      type: object
      required:
      - reason
      - _tag
      properties:
        reason:
          type: string
        _tag:
          type: string
          enum:
          - DistributorAuthenticationError
      additionalProperties: false
      description: Authentication Error
    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
    UploadableInvestorDocumentType:
      type: string
      enum:
      - proof-of-bank-account-ownership
      - certificate-of-incorporation
      - articles-of-association
      - certificate-of-good-standing
      - official-id
      - proof-of-address
      - proof-of-funds
      - extract-of-ubo-register
      - screening-report
      - power-of-attorney
      - other-document
      - unknown
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use your API client_id as username and client_secret as password.