riverty logo

Docs

Get Discount

Get a discount assosiated with a subscription.

Path

GET /v1/clients/{clientId}/subscriptions/{subscriptionId}/discounts/{discountId}

Request Parameters

clientId
required
integer
Your assigned `ClientId`.
subscriptionId
required
string
Id of the subscription to retrieve.
discountId
required
string
Id of the discount.

Responses

Successful RequestUnsuccessful Request, Discount Not Found

Request Example

    
        null
    

Response Example

    
        {
 "id": "discount-id-1",
 "description": "discount",
 "numberOfPeriods": 2,
 "periodAmount": {
  "grossAmount": 62.5,
  "vatPercentage": 25,
  "currencyCode": "NOK"
 },
 "metadata": [
  {
   "key": "order-id",
   "value": "a9ee9996-e941-4aa8-90b9-4b047c4afe87"
  }
 ],
 "createdAt": "2022-09-39T07:29:04.407Z",
 "_links": [
  {
   "method": "GET",
   "href": "https://api-dev.horizonafs.io/subscription/v1/clients/1234/subscriptions/subscription-id-1/discounts/discount-id-1",
   "rel": "self"
  },
  {
   "method": "GET",
   "href": "https://api-dev.horizonafs.io/subscription/v1/clients/1234/subscriptions/subscription-id-1",
   "rel": "subscription"
  }
 ]
}