Skip to main content
GET
Retrieve Promotion
Promotions is enabled per organizationThis endpoint works only after Yuno enables Promotions for your organization. Until then it answers 404 PROMOTION_NOT_FOUND. Ask your Technical Account Manager or Key Account Manager. See Promotions.
The promotion must belong to the account in the X-Account-Code header. A promotion of another account, and an id that no promotion holds, answer 404 PROMOTION_NOT_FOUND. An id that is not a UUID v4 answers 400 INVALID_PARAMETERS. status is computed when you read the promotion: SCHEDULED before starts_at, ACTIVE inside the window, EXPIRED after ends_at, and DISABLED once you disable it. For a code promotion with a cap, limits.used is the number of uses counted so far. A promotion with no cap shows limits: null.

Authorizations

public-api-key
string
header
default:<Your public-api-key>
required
private-secret-key
string
header
default:<Your private-secret-key>
required

Headers

X-Account-Code
string
required

The account_id found in your Yuno Dashboard (UUID). Required. A promotion belongs to one account, and this header names it. Omitting it returns 400 INVALID_PARAMETERS ("x-account-code header is required.").

Path Parameters

promotion_id
string<uuid>
required

The id of the promotion (UUID v4). A value that is not a UUID v4 returns 400 INVALID_PARAMETERS. A promotion of another account returns 404.

Response

  1. The promotion.

A promotion. Every member is present, with null for an absent value.

id
string<uuid>

The id of the promotion (UUID). Assigned by Yuno.

account_id
string<uuid>

The account the promotion belongs to.

name
string
description
string | null
schedule
object
redemption
object
discount
object
conditions
object

One key for each dimension, null when the promotion has no condition on it. A code promotion created with this API holds countries and amounts only.

limits
object | null

The cap of the code and the uses counted so far. null when the promotion has no cap.

status
enum<string>

Computed from schedule and from the disable at the moment you read the promotion.

Available options:
SCHEDULED,
ACTIVE,
EXPIRED,
DISABLED
created_at
string<date-time>
disabled_at
string<date-time> | null

null while the promotion is not disabled.