Skip to main content
These server exports are a read-only integration surface for other resources (phones, banking, MDTs, tax or loan systems, dashboards). They never mutate shop state, so every money-safety guarantee stays owned by the resource. The two delivery exports at the end are the one exception: they are how a custom delivery system finishes or gives up a restock order. To react to shop activity, see Events.
Every export returns a fresh copy of the data. Mutating a returned table never affects the resource.

GetShop

Returns the full shop record (fresh from the database), or nil if no shop with that id exists.
string
required
The shop id to look up.
The record includes fields such as id, title, balance, ownerIdentifier, ownerName, forSale, salePrice and an inventory array of listings.

GetAllShops

Returns every shop keyed by id. This reads one row per shop plus its inventory, so use it for one-off discovery or enumeration rather than per-frame reads.

GetShopBalance

Returns the shop’s current balance as a number, or nil if no such shop exists.
string
required
The shop id to read the balance of.

GetShopOwner

Returns owner info for a shop, or nil if no such shop exists. identifier and name are nil when the shop is server-run or currently for sale.
string
required
The shop id to read ownership of.

GetOwnedShops

Returns an array of the full shop records owned by an identifier. Employees are excluded (ownership only). Empty if the identifier owns nothing.
string
required
The player identifier to list owned shops for.

IsShopEmployee

Returns true only if the identifier is a hired employee of the shop. The owner is not counted as an employee, so check GetShopOwner for ownership.
string
required
The shop id to check.
string
required
The player identifier to check.

GetShopEmployees

Returns an array of employee records for a shop (empty if none, or if no such shop exists). Each record includes identifier, name, role, permissions and commission info.
string
required
The shop id to list employees for.

GetShopStats

Returns sales stats for a shop, or nil if no such shop exists. The stats are tenure-scoped to the current owner (they reset on every ownership change), matching what the owner sees on the management dashboard.
string
required
The shop id to read stats for.

GetShopBankAccount

Returns the id of the shop’s account at lation_banking when its balance is held there (see Business accounts), or nil with the link off or another banking system.
string
required
The shop id.

CompleteStockOrder

Applies a pending restock order’s stock, once, and returns true; returns false when the order is unknown or already delivered or cancelled. This is how a custom delivery system (Config → Orders → Delivery system → custom) finishes an order it was handed through the OnDeliveryRequested hook in server/utils/hooks.lua. Call it from the server only.
number
required
The order id the delivery hooks were given.

CancelStockOrder

Cancels a pending restock order a delivery system gave up on and refunds the shop at the order-cancel rate. Returns true when the order was cancelled, false when it is unknown or already finished.
number
required
The order id the delivery hooks were given.
Looking for an export we don’t have listed here? Contact us and we’ll do what we can!