Send oripa demand
Send, per card and quality, the prizes won that have no unit assigned yet, the slots left in packs on sale, and how fast they are being won. The shop uses this to decide what to stock and boost. Stock does not change. Do not send customer information.
Each call replaces the connection’s whole demand: lines left out are removed, and an empty list clears it. It replaces only when generatedAt is newer than the stored one, returning { "applied": true, "lines": count }; when it is the same or older nothing changes and it returns { "applied": false }. A generatedAt more than 5 minutes ahead of the server clock is 422 invalid_generated_at.
Besides inventory:read, this needs the operation’s scope and the approving member’s inventory.write permission.
/inventory/demandAuthorizationOAuth2 access token · headerrequiredAuthorization code flow (PKCE S256 required). Send resource=https://api.toreca-cloud.com/partner/v1 with the authorization, token and refresh requests. Access tokens last 15 minutes; refresh tokens last 90 days and rotate on every refresh.
inventory:readinventory:writeapplication/jsongeneratedAtstring<date-time>requiredWhen the partner worked out the demand
linesobject[]requiredShow propertiesHide properties
objectkeystringrequiredThe partner's stable key
cardIdstring<uuid> | nullrequiredCard catalog ID; null for an any-card line. Unknown IDs are stored as sent.
Show propertiesHide properties
string<uuid>nulllabelstringrequiredDisplay name
criteriastring | nullrequiredWhat an any-card line accepts (game, rarity, set, language and so on)
Show propertiesHide properties
stringnullruleobject | nullWhat an any-card line accepts, as fields. Stock is counted only for lines that have one. Allowed only when cardId is null. Optional.
Show propertiesHide properties
kindstringrequiredgameIdstring<uuid>requiredCard catalog game ID
languageCodestringrequiredThe card's language (ja, en, zh-Hans and so on)
raritiesstring[]requiredRarity names accepted (as the card catalog names them); a card of any one fits
setIdsstring<uuid>[]requiredSets accepted (card catalog set IDs); empty for every set
nullpartnerCodestring | nullThe partner's own code for what the line asks for, shown to tell apart lines with the same label and criteria. Optional.
Show propertiesHide properties
stringnullqualityobject | nullrequiredThe quality; null for any.
Show propertiesHide properties
kindstringrequiredconditionstringrequiredmintnear_mintlightly_playedmoderately_playedheavily_playeddamagedkindstringrequiredcompanystringrequiredgradestringrequirednullshippingRequestedintegerrequiredRequested for shipping with no unit assigned
heldintegerrequiredHeld by customers with no unit assigned
undrawnintegerrequiredSlots left in packs on sale with no unit held
reservedintegerrequiredUnits held for packs on sale, not yet drawn
wins7dintegerrequiredWins in the last 7 days
wins30dintegerrequiredWins in the last 30 days
oldestRequestAtstring<date-time> | nullrequiredWhen the oldest unassigned shipping request was made
Show propertiesHide properties
string<date-time>nullrequestobject | nullrequiredA restock request to the shop
Show propertiesHide properties
quantityintegerrequirednotestring | nullrequiredShow propertiesHide properties
stringnullrequestedAtstring<date-time>requirednullAccepted
appliedbooleanrequiredlinesintegerrequiredappliedbooleanrequiredinvalid_request: a parameter is invalid.
errorstringrequiredThe error code. The main ones are below; more may be added.
400:invalid_request(bad parameters or body),invalid_cursor401:invalid_token403:insufficient_scope,connection_revoked,client_disabled,forbidden,ip_not_allowed404:not_found409:conflict(updated at the same time; read again and retry),idempotency_conflict(arequestIdreused for different content),receipt_not_confirmed(a purchase awaiting the customer's payment confirmation)422units:unit_unavailable(not in stock),unit_not_allocated(not allocated to this partner),unit_not_found422holds:invalid_expiry,hold_shipped,hold_cancelled,hold_confirmed,hold_blocked,sale_amount_required(neither a sale price nor a market value)422listings and shipments:commitment_not_on_sale,commitment_not_allocated,commitment_shipping,commitment_blocked,commitment_closed,commitment_not_on_shipment,shipment_shipped,shipment_cancelled,shipment_not_shipped,shipment_blocked,shipment_refused422moves:invalid_location,location_inactive,different_site,same_site,mixed_sites,invalid_site,site_inactive,wrong_site,unit_not_on_transfer,transfer_line_closed,unit_not_on_checkout,move_refused,transfer_refused,checkout_refused,return_refused422other:invalid_webhook_url,invalid_generated_at429:rate_limited503:photo_unavailable
scopestringWith insufficient_scope, the missing scope
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]invalid_token: the token is missing, expired, or for another resource.
errorstringrequiredThe error code. The main ones are below; more may be added.
400:invalid_request(bad parameters or body),invalid_cursor401:invalid_token403:insufficient_scope,connection_revoked,client_disabled,forbidden,ip_not_allowed404:not_found409:conflict(updated at the same time; read again and retry),idempotency_conflict(arequestIdreused for different content),receipt_not_confirmed(a purchase awaiting the customer's payment confirmation)422units:unit_unavailable(not in stock),unit_not_allocated(not allocated to this partner),unit_not_found422holds:invalid_expiry,hold_shipped,hold_cancelled,hold_confirmed,hold_blocked,sale_amount_required(neither a sale price nor a market value)422listings and shipments:commitment_not_on_sale,commitment_not_allocated,commitment_shipping,commitment_blocked,commitment_closed,commitment_not_on_shipment,shipment_shipped,shipment_cancelled,shipment_not_shipped,shipment_blocked,shipment_refused422moves:invalid_location,location_inactive,different_site,same_site,mixed_sites,invalid_site,site_inactive,wrong_site,unit_not_on_transfer,transfer_line_closed,unit_not_on_checkout,move_refused,transfer_refused,checkout_refused,return_refused422other:invalid_webhook_url,invalid_generated_at429:rate_limited503:photo_unavailable
scopestringWith insufficient_scope, the missing scope
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]One of insufficient_scope, connection_revoked, client_disabled or forbidden.
errorstringrequiredThe error code. The main ones are below; more may be added.
400:invalid_request(bad parameters or body),invalid_cursor401:invalid_token403:insufficient_scope,connection_revoked,client_disabled,forbidden,ip_not_allowed404:not_found409:conflict(updated at the same time; read again and retry),idempotency_conflict(arequestIdreused for different content),receipt_not_confirmed(a purchase awaiting the customer's payment confirmation)422units:unit_unavailable(not in stock),unit_not_allocated(not allocated to this partner),unit_not_found422holds:invalid_expiry,hold_shipped,hold_cancelled,hold_confirmed,hold_blocked,sale_amount_required(neither a sale price nor a market value)422listings and shipments:commitment_not_on_sale,commitment_not_allocated,commitment_shipping,commitment_blocked,commitment_closed,commitment_not_on_shipment,shipment_shipped,shipment_cancelled,shipment_not_shipped,shipment_blocked,shipment_refused422moves:invalid_location,location_inactive,different_site,same_site,mixed_sites,invalid_site,site_inactive,wrong_site,unit_not_on_transfer,transfer_line_closed,unit_not_on_checkout,move_refused,transfer_refused,checkout_refused,return_refused422other:invalid_webhook_url,invalid_generated_at429:rate_limited503:photo_unavailable
scopestringWith insufficient_scope, the missing scope
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]invalid_generated_at: generatedAt is more than 5 minutes ahead of the server clock.
errorstringrequiredThe error code. The main ones are below; more may be added.
400:invalid_request(bad parameters or body),invalid_cursor401:invalid_token403:insufficient_scope,connection_revoked,client_disabled,forbidden,ip_not_allowed404:not_found409:conflict(updated at the same time; read again and retry),idempotency_conflict(arequestIdreused for different content),receipt_not_confirmed(a purchase awaiting the customer's payment confirmation)422units:unit_unavailable(not in stock),unit_not_allocated(not allocated to this partner),unit_not_found422holds:invalid_expiry,hold_shipped,hold_cancelled,hold_confirmed,hold_blocked,sale_amount_required(neither a sale price nor a market value)422listings and shipments:commitment_not_on_sale,commitment_not_allocated,commitment_shipping,commitment_blocked,commitment_closed,commitment_not_on_shipment,shipment_shipped,shipment_cancelled,shipment_not_shipped,shipment_blocked,shipment_refused422moves:invalid_location,location_inactive,different_site,same_site,mixed_sites,invalid_site,site_inactive,wrong_site,unit_not_on_transfer,transfer_line_closed,unit_not_on_checkout,move_refused,transfer_refused,checkout_refused,return_refused422other:invalid_webhook_url,invalid_generated_at429:rate_limited503:photo_unavailable
scopestringWith insufficient_scope, the missing scope
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]
