Packs

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).

post/api/packs/{id}/open

Request

  • Base URL
    https://app.d-sports.org
  • Auth
    HTTP bearer

Path parameters

idstring required

Request body

purchaseIdstring
packIdstring

Optional. Legacy clients may send path as packId + body.purchaseId.

binderIdstring

Optional landing binder. Client-sent rarities are ignored.

walletAddressstring

Optional active wallet. With no binder chosen the open lands in this wallet's default binder (#928).

Response

{ 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).

successtrue required

Changes

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    11 more changes in this revision