Skip to content

Schema Reference

Mehrdad Pajuhaan edited this page Oct 23, 2026 · 1 revision

Schema Reference

Schema.json is an OpenAPI Specification (OAS) 3.1.0 document. It describes the "My shops" API that the Selldone GPT calls: the base URL, the available operations, their parameters and responses, and the data models they return. ChatGPT reads the description of every operation to decide when to call it, so the wording matters as much as the structure.

Overview

Section Content
openapi 3.1.0
info Title, description and version of the API
servers https://api.selldone.com
paths 4 operations: Check2FA, Verify2FA, GetShops, GetProductInfo
components.schemas 23 reusable models and enums (User, Shop, Product, ProductData, …)

1. openapi

"openapi": "3.1.0"

Specifies the version of the OpenAPI Specification that this document conforms to. It dictates the overall structure and the features available in the document.

2. info

Metadata about the API.

Field Value Meaning
title My shops The name of the API.
description Get information about my business and sales on Selldone. A short summary of what the API is used for.
version v1.0.0 The version of this API document, used for version control and management.

3. servers

An array of server objects used to connect to the API.

Field Value Meaning
url https://api.selldone.com The base URL for every API call. Each path below is appended to it.

4. paths

The available paths and operations. Every operation has an operationId (the action name shown in the GPT editor), a description (instructions for ChatGPT), parameters, an optional requestBody, responses and deprecated: false.

GET /security/2fa/check — Check2FA

  • Description: "Check user two-factor authentication is enabled? If the 'user' value is in response, it means the user successfully logged in. Otherwise, call Verify2FA"
  • Parameters: none ([]).
  • Responses:
    • 200 — 2FA status retrieved successfully. Example:

      {
        "user": { "$ref": "#/components/schemas/User" },
        "has_2fa": true
      }
    • 400 — Invalid request.

POST /auth/2fa — Verify2FA

  • Description: "Request user to enter 6 digit number 2FA code if Check2FA does not return 'user' value in its response."

  • Parameters: none ([]).

  • Request body (required, application/json):

    Field Type Rule Description
    code string pattern ^[0-9]{6}$ 6-digit 2FA numeric code to verify access.
  • Responses:

    • 200 — The 2FA code is valid and API calls are now authenticated with the Bearer token. Example:

      {
        "success": true,
        "token_verified": true,
        "user": { "$ref": "#/components/schemas/User" }
      }
    • 401 — Unauthorized, incorrect 2FA code.

GET /shops/me — GetShops

  • Description: "Get the list of my shops"

  • Parameters:

    Name In Required Type Description
    search query no string Something about business name or its URL.
  • Responses:

    • 200 — List of shops retrieved successfully. The response contains shops, an array of Shop.
    • 400 — Invalid request.

GET /shops/{shop_id}/products/{product_id}/admin — GetProductInfo

  • Summary: Get Product Information by Shop and Product ID.

  • Description: Returns information about the product by product ID and shop ID, including statistics for a specified time period. ChatGPT is instructed to ask the user for the product's admin page URL, formatted as https://selldone.com/shuttle/shop/{shop_id}/product/{product_id}/…, and read both IDs from it.

  • Parameters:

    Name In Required Type Default Description
    shop_id path yes string – The unique identifier for the shop.
    product_id path yes string – The unique identifier for the product.
    offset query no integer 0 Offset in days from now for the statistics (sales, inventory, finance, views, …).
    limit query no integer 30 Number of days to look back from the offset day, i.e. the number of data records to return.
    with_trashed query no boolean false Include or exclude trashed (deleted) items in the response.
  • Responses:

    • 200 — Product details and statistics for the specified shop and product:

      Field Type Description
      product Product The product.
      data array of ProductData Daily statistics records for the requested period.
      orderQue array of { count, delivery_state, type } Orders in the queue: number of orders, delivery state and order type.

5. components

components.schemas holds reusable models referenced from the responses with $ref. They help ChatGPT interpret the data it receives.

