---
title: "Open pack"
method: POST
path: "/api/packs/{id}/open"
tags: ["Packs"]
---

# Open pack

`POST /api/packs/{id}/open`

## Request

- Base URL: `https://app.d-sports.org`
- URL: `https://app.d-sports.org/api/packs/{id}/open`
- Auth: HTTP bearer

Body is optional; a blank body is {}. Shape: { purchaseId?: string, packId?: string, binderId?: string, walletAddress?: string }. Each field must be a string when present. walletAddress is the active wallet: with no binder chosen the open lands in that wallet's default binder (#928). Malformed JSON, a non-object body, or a non-string field is 400 VALIDATION_ERROR. Client-sent rarities are ignored. Success data adds bonus: null | { purchaseId, rarity, requested, awarded, alreadyApplied }. Success data also adds pack: PackGlbMedia plus id, on first open and on replays. glbTemplateVersion is null when undeclared (clients fail closed). 0 means materials FRONT and BACK. Each collectibles[] item carries serial: CardSerial | null — FINITE packs return the claimed MintInstance serialNo with total = the pack's mint count for that card; unlimited packs return the next per-collectible number with total null; null only on replays of copies opened before serials existed. When the pack has guaranteeMinRarity, one card at or above that rarity is drawn and placed in a random slot, and the rest are drawn at the listed odds; if the contents can't meet the guarantee the open fails with 409 CONFLICT and the pack stays unopened. Each collectibles[] item carries value: integer | null and valueBreakdown: CardValueBreakdown | null (display value from the current tables, on first open and on replays). Each collectibles[] item carries player: CardPlayer | null (first open and replays): the roster player linked to the collectible; null when none is linked. Each collectibles[] item carries isNew and isDuplicate (boolean or null): opposites when this open stored a collection summary, null when no summary was stored. data.collection is null on a replay with no summary. A fresh open always sends { alreadyApplied: false, setDeltas }. setDeltas lists sets whose owned count changed, with newlyCompleted and a cosmetic reward when this open granted the badge. A replay with a summary returns the stored flags and setDeltas with alreadyApplied true, not a fresh inventory read (#915).

## Path parameters

- `id` string, required

## Request body

- object
  - `purchaseId` string
  - `packId` string: Optional. Legacy clients may send path as packId + body.purchaseId.
  - `binderId` string: Optional landing binder. Client-sent rarities are ignored.
  - `walletAddress` string: Optional active wallet. With no binder chosen the open lands in this wallet's default binder (#928).

## Response `200`

