# Gift card

A gift card is identified by its unique code, and has a balance that can be redeemed depending on the status. It may have terms and conditions that apply to its use.

## List gift cards

> List gift cards

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Gift card","description":"A gift card is identified by its unique code, and has a balance that can be redeemed depending on the status. It may have terms and conditions that apply to its use."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Gift.card-giftcard.read":{"type":"object","description":"A gift card is identified by its unique code, and has a balance that can be redeemed depending on the status. It may have terms and conditions that apply to its use.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"contact":{"description":"An optional contact that the gift card is registered to.","type":["string","null"],"format":"iri-reference"},"status":{"type":"string","enum":["Chargeback","Expired","Fraudulent","Not yet valid","Partially redeemed","Redeemed","Refunded","Valid","Grace period"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"gracePeriodExpiresAt":{"type":["string","null"],"format":"date-time"},"validFrom":{"type":"string","format":"date-time"},"partiallyRedeemable":{"default":true,"type":"boolean"},"name":{"type":"string"},"topupable":{"default":false,"type":"boolean"},"terms":{"default":"","type":"string"},"selectedOptions":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardSelectedOption-giftcard.read"}},"recipientDescription":{"default":"","type":"string"},"usingRecipientDescription":{"default":false,"type":"boolean"},"description":{"default":"","type":"string"},"personalMessage":{"default":"","type":["string","null"]},"class":{"type":"string","enum":["Standard","Monetary","Configurable"]},"redeemInstructions":{"default":"","type":["string","null"]},"lastRedeemedAt":{"type":["string","null"],"format":"date-time"},"purchaserName":{"default":"","type":"string"},"deliveryName":{"default":"","type":"string"},"latestEmailDeliveryStatus":{"type":["string","null"],"enum":["Processed","Dropped","Delivered","Deferred","Bounced","Blocked","Opened","Clicked","Reported as spam","Unsubscribed","Group unsubscribed","Group resubscribed",null]},"additionalLocations":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardLocation-giftcard.read"}}}},"GiftCardSelectedOption-giftcard.read":{"type":"object"},"GiftCardLocation-giftcard.read":{"type":"object"},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}}}},"paths":{"/gift_cards":{"get":{"operationId":"api_gift_cards_get_collection","tags":["Gift card"],"responses":{"200":{"description":"Gift card collection","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Gift.card-giftcard.read"}}}}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}}},"summary":"List gift cards","description":"List gift cards","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"schema":{"type":"integer","default":1},"style":"form","explode":true}]}}}}
```

## Issue a new gift card

> Issues a new gift card. A storeId is always required. Provide either a productVariantId to create from an existing product, or provide a name (required), description, and terms to create a gift card manually. Optionally assign to a contact, set an initial balance amount, personal message, currency code, or specify a custom code.

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Gift card","description":"A gift card is identified by its unique code, and has a balance that can be redeemed depending on the status. It may have terms and conditions that apply to its use."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Gift.card-giftcard.read":{"type":"object","description":"A gift card is identified by its unique code, and has a balance that can be redeemed depending on the status. It may have terms and conditions that apply to its use.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"contact":{"description":"An optional contact that the gift card is registered to.","type":["string","null"],"format":"iri-reference"},"status":{"type":"string","enum":["Chargeback","Expired","Fraudulent","Not yet valid","Partially redeemed","Redeemed","Refunded","Valid","Grace period"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"gracePeriodExpiresAt":{"type":["string","null"],"format":"date-time"},"validFrom":{"type":"string","format":"date-time"},"partiallyRedeemable":{"default":true,"type":"boolean"},"name":{"type":"string"},"topupable":{"default":false,"type":"boolean"},"terms":{"default":"","type":"string"},"selectedOptions":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardSelectedOption-giftcard.read"}},"recipientDescription":{"default":"","type":"string"},"usingRecipientDescription":{"default":false,"type":"boolean"},"description":{"default":"","type":"string"},"personalMessage":{"default":"","type":["string","null"]},"class":{"type":"string","enum":["Standard","Monetary","Configurable"]},"redeemInstructions":{"default":"","type":["string","null"]},"lastRedeemedAt":{"type":["string","null"],"format":"date-time"},"purchaserName":{"default":"","type":"string"},"deliveryName":{"default":"","type":"string"},"latestEmailDeliveryStatus":{"type":["string","null"],"enum":["Processed","Dropped","Delivered","Deferred","Bounced","Blocked","Opened","Clicked","Reported as spam","Unsubscribed","Group unsubscribed","Group resubscribed",null]},"additionalLocations":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardLocation-giftcard.read"}}}},"GiftCardSelectedOption-giftcard.read":{"type":"object"},"GiftCardLocation-giftcard.read":{"type":"object"},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}},"ConstraintViolation.jsonld":{"type":"object","description":"Unprocessable entity","properties":{"status":{"default":422,"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"propertyPath":{"type":"string","description":"The property path of the violation"},"message":{"type":"string","description":"The message associated with the violation"},"code":{"type":"string","description":"The code of the violation"},"hint":{"type":"string","description":"An extra hint to understand the violation"},"payload":{"type":"object","additionalProperties":true,"description":"The serialized payload of the violation"}},"required":["propertyPath","message"]}},"detail":{"readOnly":true,"type":"string"},"description":{"readOnly":true,"type":"string"},"type":{"readOnly":true,"type":"string"},"title":{"readOnly":true,"type":["string","null"]},"instance":{"readOnly":true,"type":["string","null"]}}},"ConstraintViolation":{"type":"object","description":"Unprocessable entity","properties":{"status":{"default":422,"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"propertyPath":{"type":"string","description":"The property path of the violation"},"message":{"type":"string","description":"The message associated with the violation"},"code":{"type":"string","description":"The code of the violation"},"hint":{"type":"string","description":"An extra hint to understand the violation"},"payload":{"type":"object","additionalProperties":true,"description":"The serialized payload of the violation"}},"required":["propertyPath","message"]}},"detail":{"readOnly":true,"type":"string"},"type":{"readOnly":true,"type":"string"},"title":{"readOnly":true,"type":["string","null"]},"instance":{"readOnly":true,"type":["string","null"]}}},"Gift.card.IssueGiftCardInput-giftcard.write":{"type":"object","description":"A gift card is identified by its unique code, and has a balance that can be redeemed depending on the status. It may have terms and conditions that apply to its use.","properties":{"productVariantId":{"type":["integer","null"]},"storeId":{"type":"integer"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"terms":{"type":["string","null"]},"contactId":{"type":["integer","null"]},"amount":{"minimum":0,"type":["integer","null"]},"personalMessage":{"type":["string","null"]},"currencyCode":{"minLength":3,"maxLength":3,"type":["string","null"]},"code":{"type":["string","null"]}},"required":["storeId"]}}},"paths":{"/gift_cards":{"post":{"operationId":"api_gift_cards_post","tags":["Gift card"],"responses":{"201":{"description":"Gift card resource created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Gift.card-giftcard.read"}}},"links":{}},"400":{"description":"Invalid input","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}},"422":{"description":"An error occurred","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/ConstraintViolation.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConstraintViolation"}},"application/json":{"schema":{"$ref":"#/components/schemas/ConstraintViolation"}}},"links":{}}},"summary":"Issue a new gift card","description":"Issues a new gift card. A storeId is always required. Provide either a productVariantId to create from an existing product, or provide a name (required), description, and terms to create a gift card manually. Optionally assign to a contact, set an initial balance amount, personal message, currency code, or specify a custom code.","parameters":[],"requestBody":{"description":"The new Gift card resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Gift.card.IssueGiftCardInput-giftcard.write"}}},"required":true}}}}}
```

