XBorg SDK
  • Introduction
  • Community
    • Details
    • Resources
    • Inventory
    • Prizes
    • Store
    • Achievements
  • User
    • Profile
    • Authentication
    • Socials
    • Wallets
  • Quests
    • User
    • Community
  • Quest Events
    • Details
    • Participation
    • Leaderboard
  • Blockchain
  • Configuration
  • Shared Library SDK
    • Authentication & Setup
    • Quest Management
    • Event Management
      • Working with Events
      • Events Lifecycle
      • Events Requirements
      • Events Quests
      • Events Rewards
    • Quest Rewards
    • 3D Avatar
Powered by GitBook
On this page
  1. Community

Inventory

The Inventory API provides a comprehensive set of endpoints to interact with inventories.

PreviousResourcesNextPrizes

Last updated 4 months ago

Retrieve an inventory

get
Path parameters
ckeystringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{ckey}/inventory HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Return the slots of an inventory

get
Path parameters
ckeystringRequired
Query parameters
userIdstringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{ckey}/inventory/slots?userId=text HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Return list of items of a slot

get
Path parameters
ckeystringRequired
slotIdstringRequired
Query parameters
pagenumberOptional
limitnumberOptional
onlyOwnedstringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{ckey}/inventory/slots/{slotId}/items?onlyOwned=text HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Return item

get
Path parameters
ckeystringRequired
itemIdstringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{ckey}/inventory/items/{itemId} HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Return the avatar of an user from an inventory

get
Path parameters
ckeystringRequired
Query parameters
userIdstringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{ckey}/inventory/avatar?userId=text HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Return inventory items

get
Path parameters
ckeystringRequired
Query parameters
pagenumberOptional
limitnumberOptional
onlyOwnedstringRequired
userIdstringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{ckey}/inventory/items?onlyOwned=text&userId=text HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}
  • GETRetrieve an inventory
  • GETReturn the slots of an inventory
  • GETReturn list of items of a slot
  • GETReturn item
  • POSTAllocate slots of an inventory to a user
  • GETReturn the avatar of an user from an inventory
  • GETReturn inventory items
  • POSTMint the Avatar of user as an NFT on a blockchain

Allocate slots of an inventory to a user

post
Path parameters
ckeystringRequired
Body
Responses
201Success
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
post
POST /v1/community/{ckey}/inventory/slots/allocate HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "slots": [
    {
      "slotId": "text",
      "itemId": "text"
    }
  ]
}

No content

Mint the Avatar of user as an NFT on a blockchain

post
Path parameters
ckeystringRequired
Body
blockchainstringRequired
Responses
201Success
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
post
POST /v1/community/{ckey}/inventory/avatar/mint HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "blockchain": "text"
}

No content