{ collectibles, mintedNftIds, landedBinderId, bonus, rep, pack, autoSort }. autoSort is null when pack auto-sort is off or the pack is internal-only; otherwise { applied, source, binder: { id, name, isDefault }, placedCount, newCount, duplicateCount, fallbackReason, scopeMismatchCount }. applied is true when the pref is on and the cards landed in the destination: a preference or default landing, or a checkout landing whose target equals the pref binder (or the default binder when packAutoSortBinderId is null). source stays checkout for that landing. An explicit binder stays applied false. collection is null or { alreadyApplied, setDeltas } (#915).

- object
  - `success` true, required
  - `data` object, required
    - `collectibles` object[], required
      - `serial` CardSerial, nullable, required: Serial printed on an opened card. FINITE packs: number is the MintInstance serialNo and total the pack's mint count for that collectible. Unlimited packs: number comes from the per-collectible counter and total is null.
        - `number` integer, required
        - `total` integer, nullable, required
      - `value` integer, nullable, required: Display value in points. Null only when the value tables could not be read.
      - `valueBreakdown` CardValueBreakdown, nullable, required: How value was computed: value = round(rarityBase × subjectFactor × momentFactor). Display only; credits nothing. A future market multiplier (marketFactor) is reserved and never sent in v1.
        - `rarityBase` integer, required: Points for the card's rarity: team override, else platform default.
        - `subjectFactor` number, required: Who is on the card (franchise 2.0, depth 1.0).
        - `momentFactor` number, required: Multiplier for momentType.
        - `momentType` 'PORTRAIT' | 'ACTION' | 'MILESTONE' | 'GAME_WINNER', required
      - `player` CardPlayer, nullable, required: Roster player linked to a collectible (Collectible.playerId, mint-locked like rarity). name, position and jerseyNumber are read live from the Player row on every read, replays included; teamName is the collectible's team (the card's club).
        - `id` string, required
        - `name` string, required: Roster name. The card title stays the collectible name.
        - `position` string, nullable, required: Roster position code as stored (F, C, LW, RW, D, G, ...); null when blank.
        - `jerseyNumber` integer, nullable, required
        - `teamName` string, nullable, required: Name of the collectible's team (the card's club), not the player's current team. Null only when the card has no team row.
      - `isNew` boolean, nullable, required: True when this pull was the fan's first copy of the card. Null when no collection summary was stored.
      - `isDuplicate` boolean, nullable, required: Opposite of isNew when the flag is known. Null when isNew is null.
      - `finish` string, nullable, required: Card finish id, or null when no finish is set.
      - `cardTemplate` CardTemplate, nullable, required: Render template that produced the card image currently being served.
        - `key` string, required
        - `version` integer, required
    - `mintedNftIds` string[], required
    - `landedBinderId` string, required
    - `bonus` PackOpenBonusDto, nullable, required: Idempotent pack-open rarity bonus. Null on the envelope when no rarity matched three. Replay returns the same payload with alreadyApplied true.
      - `purchaseId` string, required
      - `rarity` string, required
      - `requested` integer, required
      - `awarded` integer, required: Fan Rep actually credited. May be below requested when the Fan cap applies.
      - `alreadyApplied` boolean, required
    - `pack` object, required: Runtime texture-swap payload. One shared template GLB (modelUrl) plus pack art and team-default art, served separately. glbTemplateVersion is null when undeclared. 0 is pack materials FRONT and BACK with KHR_texture_transform, so pack art is contained in the UV window on a 1024x1536 canvas. 1 is the card case (TeamArt and CardBack). 2 is the combined pack opening (FRONT, BACK, TeamArt, CardBack) whose FRONT/BACK texture is a full-bleed 1104x1536 canvas with no texture transform. glbIdleClip is null when idle is off; CaseIdle is valid only for version 2. Texture names are not materials.
      - `teamId` string, nullable, required
      - `modelUrl` string, nullable, required: Served template URL: Pack.modelUrl, else animationId when modelUrl is null.
      - `glbTemplateVersion` integer, nullable, required: Null means undeclared. 0 is FRONT/BACK with KHR_texture_transform (1024x1536 UV window). 1 is the card case. 2 is the combined opening (full-bleed 1104x1536 pack faces). Never defaulted.
      - `glbIdleClip` string, nullable, required: Null means idle is off. The only non-null value is CaseIdle, and only when glbTemplateVersion is 2.
      - `packArtFrontUrl` string, nullable, required
      - `packArtBackUrl` string, nullable, required
      - `cardCaseArtUrl` string, nullable, required
      - `cardBackArtUrl` string, nullable, required
      - `teamDefaultPackArtFrontUrl` string, nullable, required
      - `teamDefaultPackArtBackUrl` string, nullable, required
      - `teamDefaultCardCaseArtUrl` string, nullable, required
      - `teamDefaultCardBackArtUrl` string, nullable, required
      - `id` string, required
    - `rep` PackOpenRepDto, nullable, required: Fan Rep credited by this pack open (RepLedgerEntry earnKind packOpen). Separate from the rarity bonus (PackOpenBonusDto).
      - `awarded` integer, required: Fan Rep this open credited.
      - `total` integer, nullable, required: Lifetime Fan Rep after the credit (same sum as the user profile fanRep). Null when that read failed.
      - `alreadyApplied` boolean, required: True on a replay of an already-opened purchase.
    - `collection` object, nullable, required: Null when this replay has no stored summary. Fresh opens always send the object.
      - `alreadyApplied` boolean, required
      - `setDeltas` CollectionSetDelta[], required
        - `setId` string, required
        - `teamId` string, required
        - `title` string, required
        - `owned` integer, required
        - `total` integer, required
        - `missingCollectibleIds` string[], required
        - `completed` boolean, required
        - `newlyCompleted` boolean, required: True when this open is what finished the set.
        - `reward` object, nullable, required: Set when this call granted the cosmetic badge. Null otherwise.
          - `rewardId` string, required
          - `title` string, required
    - `gameServices` object: Present only for a fresh open; replays omit the whole block. Optional hints are omitted individually when unavailable.
      - `firstEver` boolean: Present when the first-open milestone claim succeeds.
      - `fanPoints` object: Present when the Fan Rep lookup succeeds.
        - `total` integer, required
        - `seasonTotal` integer, nullable, required

## Other responses

- `400`: { success: false, error, code } — VALIDATION_ERROR when the body is malformed JSON, is not a JSON object, or a present purchaseId, packId, or binderId is not a string. The same status also carries PACK_PAYMENT_PENDING, PACK_ALREADY_OPENED, PACK_NOT_READY for failed, cancelled or refunded purchases, WALLET_REQUIRED, and VALIDATION_ERROR for an unrecognised purchase status.

## Changes

- **2026-11-18** `6de639c52609`: 14 info
  - added the new optional request property `walletAddress`
  - added the non-success response with the status `400`
  - added the optional property `data/gameServices` to the response with the `200` status
  - added the required property `data/collectibles/items/cardTemplate` to the response with the `200` status
  - …10 more
- **2026-09-12** `a8df6fe04343`: 3 info
  - added the new optional request property `binderId`
  - added the new optional request property `packId`
  - added the media type `application/json` for the response with the status `200`
- **2026-03-08** `120afc4ee72c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/changes/api/packs/:id/open/post.md)

---

[API](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api.md) - [All operations](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/llms.txt) - [OpenAPI document](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/revisions/63735cf90a04?raw)
