> For the complete documentation index, see [llms.txt](https://docs.hos.accessacloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/gift-card.md).

# Gift Card

Api Methods for GiftCard

## Get

> Get the balance of a Gift card

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"GiftCard","description":"Api Methods for GiftCard"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"GetOutput":{"type":"object","properties":{"Balance":{"type":"number","format":"double","nullable":true,"description":"Balnace of the card"},"Error":{"type":"string","description":"Error description"},"Response":{"type":"boolean","description":"The status call"}}}}},"paths":{"/api/GiftCard/Get":{"get":{"operationId":"GiftCardGet","summary":"Get","tags":["GiftCard"],"description":"Get the balance of a Gift card","parameters":[{"name":"GiftCard","in":"query","schema":{"type":"string","nullable":true},"description":"Native query parameter. CLR string GiftCard in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOutput"}}}}}}}}}
```

## Post

> Add/Update a gift card in Atreemo (GiftCode is the field used to check the existance)

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"GiftCard","description":"Api Methods for GiftCard"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"GiftCardPostInput":{"type":"object","nullable":true,"properties":{"GiftCard":{"allOf":[{"$ref":"#/components/schemas/GiftCard"}]},"Purchaser":{"allOf":[{"$ref":"#/components/schemas/ContactWithOptin"}]},"Recipient":{"allOf":[{"$ref":"#/components/schemas/ContactWithOptin"}]},"Actions":{"allOf":[{"$ref":"#/components/schemas/Actions"}]},"PurchaserIsRecipient":{"type":"boolean"},"BrandID":{"type":"integer","format":"int32","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"GiftCard":{"type":"object","nullable":true,"properties":{"Quantity":{"type":"integer","format":"int32"},"UnitPrice":{"type":"number","format":"double"},"TotalPrice":{"type":"number","format":"double"},"Message":{"type":"string","nullable":true},"Source":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"GiftCode":{"type":"string","nullable":true},"ValidFromDate":{"type":"string","format":"date-time","nullable":true},"ExpiryDate":{"type":"string","format":"date-time","nullable":true},"CreationDate":{"type":"string","format":"date-time","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"ContactWithOptin":{"type":"object","nullable":true,"properties":{"Contact":{"allOf":[{"$ref":"#/components/schemas/Contact"}]},"ContactOptin":{"allOf":[{"$ref":"#/components/schemas/CommsPreferenceInput"}]}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"Contact":{"type":"object","properties":{"_Title":{"type":"string","description":"Person title"},"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"BrandID":{"type":"integer","format":"int32","nullable":true,"description":"The ID of the Brand the customer should belongs to"},"CardTokensList":{"type":"array","items":{"type":"string"},"description":"return the list of card tokens linked to this contact"},"Company":{"allOf":[{"$ref":"#/components/schemas/Company"}],"description":"Collection of company information"},"CpyID":{"type":"integer","format":"int32","description":"Houshold ID in B2C intance Company ID in B2B intance"},"CreateDate":{"type":"string","format":"date-time","nullable":true,"description":"Creation Date (used only in PostContact)"},"CtcID":{"type":"integer","format":"int32","description":"The ID of the customer (CtcID)"},"CtcNotes":{"allOf":[{"$ref":"#/components/schemas/CtcCpyNotes"}],"description":"Collection of complementary notes"},"CurrentMemberNumber":{"type":"string","description":"return the last member number linked to this contact"},"CurrentReferrerCode":{"type":"string","description":"Get the referrer code of the contact"},"DeleteMyData":{"type":"boolean","nullable":true,"description":"Confirmation to delete the personal data of this contact (USED ONLY in PUTCONTACT)"},"DoNotExport":{"type":"boolean","description":"Shows if contact can be exported"},"Email":{"type":"string","description":"Email address"},"FirstName":{"type":"string","description":"First Name"},"HomeSiteID":{"type":"string","description":"The Site ID added will be used to flag the customer against a Selected Site"},"LastName":{"type":"string","description":"Last Name"},"MemberNumbersList":{"type":"array","items":{"type":"string"},"description":"return the list of member numbers linked to this contact"},"MobilPhone":{"type":"string","description":"Mobile number"},"ModifDate":{"type":"string","format":"date-time","nullable":true,"description":"Last modification date (used only in PostContact)"},"ModifiedBy":{"type":"integer","format":"int32","nullable":true,"description":"CtcID of the user who applied the last modification"},"OriginID":{"type":"string","description":"OriginID"},"ParentEmailAddress":{"type":"string","description":"Parent Email Address (To be used when the contact age under 16)"},"Phone":{"type":"string","description":"Landline number"},"Picture":{"type":"string","format":"byte","description":"The Image of the contact"},"PositionFreeText":{"type":"string","description":"Job Free Text"},"PredefinedGender":{"description":"Gender : Unknown, Male, Female, PreferNotToSay, (Documented as type `GenderEnum`. The published description lists the values captured in `x-atreemo-documented-names`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"ProcessMydata":{"type":"boolean","nullable":true,"description":"Confirmation to process the data of this contact (USED ONLY in PUTCONTACT)"},"ReferredByCode":{"type":"string","description":"Get or Update the referred by code of the contact"},"ReferrerCode":{"type":"string","description":"Update the referrer code of the contact"},"ReferrerCodeList":{"type":"array","items":{"type":"string"},"description":"return the list of referre codes linked to this contact"},"SourceID":{"type":"string","description":"Source ID"},"SupInfo":{"type":"array","items":{"$ref":"#/components/schemas/SupInfo"},"description":"Collection of contact supplementary information"},"UpdateIfPopulated":{"type":"boolean","description":"Used only in PutContact method (Default = false). This will allow the user to update just a specifc contact field(s) IF false : the request will be considered as PUT HTTP request (updates the entire resource) IF true : the request will be considered as PATCH HTTP request (partial update). Only populated fields will be updated."}}},"Company":{"type":"object","nullable":true,"description":"Source-backed JSON members. IgnoreDataMember members are omitted even when the controller populates them. CpyNotes is a virtual CtcCpyNotes property, not a CLR type named virtual. No required property presence is inferred from CLR types.","properties":{"Building":{"type":"string","nullable":true,"description":"Address 1"},"City":{"type":"string","nullable":true,"description":"City"},"CpyID":{"type":"integer","format":"int32","description":"Houshold ID in B2C intance Company ID in B2B intance"},"Name":{"type":"string","nullable":true,"description":"Houshold name in B2C intance Company name in B2B intance"},"PostCode":{"type":"string","nullable":true,"description":"Postcode"},"StateCode":{"type":"string","nullable":true,"description":"StateCode"},"StateName":{"type":"string","nullable":true,"description":"County"},"Street":{"type":"string","nullable":true,"description":"Address 2"},"Zone":{"type":"string","nullable":true,"description":"Address 3"},"CountryCode":{"type":"string","nullable":true,"description":"Country code; source documentation describes two-character values."},"CountryName":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Web":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"NationalID":{"type":"string","nullable":true},"SourceID":{"type":"string","nullable":true},"OriginID":{"type":"string","nullable":true},"CreateDate":{"type":"string","format":"date-time","nullable":true},"LastModifDate":{"type":"string","format":"date-time","nullable":true},"ModifiedBy":{"type":"integer","format":"int32","nullable":true},"CpyNotes":{"allOf":[{"$ref":"#/components/schemas/CtcCpyNotes"}]},"SupInfo":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SupInfo"}}}},"CtcCpyNotes":{"type":"object","nullable":true,"properties":{"Comment":{"type":"string","nullable":true,"description":"Comment Text"},"CtcCpyID":{"type":"integer","format":"int32","description":"Contact ID"},"NoteUserID":{"type":"integer","format":"int32"},"SourceNote":{"type":"integer","format":"int32"},"LastModifiedBy":{"type":"string","nullable":true},"LastModifiedOn":{"type":"string","format":"date-time"},"AttachmentFilesList":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CtcCpyNotesAttachment"}},"AttachmentFilesListString":{"type":"array","nullable":true,"items":{"type":"string","nullable":true}}},"description":"Source-backed note model; individual actions may use only a subset of these members. No property presence is inferred solely from CLR types."},"CtcCpyNotesAttachment":{"type":"object","nullable":true,"properties":{"<AttachmentName>k__BackingField":{"type":"string","nullable":true},"<AttachmentID>k__BackingField":{"type":"string","nullable":true},"<FileName>k__BackingField":{"type":"string","nullable":true},"<FileContent>k__BackingField":{"type":"string","nullable":true},"<ContentType>k__BackingField":{"type":"string","nullable":true},"<FileSize>k__BackingField":{"type":"integer","format":"int32","nullable":true},"<ID>k__BackingField":{"type":"integer","format":"int32","nullable":true},"<HasContent>k__BackingField":{"type":"boolean"}},"description":"The nested Atreemo.Models.CtcCpyNotes.Attachment class is Serializable. The ordinary Web API formatter therefore exposes compiler backing-field names, not the property names used by a default Json.NET resolver. Runtime-unverified."},"SupInfo":{"type":"object","nullable":true,"properties":{"FieldContent":{"type":"string","nullable":true,"description":"Field value"},"FieldName":{"type":"string","nullable":true,"description":"Field name"}}},"CommsPreferenceInput":{"type":"object","properties":{"BrandID":{"type":"integer","format":"int32","nullable":true,"description":"The brand ID where the change should be applied"},"ChangeDate":{"type":"string","format":"date-time","nullable":true,"description":"Change date (current date if empty)"},"CustomerID":{"type":"integer","format":"int32","description":"The unique identifier of the customer in CRM side (CtcID)."},"EmailOptin":{"type":"boolean","nullable":true,"description":"True if would receive an email"},"MailOptin":{"type":"boolean","nullable":true,"description":"True if would receive a mail"},"PhoneOptin":{"type":"boolean","nullable":true,"description":"True if would receive a call"},"PushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if would receive a mobile app push notification"},"SmsOptin":{"type":"boolean","nullable":true,"description":"True if would receive an Sms"},"SupInfo":{"type":"array","items":{"$ref":"#/components/schemas/SupInfo"},"description":"Collection of contact supplementary information"},"WebPushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if would receive a mobile app push notification"}},"required":["CustomerID"]},"Actions":{"type":"object","nullable":true,"properties":{"CreateInAtreemo":{"type":"boolean"},"CreateInEagleEye":{"type":"boolean"},"FeedInjection":{"type":"boolean"}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"ApiOutput":{"type":"object","properties":{"Error":{"type":"string","description":"Error description"},"Response":{"type":"boolean","description":"The status call"}}}}},"paths":{"/api/GiftCard/Post":{"post":{"operationId":"GiftCardPost","summary":"Post","tags":["GiftCard"],"description":"Add/Update a gift card in Atreemo (GiftCode is the field used to check the existance)","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardPostInput"}}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiOutput"}}}}}}}}}
```

