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

# Get restriction orders

> Retrieve a paginated list of restriction orders with optional status filtering.



## OpenAPI

````yaml get /api/v1/orders
openapi: 3.0.1
info:
  description: >
    # General info

    ## Base API URL for environments:

    * TEST: https://api.plais-sandbox.finventi.com

    * PROD: https://api.plais.finventi.com


    # Authentication

    <b>NOTE:</b> IP whitelisting is mandatory to gain access to our APIs in both
    TEST and PROD environments. To register your IPs, please contact
    `connectors-support@inventi.lt`.


    Our API uses OAuth 2.0 for authentication. To access the API, you need to
    obtain a bearer token from the authorization server.


    ### Obtain a Bearer Token

    To get a bearer token, use the following cURL command:


    ```

    curl -X POST \

    --location
    '<auth-server-url>/realms/<client-name>/protocol/openid-connect/token' \

    --header 'Content-Type: application/x-www-form-urlencoded' \

    --data-urlencode 'grant_type=client_credentials' \

    --data-urlencode 'client_id=api-plais-client' \

    --data-urlencode 'client_secret=<client-secret>'

    ```


    where:


    `<auth-server-url>` is either `https://auth.sandbox.finventi.com/` (TEST) or
    `https://auth.finventi.com/` (PROD).


    `<client-ID>` is a value of TenantID that was assigned by INVENTI team
    during initial configuration and could be found in Configuration Matrix that
    was shared to your representative.


    `<client-name>` is a value that can be obtained by logging into SEPA
    Dashboard UI and going to <i>User Management</i> -> <i>Clients</i> ->
    `api-plais-client` -> <i>Credentials</i> -> <i>Client Secret</i>.


    <b>NOTE:</b> The token is valid for 45 minutes.


    ### Include the Bearer Token in Requests

    Include the obtained token in the `Authorization` header of your API
    requests with the `Bearer` prefix:


    ```

    Authorization: Bearer <bearer-token>

    ```


    ### Example Request:

    ```

    curl --location --request POST
    'https://api.plais-sandbox.finventi.com/api/v1/orders' \

    --header 'Authorization: Bearer <bearer-token>' \

    ```
  title: PLAIS API
  version: 0.1.0
servers:
  - description: TEST environment
    url: https://api.plais-sandbox.finventi.com
security: []
paths:
  /api/v1/orders:
    get:
      tags:
        - Restriction orders
      summary: Get restriction orders
      description: >-
        Provides a list of restriction orders. Data is paged and can filtered by
        providing additional request parameters.
      operationId: getOrders
      parameters:
        - description: A filter for orders with a specific status
          in: query
          name: status
          required: false
          schema:
            enum:
              - UNPROCESSED
              - CONFIRMED
              - REJECTED
            type: string
        - description: >-
            Paging options. e.g.
            /api/v1/orders?page=0&size=25&sort=createdAt,DESC
          in: query
          name: pageable
          required: true
          schema:
            description: >-
              Paging options. e.g.
              /api/v1/orders?page=0&size=25&sort=createdAt,DESC
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestrictionOrdersResponse'
          description: Returned order list
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Tenant does not have an access to the resource
components:
  schemas:
    RestrictionOrdersResponse:
      properties:
        metadata:
          $ref: '#/components/schemas/PageResponseMetadata'
        orders:
          items:
            $ref: '#/components/schemas/RestrictionOrderDto'
          type: array
      required:
        - metadata
        - orders
      type: object
    ErrorResponse:
      description: Error response
      properties:
        code:
          description: Code of error
          type: string
        data:
          $ref: '#/components/schemas/ErrorResponseData'
        message:
          description: Error message
          type: string
      required:
        - code
      type: object
    PageResponseMetadata:
      properties:
        is_last_page:
          description: Whether this is the last page
          example: false
          type: boolean
        page_items:
          description: Current page order items
          example: 10
          format: int32
          type: integer
        page_number:
          description: Page number
          example: 0
          format: int32
          type: integer
        page_size:
          description: Page size
          example: 50
          format: int32
          type: integer
        total_items:
          description: Total amount of items
          example: 20
          format: int64
          type: integer
      required:
        - is_last_page
        - page_items
        - page_number
        - page_size
        - total_items
      type: object
    RestrictionOrderDto:
      properties:
        data:
          $ref: '#/components/schemas/RestrictionOrderData'
        header:
          $ref: '#/components/schemas/RestrictionOrderHeader'
      required:
        - data
        - header
      type: object
    ErrorResponseData:
      description: Error wrapper containing all occurred errors
      properties:
        errors:
          description: All occurred errors
          items:
            $ref: '#/components/schemas/ErrorResponseViolation'
          type: array
        message:
          description: Generic message for occurred errors
          type: string
      required:
        - errors
      type: object
    RestrictionOrderData:
      properties:
        amount:
          description: >-
            The amount to be restricted in minor currency units (cents), 10.50
            EUR = 1050
          example: 10000
          format: int64
          type: integer
        currency:
          description: The currency of the restricted amount
          example: EUR
          type: string
        fr_dspstn_amnt:
          description: >-
            The free available amount in minor currency units (cents), 5.50 EUR
            = 550
          example: 500
          format: int64
          type: integer
        fr_dspstn_cmmnt:
          description: The free available amount comment
          type: string
        payee:
          $ref: '#/components/schemas/RestrictionOrderParticipantDto'
        payer:
          $ref: '#/components/schemas/RestrictionOrderParticipantDto'
        remittance_information:
          $ref: '#/components/schemas/RestrictionOrderRemittanceInformationDto'
        status:
          description: The status of Restriction Order
          enum:
            - UNPROCESSED
            - CONFIRMED
            - REJECTED
          type: string
      required:
        - payer
        - status
      type: object
    RestrictionOrderHeader:
      properties:
        date:
          description: Restriction order document date
          example: '2020-01-01T12:00:00Z'
          format: date-time
          type: string
        doc_id:
          description: Unique restriction order document ID
          example: RC191234ABCDF999
          type: string
        reference_doc_id:
          description: Referred restriction order document ID
          example: RC194321AAAAA123
          type: string
        type:
          description: Restriction order document type
          enum:
            - block
            - change
            - cancel
            - ns
          type: string
      required:
        - date
        - doc_id
        - type
      type: object
    ErrorResponseViolation:
      description: Single error wrapper
      properties:
        code:
          description: Error code
          type: string
        field_name:
          description: Field name which failed
          type: string
        message:
          description: Error message
          type: string
        value:
          description: Value which was invalid
          type: string
      type: object
    RestrictionOrderParticipantDto:
      description: The participating entity of the restriction order
      properties:
        account:
          description: Account number
          example: LT073111111111123123
          type: string
        bic:
          description: BIC code
          example: HABALT22TIP
          type: string
        id:
          description: Participant Entity code
          type: string
        member_code:
          description: PLAIS code
          type: string
        name:
          description: Entity name
          example: John Doe
          type: string
      required:
        - name
      type: object
    RestrictionOrderRemittanceInformationDto:
      description: Remittance Information
      properties:
        date:
          description: Remittance Date
          format: date
          type: string
        execute_date:
          description: Remittance Execution Date
          format: date
          type: string
        execute_id:
          description: Remittance Execution ID
          type: string
        execute_pid:
          description: Remittance Execution Processing ID
          type: string
        execute_processing_date:
          description: Remittance Execution Processing Date
          format: date
          type: string
        execute_reason:
          description: Remittance Execution Reason
          type: string
        execute_type:
          description: Remittance Execution Type
          type: string
        id:
          description: Remittance ID. Correlates with payment instruction's endToEndId.
          type: string
      type: object

````