Get fixed window details

This API allows you to retrieve details of a badge's fixed windows cycle and its corresponding earned counts for customer and badge constraints.

👍

Note

For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Default access group

Resource information

URI/v1/badges/badgeMeta/getFixedWindowDetails
HTTP methodGET
PaginationYes
Rate limitNA
Batch supportNA

API endpoint example

https://eucrm.cc.capillarytech.com/v1/badges/badgeMeta/getFixedWindowDetails

Request query parameters

Parameters

Data type

Description

badgeMetaId*

String

A unique identifier ("id") generated during the creation of the badge.

constraintType

Enum

Type of constraint.
Supported values: BADGE/CUSTOMER/ALL

customerId

String

The customer identifier. customerId is a mandatory parameter if, constraintType is CUSTOMER or ALL and includeEarnCount is true.

fixedWindowCycleReferenceId

String

Fixed window cycle ID generated during the creation of the badge.

includeEarnCount

Boolean

Pass includeEarnCount as true to include earn counts of each cycle.

startDate

Date

Start date period to filter cycles. Default value: Badge start date

endDate

Date

End date period to filter cycles. Default value: Badge end date

page

Integer

Number of pages.

size

Integer

Size of page.

Response body

{
    "data": {
        "badgeMetaId": "661d019d35bc684e9e727585",
        "orgId": 100606,
        "startDate": 1713177200.000000000,
        "endDate": 1828754110.000000000,
        "fixedWindowCycles": [
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1713139200.000000000,
                "endDate": 1713484800.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1713571200.000000000,
                "endDate": 1713916800.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1714003200.000000000,
                "endDate": 1714348800.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1714435200.000000000,
                "endDate": 1714435200.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1714521600.000000000,
                "endDate": 1717113600.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1717200000.000000000,
                "endDate": 1719705600.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1719792000.000000000,
                "endDate": 1722384000.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1722470400.000000000,
                "endDate": 1725062400.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1725148800.000000000,
                "endDate": 1727654400.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1727740800.000000000,
                "endDate": 1730332800.000000000,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            }
        ],
        "pagination": {
            "page": 0,
            "size": 10,
            "total": 48,
            "totalPages": 5
        }
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "badgeMetaId": "6603ed23e4165a7993354a76",
        "orgId": 4000106,
        "startDate": 1709337637.192000000,
        "endDate": 1709510437.192000000,
        "customerId": 123,
        "fixedWindowCycles": [
            {
                "fixedWindowCycleReferenceId": "a1350b49-eb8e-3500-9e43-01f5493c91c1",
                "startDate": 1709337600.000000000,
                "endDate": 1709510400.000000000,
                "earnCount": 0,
                "constraintType": "BADGE_FIXED_WINDOW"
            }
        ],
        "pagination": {
            "page": 0,
            "size": 30,
            "total": 1,
            "totalPages": 1
        }
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "badgeMetaId": "661d019d35bc684e9e727585",
        "orgId": 100606,
        "startDate": 1713177200.000000000,
        "endDate": 1828754110.000000000,
        "customerId": 62090013,
        "fixedWindowCycles": [
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1713139200.000000000,
                "endDate": 1713484800.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1713571200.000000000,
                "endDate": 1713916800.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1714003200.000000000,
                "endDate": 1714348800.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1714435200.000000000,
                "endDate": 1714435200.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1714521600.000000000,
                "endDate": 1717113600.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1717200000.000000000,
                "endDate": 1719705600.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1719792000.000000000,
                "endDate": 1722384000.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1722470400.000000000,
                "endDate": 1725062400.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1725148800.000000000,
                "endDate": 1727654400.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "9fae3031-3abf-3936-b5df-311839c04910",
                "startDate": 1727740800.000000000,
                "endDate": 1730332800.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            }
        ],
        "pagination": {
            "page": 0,
            "size": 10,
            "total": 48,
            "totalPages": 5
        }
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "badgeMetaId": "661d019d35bc684e9e727585",
        "orgId": 100606,
        "startDate": 1713177200.000000000,
        "endDate": 1828754110.000000000,
        "customerId": 62090013,
        "fixedWindowCycles": [
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1713139200.000000000,
                "endDate": 1713484800.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1713571200.000000000,
                "endDate": 1713916800.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1714003200.000000000,
                "endDate": 1714348800.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            },
            {
                "fixedWindowCycleReferenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "startDate": 1714435200.000000000,
                "endDate": 1714435200.000000000,
                "earnCount": 0,
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW"
            }
        ],
        "pagination": {
            "page": 0,
            "size": 10,
            "total": 4,
            "totalPages": 1
        }
    },
    "errors": [],
    "warnings": []
}

Response parameters

ParameterDatatypeDescription
dataObjectThe main data container for the response.
badgeMetaIdStringThe unique identifier for the badge metadata.
orgIdIntegerThe unique identifier for the organization.
startDateFloatThe start date timestamp for the badge earning window, in epoch milliseconds timestamp format.
startDateISOStringThe start date timestamp (in seconds) for the badge earning window, in the ISO 8601 standard format YYYY-MM-DDTHH:MM:SS.SSSZ.
endDateFloatThe end date timestamp for the badge earning window, in epoch milliseconds timestamp format.
endDateISOStringThe end date timestamp (in seconds) for the badge earning window, in the ISO 8601 standard format YYYY-MM-DDTHH:MM:SS.SSSZ.
customerIdIntegerThe unique identifier for the customer.
fixedWindowCyclesArrayAn array of objects representing each fixed window cycle.
.fixedWindowCycleReferenceIdStringA unique reference ID for the specific fixed window cycle.
..startDateFloatThe start date timestamp for the fixed window cycle, in epoch milliseconds timestamp format.
..startDateISOStringThe start date timestamp for the fixed window cycle, in the ISO 8601 standard format YYYY-MM-DDTHH:MM:SS.SSSZ.
..endDateFloatThe end date timestamp for the fixed window cycle, in epoch milliseconds timestamp format.
..endDateStringThe end date timestamp (in seconds) for the fixed window cycle, in the ISO 8601 standard format YYYY-MM-DDTHH:MM:SS.SSSZ.
..earnCountIntegerThe number of times the badge was earned in this cycle.
..constraintTypeStringThe type of constraint applied to the badge earning process.
paginationObjectContainer for pagination information.
pageIntegerThe current page number in the pagination sequence.
sizeIntegerThe number of items per page.
totalIntegerThe total number of items.
totalPagesIntegerThe total number of pages available.
errorsArrayAn array containing any errors that occurred during the request.
warningsArrayAn array containing any warnings related to the request.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!