## Retrieve a gift card

> Retrieve a gift card

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Gift card","description":"A gift card is identified by its unique code, and has a balance that can be redeemed depending on the status. It may have terms and conditions that apply to its use."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Gift.card-giftcard.read":{"type":"object","description":"A gift card is identified by its unique code, and has a balance that can be redeemed depending on the status. It may have terms and conditions that apply to its use.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"contact":{"description":"An optional contact that the gift card is registered to.","type":["string","null"],"format":"iri-reference"},"status":{"type":"string","enum":["Chargeback","Expired","Fraudulent","Not yet valid","Partially redeemed","Redeemed","Refunded","Valid","Grace period"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"gracePeriodExpiresAt":{"type":["string","null"],"format":"date-time"},"validFrom":{"type":"string","format":"date-time"},"partiallyRedeemable":{"default":true,"type":"boolean"},"name":{"type":"string"},"topupable":{"default":false,"type":"boolean"},"terms":{"default":"","type":"string"},"selectedOptions":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardSelectedOption-giftcard.read"}},"recipientDescription":{"default":"","type":"string"},"usingRecipientDescription":{"default":false,"type":"boolean"},"description":{"default":"","type":"string"},"personalMessage":{"default":"","type":["string","null"]},"class":{"type":"string","enum":["Standard","Monetary","Configurable"]},"redeemInstructions":{"default":"","type":["string","null"]},"lastRedeemedAt":{"type":["string","null"],"format":"date-time"},"purchaserName":{"default":"","type":"string"},"deliveryName":{"default":"","type":"string"},"latestEmailDeliveryStatus":{"type":["string","null"],"enum":["Processed","Dropped","Delivered","Deferred","Bounced","Blocked","Opened","Clicked","Reported as spam","Unsubscribed","Group unsubscribed","Group resubscribed",null]},"additionalLocations":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardLocation-giftcard.read"}}}},"GiftCardSelectedOption-giftcard.read":{"type":"object"},"GiftCardLocation-giftcard.read":{"type":"object"},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}}}},"paths":{"/gift_cards/{id}":{"get":{"operationId":"api_gift_cards_id_get","tags":["Gift card"],"responses":{"200":{"description":"Gift card resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Gift.card-giftcard.read"}}}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}},"404":{"description":"Not found","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}}},"summary":"Retrieve a gift card","description":"Retrieve a gift card","parameters":[{"name":"id","in":"path","description":"Gift card identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false}]}}}}
```


---

# 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://glu.gitbook.io/docs/api-reference/organisation-api/gift-card.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.
