Skip to main content

Create Player Inventory

POST 

/inventory/v1/player/:player_id/inventory

deprecated

Create Inventory for the specified player.

Request

Path Parameters

    player_id Player Idrequired

Body

required

    source Source (string)

    Possible values: [UNKNOWN, WEB_ORDER_REPAIR, IN_GAME, WEB_SITE, NO_SALE, SUPPORT, ACTIVITY, REFUND, SYSTEM, REWARDS, ESPORTS, TREASURE, CONSOLE, ODYSSEY, STEAM, RETURN, JSON_GATE, SEND_GIFT, RECEIVE_GIFT, STEAM_DLC, TWITCH_MILESTONE, TWITCH_PRIME, PSN, XBOX, PTS_GRANT, INSTANCE, ACCOUNT_TRANSFER, PROMOCODE, TRIUMPH_SYSTEM, LOGIN_GRANT, EOM_UNCAPPED, EOM_CAPPED, FACEBOOK_DROP, DATABASE_SCRIPT, ACCOUNT_LINKING, CLAN, CONVERSION, APPLE, GOOGLE, GOOGLE_PLAY, PORTAL_DURABLE, PARTNER_ACHIEVEMENT, MIXER_DROP, NINTENDO, STREAM_VIEWING_PROGRESS, DISCORD, FIRST_LOGIN_GRANT, TWITCH_FUEL, DISCORD_DLC, NETEASE, EPIC_GAMES, FORTE, FACEBOOK, HIREZ, DAILY_REWARD, ADD_ACCOUNT_EMAIL_REWARD, CLIENT_CLAIM, CLIENT, ENTITLEMENTS, AMAZON, SIMULMEDIA, LUNA]

    Default value: CLIENT

    Source of this Inventory Operation.

    client_order_ref_id

    object

    Arbitrary UUID that can be used by clients to correlate Order requests with Order responses.

    anyOf

    string

    inventory

    object[]

    required

    Possible values: >= 1

  • Array [

  • bucket InventoryBucket (string)

    Possible values: [free, sweat, none, anon, amazon, steam, psn, xbox_live, google, twitch, nintendo_switch, apple, nintendo, epic, google_play, nintendo_ppid]

    Default value: none

    Grouping of Inventory Items. Inventory items are grouped into different buckets as each Platform that is supported has different requirements on how Inventory can be used on their Platform and other Platforms.

    count Count (integer)

    Default value: 1

    Count for this Inventory Operation.

    expires

    object

    Expiration for this Inventory Operation.

    anyOf

    Datetime that enforces that a timezone is given. Unix timestamps are allowed and forced into the UTC time zone

    string

    custom_data

    object

    Arbitrary data map that can be set to add additional data to Inventory.

    anyOf

    property name* string
    item_id Item Id (integer)required
    type CreateInventoryType (string)

    Possible values: [persistent, transient]

    Default value: persistent

  • ]

Responses

Successful Response

