# Get Client Rewards

## Get client gifts

> Retrieve all gifts (virtual, physical, and tickets) for a specific client.\
> \
> Gift types:\
> \- \*\*Virtual Gifts\*\*: Virtual type gifts\
> \- \*\*Physical Gifts\*\*: Physical type gifts\
> \- \*\*Tickets\*\*: Coupons (default gift) that are unused\
> \
> Conditional validation rules:\
> \- Either provide 'clientId' OR both 'platform' and 'platformClientId'<br>

```json
{"openapi":"3.0.3","info":{"title":"Manta OpenAPI","version":"0.318.0"},"tags":[{"name":"Client Points & Gifts","description":"Client points and gifts management"}],"servers":[{"url":"https://mantago.cc/api","description":"MantaGo Openapi host url"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token for API authentication"}},"schemas":{"ClientIdentificationRequest":{"type":"object","properties":{"secret":{"type":"string","description":"Secret key for API authentication"},"clientId":{"type":"string","description":"The client ID (required if platform + platformClientId not provided)"},"platform":{"type":"string","enum":["line","facebook","instagram","liveChat","whatsapp"],"description":"Platform type (required if platformClientId provided)"},"platformClientId":{"type":"string","description":"Platform-specific client ID (required if clientId not provided)"}},"required":["secret"],"description":"Client identification rules:\n- Either provide 'clientId' OR both 'platform' and 'platformClientId'\n"},"ClientGiftsResponse":{"allOf":[{"$ref":"#/components/schemas/BasicSuccessResponse"},{"type":"object","properties":{"tickets":{"type":"array","description":"Ticket gifts (default type unused coupons)","items":{"$ref":"#/components/schemas/TicketGift"}},"physicalGifts":{"type":"array","description":"Physical type gifts","items":{"$ref":"#/components/schemas/GiftItem"}},"virtualGifts":{"type":"array","description":"Virtual gifts (non-default virtual gifts)","items":{"$ref":"#/components/schemas/GiftItem"}}}}]},"BasicSuccessResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]},"TicketGift":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","description":"Ticket creation timestamp"}},"required":["createdAt"]},"GiftItem":{"type":"object","properties":{"name":{"type":"string","description":"Gift name"},"resource":{"type":"string","description":"Gift resource type","enum":["lotteryGame","rewardsCard","unknown"]},"createdAt":{"type":"string","format":"date-time","description":"Gift creation timestamp"},"isExpired":{"type":"boolean","description":"Whether the virtual gift is expired (outside valid time range)"},"startTime":{"type":"string","format":"date-time","description":"Gift valid start time (only present when isExpired is true)"},"endTime":{"type":"string","format":"date-time","description":"Gift valid end time (only present when isExpired is true)"}},"required":["name","resource","createdAt","isExpired"]},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean"},"errResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"},"botId":{"type":"string"}},"required":["message","code"]}},"required":["success","errResponse"]}},"responses":{"TokenError":{"description":"JWT token is invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"PermissionError":{"description":"Permission denied - insufficient access rights","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimitError":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/openapi/client/gift":{"post":{"tags":["Client Points & Gifts"],"summary":"Get client gifts","description":"Retrieve all gifts (virtual, physical, and tickets) for a specific client.\n\nGift types:\n- **Virtual Gifts**: Virtual type gifts\n- **Physical Gifts**: Physical type gifts\n- **Tickets**: Coupons (default gift) that are unused\n\nConditional validation rules:\n- Either provide 'clientId' OR both 'platform' and 'platformClientId'\n","parameters":[{"name":"botId","in":"query","required":true,"schema":{"type":"string"},"description":"The bot ID for the API request"},{"name":"platformClientId","in":"query","required":false,"schema":{"type":"string"},"description":"Platform-specific client ID (required if clientId not provided in body)"},{"name":"platform","in":"query","required":false,"schema":{"type":"string","enum":["line","facebook","instagram","liveChat","whatsapp"]},"description":"Platform type (required if platformClientId provided)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientIdentificationRequest"}}}},"responses":{"200":{"description":"Client gifts retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientGiftsResponse"}}}},"401":{"$ref":"#/components/responses/TokenError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.mantago.cc/mantago-en/documentation-1/client-api/get-client-rewards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