## Refund

> refund the amount of a gift card

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"GiftCard","description":"Api Methods for GiftCard"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"RefundInput":{"type":"object","properties":{"Amount":{"type":"number","format":"double","description":"Amount to be deducted"},"Date":{"type":"string","format":"date-time","nullable":true,"description":"Widhraw date"},"ExternalID":{"type":"string","description":"Widhraw external ID"},"GiftCard":{"type":"string","description":"Gift Card Number"},"LocationID":{"type":"string","description":"Location where the transction has been made"}}},"RefundOutput":{"type":"object","properties":{"Error":{"type":"string","description":"Error description"},"RemainingBalance":{"type":"number","format":"double","description":"Remaining balance in the card"},"Response":{"type":"boolean","description":"The status call"}}}}},"paths":{"/api/GiftCard/Refund":{"post":{"operationId":"GiftCardRefund","summary":"Refund","tags":["GiftCard"],"description":"refund the amount of a gift card","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundOutput"}}}}}}}}}
```

## Withdraw

> Withdraw the amount of a gift card

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"GiftCard","description":"Api Methods for GiftCard"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"WithdrawInput":{"type":"object","properties":{"Amount":{"type":"number","format":"double","description":"Amount to be deducted"},"Date":{"type":"string","format":"date-time","nullable":true,"description":"Widhraw date"},"ExternalID":{"type":"string","description":"Widhraw external ID"},"GiftCard":{"type":"string","description":"Gift Card Number"},"LocationID":{"type":"string","description":"Location where the transction has been made"}}},"WithdrawOutput":{"type":"object","properties":{"Error":{"type":"string","description":"Error description"},"RemainingBalance":{"type":"number","format":"double","description":"Remaining balance in the card"},"Response":{"type":"boolean","description":"The status call"}}}}},"paths":{"/api/GiftCard/Withdraw":{"post":{"operationId":"GiftCardWithdraw","summary":"Withdraw","tags":["GiftCard"],"description":"Withdraw the amount of a gift card","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawOutput"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/gift-card.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
