Contractors.es icon

Contractors.es

Interact with Contractors.es API

Actions995

State Api → Post Api Countries Country States Search

AI-generated

Summary

Search states within a specified country by sending a POST request with optional filtering, sorting, pagination parameters to the Contractors.es State API.

Inputs

  • Country (required) — Numeric ID of the country to search states for.
  • Page — Page number for paginated results (default is 1). Sent as a query parameter.
  • Limit — Number of results per page (default is 20). Sent as a query parameter.
  • Filters — JSON object specifying filter criteria for the states to search. Omitting or using the sentinel value means no filters are applied.
  • Sort — JSON object specifying sorting order for the results. Omitting or using the sentinel value means no explicit sorting is applied.

Output shape

a list of state records matching the search criteria, typically including state identifiers and details

Results are paginated based on 'page' and 'limit' query parameters. Filters and sort parameters are sent in the request body as JSON objects unless omitted or set to sentinel values which disables sending those fields.

Examples

Example 1: Search for states in country ID 5, showing page 2 with 10 results per page, filtering by active status, sorted by name ascending.

Set Country to 5, Page to 2, Limit to 10, Filters to {"status":"active"}, Sort to {"name":"asc"}.

Links

Discussion