Skip to main content
GET
/
api
/
v1
/
coupons
/
{id}
JavaScript
import Stigg from '@stigg/typescript';

const client = new Stigg({
  apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});

const coupon = await client.v1.coupons.retrieve('x');

console.log(coupon.data);
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "type": "FIXED",
    "status": "ACTIVE",
    "source": "STIGG",
    "percentOff": 123,
    "amountsOff": [
      {
        "amount": 123,
        "currency": "usd"
      }
    ],
    "billingId": "<string>",
    "billingLinkUrl": "<string>",
    "durationInMonths": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-API-KEY
string
required

API Key

Path Parameters

id
string
required

The unique identifier of the entity

Required string length: 1 - 255

Response

OK

Response object

data
Coupon · object
required

Discount instrument with percentage or fixed amount