x-api-key: ********************
{
"title": "Gold Level",
"levelNumber": 32,
"rewards": {
"rewardIds": [
"123e4567-e89b-12d3-a456-426655440000"
],
"collectionIds": [
"123e4567-e89b-12d3-a456-426655440000"
]
}
}
curl --location --request POST 'https://testserver.loyi.io/public/api/leveling/milestone' \
--header 'Origin;' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Gold Level",
"levelNumber": 32,
"rewards": {
"rewardIds": [
"123e4567-e89b-12d3-a456-426655440000"
],
"collectionIds": [
"123e4567-e89b-12d3-a456-426655440000"
]
}
}'
{
"id": "123e4567-e89b-12d3-a456-426655440000",
"title": "Gold Level",
"levelNumber": 10,
"rewards": {
"rewards": [
{
"id": "123e4567-e89b-12d3-a456-426655440000",
"title": "Event Entry Pass",
"description": "An entry pass for the event",
"instruction": "Show this pass at the event entrance",
"type": "EntryPass",
"createdAt": "2022-01-01T00:00:00.000Z",
"updatedAt": "2022-01-01T00:00:00.000Z"
}
],
"collections": [
{
"id": "123e4567-e89b-12d3-a456-426655440000",
"publicId": "kdPd_ntE",
"name": "My Collection",
"description": "A collection of rewards",
"image": "https://example.com/image.jpg",
"amount": 10,
"collectible": {
"imagesURL": "ipfs://example",
"metadataURL": "ipfs://example"
},
"type": "oneToOne",
"contractAddress": "0x7B5DF6F27C32cEa2CeF2c4E812c0Ff4d0515B26B",
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z"
}
]
},
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z"
}