post
https://{host}/api_gateway/v1/badges/badgeMeta//claim
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests⦠| |||
Loadingā¦
This API allows you to claim the badge using badge ID.
NoteFor 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 | /api_gateway/v1/badges/badgeMeta\{badgeId\}/claim |
| HTTP method | POST |
| Pagination | NA |
| Batch support | NA |
Example request
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/badges/badgeMeta/69381220cebb9648d8974518/claim' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: Basic bWFka3MjU2YQ==' \
--header 'Cookie: _cfuvid=h41NNNJlaGGCp71UuFTcMjP3q.OYkoR9IigSN5f_pGY-1768819014360-0.0.1.1-604800000' \
--data '{
"ownerType": "Loyalty",
"referenceId": "123"
}'Request path parameters
| Parameter Name | Data Type | Description |
|---|---|---|
| badgeID* | String | Unique identifier ("id") generated during the creation of the badge. Ex: 653df084b3cda7078c7c68f1 |
Request body parameters
| Parameter | Data Type | Description |
|---|---|---|
| ownerType* | Enum | The module for which the badge is being claimed. Supported values: Loyalty, Loyalty_Promotion, Referral_Campaigns, Journeys, Audience_Campaigns, Rewards_Catalog, Goodwill_Module, Milestones, Historical_Import |
| referenceId* | String | Enter a unique identifier to identify the badge owner (ownerType). |
Example request
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/badges/badgeMeta/693804d8cebb9648d8974489/claim' \
--header 'Authorization: Basic Z2VvcmdlL86NjVhMDgzYjk1MWY5MGY1NTY5NDk1YmNkNzUxYmJiY2U=' \
--header 'Cookie: _cfuvid=xqa2vacPOC_9d5xoORuyNOUReJ4nYUCw-1765278778115-0.0.1.1-604800000; _cfuvid=60YlXkyLfDaY1gOO1YdxKbhVquLZtaBlNd58D9_8rpU-1765282802951-0.0.1.1-604800000' \
--header 'Content-Type: application/json' \
--data '{
"ownerType": "Loyalty",
"referenceId": "123"
}'Example response
{
"data": {
"ownerType": "Loyalty",
"referenceId": "123",
"isActive": true
},
"errors": null,
"warnings": []
}Response parameters
| Parameter | Data Type | Description |
|---|---|---|
| badgeMetaId | String | Unique identifier for the badge metadata. |
| ownerType | String | The module for which the badge is being claimed. |
| referenceId | String | An identifier associated with the owner. |
| errors | String | Contains details of any errors. |
| warnings | Array | Contains details of any warnings. |
API-specific error codes
| Error code | Description |
|---|---|
| 717 | OwnerId is mandatory. |
| 400 | Invalid enum value. |
| 900 | The badge is already claimed by the user. |
| 716 | Owner type is mandatory. |
