GET rest/codes?externalId={externalId}&excludeExpiredCoupons={excludeExpiredCoupons}&excludeRedeemedCoupons={excludeRedeemedCoupons}
Gets existing coupon recipients identified by externalId.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
externalId |
External Id. |
string |
Required |
excludeExpiredCoupons |
Do not return expired coupons. |
boolean |
Default value is True |
excludeRedeemedCoupons |
Do not return redeemed coupons. |
boolean |
Default value is True |
Body Parameters
None.
Response Information
Resource Description
Collection of CouponRecipientExternalName | Description | Type | Additional information |
---|---|---|---|
Id |
Id of the coupon recipient. |
integer |
None. |
CouponId |
Id of the coupon the recipient belongs to. |
globally unique identifier |
None. |
CouponName |
Name of the coupon. Note: This is an internal name. |
string |
None. |
CouponBookId |
Id of the coupon booklet this coupon code is included in, or null if it is a standalone coupon code. |
globally unique identifier |
None. |
CouponBookName |
Name of the coupon booklet this coupon code is included in, or null if it is a standalone coupon code. Note: This is an internal name. |
string |
None. |
CouponCode |
Coupon code. |
string |
None. |
Url |
URL to the coupon code (webpage), if viewed in a browser. |
string |
None. |
Metadata |
Code metadata. |
CouponRecipientMetaData |
None. |
DynamicFields |
A list of dynamic fields. The key is used in the HTML template and replaced with the corresponding value when the actual coupon is served. |
Dictionary of string [key] and string [value] |
None. |
CouponVersion |
Coupon version. |
integer |
None. |
Response Formats
application/json, text/json
[ { "id": 1, "couponId": "754efd82-609a-4c08-a73f-7b5e688110d6", "couponName": "sample string 3", "couponBookId": "14d4168b-5e6d-4a57-b94b-fbc283b4dfa9", "couponBookName": "sample string 4", "couponCode": "sample string 5", "url": "sample string 6", "metadata": { "timesUsed": 1, "usageCount": 2, "validFrom": "2022-08-03T23:35:10.4230777Z", "validTo": "2022-08-03T23:35:10.4230777Z" }, "dynamicFields": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" }, "couponVersion": 7 }, { "id": 1, "couponId": "754efd82-609a-4c08-a73f-7b5e688110d6", "couponName": "sample string 3", "couponBookId": "14d4168b-5e6d-4a57-b94b-fbc283b4dfa9", "couponBookName": "sample string 4", "couponCode": "sample string 5", "url": "sample string 6", "metadata": { "timesUsed": 1, "usageCount": 2, "validFrom": "2022-08-03T23:35:10.4230777Z", "validTo": "2022-08-03T23:35:10.4230777Z" }, "dynamicFields": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" }, "couponVersion": 7 } ]
application/xml, text/xml
<ArrayOfCouponRecipientExternal xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.linkmobility.com/common/coupons"> <CouponRecipientExternal> <CouponBookId>14d4168b-5e6d-4a57-b94b-fbc283b4dfa9</CouponBookId> <CouponBookName>sample string 4</CouponBookName> <CouponCode>sample string 5</CouponCode> <CouponId>754efd82-609a-4c08-a73f-7b5e688110d6</CouponId> <CouponName>sample string 3</CouponName> <CouponVersion>7</CouponVersion> <DynamicFields xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>sample string 1</d3p1:Key> <d3p1:Value>sample string 2</d3p1:Value> </d3p1:KeyValueOfstringstring> <d3p1:KeyValueOfstringstring> <d3p1:Key>sample string 3</d3p1:Key> <d3p1:Value>sample string 4</d3p1:Value> </d3p1:KeyValueOfstringstring> </DynamicFields> <Id>1</Id> <Metadata> <TimesUsed>1</TimesUsed> <UsageCount>2</UsageCount> <ValidFrom>2022-08-03T23:35:10.4230777+00:00</ValidFrom> <ValidTo>2022-08-03T23:35:10.4230777+00:00</ValidTo> </Metadata> <Url>sample string 6</Url> </CouponRecipientExternal> <CouponRecipientExternal> <CouponBookId>14d4168b-5e6d-4a57-b94b-fbc283b4dfa9</CouponBookId> <CouponBookName>sample string 4</CouponBookName> <CouponCode>sample string 5</CouponCode> <CouponId>754efd82-609a-4c08-a73f-7b5e688110d6</CouponId> <CouponName>sample string 3</CouponName> <CouponVersion>7</CouponVersion> <DynamicFields xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>sample string 1</d3p1:Key> <d3p1:Value>sample string 2</d3p1:Value> </d3p1:KeyValueOfstringstring> <d3p1:KeyValueOfstringstring> <d3p1:Key>sample string 3</d3p1:Key> <d3p1:Value>sample string 4</d3p1:Value> </d3p1:KeyValueOfstringstring> </DynamicFields> <Id>1</Id> <Metadata> <TimesUsed>1</TimesUsed> <UsageCount>2</UsageCount> <ValidFrom>2022-08-03T23:35:10.4230777+00:00</ValidFrom> <ValidTo>2022-08-03T23:35:10.4230777+00:00</ValidTo> </Metadata> <Url>sample string 6</Url> </CouponRecipientExternal> </ArrayOfCouponRecipientExternal>