> ## Documentation Index
> Fetch the complete documentation index at: https://help.lobyco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gets list of available consents for user.

> Consent is available if it's not expired.



## OpenAPI

````yaml openapi/consent-v1.json GET /v1/Consents/latest/all
openapi: 3.0.4
info:
  title: Consent API
  version: v1
servers:
  - url: https://{host}/consent
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - oauth2: []
paths:
  /v1/Consents/latest/all:
    get:
      tags:
        - Service2Service
      summary: Gets list of available consents for user.
      description: Consent is available if it's not expired.
      parameters:
        - name: Accept-Language
          in: header
          description: Language code for localized content
          schema:
            type: string
            default: en
      responses:
        '200':
          description: Collection of available consents successfully fetched
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ConsentApi.Dto.Common.CollectionResponse_ConsentDto
        '400':
          description: If request is invalid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
        '404':
          description: If no consents are found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
components:
  schemas:
    ConsentApi.Dto.Common.CollectionResponse_ConsentDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ConsentApi.Dto.Common.ConsentDto'
          description: Collection of items
          nullable: true
      additionalProperties: false
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    ConsentApi.Dto.Common.ConsentDto:
      required:
        - component
        - consentType
        - contentUrl
        - createdAt
        - effectiveAt
        - expiresAt
        - id
        - key
        - name
        - revision
        - version
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: Consent unique identifier (across all consent types and versions)
          example: agreement.cpl_0
        key:
          minLength: 1
          type: string
          description: Consent key, which is unique across different consent types
          example: agreement.cpl
        name:
          minLength: 1
          type: string
          description: Name
        component:
          minLength: 1
          type: string
          description: Component to which consent corresponds
        version:
          type: integer
          description: Version
          format: int32
        revision:
          type: integer
          description: Revision
          format: int32
        iconUrl:
          type: string
          description: Url to consent icon
          nullable: true
        contentUrl:
          minLength: 1
          type: string
          description: Url to consent content
        createdAt:
          type: string
          description: Consent creation date
          format: date-time
        effectiveAt:
          type: string
          description: Consent effective from date
          format: date-time
        expiresAt:
          type: string
          description: Consent expiration date
          format: date-time
        consentType:
          $ref: '#/components/schemas/ConsentApi.Dto.Common.ConsentType'
      additionalProperties: false
      description: DTO, represents consent instance
    ConsentApi.Dto.Common.ConsentType:
      enum:
        - Regular
        - Agreement
      type: string
      description: Defines the type of consent
  securitySchemes:
    oauth2:
      type: apiKey
      name: Authorization
      in: header

````