For the complete documentation index, see llms.txt. This page is also available as Markdown.

Endpoints

All endpoints for Headless API: for specific implementation guides see Guides

Get the webstore's information

get

Gets the webstore associated with the provided token

Responses
200

Successful response returns the webstore's information.

application/json

Wrapped webstore information in a "data" object.

get/
200

Successful response returns the webstore's information.

Get custom pages defined for the webstore.

get

Gets a list of custom pages associated with the webstore. These contain a content variable with the HTML content of the page.

Responses
200

Successful response returns the webstore's pages.

application/json
get/pages
200

Successful response returns the webstore's pages.

Get a basket

get

Gets a basket associated with the provided identifier.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Successful response returns the basket information.

application/json
get/baskets/{basketIdent}
200

Successful response returns the basket information.

Create a new basket

post

Creates a new basket for use during checkout.

Body
complete_urlstringOptional

A URL the user can return to when checkout is completed.

Example: https://example.tebex.io/thank-you
cancel_urlstringOptional

A URL the user can return to when cancelling checkout.

Example: https://tebex.io/
customobjectOptional

Custom data you wish to associate with the basket. This data will be included with webhook responses and GET requests associated with the Basket.

Example: {"foo":"bar"}
complete_auto_redirectbooleanOptional

True if the user should automatically be redirected to the relevant complete/cancel URL

Example: true
Responses
200

Successful response returns the basket information.

application/json
post/baskets

Get auth links for basket

get

Fetches a basket's auth URL. The player should be directed here in order for them to authorize their account. When complete, they will be returned to the provided returnUrl and the basket will be authorized from that moment onwards.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
returnUrlstringRequired

The URL you would like to redirect the user to after successful basket authentication.

Example: https://example.tebex.io/
Responses
200

Successful response returns the auth provider options and URLs of the sign-in link.

application/json
namestringOptionalExample: FiveM
urlstringOptionalExample: https://ident.tebex.io/
get/baskets/{basketIdent}/auth?returnUrl={returnUrl}

Add packages to a dynamic category for a basket.

put

Populates a dynamic category with custom packages for the given basket. Dynamic categories are created in the creator panel with the type dynamic, and are typically populated in response to a basket.authenticated webhook.

Once created, the packages can be fetched using the category endpoints with both includePackages=1 and basketIdent provided.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
usernamestringRequired

The username of the authenticated customer the packages are being created for.

Example: TestUser
category_idintegerRequired

The ID of the dynamic category to populate.

Example: 1234
Responses
200

Successful response confirms the dynamic packages were created.

application/json
messagestringOptionalExample: Dynamic packages created successfully.
put/baskets/{basketIdent}/dynamic-packages

Get all categories

get

Gets all categories from a webstore. This does not include package information. To include package information, add ?includePackages=1 to the URL.

Responses
200

Successful response returns a list of category information.

application/json
get/categories
200

Successful response returns a list of category information.

Gets all categories and packages

get

Gets all categories from a webstore including packages.

Responses
200

Successful response returns a list of category information.

application/json
get/categories?includePackages=1
200

Successful response returns a list of category information.

Get user's tiered categories

get

Gets all categories from the webstore, returning active tier information for the given player.

Authorizations
AuthorizationstringRequired
Path parameters
usernameIdintegerRequiredExample: 76561198042467020
Responses
200

Successful response returns a list of category information.

application/json
get/categories?usernameId={usernameId}&includePackages=1
200

Successful response returns a list of category information.

Get Dynamic Categories

get

Gets all categories from a webstore including packages. When basketIdent is provided, dynamic categories are populated with the packages associated with that basket.

If a basket identifier is not provided, dynamic categories will be empty as the basket is required to relate packages to the category.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Successful response returns a list of category information.

application/json
get/categories?includePackages=1&basketIdent={basketIdent}
200

Successful response returns a list of category information.

Get specific category

get

Gets information about a category and returns the packages in that category.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Successful response returns the category without package information.

application/json
get/categories/{categoryId}
200

Successful response returns the category without package information.

Get a category with all packages

get

Gets information about a category and returns the packages in that category.

Path parameters
categoryIdstringRequired

The ID or slug of the category to fetch.

Example: 127244343
Responses
200

Successful response returns the category with package information.

application/json
get/categories/{categoryId}?includePackages=1
200

Successful response returns the category with package information.

Gets a specific category including packages, populating a dynamic category for the given basket.

get

Gets information about a category and returns the packages in that category. When the category is dynamic and basketIdent is provided, the category is populated with the packages associated with that basket.

If a basket identifier is not provided, a dynamic category will be empty as the basket is required to relate packages to the category.

Path parameters
categoryIdstringRequired

The ID or slug of the category to fetch.

Example: 1234
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Successful response returns the category with package information.

application/json
get/categories/{categoryId}?includePackages=1&basketIdent={basketIdent}
200

Successful response returns the category with package information.

Get package

get

Gets a package from a webstore by its ID or slug.

Note: this endpoint does not support packages belonging to dynamic categories. Use the category endpoints with includePackages=1 and basketIdent to fetch dynamic packages.

Path parameters
packageIdstringRequired

The package's ID or slug.

Example: 1272441812
Responses
200

Successful response returns the package information.

application/json
get/packages/{packageId}
200

Successful response returns the package information.

Get all packages

get

Gets all packages from a webstore.

Note: this endpoint does not support packages belonging to dynamic categories. Use the category endpoints with includePackages=1 and basketIdent to fetch dynamic packages.

Responses
200

Successful response returns a list of package information.

application/json
get/packages
200

Successful response returns a list of package information.

Get packages

get

Gets all packages from a webstore.

Path parameters
ipAddressstringRequired

