Dive into the UEX API documentation to grasp its ins and outs. Start building your new application with UEX data

Welcome to UEX

New Babbage, Dec 6, 2954

/data_submit

Submit reports to the UEX Datacenter

Method POST
URL https://uexcorp.space/api/2.0/data_submit
Authorization Bearer Token
Cache TTL
Input (Header) // required user secret key, should be passed via header, obtained in user profile
secret_key string(40)
Input (POST) // required
id_terminal int(11)
type string(20) // commodity, item, vehicle_buy, vehicle_rent

// required for production
is_production int(1)

// required for type 'commodity'
prices[0][id_commodity] int(11)

// only for type 'item'
prices[0][id_item] int(11)
prices[0][id_category] int(11) // required if item `name` is provided
prices[0][name] string(255) // item name, required only if `id_item` is missing

// required for type 'vehicle_rent' or 'vehicle_buy'
prices[0][id_vehicle] int(11)

// price
// 'commodity' prices are per SCU
// only one input is allowed
// leave empty if 'is_missing'
prices[0][price_buy] float
prices[0][price_sell] float
prices[0][price_rent] float // exclusive for type 'vehicle_rent'

// if item is missing at terminal, send 1, else 0
prices[0][is_missing] int(1)

// inventory amount displayed at terminal (only for type 'commodity')
prices[0][scu_buy] int(11)
prices[0][scu_sell] int(11)

// inventory status displayed at terminal (only for type 'commodity')
prices[0][status_buy] int(11) // 1 - out of stock, 7 - maximum
prices[0][status_sell] int(11) // 1 - out of stock, 7 - maximum

// faction affinity level between -100 and 100 (only for types 'commodity' and 'item')
faction_affinity int(11) // affinity with faction where terminal is

// e.g. "trade terminal is not working"
details string(255)

// star citizen version, default is LIVE version (3.24.3)
game_version string(255)

// png/jpg image in base64 format, up to 10.00 MB
screenshot string(10485760)
Types of inventory states
(only for type `commodity`)
1 - Out of Stock (Empty)
2 - Very Low Inventory
3 - Low Inventory
4 - Medium Inventory
5 - High Inventory
6 - Very High Inventory
7 - Maximum Inventory (Full)
JSON input example
type `commodity`
{
    "id_terminal": 89,
    "type": "commodity",
    "is_production": 0,
    "prices":
    [
        {
            "id_commodity": 1,
            "price_sell": 120,
            "scu_sell": 593,
            "status_sell": 2
        },
        {
            "id_commodity": 4,
            "price_sell": 900,
            "scu_sell": 652,
            "status_sell": 5
        },
        {
            "id_commodity": 24,
            "price_buy": 136,
            "scu_buy": 529,
            "status_buy": 1
        }
    ],
    "faction_affinity": 15,
    "details": "The Commons have become a junkyard!",
    "game_version": "3.21",
    "screenshot": "SSBrbmV3IHlvdSB3b3VsZCBkbyB0aGlzIDotKSBDaGVlcnMh"
}
JSON input example
type `item` (existing ones)
{
    "id_terminal": 169,
    "type": "item",
    "is_production": 0,
    "prices":
    [
        {
            "id_item": 2641,
            "price_buy": 303
        },
        {
            "id_item": 1406,
            "price_buy": 1000
        },
        {
            "id_item": 618,
            "price_sell": 5000
        }
    ],
    "faction_affinity": 10,
    "details": "No burritos found",
    "game_version": "3.21"
}
JSON input example
type `item` (new ones)
// allows you to submit new items to the database

{
    "id_terminal": 169,
    "type": "item",
    "is_production": 0,
    "prices":
    [
        {
            "name": "Picoball",
            "id_category": 37,
            "price_sell": 1000000
        }
    ],
    "details": "No burritos found",
    "game_version": "3.21"
}
JSON input example
type `vehicle_buy`
{
    "id_terminal": 112,
    "type": "vehicle_buy",
    "is_production": 0,
    "prices":
    [
        {
            "id_vehicle": 113,
            "price_buy": 4912500
        },
        {
            "id_vehicle": 34,
            "price_buy": 4925500
        }
    ],
    "details": "Orison is beautiful!",
    "game_version": "3.21"
}
JSON input example
type `vehicle_rent`
{
    "id_terminal": 147,
    "type": "vehicle_rent",
    "is_production": 0,
    "prices":
    [
        {
            "id_vehicle": 10,
            "price_rent": 245344
        },
        {
            "id_vehicle": 4,
            "price_rent": 28769
        }
    ],
    "details": "NBIS voice announcer get on my nerves!!11!",
    "game_version": "3.21"
}
Output ids_reports string(255)
date_added int(11) // timestamp
username string(255) // datarunner ign
Responses // service temporarily unavailable
service_unavailable

