Redeem subscription

Redeem a gift subscription by gift code.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Redeem a gift subscription for the authenticated customer using its gift_code (required). The gift must be paid and not already redeemed; address_id is required when the gift's product ships. Returns the customer resource with a fresh JWT.

Example:

curl --request POST \
  --url 'https://www.pelcro.com/api/v1/sdk/gift/redeem?site_id=1232' \
  --header 'Authorization: Bearer <JWT>' \
  --header 'Content-Type: application/json' \
  --data '{ "gift_code": "GIFT-XXXX-XXXX" }'

Notes

  • Protected — requires the customer's JWT.
  • A missing or unknown gift_code, or an already-redeemed/unpaid gift, fails with 400/404.
Query Params
int32
required

The unique identifier of the site associated with your account.

Body Params
string
required

The gift code to redeem.

int32

The identifier of the shipping address to associate with the subscription. Required if related product requires an address, if product is available only in certain countries, or if tax feature is enabled under your account.

string
enum
Defaults to en

The customer’s preferred language as a two-letter code, defined by ISO 639-1 standard. If not specified, it will be set from Accept-Language header, or from the default language defined in your site settings as a fallback.

Allowed:
int32

An optional identifier of an existing subscription on which you would like to redeem this gift as a future phase on. If not provided, the gift will be created as a new subscription.

Responses

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json