Skip to main content

Get Contract General Data

curl -X GET "https://api.example.com/api/provisions/contracts?TypeFilter=3&Page=1&PagSize=50" \
  -H "Authorization: Basic <base64-credentials>"
Retrieves general contract data from the Datos generales del contrato grid.

Endpoint

GET /api/provisions/contracts

Authentication

This endpoint requires authentication via Basic Authentication.

Query Parameters

TypeFilter
integer
required
Type of filter:
  • 1 = Previous day
  • 2 = Previous month
  • 3 = Current month
  • 4 = Previous year
  • 5 = Specific month and year
Month
integer
Specific month to search. Valid range: 1-12. Required when TypeFilter is 5.
Year
integer
Specific year. Valid values from the previous year onwards. Required when TypeFilter is 5.
Page
integer
default:"1"
Page number, starts with 1.
PagSize
integer
Number of records to retrieve per page.

Response

currentPage
integer
The current page number being returned.
gridName
string
Name of the grid (e.g., “DatosGeneralesContrato”).
gridId
integer
Unique identifier for the grid.
totalRecordsReturned
integer
Number of records returned in the current page.
totalPages
integer
Total number of pages available.
totalRecords
integer
Total number of records matching the query.
dataRecord
object
Contains the field definitions and row data.
{
  "currentPage": 1,
  "gridName": "DatosGeneralesContrato",
  "gridId": 12345,
  "totalRecordsReturned": 25,
  "totalPages": 4,
  "totalRecords": 100,
  "dataRecord": {
    "fields": [
      {
        "id": 1,
        "label": "Contract Number",
        "name": "contractNumber",
        "order": 1,
        "type": "string",
        "visible": true,
        "width": 150
      },
      {
        "id": 2,
        "label": "Contract Date",
        "name": "contractDate",
        "order": 2,
        "type": "date",
        "visible": true,
        "width": 120
      },
      {
        "id": 3,
        "label": "Supplier",
        "name": "supplier",
        "order": 3,
        "type": "string",
        "visible": true,
        "width": 200
      }
    ],
    "rows": [
      {
        "contractNumber": "CT-2026-001",
        "contractDate": "2026-03-01T00:00:00Z",
        "supplier": "ABC Corporation"
      },
      {
        "contractNumber": "CT-2026-002",
        "contractDate": "2026-03-02T00:00:00Z",
        "supplier": "XYZ Industries"
      }
    ]
  }
}

Response Codes

  • 200 OK: Successfully retrieved contract data
  • 401 Unauthorized: Missing or invalid authentication token
  • 500 Internal Server Error: Server error occurred while processing the request

Caching

This endpoint is cached for 900 seconds (15 minutes).

Build docs developers (and LLMs) love