User models

User

Field Type Description
id number The unique identifier for the user.
name string The user's full name.
email string The user's email address.
phone string The user's phone number.
email_verified_at string Timestamp when the user verified their email address.
socials_login UserSocialLogin Social login flags for the user.
preferences UserPreferences User preferences settings.
interest UserInterest User's interests grouped by categories.
subscribed boolean Indicates if the user is subscribed.
block_at string Timestamp indicating when the user was blocked.
block_hours number Duration (in hours) the user was last blocked. Used for calculating the next punishment period.
ban string: BanLevel1, BanLevel2, BanLevel3 Ban level for the user.
meta object Key-value pairs for storing metadata (private). Used for keeping third-party customer IDs and other values.
deleted_at string Timestamp when the user was soft deleted.
created_at string Timestamp when the user was created.
updated_at string Timestamp when the user was last updated.

UserSocialLogin

Free-form object (no fixed properties are defined in the schema).

UserPreferences

Free-form object (no fixed properties are defined in the schema).

UserInterest

Free-form object (no fixed properties are defined in the schema).

Shop models

Shop

Field Type Description
id number | null The unique identifier for the shop.
name string | null The name of the shop.
user_id number The unique identifier for the user associated with the shop.
home ShopHome Represents the shop's homepage configuration.
language string The default language for the shop.
title string The title of the shop.
description string The description of the shop.
icon string The icon associated with the shop.
fav string The favorite icon for the shop.
official boolean Indicates if the shop is official.
active boolean Indicates if the shop is active.
restriction string The shop's access restriction setting.
license string: License1, License2, License3 The licensing code for the shop.
capacity number The storage capacity of the shop in KB.
expire_at string The expiration date of the shop.
info ShopInfo Additional info about the shop.
support_mode string Support mode for the shop.
support array Support details.
address_verified boolean Indicates if the address associated with the shop is verified.
phone_verified boolean Indicates if the phone number associated with the shop is verified.
gold boolean Indicates if the shop has a gold status.
penalty boolean Indicates if the shop has any penalties.
purge_at string The date when the shop and its content will be deleted.
options array of ShopOption Configuration options for the shop.
domain string The domain associated with the shop.
currencies array Supported currencies for the shop.
footer array Configuration for the footer of the shop.
theme ShopTheme Theme configuration for the shop.
avocado array Configuration for Avocado form.
hyper array Configuration for Hyper.
ribbon ShopRibbon Configuration for Ribbon. Its the default behavior of subscription products.
marketplace array Configuration for the marketplace.
model string The business model of the shop.
local Domain Domain details for local configuration.
sub Domain Domain details for sub-domain configuration.
countries array Supported countries for the shop.
lottery array Information regarding the lottery.
tax array Tax information for the shop.
created_at string The creation date of the shop.
updated_at string The last updated date for the shop.
deleted_at string The deletion date for the shop.
client_id number Agency client ID associated with the shop.
drop_shipping boolean Indicates if the shop operates in dropshipping mode.
dropShipping_products number The number of dropshipping products.
dropShipping_sells number The number of dropshipping products sold.
dropShipping_score number The dropshipping score for the shop.
shop_exchange_rates array Shop exchange rates.

ShopHome

Represents the shop's homepage configuration.

Type string. Values: blog, avocado, hyper, community, shop, map, landing_page.

ShopInfo

Additional info about the shop.

Field Type Description
location string The location of the shop.
daysOpen array Days when the shop is open.
times string Opening times of the shop.
address string The address of the shop.
email string The email address of the shop.
country string The country of the shop.
postalCode string The postal code of the shop.
countryCode string The country code of the shop.
region string The region of the shop.
locality string The locality of the shop.
days_open array Days when the shop is open based on the WeekDays enum.

ShopOption

Field Type Description
code string The code for the shop option.
value array The custom options of shop.

ShopTheme

Shop theme configuration.

