When sending out email gift cards a gift card design must be specified. This operation retrieves all the available GlobalGiving gift card designs to select from. This is a secure request as indicated by the '/secure/' element in the URL path, therefore, an access token (authentication) is required.
GET
xml, json
xml, json
https://api.globalgiving.org/api/secure/givingservice/giftcarddesigns
&api_key described in the API Key section, required
&api_token described in the Access Token section, required
/api/secure/givingservice/giftcarddesigns?api_key=YOUR_API_KEY&api_token= SOME_API_TOKEN
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "https://api.globalgiving.org/api/secure/givingservice/giftcarddesigns?api_key=YOUR_API_KEY&api_token=SOME_API_TOKEN"
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<giftCardDesigns>
<giftCardDesign>
<active>true</active>
<addressRequired>false</addressRequired>
<amountRequired>true</amountRequired>
<cardType>giftcertificate</cardType>
<custom>false</custom>
<emailRequired>true</emailRequired>
<giftCertificate>true</giftCertificate>
<id>28</id>
<imageUrl>https://www.globalgiving.org/img/giftCards/ecard_green.gif</imageUrl>
<media>electronic</media>
<name>The Gift of Green</name>
<previewImageUrl>https://www.globalgiving.org/img/giftCards/ecard_green_preview.gif</previewImageUrl>
<quantityRequired>false</quantityRequired>
<sendToRequired>true</sendToRequired>
<thumbnailUrl>https://www.globalgiving.org/img/giftCards/ecard_green_preview.gif</thumbnailUrl>
</giftCardDesign>
.
.
</giftCardDesigns>
NOTE: The <giftCardDesign> elements are repeating.
giftCardDesigns |
|
Element | Mandatory | Description |
---|---|---|
active | required | True if this gift card is flagged as active on the GlobalGiving site. |
addressRequired | required | True if an address is required when sending a gift card. |
amountRequired | required | True if an amount is required when sending a gift card. |
cardType | required | Type of gift card. |
custom | required | True if this is a custom gift card. |
emailRequired | required | True if an email is required when sending a gift card. |
giftCertificate | required | True if this gift card is a gift certificate. |
id | required | Unique identifier for the gift card design. Used when sending a gift card and specifying the gift card design. |
imageUrl | required | Url of the gift card image. |
media | required | Type of media for this gift card. |
name | required | Name of the gift card on the GlobalGiving site. |
previewImageUrl | required | Url of the gift card preview (smaller) image. |
quantityRequired | required | True if a quantity (how many to generate) is required when sending a gift card. |
sendToRequired | required | True if "send to" information is required when sending a gift card. |
thumbnailUrl | required | Url of the thumbnail gift card image. |