The Function API allows authorized applications to upload, register, and manage function scripts on the Shoplazza platform. This enables developers to extend or customize system logic, such as modifying cart pricing, applying discounts, or handling checkout processes.

Access Restriction: Only specific applications have permission to access this API. Your application must be whitelisted before using these endpoints.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Body Parameters

ParameterTypeRequiredDescription
namespacestringYesNamespace of the function (e.g., cart_transform).
namestringYesFunction name.
filebinaryYesExecutable file (compiled .wasm for JS/Rust).
source_codestringYesFunction source code in JS or Rust.

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Successful Response

ParameterTypeDescriptionExample
codestringStatus code (SUCCESS if successful, otherwise an error code)."SUCCESS"
messagestringResponse message."SUCCESS"
dataobjectContains the created function details.{...}
data.function_idstringThe unique identifier of the function."123456"
data.versionstringVersion number of the created function."v1.0.0"
Language
Credentials
Click Try It! to start a request and see the response here!