Storefront Customer
A customer represents a user in your store.
This resource is intended to be accessed directly by customers using a customer token.
Request Headers
- Name
Authorization
- Type
- customer auth
- Tags
- REQUIRED
- Description
the token of your customer prefixed with
customer
if logged in, more information here
The Customer object
Fields
- Name
id
- Type
- flake
- Tags
- Description
id of the customer
- Name
store_id
- Type
- flake
- Tags
- Description
id of the store this customer belongs to
- Name
profile
- Type
- generic profile
- Tags
- NULLABLE
- Description
the generic profile information for this customer
- Name
steam_id
- Type
- string
- Tags
- NULLABLE
- Description
the SteamID64 of this customer
- Name
minecraft_uuid
- Type
- string
- Tags
- NULLABLE
- Description
the Minecraft UUID of this customer
- Name
steam
- Type
- steam profile
- Tags
- NULLABLE
- Description
the basic Steam profile information for this customer
- Name
minecraft
- Type
- minecraft profile
- Tags
- NULLABLE
- Description
the basic Minecraft profile information for this customer
- Name
name
- Type
- string
- Tags
- NULLABLE
- Description
the name of the customer
- Name
created_at
- Type
- timestamp
- Tags
- Description
timestamp of when the product was created
- Name
updated_at
- Type
- timestamp
- Tags
- NULLABLE
- Description
timestamp of when the product was last updated
Steam Profile Structure
Fields
- Name
id
- Type
- string
- Tags
- Description
the profile's SteamID64
- Name
name
- Type
- string
- Tags
- NULLABLE
- Description
the profile's display name
- Name
avatar_url
- Type
- string
- Tags
- NULLABLE
- Description
the profile's avatar url
Minecraft Profile Structure
Fields
- Name
id
- Type
- string
- Tags
- Description
the profile's UUID
- Name
name
- Type
- string
- Tags
- NULLABLE
- Description
the profile's display name
- Name
avatar_url
- Type
- string
- Tags
- NULLABLE
- Description
the profile's Minecraft head avatar url
Generic Profile Structure
Fields
- Name
id
- Type
- string
- Tags
- Description
the profile's unique identifier
- Name
platform
- Type
- enum
- Tags
- Description
the profile provider platform
Allowed enum valuessteam
minecraft
minecraft_offline
- Name
name
- Type
- string
- Tags
- NULLABLE
- Description
the profile's display name
- Name
avatar_url
- Type
- string
- Tags
- NULLABLE
- Description
the profile's avatar url
The Customer object
{
"id": "150352880618967040",
"store_id": "94688451781206016",
"steam_id": "76561197960287930",
"steam": {
"id": "76561197960287930",
"name": "Rabscuttle",
"avatar_url": "https://avatars.akamai.steamstatic.com/c5d56249ee5d28a07db4ac9f7f60af961fab5426_full.jpg"
},
"name": "Rabscuttle",
"created_at": "2023-04-13T19:51:02.162046Z",
"updated_at": "2023-04-13T19:55:13.122010Z"
}
Get Current Customer
Request
Response
{
"id": "150352880618967040",
"store_id": "94688451781206016",
"steam_id": "76561197960287930",
"steam": {
"id": "76561197960287930",
"name": "Rabscuttle",
"avatar_url": "https://avatars.akamai.steamstatic.com/c5d56249ee5d28a07db4ac9f7f60af961fab5426_full.jpg"
},
"name": "Rabscuttle",
"created_at": "2023-04-13T19:51:02.162046Z",
"updated_at": "2023-04-13T19:55:13.122010Z"
}
The InventoryItem object
An inventory item represents a product that is owned by a customer. When a customer buys something on the store, the product goes into their inventory as an inventory item.
Fields
- Name
id
- Type
- flake
- Tags
- Description
id of the item
- Name
store_id
- Type
- flake
- Tags
- Description
id of the store this item belongs to
- Name
customer_id
- Type
- flake
- Tags
- Description
id of the customer this item belongs to
- Name
order_id
- Type
- flake
- Tags
- NULLABLE
- Description
id of the order that is related to this item
- Name
order_line_id
- Type
- flake
- Tags
- NULLABLE
- Description
id of the order line that is related to this item
- Name
quantity_index
- Type
- integer
- Tags
- NULLABLE
- Description
the quantity index of this item. Used if the order line contained multiple units.
- Name
product
- Type
- partial product
- Tags
- Description
the product this inventory item represents
- Name
state
- Type
- enum
- Tags
- Description
the state of the item
Allowed enum valuesitem has been assigned, but has not been used yetusable
item is activeactive
item has been usedused
item has been revokedrevoked
- Name
expirable
- Type
- boolean
- Tags
- Description
whether this item has a duration and can expire
- Name
gift
- Type
- boolean
- Tags
- Description
whether this item was a gift
- Name
added_at
- Type
- timestamp
- Tags
- Description
timestamp of when this item was added to the customer's inventory
- Name
active_at
- Type
- timestamp
- Tags
- NULLABLE
- Description
timestamp of when this item was activated. Is populated after the item becomes
active
.
- Name
expires_at
- Type
- timestamp
- Tags
- NULLABLE
- Description
timestamp of when this item will expire. Is populated after the item becomes
active
.
- Name
removed_at
- Type
- timestamp
- Tags
- NULLABLE
- Description
timestamp of when this item was removed. Is populated after the item becomes
used
.
- Name
revoked_at
- Type
- timestamp
- Tags
- NULLABLE
- Description
timestamp of when this item was revoked. Is populated after the item becomes
revoked
.
- Name
revoke_reason
- Type
- enum
- Tags
- NULLABLE
- Description
the reason this item was revoked
Allowed enum valuesa store admin decided to manually revoke the itemadmin
the item was refunded from the original orderrefund
the customer initiated a chargebackchargeback
Partial Product Structure
Contains a partial set fields that refer to a product
Fields
- Name
id
- Type
- flake
- Tags
- Description
id of the product
- Name
store_id
- Type
- flake
- Tags
- Description
the id of the store that this product belongs to
- Name
version_id
- Type
- flake
- Tags
- Description
version id of the product
- Name
slug
- Type
- string
- Tags
- Description
the url-safe identifier for the product, unique to the store
- Name
name
- Type
- string
- Tags
- Description
the name the product
The InventoryItem object
{
"id": "149643503939362817",
"store_id": "94688451781206016",
"customer_id": "150352880618967040",
"order_id": "149643389770407936",
"order_line_id": "149643389770407937",
"quantity_index": 1,
"product": {
"id": "124249183568797696",
"store_id": "94688451781206016",
"version_id": "147121000780144640",
"slug": "banana",
"name": "Banana"
},
"state": "used",
"expirable": true,
"gift": false,
"added_at": "2023-04-11T20:52:13.659206Z",
"active_at": "2023-04-11T21:52:53.66545Z",
"expires_at": "2023-04-11T22:52:53.66545Z",
"removed_at": "2023-04-11T22:53:55.763216Z",
"revoked_at": null,
"revoke_reason": null
}
Get Current Customer Inventory
Returns all of the inventory items for the currently authenticated customer.
Returns
Returns an array of inventory items.
Response
[
{
"id": "149643503939362817",
"store_id": "94688451781206016",
"customer_id": "150352880618967040",
"order_id": "149643389770407936",
"order_line_id": "149643389770407937",
"quantity_index": 1,
"product": {
"id": "124249183568797696",
"store_id": "94688451781206016",
"version_id": "147121000780144640",
"slug": "banana",
"name": "Banana"
},
"state": "used",
"expirable": true,
"gift": false,
"added_at": "2023-04-11T20:52:13.659206Z",
"active_at": "2023-04-11T21:52:53.66545Z",
"expires_at": "2023-04-11T22:52:53.66545Z",
"removed_at": "2023-04-11T22:53:55.763216Z",
"revoked_at": null,
"revoke_reason": null
},
{...},
{...}
]