// authentication error
no_api_found

// datarunner secret
missing_secret_key

// datarunner secret
invalid_secret_key

// PTU reports are currently not allowed by the server
ptu_reports_not_allowed

// game version does not exist. LIVE or PTU accepted only
invalid_game_version

// reached limit of 500 rows (e.g. commodities prices) per submission
max_rows_exceeded

// when the faction affinity is under the minimum range of -100
faction_affinity_under_minimum_range

// when the faction affinity is above the maximum range of 100
faction_affinity_under_maximum_range

// when there's an faction affinity input but the report type isn't 'commodity' or 'item'
faction_affinity_not_allowed_for_current_type

// datarunner not found
user_not_found

// datarunner banned or blocked
user_not_allowed

// report type not provided
missing_type

// invalid report type
invalid_type

// report type currently not available in the API
type_not_available

// terminal ID not provided
missing_id_terminal

// terminal not found
terminal_not_found

// `prices` input is not an array
missing_prices_array

// `prices` input is not an array
invalid_prices_array

// input error
reference_key_not_supplied

// input error
too_many_reports

// if user submits more than 1000 reports in the last 30 minutes
duplicated_report

// if a report for the same item and location has been submitted within the last 5 minutes
no_commodities_found

// input error
no_items_found

// input error
no_categories_found

// input error
no_vehicles_found

// `prices` input is not an array
invalid_prices_array_format

// if screenshot length exceeds 10.00 MB
screenshot_length_exceeds_limit

// error processing image (server side)
image_upload_error

// error storing image (server side)
image_storage_error

// server error
database_error

// commodity ID not provided
missing_id_commodity

// commodity not found (type `commodity` only)
invalid_id_commodity

// if both prices and 'is_missing' inputs are missing (type `commodity` only)
has_no_prices_and_no_is_missing_set

// if report has both price buy and sell (type `commodity` only)
has_both_price_buy_and_price_sell

// if report has both SCU buy and sell (type `commodity` only)
has_both_scu_buy_and_scu_sell

// if report includes both `status_buy` but `status_sell` (type `commodity` only)
cannot_have_both_status_buy_and_status_sell

// if report includes `price_buy` but `scu_sell` is incorrectly sent (type `commodity` only)
cannot_have_both_price_buy_and_status_sell

// if report includes `price_buy` but `status_sell` is incorrectly sent (type `commodity` only)
cannot_have_both_price_sell_and_status_buy

// if report includes `price_buy` but `status_sell` is incorrectly sent (type `commodity` only)
cannot_have_both_price_buy_and_scu_sell

// if report includes `price_sell` but `scu_buy` (type `commodity` only)
cannot_have_both_price_sell_and_scu_buy

// if provided `status_buy` value doesn't exist (type `commodity` only)
invalid_status_buy

// if provided `status_sell` value doesn't exist (type `commodity` only)
invalid_status_sell

// item not found in the database (type `item` only)
invalid_id_item

// category not provided (type `item` only)
missing_id_category

// category not found in the database (type `item` only)
invalid_id_category

// if both `id_item` and `name` were not provided (type `item` only)
id_item_or_name_not_provided

// if report has both price buy and sell (type `item` only)
has_both_price_buy_and_price_sell

// if `category` or `subcategory` inputs are missing (type `item` only)
missing_category_or_subcategory

// invalid category name (type `item` only)
invalid_category

// invalid subcategory name (type `item` only)
invalid_subcategory

// vehicle ID not provided (type `vehicle_rent` or `vehicle_buy` only)
missing_id_vehicle

// vehicle not found (type `vehicle_rent` or `vehicle_buy` only)
invalid_id_vehicle

// if both prices and 'is_missing' inputs are sent (type `vehicle_rent` or `vehicle_buy` only)
has_prices_and_is_missing_set

// all good
ok
Maximum Rows Allowed 500 rows
Last update: 6 months ago

Optional Required Required as header input

This website uses third-party cookies for stats, no personal data. We use cookies for preferences (dark mode, trading, mining) and collects trade/refining info (commodities, locations) for public reports. No personal data is collected.