# Get requests

Sorting Fields:
- createdAt
- updatedAt

Note: Due to caching mechanism the bulk view may not be in sync with single request detail view.

Endpoint: GET /requests
Version: 2.0.0
Security: ApiKeyAuth

## Security:

  - `ApiKeyAuth` (unknown)
    apiKey in header X-Api-Key

## Query parameters:

  - `sort` (string)
    Not all fields are supported in sorting. See the description of the endpoint for the list of supported fields.
Specify the field to sort and the ordering (`asc`, or `desc`) separated by a coma.

  - `page` (integer)
    Page numbers starting at 0.

  - `size` (integer)
    Size 0 equals to default size. Maximum size may be limited anytime and not honored by the backend.

  - `status` (string)
    Used to filter requests by their current status.

  - `referenceId` (string)
    Used to filter requests by their referenceId.

  - `operatorPending` (boolean)
    Used to filter requests by operatorPending.

  - `id` (string)
    Used to filter requests by id.

  - `requestTypeId` (string)
    Used to filter requests by requestTypeId.

  - `organizationId` (string)
    Used to filter requests by organizationId.

  - `search` (string)
    Used to search for requests by identified people's first name, last name and / or personal number.

  - `createdAtFrom` (string)
    Filter requests created at or after this instant (inclusive). ISO-8601 UTC format (e.g. 2024-01-01T00:00:00Z).

  - `createdAtTo` (string)
    Filter requests created at or before this instant (inclusive). ISO-8601 UTC format (e.g. 2024-12-31T23:59:59Z).
Must be strictly after createdAtFrom when both are provided.

  - `finalizedAtFrom` (string)
    Filter requests finalized at or after this instant (inclusive). ISO-8601 UTC format (e.g. 2024-01-01T00:00:00Z).
Requests not yet finalized are excluded.

  - `finalizedAtTo` (string)
    Filter requests finalized at or before this instant (inclusive). ISO-8601 UTC format (e.g. 2024-12-31T23:59:59Z).
Requests not yet finalized are excluded. Must be strictly after finalizedAtFrom when both are provided.

## Response 200:

  - `200` (unknown)
    The fetched request

## Response 200 fields (application/json):

  - `content` (array)

  - `content.id` (string)

  - `content.organizationId` (string)

  - `content.status` (string)
    - `DRAFT`: The request has not been created yet, but it can be modified
- `CREATED`: The request has been created, but its processing has to start yet.
- `RUNNING`: The request is being processed, it means that actions from users or systems still have to be completed.
- `COMPLETED`: Final status for a request completed successfully (according to specific request type
it may have warnings or unsuccessful scenarios accepted by operational behavior).
- `EXPIRED`: Final status for a request that has not been completed before the expiration time.
- `FAILED`: Final status for a request whose processing has failed.
- `CANCELLED`: Final status for a request that has been cancelled or completed unsuccessfully.
    Enum: "DRAFT", "CREATED", "RUNNING", "COMPLETED", "EXPIRED", "FAILED", "CANCELLED"

  - `content.referenceId` (string)
    Optional field. It maps an id that is relevant for the Integrator. The filed is not used internally.
More requests can have the same value.

  - `content.requestTypeId` (string)
    Identifier of the type of process associated to the request. This identifier is given to the Integrator
during initial setup of the integration project.

  - `content.createdAt` (string)

  - `content.personData` (array)

  - `content.personData.firstName` (string)

  - `content.personData.lastName` (string)

  - `content.personData.personalNumber` (string)
    Personal identification number used in the country.
For instance, in Italy is "Codice Fiscale".

  - `page` (object)

  - `page.size` (integer)
    the size of the pages. The last page can have less items, do not use as item counter the reply.

  - `page.number` (integer)
    zero-based page number, is not negative.

  - `page.totalElements` (integer)
    counter of elements matching the query.

  - `page.totalPages` (integer)
    counter of pages of the current size.

