Skip to Content
Grail Network

Packs

The packs that your shop sells, what each pack holds, and its states.

A pack has a pack price and one or more slots. Each slot gives one card. A slot has tiers: price ranges of cards, each with its chance. A pack can also have featured cards: after the slots, one more roll for each pack can give one of them.

Your shop sells two kinds of packs: Grail Network's packs that your shop uses, and your shop's own packs. A user of your shop chooses the packs, makes your own packs and enables them in the shop back office. Your server reads them.

Read your packs

GET /shop/packs

With your API key, the list holds the packs that your server can sell. Each pack:

FieldMeaning
id, name, categoryIdThe pack
versionThe number of the pack's current version. A change of the pack makes a new version
priceThe pack price
ev, minEv, maxEvThe EV of the pack at its last stock check, and the range that the EV must stay in
inStocktrue when a pull can be sold now
stateThe state, below
slotsEach slot's position and its tiers: id, position, name, chancePpb, minPrice, maxPrice
featuredCardsEach featured card: position, itemId, oddsPpb, available, price, and the card's names and picture

A chance is in parts per billion: 800000000 is 80%. A slot's chances add up to exactly 1,000,000,000.

  • GET /shop/packs/{packId} reads one pack. Each tier then has itemCount: the cards of the pack in its range now.
  • GET /shop/packs/{packId}/items lists the cards in the pack now, the most expensive first. tierId filters one tier.
  • GET /shop/packs/{packId}/versions/{number} reads a past version, for example the version of a pull (packVersion).
  • The filters of the list: categoryId, inStock, state, page and pageSize.

The states

stateMeaningA pull
on_saleEnabled and in stockSold
off_saleEnabled, but not in stock now. It comes back by itself when the pack has its cards again409 PACK_OUT_OF_STOCK
disabledNot enabled, or refused by Grail Network's staff409 PACK_OUT_OF_STOCK
waiting_for_approvalYour shop's own pack waits for Grail Network's approval409 PACK_OUT_OF_STOCK
archivedArchived. It is out of your lists404 PACK_NOT_FOUND

Your shop's own pack needs Grail Network's approval before its first sale, and again after a change of its pack price, its tiers or its featured cards. Until the approval, a pull of it gets 409 PACK_OUT_OF_STOCK.

Show a pack to your buyers only when its state is on_sale. Read the pack again before you show its price: a pull with an old price gets 409 PULL_PRICE_CHANGED.

On this page