This API call allows you to retrieve a list of onboarding requests. The request can include various parameters to filter and sort the results according to your needs.
Endpoint
URL:
/requests
Method:
GET
Headers
Ensure you include the following headers in your request:
Accept: application/json
X-Api-Key: YOUR_API_KEY
(replaceYOUR_API_KEY
with your actual API key)
Parameters
sort (optional): Specify the field to sort by and the order (
asc
ordesc
). Example:createdAt,desc
page (optional): Page number starting at 0. Example:
0
size (optional): Number of items per page. Example:
10
status (optional): Filter requests by their current status. Example:
RUNNING
referenceId (optional): Filter requests by their reference ID. Example:
order-1234-0002
Example cURL API call
curl -X GET "https://test.onboarding.namirial.app/api/v2/requests?sort=createdAt,desc&status=RUNNING&referenceId=order-1234-0002&page=0&size=10" \ -H "Accept: application/json" \ -H "X-Api-Key: YOUR_API_KEY"
Replace YOUR_API_KEY
with your actual API key.
Responses
200 OK
Description: The fetched requests.
Example Response:
{ "content": [ { "id": "123e4567-e89b-12d3-a456-426614174001", "organizationId": "123e4567-e89b-12d3-a456-426614174002", "status": "RUNNING", "referenceId": "order-1234-0002", "requestTypeId": "123e4567-e89b-12d3-a456-426614174000", "createdAt": "2024-10-29T17:42:16Z", "updatedAt": "2024-10-29T17:42:16Z", "finalizedAt": null, "expireAfter": "2024-11-29T17:42:16Z" } ], "page": { "size": 10, "totalElements": 1, "totalPages": 1, "number": 0 } }
400 Bad Request
Description: Bad Request described following Problem Details (RFC 9457).
Example Response:
{ "type": "about:blank", "status": 400, "title": "Request validation error", "detail": "The has a malformed query parameter.", "instance": "urn:uuid:123e4567-e89b-12d3-a456-426614174000?ts=1729667463", "retryable": false, "errors": [ { "detail": "Parameter 'sort' is not valid.", "pointer": "/sort", "field": "sort", "reason": "invalid" } ] }