Browse docs
Server: Advanced Pricing exports
This page documents supported public integration calls and usage examples. It does not expose or reproduce the resource's internal implementation.
Server Exports
All Advanced Pricing and Billing exports return a result table:
{
success = true,
data = {}
}
Rejected requests return success = false and a stable error code. Player identity, mechanic job, grade, permissions, vehicle distance, configured limits, quote state, invoice ownership, and monetary values are always resolved or validated on the server.
Advanced Pricing exports
| Export | Arguments | Purpose |
|---|---|---|
CreatePricingQuote | source, payload | Calculates a fresh server-authoritative quote for a nearby vehicle and configured tuning options |
GetPricingQuote | source, orderId | Returns the saved quote data for an accessible workshop order |
ValidatePricingQuote | source, orderId, vehicleNetId | Validates order state, expiry, proximity, procurement state, and quoted vehicle model |
GetSupplierCatalog | source | Returns the authorized mechanic's current Dynasty catalog with server-calculated supplier prices |
GetPricingAnalytics | source, periodDays? | Returns workshop pricing analytics when the mechanic has billing-management permission |
CreatePricingQuote(source, payload)
The caller supplies only the requested vehicle and tuning option identifiers. Client or integration values for vehicle price, supplier cost, labor, margin, tax, discount, grade, society, or final price are not accepted as authoritative.
local result = exports["sky_mechanicjob"]:CreatePricingQuote(source, {
vehicleNetId = NetworkGetNetworkIdFromEntity(vehicle),
vehicleClass = 7,
parts = {
{ id = "mod_11", value = 2 },
{ id = "mod_23", value = 4, wheelType = 7 }
}
})
if result.success then
print(("Server quote: $%s"):format(result.data.amount))
end
vehicleClass is only used as a validated compatibility fallback when the current server artifact cannot resolve the class from the networked vehicle. The server still validates the entity and the player's distance.
Reading and validating an order quote
local quote = exports["sky_mechanicjob"]:GetPricingQuote(source, order_id)
if not quote.success then return end
local validation = exports["sky_mechanicjob"]:ValidatePricingQuote(
source,
order_id,
vehicle_net_id
)
if validation.success then
print("The quote is valid for this vehicle")
end
Only a mechanic belonging to the order's workshop can read or validate its quote.
Supplier catalog and analytics
local catalog = exports["sky_mechanicjob"]:GetSupplierCatalog(source)
local analytics = exports["sky_mechanicjob"]:GetPricingAnalytics(source, 30)
The supplier catalog requires Parts Delivery access. Pricing analytics additionally require the billing-management permission and never accept a job name from the caller.