openapi: 3.0.0
info:
  contact:
    email: dev@invopop.com
    name: Invopop Developers
  description: >-
    Store and manage GOBL documents along with their attachments in "Silo
    Entries".
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Silo Service API
  version: 1.0.0
servers:
  - description: production
    url: https://api.invopop.com
security:
  - authToken: []
paths:
  /silo/v1/entries:
    get:
      description: Fetch all the silo entries in the current company.
      parameters:
        - description: The folder in which to search for entries.
          in: query
          name: folder
          schema:
            description: The folder in which to search for entries.
            example: invoices
            title: Folder
            type: string
        - description: >-
            Starting date and time for retrieving results, formatted as an ISO
            timestamp. Treated as the upper bound when descending (the default)
            or the lower bound when ascending.
          in: query
          name: created_at
          schema:
            description: >-
              Starting date and time for retrieving results, formatted as an ISO
              timestamp. Treated as the upper bound when descending (the
              default) or the lower bound when ascending.
            example: '2023-08-02T00:00:00.000Z'
            title: Created At
            type: string
        - description: >-
            The position marker from the previous result's next_cursor property,
            used for pagination. Must be used with the same ascending value as
            the call that produced it.
          in: query
          name: cursor
          schema:
            description: >-
              The position marker from the previous result's next_cursor
              property, used for pagination. Must be used with the same
              ascending value as the call that produced it.
            title: Cursor
            type: string
        - description: The maximum number of entries to return in a single page of results.
          in: query
          name: limit
          schema:
            description: >-
              The maximum number of entries to return in a single page of
              results.
            example: 20
            title: Limit
            type: integer
        - description: >-
            When true, results are returned in ascending order (oldest first)
            instead of the default descending order (newest first).
          in: query
          name: ascending
          schema:
            description: >-
              When true, results are returned in ascending order (oldest first)
              instead of the default descending order (newest first).
            title: Ascending
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntryCollection'
          description: OK
    post:
      description: Create a new silo entry without an explicit UUID.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiloCreateEntry'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntry'
          description: OK
  /silo/v1/entries/{entry_id}/files:
    post:
      description: >-
        Add a new file to a silo entry without an explicit UUID. The file data
        can be provided inline as base64 encoded data, or omitted to create a
        placeholder. When data is not provided, you must provide sha256, size,
        and mime fields, and the response will include a `url` field that can be
        used to stream/upload the file contents directly via a PUT request to
        that URL. For non enrolled users, only the `format` and `attachment`
        categories are allowed.
      parameters:
        - description: UUID of the silo entry.
          in: path
          name: entry_id
          required: true
          schema:
            description: UUID of the silo entry.
            title: Entry ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                category:
                  description: Category of the file.
                  example: format
                  title: Category
                  type: string
                data:
                  description: >-
                    Base64 encoded binary data. Optional - if not provided,
                    sha256, size, and mime are required.
                  format: byte
                  type: string
                desc:
                  description: Description of the file.
                  example: Invoice for January 2021.
                  title: Description
                  type: string
                embeddable:
                  description: >-
                    When true, this file may be embedded inside other files,
                    like PDFs. Default is false.
                  example: true
                  title: Embeddable
                  type: boolean
                key:
                  description: Key used to identify the file in the entry.
                  example: pdf
                  title: Key
                  type: string
                meta:
                  additionalProperties:
                    type: string
                  description: Any additional meta data about the file.
                  title: Meta
                  type: object
                mime:
                  description: MIME type of the file. Required when data is not provided.
                  example: application/pdf
                  title: MIME
                  type: string
                name:
                  description: Name of the file.
                  example: invoice.pdf
                  title: Name
                  type: string
                private:
                  description: >-
                    When true, this file is private and can only be accessed by
                    the owner. Default is false.
                  example: true
                  title: Private
                  type: boolean
                sha256:
                  description: >-
                    SHA256 hex hash of the file. Required when data is not
                    provided.
                  example: >-
                    27a0b656df99dc32124b4c49f2f3c35025f0a7453f289cbaa0701435cfcf4e28
                  title: SHA256
                  type: string
                size:
                  description: >-
                    Size of the file in bytes. Required when data is not
                    provided.
                  example: 12345
                  title: Size
                  type: integer
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloFile'
          description: OK
  /silo/v1/entries/{entry_id}/files/{id}:
    get:
      description: >-
        Download silo entry file's data. Content type and disposition will be
        set according to the source.
      parameters:
        - description: UUID of the file to fetch, may be a previous version.
          in: path
          name: id
          required: true
          schema:
            description: UUID of the file to fetch, may be a previous version.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: ID
            type: string
        - description: UUID of the silo entry.
          in: path
          name: entry_id
          required: true
          schema:
            description: UUID of the silo entry.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: Entry ID
            type: string
      responses:
        '200':
          description: Contains the file data.
    put:
      description: >-
        Add a new file to a silo entry with a specific UUID. The file data can
        be provided inline as base64 encoded data, or omitted to create a
        placeholder. When data is not provided, you must provide sha256, size,
        and mime fields, and the response will include a `url` field that can be
        used to stream/upload the file contents directly via a PUT request to
        that URL. For non enrolled users, only the `format` and `attachment`
        categories are allowed.
      parameters:
        - description: UUID of file to create
          in: path
          name: id
          required: true
          schema:
            description: UUID of file to create
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: ID
            type: string
        - description: UUID of the silo entry.
          in: path
          name: entry_id
          required: true
          schema:
            description: UUID of the silo entry.
            title: Entry ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                category:
                  description: Category of the file.
                  example: format
                  title: Category
                  type: string
                data:
                  description: >-
                    Base64 encoded binary data. Optional - if not provided,
                    sha256, size, and mime are required.
                  format: byte
                  type: string
                desc:
                  description: Description of the file.
                  example: Invoice for January 2021.
                  title: Description
                  type: string
                embeddable:
                  description: >-
                    When true, this file may be embedded inside other files,
                    like PDFs. Default is false.
                  example: true
                  title: Embeddable
                  type: boolean
                key:
                  description: Key used to identify the file in the entry.
                  example: pdf
                  title: Key
                  type: string
                meta:
                  additionalProperties:
                    type: string
                  description: Any additional meta data about the file.
                  title: Meta
                  type: object
                mime:
                  description: MIME type of the file. Required when data is not provided.
                  example: application/pdf
                  title: MIME
                  type: string
                name:
                  description: Name of the file.
                  example: invoice.pdf
                  title: Name
                  type: string
                private:
                  description: >-
                    When true, this file is private and can only be accessed by
                    the owner. Default is false.
                  example: true
                  title: Private
                  type: boolean
                sha256:
                  description: >-
                    SHA256 hex hash of the file. Required when data is not
                    provided.
                  example: >-
                    27a0b656df99dc32124b4c49f2f3c35025f0a7453f289cbaa0701435cfcf4e28
                  title: SHA256
                  type: string
                size:
                  description: >-
                    Size of the file in bytes. Required when data is not
                    provided.
                  example: 12345
                  title: Size
                  type: integer
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloFile'
          description: OK
  /silo/v1/entries/{entry_id}/states:
    get:
      description: Fetch the current and previous state objects for a silo entry.
      parameters:
        - description: UUID of the entry to find states for.
          in: path
          name: entry_id
          required: true
          schema:
            description: UUID of the entry to find states for.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: Entry ID
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloStateCollection'
          description: OK
    post:
      description: Create a new state for a silo entry without time
      parameters:
        - description: UUID of the entry to create state for
          in: path
          name: entry_id
          required: true
          schema:
            description: UUID of the entry to create state for
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: Entry ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiloCreateState'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloState'
          description: OK
  /silo/v1/entries/{entry_id}/states/{at}:
    put:
      description: Create a new state for a silo entry
      parameters:
        - description: ISO timestamp with millisecond accuracy.
          in: path
          name: at
          required: true
          schema:
            description: ISO timestamp with millisecond accuracy.
            example: '2023-08-02T00:00:00.000Z'
            title: Timestamp
            type: string
        - description: UUID of the entry to create state for
          in: path
          name: entry_id
          required: true
          schema:
            description: UUID of the entry to create state for
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: Entry ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                key:
                  description: Key for the state.
                  example: paid
                  title: Key
                  type: string
                meta:
                  additionalProperties:
                    type: string
                  description: Any additional structured fields about the state.
                  title: Meta
                  type: object
                notes:
                  description: Additional details.
                  title: Notes
                  type: string
              required:
                - key
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloState'
          description: OK
  /silo/v1/entries/{id}:
    get:
      description: Fetch an existing silo entry given its UUID.
      parameters:
        - description: UUID of the silo entry to fetch.
          in: path
          name: id
          required: true
          schema:
            description: UUID of the silo entry to fetch.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: ID
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntry'
          description: OK
    patch:
      description: Update an existing silo entry given its UUID.
      parameters:
        - description: UUID of the silo entry to update.
          in: path
          name: id
          required: true
          schema:
            description: UUID of the silo entry to update.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiloUpdateEntry'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntry'
          description: OK
    put:
      description: Create a new silo entry with the given UUID.
      parameters:
        - description: UUID of the silo entry to create.
          in: path
          name: id
          required: true
          schema:
            description: UUID of the silo entry to create.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                allow_invalid:
                  description: >-
                    When true, the envelope's contents are allowed to be
                    invalid.
                  example: true
                  title: Allow Invalid
                  type: boolean
                content_type:
                  description: The content type of the data being uploaded.
                  example: application/json
                  title: Content Type
                  type: string
                correct:
                  description: JSON object containing the GOBL correction option data.
                  example:
                    credit: true
                  title: Correct
                  type: object
                data:
                  description: >-
                    Data contents to upload which may either be a GOBL Envelope
                    or Object. Any partial data will be calculated and validated
                    automatically.
                  title: Data
                  type: object
                folder:
                  description: >-
                    In which folder the entry should be associated, leave empty
                    to use the automatic rules.
                  title: Folder
                  type: string
                key:
                  description: >-
                    Key used to identify the entry idempotently within a
                    workspace.
                  example: invoice-101
                  title: Key
                  type: string
                previous_id:
                  description: The UUID of the previous silo entry to copy.
                  format: uuid
                  title: Previous ID
                  type: string
                sign:
                  description: When true, the GOBL envelope will be signed automatically.
                  example: false
                  title: Sign
                  type: boolean
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntry'
          description: OK
  /silo/v1/entries/{id}/related:
    get:
      description: Find silo entries whose document mentions the given entry's UUID.
      parameters:
        - description: The unique identifier of the document to find related entries for.
          in: query
          name: uuid
          schema:
            description: The unique identifier of the document to find related entries for.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: UUID
            type: string
        - description: >-
            The specific context within a document where the silo entry's UUID
            is referenced.
          in: query
          name: context
          schema:
            description: >-
              The specific context within a document where the silo entry's UUID
              is referenced.
            example: line.item
            title: Context
            type: string
        - description: >-
            The starting date and time for retrieving related entries in
            descending order, formatted as an ISO timestamp.
          in: query
          name: created_at
          schema:
            description: >-
              The starting date and time for retrieving related entries in
              descending order, formatted as an ISO timestamp.
            example: '2023-08-02T00:00:00.000Z'
            title: Created At
            type: string
        - description: >-
            The position marker from the previous result's next_cursor property,
            used for pagination.
          in: query
          name: cursor
          schema:
            description: >-
              The position marker from the previous result's next_cursor
              property, used for pagination.
            title: Cursor
            type: string
        - description: >-
            The maximum number of related entries to return in a single page of
            results.
          in: query
          name: limit
          schema:
            description: >-
              The maximum number of related entries to return in a single page
              of results.
            example: 20
            title: Limit
            type: integer
        - description: Silo entry ID to find related entries for.
          in: path
          name: id
          required: true
          schema:
            description: Silo entry ID to find related entries for.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: ID
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntryCollection'
          description: OK
  /silo/v1/entries/key/{key}:
    get:
      description: Fetch an existing silo entry by its key.
      parameters:
        - description: Key used to identify the entry idempotently within a workspace.
          in: path
          name: key
          required: true
          schema:
            description: Key used to identify the entry idempotently within a workspace.
            example: invoice-101
            title: Key
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntry'
          description: OK
  /silo/v1/entries/related:
    get:
      description: Find silo entries whose document mentions the UUID parameter.
      parameters:
        - description: The unique identifier of the document to find related entries for.
          in: query
          name: uuid
          schema:
            description: The unique identifier of the document to find related entries for.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: UUID
            type: string
        - description: >-
            The specific context within a document where the silo entry's UUID
            is referenced.
          in: query
          name: context
          schema:
            description: >-
              The specific context within a document where the silo entry's UUID
              is referenced.
            example: line.item
            title: Context
            type: string
        - description: >-
            The starting date and time for retrieving related entries in
            descending order, formatted as an ISO timestamp.
          in: query
          name: created_at
          schema:
            description: >-
              The starting date and time for retrieving related entries in
              descending order, formatted as an ISO timestamp.
            example: '2023-08-02T00:00:00.000Z'
            title: Created At
            type: string
        - description: >-
            The position marker from the previous result's next_cursor property,
            used for pagination.
          in: query
          name: cursor
          schema:
            description: >-
              The position marker from the previous result's next_cursor
              property, used for pagination.
            title: Cursor
            type: string
        - description: >-
            The maximum number of related entries to return in a single page of
            results.
          in: query
          name: limit
          schema:
            description: >-
              The maximum number of related entries to return in a single page
              of results.
            example: 20
            title: Limit
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntryCollection'
          description: OK
  /silo/v1/gobl/build:
    post:
      description: Build GOBL Envelopes or Objects for validation purposes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiloBuildGOBL'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloGOBL'
          description: OK
  /silo/v1/gobl/correct:
    post:
      description: >-
        Correct or determine the correction options for a GOBL Envelope (not
        Object!)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiloCorrectGOBL'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloGOBL'
          description: OK
  /silo/v1/gobl/sign:
    post:
      description: Sign GOBL Envelopes or Objects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiloSignGOBL'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloGOBL'
          description: OK
  /silo/v1/search:
    get:
      description: Perform a free-text search on all documents in the current company.
      parameters:
        - description: Search query string.
          in: query
          name: q
          required: true
          schema:
            description: Search query string.
            example: TEST
            title: Query
            type: string
        - description: Folder to search within.
          in: query
          name: folder
          schema:
            description: Folder to search within.
            example: invoices
            title: Folder
            type: string
        - description: Maximum number of entries to show in a page of results.
          in: query
          name: limit
          schema:
            description: Maximum number of entries to show in a page of results.
            example: 20
            title: Limit
            type: integer
        - description: The number of entries to skip in the result set.
          in: query
          name: offset
          schema:
            description: The number of entries to skip in the result set.
            example: 10
            title: Offset
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntrySearchCollection'
          description: OK
  /silo/v1/spool:
    post:
      description: Upload temporary file data to the silo spool. Requires 'enrolled' scope.
      requestBody:
        content:
          application/json:
            schema:
              properties:
                data:
                  description: Base64 encoded binary data.
                  format: byte
                  type: string
                name:
                  description: File name associated with the data.
                  example: invoice.xml
                  title: Name
                  type: string
                type:
                  description: MIME Type of the data
                  example: application/xml
                  title: Type
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloUploadTempFileResponse'
          description: OK
  /silo/v1/spool/{key}:
    delete:
      description: Delete a previously uploaded entry from the spool.
      parameters:
        - description: Key of the file provided during upload
          in: path
          name: key
          required: true
          schema:
            description: Key of the file provided during upload
            example: 2025-W20-123467abcde-invoice.xml
            title: Key
            type: string
      responses:
        '204':
          description: No Content
    get:
      description: Download a previously uploaded entry from the spool.
      parameters:
        - description: Key of the file provided during upload
          in: path
          name: key
          required: true
          schema:
            description: Key of the file provided during upload
            example: 2025-W20-123467abcde-invoice.xml
            title: Key
            type: string
      responses:
        '200':
          description: Contains the originally uploaded data.
