Middle
Describe the GET request contract for searching for a contract.
sobes.tech AI
Answer from AI
The GET request contract for searching for an agreement typically includes the following elements:
-
URL:
/contractsor/contracts/search -
Query parameters:
contractId— unique identifier of the contract (optional)personId— identifier of the person associated with the contractstatus— status of the contract (e.g., active, completed)dateFromanddateTo— date range of the contract conclusionpageandpageSize— for paginating results
-
Method: GET
-
Response:
- List of contracts matching the filters, with fields:
contractIdpersonIdstatusstartDateendDate- other relevant data
- List of contracts matching the filters, with fields:
-
Response codes:
200 OK— successful search400 Bad Request— invalid parameters404 Not Found— contracts not found (optional)
Example request:
GET /contracts?personId=12345&status=active&dateFrom=2023-01-01&dateTo=2023-12-31&page=1&pageSize=20
This contract provides a flexible and understandable interface for searching contracts based on various criteria.