An IP address can be provided with authenticated requests

Example: 127.0.0.1
Responses
200

Successful response returns a list of package information.

application/json
get/packages?ipAddress={ipAddress}

Get packages available for basket

get

Gets all packages available to the provided basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Successful response returns a list of package information.

application/json
get/packages?basketIdent={basketIdent}

Get packages available for IP and basket

get

Gets all packages from a webstore.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
ipAddressstringRequired

An IP address can be provided with authenticated requests.

Example: 127.0.0.1
Responses
200

Successful response returns a list of package information.

application/json
get/packages?ipAddress={ipAddress}&basketIdent={basketIdent}

Apply a creator code

post

Applies a creator code to a basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
creator_codestringOptionalExample: Academy10
Responses
200

Successful response returns a success object

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Creator code applied successfully
post/baskets/{basketIdent}/creator-codes

Remove a creator code from the basket.

post

Applies a creator code to a basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Creator code removed successfully.

No content

post/baskets/{basketIdent}/creator-codes/remove

No content

Apply a gift card

post

Applies a creator code to a basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
card_numberstringOptionalExample: 0127 0244 7210 1111
Responses
200

Successful response returns a success message.

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Gift card applied successfully
post/baskets/{basketIdent}/giftcards
200

Successful response returns a success message.

Remove a gift card from the basket.

post

Removes a gift card from the basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
card_numberstringOptionalExample: 0127 0244 7210 1111
Responses
200

Gift card removed successfully.

No content

post/baskets/{basketIdent}/giftcards/remove

No content

Apply a coupon

post

Applies a coupon to a basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
coupon_codestringOptionalExample: Academy10
Responses
200

Successful response returns a success message.

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Coupon applied successfully
post/baskets/{basketIdent}/coupons
200

Successful response returns a success message.

Remove a coupon from the basket.

post

Removes a coupon code from a basket

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
coupon_codestringOptionalExample: Academy10
Responses
200

Successful response.

No content

post/baskets/{basketIdent}/coupons/remove

No content

Add package to basket

post

Add a package with the given ID to the basket.

To add a package belonging to a dynamic category, set dynamic to true. Without this property the API will treat the request as a normal package ID.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
package_idstringOptionalExample: 6276316
quantityintegerOptionalExample: 1
dynamicbooleanOptional

Set to true when adding a package that belongs to a dynamic category. When omitted, the API acts as if a normal package ID was provided.

Example: true
Responses
200

Successful response.

application/json
idstringOptionalExample: 244127617
identstringOptionalExample: 1a-55fff4107740a1f40d844ff89607557f45bfafb3
completebooleanOptionalExample: false
emailstring · nullableOptionalExample: support@tebex.io
usernamestring · nullableOptional
creator_codestringOptional

The creator code is used to share a percentage of the payment with another party. See more about creator codes at https://docs.tebex.io/creators/tebex-control-panel/engagement/creator-codes

cancel_urlstringOptionalExample: https://tebex.io
complete_urlstring · nullableOptional
complete_auto_redirectbooleanOptionalExample: false
countrystringOptional

A two-character country code

Example: US
ipstringOptionalExample: 127.0.0.1
username_idintegerOptionalExample: 127244
base_pricenumber · floatOptionalExample: 1.27
sales_taxnumber · floatOptionalExample: 0.11
total_pricenumber · floatOptionalExample: 1.38
currencystringOptional

A 3 character currency code

Example: USD
customobject · nullableOptionalExample: {"foo":"bar","ref":1234}
post/{basketIdent}/packages

Remove a package from a basket

post

Remove the given package ID from the basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
package_idstringOptionalExample: 6276316
Responses
200

Successful response returns the basket.

application/json
idstringOptionalExample: 244127617
identstringOptionalExample: 1a-55fff4107740a1f40d844ff89607557f45bfafb3
completebooleanOptionalExample: false
emailstring · nullableOptionalExample: support@tebex.io
usernamestring · nullableOptional
creator_codestringOptional

The creator code is used to share a percentage of the payment with another party. See more about creator codes at https://docs.tebex.io/creators/tebex-control-panel/engagement/creator-codes

cancel_urlstringOptionalExample: https://tebex.io
complete_urlstring · nullableOptional
complete_auto_redirectbooleanOptionalExample: false
countrystringOptional

A two-character country code

Example: US
ipstringOptionalExample: 127.0.0.1
username_idintegerOptionalExample: 127244
base_pricenumber · floatOptionalExample: 1.27
sales_taxnumber · floatOptionalExample: 0.11
total_pricenumber · floatOptionalExample: 1.38
currencystringOptional

A 3 character currency code

Example: USD
customobject · nullableOptionalExample: {"foo":"bar","ref":1234}
post/{basketIdent}/packages/remove

Update package quantity

put

Sets the quantity of the given item in the basket. The user must be logged in before the quantity can be changed.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
quantityintegerOptionalExample: 1
Responses
200

Successful response.

No content

put/{basketIdent}/packages/{packageId}

No content

Update user's tier to a new package

patch

Updates a tier to a new package. A recurring payment updated webhook is sent when an update is successful.

Authorizations
AuthorizationstringRequired
Path parameters
tierIdintegerRequired

The tier identifier

Example: 6276316
Body
package_idintegerOptionalExample: 6834822
Responses
200

Successful response.

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Tier successfully upgraded, please allow a few moments for your changes to take effect.
patch/tiers/{tierId}
200

Successful response.

Retrieves the available sidebar modules.

get

Retrieves the available sidebar modules configured for the store.

Path parameters
tokenstringRequired

The webstore identifier.

Example: some-uuid
Responses
200

Successful response.

application/json
get/sidebar
200

Successful response.

Last updated