Get discount

Get a discount assosiated with a subscription.

PATH:

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

PATH PARAMETERS:

clientId
required

integer

Your assigned ClientId.

subscriptionId
required

string

Id of the subscription to retrieve.

discountId
required

string

Id of the discount.

HYPERMEDIA CONTROLS:

RESPONSES:

200 Success.

RESPONSE SCHEMA:

id

string

Id of this discount.

description

string

Description of the discount.

numberOfPeriods

integer int32

Number of periods the discount will be applied.

periodAmount

periodAmount object

Gross amount to discount each period.

grossAmount

number decimal

The gross amount.

vatPercentage

number decimal

The VAT percentage. For a VAT of 25%, the percentage is 25.

currencyCode

string

The currency code.

metadata

array of metadata

Optional. A list of key-value pairs.

Array () [
key

string <= 30 characters

The key of the metadata item.

value

string <= 255 characters

The value of the metadata item.


]
createdAt

string date-time

Time of which this discount was created.

_links

array of _links

List of hypermedia links related to this resource.

400 Bad request.

RESPONSE SCHEMA:

undefined
401 Missing or invalid "Authorization" header.

RESPONSE SCHEMA:

type

string

The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type.

category

string

Enum: BUSINESS_ERROR TECHNICAL_ERROR

Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:

  • BUSINESS_ERROR - A business error occured. This request should not be retried without modification
  • TECHNICAL_ERROR - A temporary, technical error occurred. the request should be retried after a back-off period.

title

string

A short, human-readable summary of the problem.

message

string

A short, human-readable summary of the problem. Identical to title.

403 Lacking permissions.

RESPONSE SCHEMA:

type

string

The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type.

category

string

Enum: BUSINESS_ERROR TECHNICAL_ERROR

Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:

  • BUSINESS_ERROR - A business error occured. This request should not be retried without modification
  • TECHNICAL_ERROR - A temporary, technical error occurred. the request should be retried after a back-off period.

title

string

A short, human-readable summary of the problem.

message

string

A short, human-readable summary of the problem. Identical to title.

404 Resource not found.

RESPONSE SCHEMA:

type

string

The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type.

category

string

Enum: BUSINESS_ERROR TECHNICAL_ERROR

Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:

  • BUSINESS_ERROR - A business error occured. This request should not be retried without modification
  • TECHNICAL_ERROR - A temporary, technical error occurred. the request should be retried after a back-off period.

title

string

A short, human-readable summary of the problem.

message

string

A short, human-readable summary of the problem. Identical to title.

500 Unexpected internal server error.

RESPONSE SCHEMA:

type

string

The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type.

category

string

Enum: BUSINESS_ERROR TECHNICAL_ERROR

Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:

  • BUSINESS_ERROR - A business error occured. This request should not be retried without modification
  • TECHNICAL_ERROR - A temporary, technical error occurred. the request should be retried after a back-off period.

title

string

A short, human-readable summary of the problem.

message

string

A short, human-readable summary of the problem. Identical to title.

Path

get

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

Response samples

200400401403404500
  • {
    • "id": "string",
    • "description": "string",
    • "numberOfPeriods": 1,
    • "periodAmount": { ...
      • "currencyCode": "string"
      },
    • "metadata": [ ...
      • {
        • "key": "string",
        • "value": "string"
        }
      ],
    • "createdAt": "string",
    • "_links": [ ...
      • {
        • "method": "string",
        • "href": "string",
        • "rel": "string",
        • "target": X
        }
      ]
    }
undefined
  • {
    • "type": "string",
    • "category": "string",
    • "title": "string",
    • "message": "string"
    }
  • {
    • "type": "string",
    • "category": "string",
    • "title": "string",
    • "message": "string"
    }
  • {
    • "type": "string",
    • "category": "string",
    • "title": "string",
    • "message": "string"
    }
  • {
    • "type": "string",
    • "category": "string",
    • "title": "string",
    • "message": "string"
    }