Skip to main content
curl --request GET 'https://api.mayar.id/hl/v2/memberships/members?productId=7c9d2e1f-4a5b-4c6d-8e9f-0a1b2c3d4e5f&limit=10' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here'
{
    "statusCode": 200,
    "messages": "success",
    "data": [
        {
            "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
            "createdAt": "2026-01-15T15:29:59.659Z",
            "customerId": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
            "membershipTierId": "9b2d4f6a-8c1e-4a3b-bd5c-6e7f8a9b0c1d",
            "nextPayment": "2026-02-15T15:29:59.430Z",
            "status": "inactive",
            "updatedAt": "2026-02-15T17:30:03.531Z",
            "userId": "348e083d-315a-4e5c-96b1-5a2a98c48413",
            "memberId": "MBR8X2QK",
            "membershipTier.name": "Paket 1",
            "membershipTier.gracePeriodInDays": "0",
            "customer.name": "Budi Santoso",
            "customer.mobile": "081234567890",
            "customer.email": "budi.santoso@example.com"
        }
    ],
    "hasMore": false,
    "nextStartingAfter": "1768490999659"
}
Endpoint:
https://api.mayar.id/hl/v2/memberships/members?productId=(productId)

Authorization

Authorization
string
required
Example:Authorization | Bearer Paste-Your-API-Key-Here

Query Parameters

productId
string
required
The unique identifier of the membership product whose members you want to list. If missing or malformed the endpoint responds 400 "Invalid query parameters".
searchTerm
string
Filter members by a search term (for example a customer name or email).
startDate
string
Start of the date range to filter by.
endDate
string
End of the date range to filter by.
isChurnedMember
boolean
When set, filters churned members. When this filter is used the response also includes a totalMember sibling field alongside data.
limit
integer
default:"10"
Number of items to return per page. Defaults to 10, with a maximum of 50.
startingAfter
string
Cursor for forward pagination. Pass the nextStartingAfter value from the previous response (a Unix timestamp in milliseconds, as a string) to fetch the next page.

Response

Successful Response

Main Structure (Root)

statusCode
integer
Status code form API.
messages
string
Status message that describes the status code.
data
array of object
List of membership members for the product.
hasMore
boolean
Information on whether there is additional data to be retrieved (true/false).
nextStartingAfter
string | null
Cursor to pass as startingAfter to fetch the next page. null when there is no further data.
totalMember
integer
Total number of members. Only present when the isChurnedMember filter is used.

data Structure (Array Of Object)

Each member row carries the membership-customer fields plus a few flattened, dotted-key columns for the related tier and customer.
id
string<uuid>
Unique identifier of the membership-customer record.
createdAt
string
ISO 8601 timestamp (UTC) of when the member was created.
customerId
string<uuid>
Unique identifier of the customer.
membershipTierId
string<uuid>
Unique identifier of the member’s tier.
nextPayment
string
ISO 8601 timestamp (UTC) of the member’s next scheduled payment.
status
string
Current status of the member (for example active, inactive).
updatedAt
string
ISO 8601 timestamp (UTC) of the last update.
userId
string<uuid>
The user ID of the owner of the product.
memberId
string
Public membership code of the member.
membershipTier.name
string
Name of the member’s tier (flattened dotted-key column).
membershipTier.gracePeriodInDays
string
Grace-period days of the member’s tier, as a string (flattened dotted-key column).
customer.name
string
Name of the customer (flattened dotted-key column).
customer.mobile
string
Mobile number of the customer (flattened dotted-key column).
customer.email
string
Email address of the customer (flattened dotted-key column).

Errors

400 Invalid query parameters
object
Returned with messages: "Invalid query parameters" when productId is missing or the query parameters fail validation.