Skip to content
Stashtab Docs
Esc
↑↓navigate↵open⌘Jpreview

Preview a whole pack or selected cards for redemption

Optional declaredUnitValues accept one {productId, amount} entry per distinct selected product, in USD per unit. Repeated copies share that unit value. The returned lines include declaredUnitValue, and the returned pack retains the overrides. Duplicate or unselected product entries are refused. Values do not change the frozen source digest or catalog defaults. Preview a whole published pack or selected one-based cardOrdinals within the current organization and verified deployment. Omit cardOrdinals for the whole pack; each selected ordinal may appear once. The response includes the frozen source revision and digest, exact catalog products and recorded conditions, and quantity lines that combine repeated exact variants. Pass the returned lines into createRedemptionOrder for the whole pack or the previewed subset. To select cards after fetching the whole pack, use their productId and condition from cards and combine repeated products into quantities. A Live caller using the pack input can pass the returned pack object unchanged instead of lines. Preview and quote the resolved lines with the same recipient and physical source before submitting a priced redemption. A stale revision or digest requires another preview; an exact submission-key replay preserves the selected source identities. This convenience does not grant protocol authority, allocate a serialized physical copy, restore a token or escrow, or authorize unrevealed content. Test can preview explicitly copied published packs in its active generation. The copy preserves recorded raw conditions and resolves separate Test catalog products with sufficient synthetic stock. Use the returned explicit lines for Test redemption; frozen pack creation remains Live-only. Missing or revoked Test copies never fall back to Live.

POST/v1/organizations/{orgId}/orders/redemptions/pack-preview
Authorization
AuthorizationBasic auth · headerrequired

Registered confidential integration credentials. Keep the secret server-side.

or
CookieAPI key · headerrequired

Console-managed Vault session cookie; secure cookie naming may vary by environment.

or
AuthorizationBearer token (Vault organization API key) · headerrequired

Organization-owned credential with immutable mode and Read-only or Read/write permissions. Only explicitly declared ordinary customer operations accept it. Test business access refuses until shared Test composition is available; no staff, team, key-management or protocol authority is granted.

Path parameters
orgIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
Request body
requiredapplication/json
cardOrdinalsinteger[]
min items 1 · max items 10
declaredUnitValuesobject[]
min items 1 · max items 10
Show properties
Array of object
amountstringrequired
matches ^(0|[1-9]\d{0,8})(\.\d{1,4})?$
productIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
deploymentRefstringrequired
min length 1 · max length 200
packReferencestringrequired
matches ^0x[0-9a-f]{64}$
Responses
200

Success

dataobjectrequired
Show properties
cardsobject[]required
Show properties
Array of object
conditionstring | nullrequired
Show properties
Any of:
string
string
null
null
ordinalintegerrequired
min 1 · max 10
productIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
linesobject[]required
Show properties
Array of object
declaredUnitValueobject
Show properties
amountstringrequired
matches ^(0|[1-9]\d{0,8})(\.\d{1,4})?$
conditionstring | nullrequired
Show properties
Any of:
string
string
null
null
productIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
quantityintegerrequired
max 9007199254740991
packobjectrequired
Show properties
cardOrdinalsinteger[]
min items 1 · max items 10
declaredUnitValuesobject[]
min items 1 · max items 10
Show properties
Array of object
amountstringrequired
matches ^(0|[1-9]\d{0,8})(\.\d{1,4})?$
productIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
deploymentRefstringrequired
min length 1 · max length 200
packReferencestringrequired
matches ^0x[0-9a-f]{64}$
sourceContentRevisionintegerrequired
max 9007199254740991
sourceDigeststringrequired
matches ^[0-9a-f]{64}$
metaobjectrequired
Show properties
requestIdstringrequired
default

Error

errorobjectrequired
Show properties
codestringrequired
Allowed:forbiddeninternal_errornot_foundprovider_data_invalidprovider_outcome_unknownprovider_unavailablerate_limitedstate_conflictunauthenticatedvalidation_errorwarehouse_not_ready
fieldsobject[]
Show properties
Array of object
codestringrequired
messagestringrequired
pathstringrequired
messagestringrequired
operationIdstring
metaobjectrequired
Show properties
requestIdstringrequired
Request
curl -X POST '/v1/organizations/org_example/orders/redemptions/pack-preview' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "cardOrdinals": [
    1,
    3
  ],
  "declaredUnitValues": [
    {
      "amount": "9.25",
      "productId": "variant_example_nm"
    }
  ],
  "deploymentRef": "0x1111111111111111111111111111111111111111111111111111111111111111",
  "packReference": "0x2222222222222222222222222222222222222222222222222222222222222222"
}'
Response
{
  "data": {
    "cards": [
      {
        "condition": "nm",
        "ordinal": 1,
        "productId": "variant_example_nm"
      },
      {
        "condition": "nm",
        "ordinal": 3,
        "productId": "variant_example_nm"
      }
    ],
    "lines": [
      {
        "declaredUnitValue": {
          "amount": "9.25"
        },
        "condition": "nm",
        "productId": "variant_example_nm",
        "quantity": 2
      }
    ],
    "pack": {
      "cardOrdinals": [
        1,
        3
      ],
      "declaredUnitValues": [
        {
          "amount": "9.25",
          "productId": "variant_example_nm"
        }
      ],
      "deploymentRef": "0x1111111111111111111111111111111111111111111111111111111111111111",
      "packReference": "0x2222222222222222222222222222222222222222222222222222222222222222",
      "sourceContentRevision": 4,
      "sourceDigest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    }
  },
  "meta": {
    "requestId": "example-previewPackRedemption"
  }
}

Was this page helpful?