Field Type
color_light string
color_dark string
color_deep_dark string
color_info string
color_buy string
color_bill string
light_checkout boolean
light_header boolean
light_footer boolean
light_filter boolean
mobile string
tablet string
pc string
static –
hover_actions –
only_available boolean
smart_price boolean
order array
font_family –
font_res –
reverse_currency boolean
logo –
logo_w –
logo_h –
title string
css –

ShopRibbon

Subscription selling configuration in the shop.

Field Type Description
shipping boolean Ask for shipping address
billing boolean Ask for billing address
cart boolean Cart mode (add multiple subscriptions to cart)
count boolean User can buy more than one subscription per product.

Domain

Information about shop main domain.

Field Type Description
id number Unique identifier for the domain.
shop_id number Identifier of the associated shop.
primary boolean Indicates if this is the primary domain for the shop.
indexed boolean Indicates if the domain is indexed.
domain string The domain name.
home string | null Domain home page (can be null, a page_id, 'avocado', or 'blog').
approved boolean Indicates if the domain is approved.
enable boolean Indicates if the domain is enabled.
expire_at string | null Date and time when the domain expires.
ssl_proxy boolean Indicates if the domain was added via SSL proxy IPs.
ssl boolean Indicates the health status of domain SSL.
issue_at string | null Last date and time when a request was sent to issue SSL by SSL proxy.
check_at string | null Last date and time when the domain was checked.
https boolean Indicates if http should be forced to https.
error string | null Last error message, if any.
affiliate_id number Identifier of the attached affiliate.
info array | null Additional domain information provided by the user.
debug array | null Debug details for selldone admin.
certificate array | null Certificate information (see SSLCertificate).
created_at string | null Date and time when the domain was created.
updated_at string | null Date and time when the domain was last updated.

Product models

Product

Field Type Description
id number Unique identifier for the product.
shop_id number Identifier for the shop owning the product.
action string Product buy call to action.
ar Product.IAR AR 3D model, created by the system.
badges array | null Array of badge identifiers associated with the product.
best_content boolean Indicates if product has great ranked content.
best_seller boolean Indicates if this is the bestseller product.
blog string Link to external resources shown on the product page.
brand string Brand name of the product.
category_id number Identifier for the product's category.
commission number Commission on the product.
condition string Condition of the product, e.g., 'NEW', 'USED', 'REFURBISHED'.
connect_id number Identifier for the connect provider that created this product.
cons object List of disadvantages.
currency string Currency code, e.g., 'USD', 'EUR'.
dis_end string | null End date for the product discount.
dis_start string | null Start date for the product discount.
discount number Discount amount on the product.
extra Product.IExtra Additional product details.
for_auction number Total users waiting for auction.
for_available number Total users waiting for availability.
gpc string Global Product Classification code.
gtin string Global Trade Item Number.
guide_id number Assigned guide profile ID shown on the product page.
hsn string Harmonized System Nomenclature code for international trade.
inputs array Input form structure for extra information about purchased product.
lead string Lead time required for the product.
map_id number Assigned location tag on the map.
message string Note shown to the customer in the product and basket page.
mpn string Manufacturer Part Number for the product.
note any General note or additional information about the product.
officer number Officer user id, the user who creates this product.
order number Order index to custom sort products.
original boolean Indicates if the product is original.
outputs array Output form structure for virtual items purchase.
parent_id number For middle sellers, the main product in drop-shipping supplier store.
price number Price of the product.
price_input Product.PriceInputType Type of input used for the product price.
price_label string Extra info about price (e.g., $1.5/Fl Oz).
pricing Product.ProductPricing Pricing strategy for the product.
pros object List of advantages or positive aspects.
quantity number Available quantity of the product.
rate number Average rating of the product.
rate_count number Total number of buyers who rated this product.
repository_id number Identifier for the products repository this product was created from.
reselling boolean Indicates if the product is available for drop-shipping.
reselling_count number Total number of products sold by resellers.
reselling_shops number Total number of shops reselling this product.
return_policy_id number Assigned return policy profile ID.
return_warranty number Duration in hours to return goods after receiving order by buyer.
ribbon Product.IRibbon Ribbon configurations.
sells number Total sales of this product.
shipping object | null Custom shipping price for drop-shipping suppliers.
shipping_id number Assigned shipping profile ID.
sku string Stock Keeping Unit identifier for the product.
slug string Slug to create SEO friendly URL.
spec Product.ISpec Product specifications as key/value pairs.
spec_order array | null Order of items in the spec table.
status Product.ProductStatus Availability of the product, e.g., 'Open', 'Close'.
style object Style of the product.
tags array List of product tags.
tax_id number Assigned tax profile ID.
title string Title of the product.
title_en string Subtitle of the product, preferably in English.
type Product.ProductType Type of product.
unit string Custom product unit, e.g., cm, litre, bottle.
unit_float boolean Indicates if a fractional unit can be ordered, e.g., 3.5 kg of fruit.
valuation_id number Identifier for the valuation method used.
variants array | null List of product variants.
vendor_id number Identifier for the vendor of the product.
video string Youtube video ID for the product.
visits number Total number of visits to the product page.
warranty string Short warranty condition and name.
warranty_id number Assigned warranty profile ID.
locations object Specific locations associated with the product.
icon string | null Optional icon for the product.

