post https://{shopdomain}.myshoplaza.com/openapi/2022-01/app-proxies
Requires
write_app_proxy
access scope. Please refer access scope
The Create App Proxy API is used to create a proxy connection between a Shoplazza store and a developer's application. This enables external applications to interact with the Shoplazza platform by forwarding requests to the specified proxy_url
, while maintaining the appearance of operating within the Shoplazza store's environment.
This API is especially useful for:
- Integrating custom application functionalities into Shoplazza stores.
- Seamlessly forwarding user requests from Shoplazza to external developer-hosted applications.
- Dynamically rendering Liquid content or providing JSON/HTML responses via external applications, without exposing the external server to the end user.
Request Parameters
Public Request Parameters
Body Parameters
Name | Type | Required | Description | Example |
---|---|---|---|---|
real_path | string | Yes | URL path for accessing the proxy. Must start with apps/ . | apps/testappproxy |
proxy_url | string | Yes | URL for the developer's application to process requests. | http://www.example.com |
Response Explanation
Public Response Parameters
Successful Response Fields
Field | Type | Description | Example |
---|---|---|---|
app_proxy.id | string | Unique identifier of the app proxy | 4 |
app_proxy.real_path | string | URL path configured for accessing the proxy | apps/testappproxy |
app_proxy.proxy_url | string | URL of the developer's application | http://www.example.com/app |
app_proxy.created_at | string | Timestamp when the app proxy was created | 2024-12-30T03:36:08+08:00 |
app_proxy.updated_at | string | Timestamp when the app proxy was last updated | 2024-12-30T03:36:08+08:00 |
Error Response
Error responses in the API can be represented using two different fields: errors
and error
. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field | Type | Example | Description |
---|---|---|---|
errors | Array | [ "file number error"] | A list of errors encountered during the request processing. |
Field | Type | Example | Description |
---|---|---|---|
error | String | "page not found" | Indicates an error encountered during the process |
Error Detail
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
422 | Unprocessable Entity | Empty ProxyUrl | "ProxyUrl is required", |
invalid ProxyUrl | "parse "123": invalid URI for request" |