# Giftcard

Giftcard

## Get Giftcard details

> Get details for a giftcard

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Giftcard","description":"Giftcard"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"parameters":{"giftcardExtensionCode":{"name":"extensionCode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ExtendedGiftcardExtensionCodeENUM"},"description":"Reference to an extension"},"giftcardCvcNumberQuery":{"name":"cvc","in":"query","required":false,"schema":{"type":"string"},"description":"Reference to a giftcard CVC number."}},"schemas":{"ExtendedGiftcardExtensionCodeENUM":{"title":"ExtendedGiftcardExtensionCodeENUM","type":"string","enum":["FLOWGIFTCARD","STORE_CREDIT","BRITANNIA","PAYEX_GIFTCARD"]},"GiftcardDetailsResponseSchema":{"title":"GiftcardDetailsResponseSchema","type":"object","required":["balance","cardId","cardNumber","validTo","brandId","brandName","issuerName","note","status","cvcRequired","legacyCardNumber"],"properties":{"active":{"type":"boolean","deprecated":true},"balance":{"type":"integer"},"cardId":{"type":"integer"},"cardNumber":{"type":"string"},"validTo":{"type":"string","format":"date-time","nullable":true},"brandId":{"type":"integer"},"brandName":{"type":"string"},"issuerName":{"type":"string"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/GiftcardStatusENUM"},"cvcRequired":{"type":"boolean"},"legacyCardNumber":{"type":"string"}}},"GiftcardStatusENUM":{"title":"GiftcardStatusENUM","type":"string","enum":["ACTIVE","INACTIVE","CLEARED"],"description":"`CLEARED` means the card balance is emptied, the card is deactivated and can not be used anymore."}},"responses":{"GiftcardDetailsResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftcardDetailsResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/giftcards/{giftcardNumber}":{"get":{"description":"Get details for a giftcard","operationId":"get-tenants-stores-giftcards-details","parameters":[{"$ref":"#/components/parameters/giftcardExtensionCode"},{"$ref":"#/components/parameters/giftcardCvcNumberQuery"}],"responses":{"200":{"$ref":"#/components/responses/GiftcardDetailsResponse"}},"summary":"Get Giftcard details","tags":["Giftcard"]}}}}
```

## Update giftcard details

> Change expiry date or active status.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Giftcard","description":"Giftcard"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"GiftcardDetailsResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftcardDetailsResponseSchema"}}},"description":"Example response"}},"schemas":{"GiftcardDetailsResponseSchema":{"title":"GiftcardDetailsResponseSchema","type":"object","required":["balance","cardId","cardNumber","validTo","brandId","brandName","issuerName","note","status","cvcRequired","legacyCardNumber"],"properties":{"active":{"type":"boolean","deprecated":true},"balance":{"type":"integer"},"cardId":{"type":"integer"},"cardNumber":{"type":"string"},"validTo":{"type":"string","format":"date-time","nullable":true},"brandId":{"type":"integer"},"brandName":{"type":"string"},"issuerName":{"type":"string"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/GiftcardStatusENUM"},"cvcRequired":{"type":"boolean"},"legacyCardNumber":{"type":"string"}}},"GiftcardStatusENUM":{"title":"GiftcardStatusENUM","type":"string","enum":["ACTIVE","INACTIVE","CLEARED"],"description":"`CLEARED` means the card balance is emptied, the card is deactivated and can not be used anymore."},"GiftcardExtensionENUM":{"title":"GiftcardExtensionENUM","type":"string","enum":["FLOWGIFTCARD","STORE_CREDIT","PAYEX_GIFTCARD"]}},"requestBodies":{"GiftcardUpdateRequest":{"content":{"application/json":{"schema":{"type":"object","properties":{"validTo":{"type":"string","format":"date-time"},"active":{"type":"boolean","deprecated":true},"note":{"type":"string"},"extensionCode":{"$ref":"#/components/schemas/GiftcardExtensionENUM"},"status":{"$ref":"#/components/schemas/GiftcardStatusENUM"}}}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/giftcards/{giftcardNumber}":{"put":{"summary":"Update giftcard details","tags":["Giftcard"],"responses":{"200":{"$ref":"#/components/responses/GiftcardDetailsResponse"}},"operationId":"put-giftcards-giftcardNumber","requestBody":{"$ref":"#/components/requestBodies/GiftcardUpdateRequest"},"description":"Change expiry date or active status."}}}}
```
