Centro de Ayuda de Dardo
Referencia

Juegos

Mecánicas de juego asociadas a una tarjeta.

GET/api/v2/games

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Query Parameters

page?integer

Page number

Range1 <= value
Default1
itemsPerPage?integer

Items per page

Range1 <= value <= 1000
Default30

Response Body

application/json

curl -X GET "https://example.com/api/v2/games"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "meta": {    "totalItems": 0,    "itemsPerPage": 0,    "currentPage": 0  },  "data": [    {      "config": {        "colors": {          "bgFrom": "string",          "bgTo": "string",          "text": "string",          "border": "string",          "pointer": "string",          "button": "string",          "marquee": "string",          "marqueeText": "string"        },        "meta": {          "title": "string",          "description": "string"        },        "logo": "string",        "headline": "string",        "marquee": [          "string"        ],        "texts": {          "winGift": {            "icon": "string",            "title": "string",            "description": "string",            "claimLabel": "string"          },          "lose": {            "icon": "string",            "title": "string",            "description": "string",            "continueLabel": "string"          },          "alreadyPlayed": {            "icon": "string",            "title": "string",            "description": "string"          },          "gate1": {            "icon": "string",            "title": "string",            "description": "string",            "confirmLabel": "string",            "skipLabel": "string"          },          "gate2": {            "icon": "string",            "title": "string",            "description": "string",            "confirmLabel": "string",            "skipLabel": "string"          },          "waiting": {            "icon": "string",            "title": "string",            "description": "string"          }        }      },      "prizes": [        {          "id": 0,          "type": "string",          "label": "string",          "emoji": "string",          "color": "string",          "textColor": "string",          "weight": 0,          "templateId": 0,          "displayOrder": 0,          "isPlayable": true        }      ],      "utmLinks": [        {          "id": 0,          "gameId": 0,          "type": "string",          "name": "string",          "utmSource": "string",          "shortLink": "string",          "isActive": true        }      ],      "id": 0,      "type": "string",      "name": "string",      "active": true,      "objective": "string",      "objectiveUrl": "string",      "playFrequencyDays": 0,      "termsUrl": "string",      "claimTtlHours": 0,      "idHash": "string",      "qrLink": "string",      "createdAt": "string"    }  ]}
POST/api/v2/games

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v2/games" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "config": {      "colors": {        "bgFrom": "string",        "bgTo": "string",        "text": "string",        "border": "string",        "pointer": "string",        "button": "string",        "marquee": "string",        "marqueeText": "string"      },      "meta": {        "title": "string",        "description": "string"      },      "logo": "string",      "headline": "string",      "marquee": [        "string"      ],      "texts": {        "winGift": {          "icon": "string",          "title": "string",          "description": "string",          "claimLabel": "string"        },        "lose": {          "icon": "string",          "title": "string",          "description": "string",          "continueLabel": "string"        },        "alreadyPlayed": {          "icon": "string",          "title": "string",          "description": "string"        },        "gate1": {          "icon": "string",          "title": "string",          "description": "string",          "confirmLabel": "string",          "skipLabel": "string"        },        "gate2": {          "icon": "string",          "title": "string",          "description": "string",          "confirmLabel": "string",          "skipLabel": "string"        },        "waiting": {          "icon": "string",          "title": "string",          "description": "string"        }      }    },    "prizes": [      {        "id": 0,        "type": "string",        "label": "string",        "emoji": "string",        "color": "string",        "textColor": "string",        "weight": 0,        "templateId": 0,        "displayOrder": 0,        "isPlayable": true      }    ],    "utmLinks": [      {        "id": 0,        "gameId": 0,        "type": "string",        "name": "string",        "utmSource": "string",        "shortLink": "string",        "isActive": true      }    ],    "id": 0,    "type": "string",    "name": "string",    "active": true,    "objective": "string",    "objectiveUrl": "string",    "playFrequencyDays": 0,    "termsUrl": "string",    "claimTtlHours": 0,    "idHash": "string",    "qrLink": "string",    "createdAt": "string"  }}
GET/api/v2/games/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X GET "https://example.com/api/v2/games/string"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "config": {      "colors": {        "bgFrom": "string",        "bgTo": "string",        "text": "string",        "border": "string",        "pointer": "string",        "button": "string",        "marquee": "string",        "marqueeText": "string"      },      "meta": {        "title": "string",        "description": "string"      },      "logo": "string",      "headline": "string",      "marquee": [        "string"      ],      "texts": {        "winGift": {          "icon": "string",          "title": "string",          "description": "string",          "claimLabel": "string"        },        "lose": {          "icon": "string",          "title": "string",          "description": "string",          "continueLabel": "string"        },        "alreadyPlayed": {          "icon": "string",          "title": "string",          "description": "string"        },        "gate1": {          "icon": "string",          "title": "string",          "description": "string",          "confirmLabel": "string",          "skipLabel": "string"        },        "gate2": {          "icon": "string",          "title": "string",          "description": "string",          "confirmLabel": "string",          "skipLabel": "string"        },        "waiting": {          "icon": "string",          "title": "string",          "description": "string"        }      }    },    "prizes": [      {        "id": 0,        "type": "string",        "label": "string",        "emoji": "string",        "color": "string",        "textColor": "string",        "weight": 0,        "templateId": 0,        "displayOrder": 0,        "isPlayable": true      }    ],    "utmLinks": [      {        "id": 0,        "gameId": 0,        "type": "string",        "name": "string",        "utmSource": "string",        "shortLink": "string",        "isActive": true      }    ],    "id": 0,    "type": "string",    "name": "string",    "active": true,    "objective": "string",    "objectiveUrl": "string",    "playFrequencyDays": 0,    "termsUrl": "string",    "claimTtlHours": 0,    "idHash": "string",    "qrLink": "string",    "createdAt": "string"  }}
PATCH/api/v2/games/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v2/games/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "config": {      "colors": {        "bgFrom": "string",        "bgTo": "string",        "text": "string",        "border": "string",        "pointer": "string",        "button": "string",        "marquee": "string",        "marqueeText": "string"      },      "meta": {        "title": "string",        "description": "string"      },      "logo": "string",      "headline": "string",      "marquee": [        "string"      ],      "texts": {        "winGift": {          "icon": "string",          "title": "string",          "description": "string",          "claimLabel": "string"        },        "lose": {          "icon": "string",          "title": "string",          "description": "string",          "continueLabel": "string"        },        "alreadyPlayed": {          "icon": "string",          "title": "string",          "description": "string"        },        "gate1": {          "icon": "string",          "title": "string",          "description": "string",          "confirmLabel": "string",          "skipLabel": "string"        },        "gate2": {          "icon": "string",          "title": "string",          "description": "string",          "confirmLabel": "string",          "skipLabel": "string"        },        "waiting": {          "icon": "string",          "title": "string",          "description": "string"        }      }    },    "prizes": [      {        "id": 0,        "type": "string",        "label": "string",        "emoji": "string",        "color": "string",        "textColor": "string",        "weight": 0,        "templateId": 0,        "displayOrder": 0,        "isPlayable": true      }    ],    "utmLinks": [      {        "id": 0,        "gameId": 0,        "type": "string",        "name": "string",        "utmSource": "string",        "shortLink": "string",        "isActive": true      }    ],    "id": 0,    "type": "string",    "name": "string",    "active": true,    "objective": "string",    "objectiveUrl": "string",    "playFrequencyDays": 0,    "termsUrl": "string",    "claimTtlHours": 0,    "idHash": "string",    "qrLink": "string",    "createdAt": "string"  }}
DELETE/api/v2/games/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "https://example.com/api/v2/games/string"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "id": 0  }}
GET/api/v2/games/{id}/stats

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X GET "https://example.com/api/v2/games/string/stats"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "totalPlays": 0,    "wins": 0,    "losses": 0,    "claims": 0,    "expired": 0,    "claimRate": 0.1,    "objectiveCompleted": 0,    "objectiveSkipped": 0,    "prizes": [      null    ]  }}
GET/api/v2/games/{gameId}/utm-links

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

gameId*string

Response Body

application/json

curl -X GET "https://example.com/api/v2/games/string/utm-links"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": [    {      "id": 0,      "gameId": 0,      "type": "string",      "name": "string",      "utmSource": "string",      "shortLink": "string",      "isActive": true    }  ]}
POST/api/v2/games/{gameId}/utm-links

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

gameId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v2/games/string/utm-links" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "id": 0,    "gameId": 0,    "type": "string",    "name": "string",    "utmSource": "string",    "shortLink": "string",    "isActive": true  }}
GET/api/v2/games/{gameId}/utm-links/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

gameId*string
id*string

Response Body

application/json

curl -X GET "https://example.com/api/v2/games/string/utm-links/string"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "id": 0,    "gameId": 0,    "type": "string",    "name": "string",    "utmSource": "string",    "shortLink": "string",    "isActive": true  }}
DELETE/api/v2/games/{gameId}/utm-links/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

gameId*string
id*string

Response Body

application/json

curl -X DELETE "https://example.com/api/v2/games/string/utm-links/string"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "ok": true  }}