Retrieves an array of coupons, optionally filtered by one or more properties.
GET https://api.commissionfactory.com/V1/Merchant/Coupons?apiKey=[apiKey]&affiliateId=[affiliateId]&affiliateContactName=[affiliateContactName]&affiliateBusinessName=[affiliateBusinessName]
Name | Type | Description |
---|---|---|
apiKey Required |
String | A valid API key that represents a merchant account. |
affiliateId Optional |
Integer | If specified, filters results by affiliate ID. |
affiliateContactName Optional |
String | If specified, filters results by affiliate contact name. |
affiliateBusinessName Optional |
String | If specified, filters results by affiliate business name. |
Type | Description |
---|---|
CouponArray | Represents zero or more coupons. |
Error | Description |
---|---|
400 Bad Request | One or more parameters could not be parsed correctly. |
401 Unauthorised | The API key is missing, invalid, or for a different account type; or the user account has been suspended or closed. |
429 Too Many Requests | The API call rate limit for the user account has been exceeded. |
500 Internal Server Error | An unexpected error occurred while processing your request. |
GET /V1/Merchant/Coupons?apiKey=ABC123 HTTP/1.1 Accept: application/json Host: api.commissionfactory.com
GET /V1/Merchant/Coupons?apiKey=ABC123 HTTP/1.1 Accept: application/xml Host: api.commissionfactory.com
[ { "Id": 1, "DateCreated": "2000-01-01T00:00:00.000", "DateModified": "2000-01-01T00:00:00.000", "Description": "10% off when you spend $100 or more", "Code": "TENOFF", "TargetUrl": "https://www.example.com/", "TermsAndConditions": "Cannot be combined with any other offer.", "StartDate": null, "EndDate": null, "AffiliateId": 123, "AffiliateContactName": "John Smith", "AffiliateBusinessName": "Example Pty Ltd" }, { "Id": 1, "DateCreated": "2000-01-01T00:00:00.000", "DateModified": "2000-01-01T00:00:00.000", "Description": "20% off when you spend $300 or more", "Code": "TWENTYOFF", "TargetUrl": "https://www.example.com/", "TermsAndConditions": "Cannot be combined with any other offer.", "StartDate": null, "EndDate": null, "AffiliateId": null, "AffiliateContactName": null, "AffiliateBusinessName": null }, { "Id": 1, "DateCreated": "2000-01-01T00:00:00.000", "DateModified": "2000-01-01T00:00:00.000", "Description": "30% off when you spend $500 or more", "Code": "THIRTYOFF", "TargetUrl": "https://www.example.com/", "TermsAndConditions": "Cannot be combined with any other offer.", "StartDate": null, "EndDate": null, "AffiliateId": null, "AffiliateContactName": null, "AffiliateBusinessName": null } ]
<CouponArray xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://api.commissionfactory.com/V1/Merchant"> <Coupon> <Id>1</Id> <DateCreated>2000-01-01T00:00:00.000</DateCreated> <DateModified>2000-01-01T00:00:00.000</DateModified> <Description>10% off when you spend $100 or more</Description> <Code>TENOFF</Code> <TargetUrl>https://www.example.com/</TargetUrl> <TermsAndConditions>Cannot be combined with any other offer.</TermsAndConditions> <StartDate i:nil="true" /> <EndDate i:nil="true" /> <AffiliateId>123</AffiliateId> <AffiliateContactName>John Smith</AffiliateContactName> <AffiliateBusinessName>Example Pty Ltd</AffiliateBusinessName> </Coupon> <Coupon> <Id>1</Id> <DateCreated>2000-01-01T00:00:00.000</DateCreated> <DateModified>2000-01-01T00:00:00.000</DateModified> <Description>20% off when you spend $300 or more</Description> <Code>TWENTYOFF</Code> <TargetUrl>https://www.example.com/</TargetUrl> <TermsAndConditions>Cannot be combined with any other offer.</TermsAndConditions> <StartDate i:nil="true" /> <EndDate i:nil="true" /> <AffiliateId i:nil="true" /> <AffiliateContactName i:nil="true" /> <AffiliateBusinessName i:nil="true" /> </Coupon> <Coupon> <Id>1</Id> <DateCreated>2000-01-01T00:00:00.000</DateCreated> <DateModified>2000-01-01T00:00:00.000</DateModified> <Description>30% off when you spend $500 or more</Description> <Code>THIRTYOFF</Code> <TargetUrl>https://www.example.com/</TargetUrl> <TermsAndConditions>Cannot be combined with any other offer.</TermsAndConditions> <StartDate i:nil="true" /> <EndDate i:nil="true" /> <AffiliateId i:nil="true" /> <AffiliateContactName i:nil="true" /> <AffiliateBusinessName i:nil="true" /> </Coupon> </CouponArray>