Sobes.tech
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: /contracts or /contracts/search

  • Query parameters:

    • contractId — unique identifier of the contract (optional)
    • personId — identifier of the person associated with the contract
    • status — status of the contract (e.g., active, completed)
    • dateFrom and dateTo — date range of the contract conclusion
    • page and pageSize — for paginating results
  • Method: GET

  • Response:

    • List of contracts matching the filters, with fields:
      • contractId
      • personId
      • status
      • startDate
      • endDate
      • other relevant data
  • Response codes:

    • 200 OK — successful search
    • 400 Bad Request — invalid parameters
    • 404 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.

Describe the GET request contract for searching for a… - sobes.tech