Overview

The Genders API allows you to fetch and paginate gender data stored in the database. The results are sorted by gender type by default, and pagination is supported through cursor-based navigation.


Endpoint

GET /api/data/genders


Query Parameters

Parameter Type Default Description
cursorId string null Cursor ID to fetch the next page of results.
pageSize integer 10 Number of records to fetch per page.

Example Requests

  1. Fetch all genders:

    GET /api/data/genders
    
    
  2. Paginate through genders (page size of 5 starting from a specific cursor):

    GET /api/data/genders?pageSize=5&cursorId=xyz456
    
    

Response Format

Success Response (200 OK)

{
"genders": [
		{
			"id":"8557171f-5236-4ec1-b9a2-c69ee0becff7",
			"type":"female"
		},
		{
			"id":"8e62bb48-825e-401b-9140-d09fc8f05628",
			"type":"male"
		},
		{
			"id":"94e15f14-c646-4df9-9a76-a179e50e6fb5",
			"type":"non-binary"
		}
	],
	"nextCursor":null,
	"hasMore":false
}

Error Response (400/500)

{
  "error": "Failed to fetch genders"
}


Pagination Notes