Product.ProductType

Type string. Values: PHYSICAL, VIRTUAL, SERVICE, FILE, SUBSCRIPTION.

Product.PriceInputType

Type string. Values: default, area, volume, custom.

Product.ProductPricing

Type string. Values: FIX, ESTIMATION, AGREEMENT, BID.

Product.ProductCondition

Type string. Values: new, refurbished, used, used_fair, used_good, used_like_new.

Product.ProductStatus

Type string. Values: Open, Close, Pending, Rejected.

Product.ISpec

A JSON of key/value pairs representing the product specifications.

Free-form object. Each value is either an array of strings or the string group.

Product.IVariant

Field Type
color string
style string | null
volume string | null
weight string
pack string | null
type string

Product.IRibbon

Field Type
mode enum: SubBox, Membership, SubPhysical, SubVirtual, SubFile, SubService
items array
billing boolean
shipping boolean
count boolean

Product.IAR

Field Type
src_file string | null
src string | null
size_src string | null
name_src string | null

Product.IExtra

Field Type
width number | null
length number | null
height number | null
weight number | null

Statistics

ProductData

Field Type Description
id number Unique identifier for the data entry.
product_id number ID of the associated product.
price number Price of the product in Rial.
count number Total quantity of items.
sell number Total number of products sold.
send number Total number of products sent.
views number Total number of product views.
likes number Total number of likes for the product.
powers number Some property related to the power metric of the product.
favorites number Total number of times the product has been favorited.
wishlist number Total number of times the product has been added to wishlists.
comments number Total number of comments on the product.
comments_approved number Total number of approved comments on the product.
ratings number Total number of ratings for the product.
rating_star number Average star rating of the product (ranges from 1 to 5).
reselling_shops number Number of shops reselling the product.
reselling_count number Count related to reselling of the product.
created_at string The date and time when the record was created.
updated_at string The date and time when the record was last updated.

Extending the schema

You can add more Selldone API operations to Schema.json for your own GPT:

  1. Add a new entry under paths with the HTTP method, a unique operationId and a clear description that tells ChatGPT when to call it.
  2. Declare every parameter (in: path, query) and the requestBody, if any.
  3. Describe the response, reusing models from components.schemas with $ref.
  4. Make sure the OAuth scopes configured in the GPT allow the new operation.
  5. Paste the updated schema into the GPT editor and use Test before publishing.

Keep descriptions short and explicit. ChatGPT follows them literally, for example Check2FA tells it to call Verify2FA when no user is returned.

Related