Schema

    source Source (string)

    Possible values: [UNKNOWN, WEB_ORDER_REPAIR, IN_GAME, WEB_SITE, NO_SALE, SUPPORT, ACTIVITY, REFUND, SYSTEM, REWARDS, ESPORTS, TREASURE, CONSOLE, ODYSSEY, STEAM, RETURN, JSON_GATE, SEND_GIFT, RECEIVE_GIFT, STEAM_DLC, TWITCH_MILESTONE, TWITCH_PRIME, PSN, XBOX, PTS_GRANT, INSTANCE, ACCOUNT_TRANSFER, PROMOCODE, TRIUMPH_SYSTEM, LOGIN_GRANT, EOM_UNCAPPED, EOM_CAPPED, FACEBOOK_DROP, DATABASE_SCRIPT, ACCOUNT_LINKING, CLAN, CONVERSION, APPLE, GOOGLE, GOOGLE_PLAY, PORTAL_DURABLE, PARTNER_ACHIEVEMENT, MIXER_DROP, NINTENDO, STREAM_VIEWING_PROGRESS, DISCORD, FIRST_LOGIN_GRANT, TWITCH_FUEL, DISCORD_DLC, NETEASE, EPIC_GAMES, FORTE, FACEBOOK, HIREZ, DAILY_REWARD, ADD_ACCOUNT_EMAIL_REWARD, CLIENT_CLAIM, CLIENT, ENTITLEMENTS, AMAZON, SIMULMEDIA, LUNA]

    Default value: CLIENT

    The source of the Player Order.

    client_order_ref_id

    object

    Arbitrary UUID clients can use to track Orders between request to response.

    anyOf

    string

    portal_id

    object

    deprecated

    Portal of the Portal User the Player Order belongs to.

    anyOf

    integer

    Possible values: [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33]

    portal_user_id

    object

    Portal User Id for the Player this Player Order belongs to.

    anyOf

    string

    instance_id

    object

    Instance Id for the Instance who submits the Player Order.

    anyOf

    string

    match_id

    object

    Match Id for the Match that generated the Player Order.

    anyOf

    string

    is_transaction Is Transaction (boolean)

    If an order is a transaction, any failed entries will roll back changes from all other entries.

    order_id Order Id (string)required

    Unique Identifier for the Order.

    player_uuid uuidrequired

    Player UUID of the Player this Player Order belongs to.

    created_time date-timerequired

    Time the Player Order was created.

    entries

    object[]

    required

    List of Player Order Entries for the Player Order.

  • Array [

  • type PlayerOrderEntryType (string)required

    Possible values: [fill_loot, purchase_loot, purchase_dynamic_bundle, promotion_code, fill_loot_single_transient, fill_entitled_loot, create_new_persistent_inventory, update_existing_persistent_inventory, create_new_transient_inventory, update_existing_transient_inventory, update_inventory]

    The type of entry.

    loot_id

    object

    Unique Identifier for the Loot

    anyOf

    integer

    quantity Quantity (integer)required

    Quantity of Inventory

    vendor_version

    int64

    deprecated

    Legacy version for the vendor owning the loot_id. Use vendor_etag instead.

    anyOf

    integer

    vendor_etag

    object

    etag for the vendor owning the loot_id. Will fail the fulfillment if they do not match

    anyOf

    string

    dynamic_bundle_loot_ids

    object

    List of Loot IDs for the dynamic bundle.

    anyOf

  • Array [

  • integer

  • ]

  • purchase_price

    object

    deprecated

    The purchase price of the Loot. Deprecated. Use the purchase_prices field instead

    anyOf

    The purchase price of an Item.

    price_item_id

    object

    deprecated

    The Item used as the currency for the purchase. Deprecated. Use currencies instead

    anyOf

    integer

    price

    object

    deprecated

    The price of the Item. Deprecated. Use currencies instead

    anyOf

    integer

    price_coupon_item_id

    object

    The Item used as the coupon for the purchase.

    anyOf

    integer

    currencies

    object

    List of currencies for this purchase price

    anyOf

  • Array [

  • price_item_id Price Item Id (integer)required

    The Item used as the currency for the purchase.

    price Price (integer)required

    The price of the Item.

  • ]

  • external_tran_id

    object

    External Transaction Id for source of the acquisition or a promotion code to claim. Required for [PROMOTION_CODE] types

    anyOf

    string

    external_item_sku

    object

    External item SKU for the Order Entry.

    anyOf

    string

    use_inventory_bucket

    object

    Inventory Bucket to use for the Order Entry.

    anyOf

    Grouping of Inventory Items. Inventory items are grouped into different buckets as each Platform that is supported has different requirements on how Inventory can be used on their Platform and other Platforms.

    string

    Possible values: [free, sweat, none, anon, amazon, steam, psn, xbox_live, google, twitch, nintendo_switch, apple, nintendo, epic, google_play, nintendo_ppid]

    player_portal_event_id

    int64

    Player Portal Event Id for the Order Entry.

    anyOf

    integer

    inventory_id

    object

    Unique Identifier for the Inventory

    anyOf

    string

    legacy_inventory_id

    int64

    Legacy Inventory Id. This is only used when type equals [UPDATE_EXISTING_PERSISTENT_INVENTORY, UPDATE_EXISTING_TRANSIENT_INVENTORY]

    anyOf

    integer

    item_id

    object

    Item Id used create or update Inventory directly. This is only used when type equals [CREATE_NEW_PERSISTENT_INVENTORY, CREATE_NEW_TRANSIENT_INVENTORY]

    anyOf

    integer

    expires

    object

    Expiration time for the Inventory. This is only used when type equals [CREATE_NEW_PERSISTENT_INVENTORY, UPDATE_EXISTING_PERSISTENT_INVENTORY, CREATE_NEW_TRANSIENT_INVENTORY, UPDATE_EXISTING_TRANSIENT_INVENTORY, UPDATE_INVENTORY]

    anyOf

    Datetime that enforces that a timezone is given. Unix timestamps are allowed and forced into the UTC time zone

    string

    custom_data

    object

    Custom Data Attributes for the Inventory. This is only used when type equals [CREATE_NEW_PERSISTENT_INVENTORY, UPDATE_EXISTING_PERSISTENT_INVENTORY, CREATE_NEW_TRANSIENT_INVENTORY, UPDATE_EXISTING_TRANSIENT_INVENTORY, UPDATE_INVENTORY]

    anyOf

    property name* string
    entry_id Entry Id (string)required

    Unique Identifier for the Order Entry.

    result PlayerOrderEntryResult (string)

    Possible values: [success, internal_error, invalid_entry_type, not_allowed_on_current_portal, loot_not_found, loot_not_active, price_item_not_found, price_not_allowed, dynamic_bundle_invalid, too_many_requests, price_does_not_match, vendor_version_does_not_match, dynamic_bundle_ltis_do_not_match, cannot_afford_price, cannot_afford_coupon, failed_to_spend_price, failed_to_spend_coupon, loot_not_for_sale_with_price_item, coupons_disabled, coupon_item_not_found, coupon_item_not_active, coupon_item_not_applicable_for_quantity, coupon_item_not_applicable_for_price_item, coupon_item_not_applicable_for_loot, quantity_not_allowed, promotion_expired, promotion_not_found, promotion_no_uses_left, promotion_not_available, promotion_claimed_already, dynamic_bundles_not_available, transient_single_loot_already_applied, loot_not_fillable_from_client, permission_denied, failed_to_find_any_sub_loot, failed_to_fill_any_sub_loot, cannot_meet_loot_blocker, cannot_meet_loot_required, failed_to_consume_loot_required, failed_to_submit_new_order, failed_to_modify_inventory, inventory_not_found, item_not_found, item_not_active, too_many_inv_custom_attributes, always_owned_inventory_cannot_be_modified, available_until_is_in_past, rollback, not_started]

    Entry result type.

    details

    object[]

    Details for the Order Entry.

  • Array [

  • type PlayerOrderDetailType (string)required

    Possible values: [unknown, inventory_change, dynamic_bundle_lti, claim_promo_code, return_promo_code, new_order]

    The type of detail.

    loot_id

    object

    The Loot ID.

    anyOf

    integer

    inv_change

    object

    The Inventory change that occurred as part of this detail.

    anyOf

    Represents the change that occurred to an entry in the Player's Inventory. The before fields contain the state before the change, after fields contain the state after the change.

    before_item_id

    object

    The Item ID of the Item before the change.

    anyOf

    integer

    after_item_id

    object

    The Item ID of the Item after the change.

    anyOf

    integer

    before

    object

    The Inventory Record before the change.

    anyOf

    Inventory Record for a Player

    inventory_id uuidrequired

    Unique ID for this Inventory Record.

    type InventoryType (string)required

    Possible values: [persistent, transient, always_owned]

    Type of Inventory Record.

    legacy_inventory_id

    int64

    Legacy Inventory ID.

    anyOf

    integer

    bucket InventoryBucket (string)

    Possible values: [free, sweat, none, anon, amazon, steam, psn, xbox_live, google, twitch, nintendo_switch, apple, nintendo, epic, google_play, nintendo_ppid]

    Default value: none

    Grouping of Inventory Items. Inventory items are grouped into different buckets as each Platform that is supported has different requirements on how Inventory can be used on their Platform and other Platforms.

    count Count (integer)required

    Instance count for this Inventory Record.

    acquired date-timerequired

    When this Inventory Record was acquired.

    expires

    object

    When this Inventory Record expires.

    anyOf

    Datetime that enforces that a timezone is given. Unix timestamps are allowed and forced into the UTC time zone

    string

    custom_data

    object

    Arbitrary map of data for this Inventory Record.

    anyOf

    property name* string

    after

    object

    The Inventory Record after the change.

    anyOf

    Inventory Record for a Player

    inventory_id uuidrequired

    Unique ID for this Inventory Record.

    type InventoryType (string)required

    Possible values: [persistent, transient, always_owned]

    Type of Inventory Record.

    legacy_inventory_id

    int64

    Legacy Inventory ID.

    anyOf

    integer

    bucket InventoryBucket (string)

    Possible values: [free, sweat, none, anon, amazon, steam, psn, xbox_live, google, twitch, nintendo_switch, apple, nintendo, epic, google_play, nintendo_ppid]

    Default value: none

    Grouping of Inventory Items. Inventory items are grouped into different buckets as each Platform that is supported has different requirements on how Inventory can be used on their Platform and other Platforms.

    count Count (integer)required

    Instance count for this Inventory Record.

    acquired date-timerequired

    When this Inventory Record was acquired.

    expires

    object

    When this Inventory Record expires.

    anyOf

    Datetime that enforces that a timezone is given. Unix timestamps are allowed and forced into the UTC time zone

    string

    custom_data

    object

    Arbitrary map of data for this Inventory Record.

    anyOf

    property name* string

    order

    object

    Reference to the Player Order that this detail belongs to.

    anyOf

    Create a new Player Order.

    Note: use_inventory_bucket will be ignored on the PlayerOrderEntryCreate if the source equals CLIENT.
    source Source (string)

    Possible values: [UNKNOWN, WEB_ORDER_REPAIR, IN_GAME, WEB_SITE, NO_SALE, SUPPORT, ACTIVITY, REFUND, SYSTEM, REWARDS, ESPORTS, TREASURE, CONSOLE, ODYSSEY, STEAM, RETURN, JSON_GATE, SEND_GIFT, RECEIVE_GIFT, STEAM_DLC, TWITCH_MILESTONE, TWITCH_PRIME, PSN, XBOX, PTS_GRANT, INSTANCE, ACCOUNT_TRANSFER, PROMOCODE, TRIUMPH_SYSTEM, LOGIN_GRANT, EOM_UNCAPPED, EOM_CAPPED, FACEBOOK_DROP, DATABASE_SCRIPT, ACCOUNT_LINKING, CLAN, CONVERSION, APPLE, GOOGLE, GOOGLE_PLAY, PORTAL_DURABLE, PARTNER_ACHIEVEMENT, MIXER_DROP, NINTENDO, STREAM_VIEWING_PROGRESS, DISCORD, FIRST_LOGIN_GRANT, TWITCH_FUEL, DISCORD_DLC, NETEASE, EPIC_GAMES, FORTE, FACEBOOK, HIREZ, DAILY_REWARD, ADD_ACCOUNT_EMAIL_REWARD, CLIENT_CLAIM, CLIENT, ENTITLEMENTS, AMAZON, SIMULMEDIA, LUNA]

    Default value: CLIENT

    The source of the Player Order.

    client_order_ref_id

    object

    Arbitrary UUID clients can use to track Orders between request to response.

    anyOf

    string

    portal_id

    object

    deprecated

    Portal of the Portal User the Player Order belongs to.

    anyOf

    integer

    Possible values: [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33]

    portal_user_id

    object

    Portal User Id for the Player this Player Order belongs to.

    anyOf

    string

    instance_id

    object

    Instance Id for the Instance who submits the Player Order.

    anyOf

    string

    match_id

    object

    Match Id for the Match that generated the Player Order.

    anyOf

    string

    is_transaction Is Transaction (boolean)

    If an order is a transaction, any failed entries will roll back changes from all other entries.

    order_id

    object

    Unique Identifier for the Order.

    anyOf

    string

    entries

    object[]

    required

    List of Player Order Entries for the Player Order.

  • Array [

  • type PlayerOrderEntryType (string)required

    Possible values: [fill_loot, purchase_loot, purchase_dynamic_bundle, promotion_code, fill_loot_single_transient, fill_entitled_loot, create_new_persistent_inventory, update_existing_persistent_inventory, create_new_transient_inventory, update_existing_transient_inventory, update_inventory]

    The type of entry.

    loot_id

    object

    Unique Identifier for the Loot

    anyOf

    integer

    quantity Quantity (integer)required

    Quantity of Inventory

    vendor_version

    int64

    deprecated

    Legacy version for the vendor owning the loot_id. Use vendor_etag instead.

    anyOf

    integer

    vendor_etag

    object

    etag for the vendor owning the loot_id. Will fail the fulfillment if they do not match

    anyOf

    string

    dynamic_bundle_loot_ids

    object

    List of Loot IDs for the dynamic bundle.

    anyOf

  • Array [

  • integer

  • ]

  • purchase_price

    object

    deprecated

    The purchase price of the Loot. Deprecated. Use the purchase_prices field instead

    anyOf

    The purchase price of an Item.

    price_item_id

    object

    deprecated

    The Item used as the currency for the purchase. Deprecated. Use currencies instead

    anyOf

    integer

    price

    object

    deprecated

    The price of the Item. Deprecated. Use currencies instead

    anyOf

    integer

    price_coupon_item_id

    object

    The Item used as the coupon for the purchase.

    anyOf

    integer

    currencies

    object

    List of currencies for this purchase price

    anyOf

  • Array [

  • price_item_id Price Item Id (integer)required

    The Item used as the currency for the purchase.

    price Price (integer)required

    The price of the Item.

  • ]

  • external_tran_id

    object

    External Transaction Id for source of the acquisition or a promotion code to claim. Required for [PROMOTION_CODE] types

    anyOf

    string

    external_item_sku

    object

    External item SKU for the Order Entry.

    anyOf

    string

    use_inventory_bucket

    object

    Inventory Bucket to use for the Order Entry.

    anyOf

    Grouping of Inventory Items. Inventory items are grouped into different buckets as each Platform that is supported has different requirements on how Inventory can be used on their Platform and other Platforms.

    string

    Possible values: [free, sweat, none, anon, amazon, steam, psn, xbox_live, google, twitch, nintendo_switch, apple, nintendo, epic, google_play, nintendo_ppid]

    player_portal_event_id

    int64

    Player Portal Event Id for the Order Entry.

    anyOf

    integer

    inventory_id

    object

    Unique Identifier for the Inventory

    anyOf

    string

    legacy_inventory_id

    int64

    Legacy Inventory Id. This is only used when type equals [UPDATE_EXISTING_PERSISTENT_INVENTORY, UPDATE_EXISTING_TRANSIENT_INVENTORY]

    anyOf

    integer

    item_id

    object

    Item Id used create or update Inventory directly. This is only used when type equals [CREATE_NEW_PERSISTENT_INVENTORY, CREATE_NEW_TRANSIENT_INVENTORY]

    anyOf

    integer

    expires

    object

    Expiration time for the Inventory. This is only used when type equals [CREATE_NEW_PERSISTENT_INVENTORY, UPDATE_EXISTING_PERSISTENT_INVENTORY, CREATE_NEW_TRANSIENT_INVENTORY, UPDATE_EXISTING_TRANSIENT_INVENTORY, UPDATE_INVENTORY]

    anyOf

    Datetime that enforces that a timezone is given. Unix timestamps are allowed and forced into the UTC time zone

    string

    custom_data

    object

    Custom Data Attributes for the Inventory. This is only used when type equals [CREATE_NEW_PERSISTENT_INVENTORY, UPDATE_EXISTING_PERSISTENT_INVENTORY, CREATE_NEW_TRANSIENT_INVENTORY, UPDATE_EXISTING_TRANSIENT_INVENTORY, UPDATE_INVENTORY]

    anyOf

    property name* string

    entry_id

    object

    Unique Identifier for the Order Entry.

    anyOf

    string

  • ]

  • ]

  • ]

Loading...