components:
  schemas:
    DsigDigest:
      properties:
        alg:
          type: string
        val:
          type: string
      type: object
    SiloBuildGOBL:
      properties:
        data:
          description: GOBL Envelope or Object to calculate and validate.
          nullable: true
          title: Data
          type: object
        envelop:
          description: >-
            When true, a complete GOBL Envelope will be provided as opposed to
            the standalone object.
          title: Envelop
          type: boolean
      type: object
    SiloCorrectGOBL:
      properties:
        data:
          description: GOBL Envelope or Object to calculate and validate.
          nullable: true
          title: Data
          type: object
        options:
          description: JSON object containing the GOBL correction option data.
          title: Options
          type: object
        show_options:
          description: >-
            When true, the options schema for correction are provided in the
            response.
          title: Show Options
          type: boolean
      type: object
    SiloCreateEntry:
      properties:
        allow_invalid:
          description: When true, the envelope's contents are allowed to be invalid.
          example: true
          title: Allow Invalid
          type: boolean
        content_type:
          description: The content type of the data being uploaded.
          example: application/json
          title: Content Type
          type: string
        correct:
          description: JSON object containing the GOBL correction option data.
          example:
            credit: true
          title: Correct
          type: object
        data:
          description: >-
            Data contents to upload which may either be a GOBL Envelope or
            Object. Any partial data will be calculated and validated
            automatically.
          title: Data
          type: object
        folder:
          description: >-
            In which folder the entry should be associated, leave empty to use
            the automatic rules.
          title: Folder
          type: string
        key:
          description: Key used to identify the entry idempotently within a workspace.
          example: invoice-101
          title: Key
          type: string
        previous_id:
          description: The UUID of the previous silo entry to copy.
          format: uuid
          title: Previous ID
          type: string
        sign:
          description: When true, the GOBL envelope will be signed automatically.
          example: false
          title: Sign
          type: boolean
      type: object
    SiloCreateState:
      properties:
        key:
          description: Key for the state.
          example: paid
          title: Key
          type: string
        meta:
          additionalProperties:
            type: string
          description: Any additional structured fields about the state.
          title: Meta
          type: object
        notes:
          description: Additional details.
          title: Notes
          type: string
      required:
        - key
      type: object
    SiloEntry:
      properties:
        attachments:
          description: List of files for this entry.
          items:
            $ref: '#/components/schemas/SiloFile'
          title: Attachments
          type: array
        context:
          description: >-
            When entry provided within a related query, this is the context
            within the document.
          example: line.item
          title: Context
          type: string
        created_at:
          description: The date and time the silo entry was created.
          example: '2018-01-01T00:00:00.000Z'
          title: Created At
          type: string
        data:
          description: JSON envelope contents when specifically requested.
          title: Data
          type: object
        digest:
          $ref: '#/components/schemas/DsigDigest'
        doc_schema:
          description: Schema URL for the envelope's payload.
          example: https://gobl.org/draft-0/bill/invoice
          title: Object Schema
          type: string
        draft:
          description: Deprecated. When true, indicates that the envelope is not signed.
          example: true
          title: Draft
          type: boolean
        env_schema:
          description: Schema URL for the envelope.
          example: https://gobl.org/draft-0/envelope
          title: Envelope Schema
          type: string
        faults:
          description: >-
            List of faults that occurred during the processing of the job
            associated with the last state.
          items:
            $ref: '#/components/schemas/SiloFault'
          title: Faults
          type: array
        folder:
          description: Key for the folder where the entry is located.
          example: sales
          title: Folder
          type: string
        id:
          description: UUID of the silo entry.
          example: 347c5b04-cde2-11ed-afa1-0242ac120002
          title: ID
          type: string
        invalid:
          description: >-
            When true, the envelope's contents are invalid and need to be
            reviewed.
          example: true
          title: Invalid
          type: boolean
        key:
          description: Key used to identify the entry idempotently within a workspace.
          example: invoice-101
          title: Key
          type: string
        meta:
          description: Additional meta fields associated with the entry.
          items:
            $ref: '#/components/schemas/SiloMeta'
          title: Meta
          type: array
        signed:
          description: When true, the envelope has been signed and should not be modified.
          example: true
          title: Signed
          type: boolean
        snippet:
          description: JSON object containing a snippet of the document.
          example:
            title: Sample Title
          title: Snippet
          type: object
        state:
          description: Current state of the silo entry if not a draft.
          example: sent
          title: State
          type: string
        tags:
          description: Copy of tags stored in the envelope header.
          items:
            type: string
          title: Tags
          type: array
        updated_at:
          description: The date and time the silo entry was last updated.
          example: '2018-01-01T00:00:00.000Z'
          title: Updated At
          type: string
      type: object
    SiloEntryCollection:
      properties:
        created_at:
          description: >-
            Starting date for results. Acts as the upper bound when descending
            (the default) or the lower bound when ascending.
          example: '2025-05-01T00:00:00.000Z'
          title: Created At
          type: string
        cursor:
          description: Cursor used to identify the current page of results.
          title: Cursor
          type: string
        folder:
          description: Key for the folder
          example: sales
          title: Folder
          type: string
        limit:
          description: Maximum number of entries to show in a page of results, up to 100.
          example: 20
          title: Limit
          type: integer
        list:
          description: >-
            Array of entries sorted by creation time, descending by default or
            ascending when requested.
          items:
            $ref: '#/components/schemas/SiloEntry'
          nullable: true
          title: List
          type: array
        next_cursor:
          description: Cursor used to identify the next page of results.
          title: Next Cursor
          type: string
      type: object
    SiloEntrySearchCollection:
      properties:
        folder:
          description: Key for the folder
          example: sales
          title: Folder
          type: string
        limit:
          description: Maximum number of entries to show in a page of results, up to 100.
          example: 20
          title: Limit
          type: integer
        list:
          description: Array of entries ordered by relevance.
          items:
            $ref: '#/components/schemas/SiloEntry'
          nullable: true
          title: List
          type: array
        offset:
          description: Number of entries to skip in the result set.
          example: 20
          title: Offset
          type: integer
        query:
          description: String query used for the search.
          example: FT-101
          title: Query
          type: string
      type: object
    SiloFault:
      properties:
        code:
          description: >-
            Code assigned by the provider that may provide additional
            information about the fault.
          title: Code
          type: string
        message:
          description: >-
            Message assigned by the provider that may provide additional
            information about the fault.
          title: Message
          type: string
        paths:
          description: JSON Paths to the properties affected by the fault.
          items:
            type: string
          title: Paths
          type: array
        provider:
          description: ID of the provider that generated the fault.
          example: pdf
          title: Provider
          type: string
      type: object
    SiloFile:
      properties:
        category:
          description: Category of the file.
          example: version
          title: Category
          type: string
        created_at:
          description: The date and time this file was created.
          example: '2018-01-01T00:00:00.000Z'
          title: Created At
          type: string
        desc:
          description: Description of the file.
          example: Invoice for January 2021.
          title: Description
          type: string
        embeddable:
          description: When true, the file can be embedded inside another file, like a PDF.
          example: true
          title: Embeddable
          type: boolean
        entry_id:
          description: The UUID of the entry this file belongs to.
          example: 347c5b04-cde2-11ed-afa1-0242ac120002
          title: Entry ID
          type: string
        hash:
          description: SHA256 hash of the file.
          example: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6
          title: Hash
          type: string
        id:
          description: The UUID that identifies the file in the entry.
          title: ID
          type: string
        key:
          description: >-
            Key used to identify the file by the service or app that generated
            it.
          example: pdf
          title: Key
          type: string
        meta:
          additionalProperties:
            type: string
          description: Any additional meta data about the file.
          title: Meta
          type: object
        mime:
          description: MIME type of the file.
          example: application/pdf
          title: MIME
          type: string
        name:
          description: Name of the file.
          example: invoice.pdf
          title: Name
          type: string
        previous:
          description: Set of previous versions of the file.
          items:
            $ref: '#/components/schemas/SiloFileVersion'
          title: Previous
          type: array
        private:
          description: When true, the file will not have a public link.
          title: Private
          type: boolean
        size:
          description: Size of the file in bytes.
          example: 12345
          title: Size
          type: integer
        stored:
          description: >-
            When true, indicates that the file's contents have been uploaded
            successfully.
          example: true
          title: Stored
          type: boolean
        url:
          description: URL where the file's contents can be downloaded.
          title: Public URL
          type: string
      type: object
    SiloFileVersion:
      properties:
        created_at:
          description: The date and time this file was created.
          example: '2018-01-01T00:00:00.000Z'
          title: Created At
          type: string
        hash:
          description: The SHA256 of the file's contents.
          title: Hash
          type: string
        id:
          description: The UUID that identifies the file when it was originally uploaded.
          title: ID
          type: string
        size:
          description: Size of the file.
          title: Size
          type: integer
      type: object
    SiloGOBL:
      properties:
        data:
          description: GOBL Envelope or Object response to a build request.
          nullable: true
          title: Data
          type: object
      type: object
    SiloMeta:
      properties:
        created_at:
          description: Timestamp of when the row was created.
          example: '2018-01-01T00:00:00.000Z'
          title: Created At
          type: string
        entry_id:
          description: ID of the entry this meta row belongs to
          example: 347c5b04-cde2-11ed-afa1-0242ac120002
          title: Entry ID
          type: string
        id:
          description: Compound ID of the meta row.
          example: 347c5b04-cde2-11ed-afa1-0242ac120002:source:key
          title: ID
          type: string
        indexed:
          description: When true, the meta entry is indexed for search.
          example: true
          title: Indexed
          type: boolean
        key:
          description: Key used to identify the meta entry by the source.
          example: service-id
          title: Key
          type: string
        link_scope:
          description: Describes the context in which the link should be made available.
          example: public
          title: Link Scope
          type: string
        link_url:
          description: >-
            URL associated with the meta row that may be used to perform
            additional actions or view more details.
          example: https://example.com/info
          title: Link URL
          type: string
        owned:
          description: When true, the meta entry is indexed by owner ID.
          example: true
          title: Owned
          type: boolean
        owner_id:
          description: >-
            UUID of the owner of the silo entry, typically a workspace ID.
            Included for reference when the authentication token does not
            already include the owner such as for lookups by reference.
          title: Owner ID
          type: string
        ref:
          description: >-
            Indexable value used to locate the meta entry if a silo entry ID is
            not available.
          title: Reference
          type: string
        secure:
          description: >-
            When true, the meta entry is never included in lists and needs to be
            specifically requested.
          example: true
          title: Secure
          type: boolean
        shared:
          description: When true, the meta entry may be shared with other applications.
          example: true
          title: Shared
          type: boolean
        src:
          description: The service or source that create this meta entry.
          example: source
          title: Source
          type: string
        updated_at:
          description: Timestamp of when the row was last updated.
          example: '2018-01-01T00:00:00.000Z'
          title: Updated At
          type: string
        value:
          description: The JSON data stored with the meta row.
          example:
            key: value
          title: Value
          type: object
      type: object
    SiloSignGOBL:
      properties:
        data:
          description: GOBL Envelope or Object to calculate, validate, and sign.
          nullable: true
          title: Data
          type: object
      type: object
    SiloState:
      properties:
        created_at:
          description: The date and time this state was created.
          example: '2018-01-01T00:00:00.000Z'
          title: Created At
          type: string
        faults:
          description: >-
            List of faults that occurred during the processing of the job where
            state was assigned.
          items:
            $ref: '#/components/schemas/SiloFault'
          title: Faults
          type: array
        id:
          description: UUID and timestamp composite ID.
          title: ID
          type: string
        key:
          description: Key for the state
          example: paid
          title: Key
          type: string
        meta:
          additionalProperties:
            type: string
          description: Any additional structured fields about the state.
          title: Meta
          type: object
        notes:
          description: Additional details.
          title: Notes
          type: string
        src:
          description: Identifier key for the source of the state
          example: api-key
          title: Source
          type: string
        src_id:
          description: UUID for the entity that created the state
          example: 347c5b04-cde2-11ed-afa1-0242ac120002
          title: Source ID
          type: string
      type: object
    SiloStateCollection:
      properties:
        list:
          description: Array of states.
          items:
            $ref: '#/components/schemas/SiloState'
          nullable: true
          title: List
          type: array
      type: object
    SiloUpdateEntry:
      properties:
        allow_invalid:
          description: >-
            When true, the updated envelope's contents are allowed to be
            invalid.
          example: true
          title: Allow Invalid
          type: boolean
        content_type:
          description: >-
            The content type of the data being uploaded which by default expects
            application/json for a complete document, simple merge patch
            application/merge-patch+json (RFC7396), or a line-by-line patch
            application/json-patch+json (RFC6902)
          example: application/json
          title: Content Type
          type: string
        data:
          description: >-
            Updated envelope data either a complete envelope or document, or
            patched data according to the content type.
          nullable: true
          title: Data
          type: object
        folder:
          description: New location for the silo entry.
          example: drafts
          title: Folder
          type: string
        sign:
          description: When true, the GOBL envelope will be signed automatically.
          example: false
          title: Sign
          type: boolean
      type: object
    SiloUploadTempFileResponse:
      properties:
        key:
          description: Use this key to download the file again later.
          title: Key
          type: string
      type: object
  securitySchemes:
    authToken:
      bearerFormat: JWT
      description: >-
        Use the `Bearer` scheme with a valid JWT token to authenticate requests.
        Example: `Authorization: Bearer <token>`
      scheme: bearer
      type: http
