Skip to main content

Retrieve discounts

After you create a discount, you can read it through the API with the Retrieve discounts endpoint.

GET https://www.example.com/api/channel/v1/discounts/{discountId}

where discountId is the unique identifier of the discount to change.

Example request:

GET https://appdirect.com/api/channel/v1/discounts/2
Content-Type: application/json
Authorization: OAuth oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_nonce="1oeaqyLgZoDN94B", oauth_timestamp="1433443191", oauth_consumer_key="appdirect-91", oauth_signature="O7twFnWyJ9ME2v8sF6C7j9LJkX8%3D"

Example response body:

Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 756
Content-Type: application/json;charset=UTF-8
Date: Thu, 04 Jun 2015 19:02:44 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"id": "2",
"code": "ILOVEAPPDIRECT",
"redemptions": "0",
"createdOn": "2015-06-04T12:39:51-06:00",
"startDate": "2015-05-06T00:00:00-06:00",
"expirationDate": "2015-10-11T00:00:00-06:00",
"type": "PERCENTAGE",
"percentage": "50.0000000000",
"description": "A discount for those who love AppDirect",
"autoApply": "false",
"retainable": "false",
"redemptionRestriction": "NONE",
"vendorSharePercentage": "0.0000000000",
"partnerSharePercentage": "100.0000000000",
"basePartnerSharePercentage": "0.0000000000",
"minUnits": "0.0000000000"
}

Was this page helpful?