post https://partners.shoplazza.com/openapi/2024-07/functions
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
Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
namespace | string | Yes | Namespace of the function (e.g., cart_transform ). |
name | string | Yes | Function name. |
file | binary | Yes | Executable file (compiled .wasm for JS/Rust). |
source_code | string | Yes | Function source code in JS or Rust. |
Response Explanation
Public Response Parameters
Successful Response
Parameter | Type | Description | Example |
---|---|---|---|
code | string | Status code (SUCCESS if successful, otherwise an error code). | "SUCCESS" |
message | string | Response message. | "SUCCESS" |
data | object | Contains the created function details. | {...} |
data.function_id | string | The unique identifier of the function. | "123456" |
data.version | string | Version number of the created function. | "v1.0.0" |