API文档

API服务服务状态

https://openapi.customeow.io/v1/

访问我们的的API文档,帮助您在快速集成获取定制信息和合成生产图。

速率限制方法:同一个密钥每分钟可以发出的最大请求数。例如,60秒内有60个API请求。无论返回多少数据,每个请求都同等重要。

获取你的 API 密钥

API 密钥

获取店铺 id

guide-get-store-id

获取定制功能V1

https://client.customeow.io/[lang]?storeId={storeId}&sku={sku}&addCartButtonText={addCartButtonText}
嵌入iframe元素来访问定制功能页面。
建议将iframe元素的宽度和高度设置为100%。

请求参数

storeId*string

店铺 ID

例子:122993486726201345

sku*string

SKU

例子:api-demo-sku

addCartButtonTextstring

自定义加入购物车按钮文案

例子:Add to Cart

路径参数

langstring

页面语言

例子:en

语言语言代码
英语(美国)en
德语de
法语fr
葡萄牙语(巴西)pt-br
西班牙语es
日语ja
意大利语it
荷兰语nl
繁体中文zh-tw
简体中文zh-cn
希伯来语(以色列)he
俄语ru
阿拉伯语ar
泰语th
印度尼西亚语id
土耳其语tr
越南语vi
瑞典语sv
波兰语pl
葡萄牙语pt-pt
韩语ko
希腊语el-gr
捷克语cs-cz
罗马尼亚语ro
斯洛伐克语sk
匈牙利语hu
保加利亚语bg

iframe

例子:

iframe嵌入代码示例

<iframe src="https://client.customeow.io/en?storeId=122993486726201345&sku=api-demo-sku"></iframe>
预览

事件

通过 window.addEventListener("message", receiveMessage) 你可以监听发送到自定义页面的事件。
相关事件:
事件名称说明请求数据
customeow:mount挂载事件
customeow:close关闭事件
customeow:confirm确认事件customInfoId: 定制数据 id,preview:预览数据,stores:定制数据
customeow:error错误事件
customeow:reload刷新事件
例子:
1
2    window.addEventListener('message', (event) => {
3
4      if (event.data.type === 'customeow:mount') {
5        console.log('🚀 ~  : customeow:mount');
6      }
7
8      if (event.data.type === 'customeow:confirm') {
9        console.log('🚀 ~  : customeow:confirm', event.data);
10      }
11
12      if (event.data.type === 'customeow:close') {
13        console.log('🚀 ~  : customeow:close');
14      }
15
16      if (event.data.type === 'customeow:error') {
17        console.log('🚀 ~  : customeow:error');
18      }
19
20    });
21
22
23    const iframe = document.getElementById('iframe');
24
25    const message = {
26      type: 'customeow:reload',
27      data: undefined,
28    };
29
30    iframe.contentWindow.postMessage(message, '*');
31
32            

创建订单V1

POST/order
在定制喵创建订单

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

数据

字段类型必需的说明
storeIdstring店铺id
platformOrderIdstring平台订单id
platformOrderNostring平台订单号
platformTypenumber平台类型: 0=无, 1=Shopify, 2=SHOPLINE, 3=WooCommerce, 4=AliExpress, 5=Shoplazza, 6=Etsy, 7=SHOPYY。

默认值: 0

platformCreatedAtstring平台订单创建时间(ISO 8601 format)
currencyCodestring商店货币的代码(ISO 4217 格式)
lineItemsobject[]订单项的列表
skustring
customInfoIdstring定制数据id
platformItemIdstring平台订单项id
platformProductIdstring平台产品 id
platformProductTitlestring平台产品标题
platformVariantTitlestring平台变体标题
platformVariantIdstring平台变体id
platformProductImagestring平台产品图片
quantitynumber购买数量
pricestring平台产品售价

响应

201400404401
请求
POST/order
1curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: 123456789" -d '{
2  "storeId": "212517125472956417",
3  "platformOrderId": "62758597430",
4  "platformOrderNo": "D1001",
5  "platformType": 1,
6  "platformCreatedAt": "2025-02-20T03:07:42-05:00",
7  "currencyCode": "USD",
8  "lineItems": [
9    {
10      "sku": "test-sku",
11      "customInfoId": "53424155105734656",
12      "platformItemId": "62758597530",
13      "platformProductId": "453695684",
14      "platformProductTitle": "Big Brown Bear Boots111",
15      "platformVariantTitle": "Default",
16      "platformVariantId": "6958596542",
17      "platformProductImage": "https://oss-us-east.staticmeow.com/customeow/static/example/demo.jpg",
18      "quantity": 1,
19      "price": "20.23"
20    }
21  ]
22}' \
23  https://openapi.customeow.io/v1/order
响应
1{
2  "code": 0,
3  "message": "OK",
4  "data": {
5    "id": "173849875337719809",
6    "compositeInfos": [
7      {
8        "customInfoId": "164044840034668544",
9        "template": [
10          {
11            "title": "Custom Clock Template",
12            "compositeId": "42196802438430720"
13          }
14        ]
15      }
16    ]
17  }
18}

获取订单列表V1

GET/order
获取订单列表

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

请求参数

startTimestring

日期筛选开始时间

例子:2023-09-01T12:00:00+08:00

endTimestring

日期筛选结束时间

例子:2023-09-01T12:00:00+08:00

pagestring

页码

例子:1

pageSizestring

一页总数量

例子:10

storeIdsstring

仅检索由逗号分隔的存储id列表指定的订单

例子:179639630637846528,279639630637846526

响应

200400500404
OK
codenumber

服务端返回的状态码

例子:

0

messagestring

请求结果的描述信息

例子:

OK

dataobject

请求返回的数据对象

countnumber

总数量

例子:

1

listobject[]

订单列表

idstring

ID

例子:

173849875337719809

orderIdstring

用户店铺订单ID

例子:

173849875337719808

platformOrderNostring

第三方订单编号

例子:

3043654050207435

platformOrderIdstring

第三方订单ID

例子:

3043654050207435

platformCreatedAtstring

订单创建时间

例子:

2024-10-26T09:51:53Z

skustring

SKU

例子:

ALIBXT0P152X04

customIdstring

定制功能ID

例子:

103237991190757376

customInfoIdstring

定制信息ID

例子:

0

customVersionstring

定制版本

例子:

0

platformItemIdstring

第三方平台产品项Id

例子:

3043654050217435

platformProductIdstring

第三方平台产品ID

例子:

1005007937811704

platformProductTitlestring

第三方平台产品标题

例子:

Custom Bluetooth Music Fridge Magnets

platformVariantTitlestring

第三方平台变体标题

例子:

CMDemo5-23

platformVariantIdstring

第三方平台变体Id

例子:

49967332983073

platformProductImagestring

第三方平台产品图片

例子:

https://img-va.myshopline.com/image/store/1715051276308/2d4b670e-7fc8-4d22-a1f8-c897cab3938d.png?w=1000&h=1000

quantitynumber

购买数量

例子:

1

storeIdstring

店铺 ID

例子:

179639630637846528

请求
GET/order
1curl --location -H "X-Api-Key: 123456789" --request GET 'https://openapi.customeow.io/v1/order?page={page}&pageSize={pageSize}'
响应
1{
2  "code": 0,
3  "message": "OK",
4  "data": {
5    "count": 1,
6    "list": [
7      {
8        "id": "173849875337719809",
9        "orderId": "173849875337719808",
10        "platformOrderNo": "3043654050207435",
11        "platformOrderId": "3043654050207435",
12        "platformCreatedAt": "2024-10-26T09:51:53Z",
13        "sku": "ALIBXT0P152X04",
14        "customId": "103237991190757376",
15        "customInfoId": "0",
16        "customVersion": "0",
17        "platformItemId": "3043654050217435",
18        "platformProductId": "1005007937811704",
19        "platformProductTitle": "Custom Bluetooth Music Fridge Magnets, Personalized
20        Names Refrigerator Magnet with Music, Anniversaryy Gifts for Girlfriend 3.0",
21        "platformVariantTitle": "",
22        "platformVariantId": "",
23        "platformProductImage": "",
24        "quantity": 1,
25        "storeId": "179639630637846528"
26      }
27    ]
28  }
29}

获取订单V1

GET/order-info
查询订单详情

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

请求参数

storeId*string

店铺 ID

例子:107530295472842304

platformOrderId*string

第三方订单ID

例子:107530295472842366

响应

200400500404
OK
codenumber

服务端返回的状态码

例子:

0

messagestring

请求结果的描述信息

例子:

OK

dataobject

请求返回的数据对象

idstring

ID

例子:

107530295472840704

quantitynumber

购买数量

例子:

1

platformOrderIdstring

第三方订单ID

例子:

6109536387361

platformOrderNostring

第三方订单编号

例子:

1027

platformCreatedAtstring

订单创建时间

例子:

2024-11-04T08:34:46Z

lineItemsobject[]

产品列表

idstring

ID

例子:

173471757179592705

orderIdstring

用户店铺订单ID

例子:

173471757179592704

platformOrderNostring

第三方订单编号

例子:

1027

platformOrderIdstring

第三方订单ID

例子:

6109536387361

skustring

SKU

例子:

CMDemo5-23-2

platformProductIdstring

第三方平台产品ID

例子:

988654556

customIdstring

定制功能ID

例子:

129219908520116224

customInfoIdstring

定制信息ID

例子:

173471012095041536

customVersionstring

定制版本

例子:

129219908520116224

platformItemIdstring

第三方平台产品项Id

例子:

15191512514849

platformProductTitlestring

第三方平台产品标题

例子:

sadadqwdwqdtest1233

platformVariantTitlestring

第三方平台变体标题

例子:

CMDemo5-23

platformVariantIdstring

第三方平台变体Id

例子:

49967332983073

platformProductImagestring

第三方平台产品图片

例子:

https://img-va.myshopline.com/image/store/1715051276308/2d4b670e-7fc8-4d22-a1f8-c897cab3938d.png?w=1000&h=1000

quantitynumber

购买数量

例子:

1

productionTemplateobject[]

生产模板

idstring

合成任务ID

例子:

9223372036854775807

compositeIdstring

生产模板ID

例子:

9223372036854775808

statusnumber

状态: 0=无, 1=处理中, 2=成功, 3=失败

例子:

3

failedReasonstring

失败描述

例子:

string

resourcesstring[]

合成结果资源集合

例子:

["string"]

请求
GET/order-info
1curl --location -H "X-Api-Key: 123456789" --request GET 'https://openapi.customeow.io/v1/order-info?storeId={storeId}&platformOrderId={platformOrderId}'
响应
1{
2  "code": 0,
3  "message": "OK",
4  "data": {
5    "id": "173471757179592704",
6    "quantity": 1,
7    "platformOrderId": "6109536387361",
8    "platformOrderNo": "1027",
9    "platformCreatedAt": "2024-11-04T08:34:46Z",
10    "lineItems": [
11      {
12        "id": "173471757179592705",
13        "orderId": "173471757179592704",
14        "platformOrderNo": "1027",
15        "platformOrderId": "6109536387361",
16        "sku": "CMDemo5-23-2",
17        "platformProductId": "988654556",
18        "customId": "129219908520116224",
19        "customInfoId": "173471012095041536",
20        "customVersion": "129219908520116224",
21        "platformItemId": "15191512514849",
22        "platformProductTitle": "sadadqwdwqdtest1233",
23        "platformVariantTitle": "CMDemo5-23",
24        "platformVariantId": "49967332983073",
25        "platformProductImage": "",
26        "quantity": 1,
27        "productionTemplate": [
28          {
29            "id": "9223372036854775807",
30            "compositeId": "9223372036854775808",
31            "status": 3,
32            "failedReason": "string",
33            "resources": [
34                "string"
35            ]
36          }
37        ]
38      }
39    ]
40  }
41}

获取SKU列表V1

GET/skus
获取SKU列表

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

请求参数

storeId*string

店铺 id

例子:179639630637846528

integratedStatusnumber

状态: 0=无, 1=未集成, 2=集成中, 3=已集成, 4=积分机制移除

例子:1

pagestring

页码

例子:1

pageSizestring

一页总数量

例子:10

keywordstring

关键字搜索

例子:sku

skustring

SKU 搜索,使用英文逗号分隔多个值(最多支持100个SKU)

例子:sku1,sku2,sku3

响应

200400500404
OK
codenumber

服务端返回的状态码

例子:

0

messagestring

请求结果的描述信息

例子:

OK

dataobject

请求返回的数据对象

countnumber

总数量

例子:

1

listobject[]

SKU 列表

idstring

SKU id

例子:

173849875337719809

skustring

SKU

例子:

CustoMeowDemoSKU1

integratedStatusnumber

状态: 0=无, 1=未集成, 2=集成中, 3=已集成, 4=积分机制移除

例子:

1

createdAtstring

创建时间

例子:

2025-03-07T08:49:19Z

updatedAtstring

更新时间

例子:

2025-03-07T08:49:24Z

customobject

定制功能信息

idstring

定制功能 id

例子:

103237991190757376

titlestring

定制功能标题

例子:

Demo-Custom Photo Case

storeobject

店铺信息

idstring

店铺 id

例子:

179639630637846528

namestring

店铺名字

例子:

demo-store

请求
GET/skus
1curl --location -H "X-Api-Key: 123456789" --request GET 'https://openapi.customeow.io/v1/skus?storeId={storeId}&page={page}&pageSize={pageSize}&keyword={keyword}&sku={sku}'
响应
1{
2  "code": 0,
3  "message": "OK",
4  "data": {
5    "count": 1,
6    "list": [
7      {
8        "id": "218049111163670528", 
9        "sku": "CustoMeowDemoSKU1",
10        "integratedStatus": 3,
11        "createdAt": "2025-03-07T08:49:19Z",
12        "updatedAt": "2025-03-07T08:49:24Z",
13        "custom": {
14          "id": "218049112598118400",
15          "title": "Demo-Custom Photo Case"
16        },
17        "store":{
18          "id": "1959596565656",
19          "name": "demo-store"
20        }
21      }
22    ]
23  }
24}

获取定制数据 V1

GET/custom-info/{custom_id}?lang=en_US
访问全部定制数据。

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

请求参数

custom_id*string

定制数据ID,用户定制数据的唯一标识符。

例子:53424155105734656

lang*string

组件 label 的语言

例子:en_US

语言语言代码
英语(美国)en_US
德语de_DE
法语fr_FR
葡萄牙语(巴西)pt_BR
西班牙语es_ES
日语ja_JP
意大利语it_IT
荷兰语nl_NL
繁体中文zh_TW
简体中文zh_CN
希伯来语(以色列)he_IL
俄语ru_RU
阿拉伯语ar_AR
泰语th_TH
印度尼西亚语id_ID
土耳其语tr_TR
越南语vi_VI
瑞典语sv_SV
波兰语pl_PL
葡萄牙语pt_PT
韩语ko_KR
希腊语el_GR
捷克语cs_CZ
罗马尼亚语ro_RO
斯洛伐克语sk_SK
匈牙利语hu_HU
保加利亚语bg_BG

响应

200400404401
OK
codenumber

服务端返回的状态码

例子:

0

messagestring

请求结果的描述信息

例子:

OK

dataobject

请求返回的数据对象

idstring

用户定制信息的唯一标识符

例子:

41518078235770880

customInfoobject

定制信息的具体内容

previewobject

用在购物车预览或者订单预览中

effectsarray

预览图(产品形态与用户定制信息结合的图)

例子:

['https://s3.amazonaws.com/a.storyblok.com/f/191576/1024x1024/d25e1a99d7/sample-05.png', 'https://s3.amazonaws.com/a.storyblok.com/f/191576/1024x1024/d25e1a99d7/sample-06.png']

imagesarray

图片类型的定制信息

例子:

['https://s3.amazonaws.com/a.storyblok.com/f/191576/1024x1024/d25e1a99d7/sample-05.png', 'https://s3.amazonaws.com/a.storyblok.com/f/191576/1024x1024/d25e1a99d7/sample-06.png']

textsarray

文字类型的定制信息

例子:

[Grace, David]

storesobject[]

存储组件相关信息的数组

idstring

存储项的唯一标识符

例子:

41518078235770880

keystring

存储项的键

例子:

value

labelstring

组件的 label

例子:

Text

moduleTypestring

模块类型

例子:

text

propertyNamestring

属性名称

例子:

text

typestring

数据类型

例子:

string

valuestring

存储项的值

例子:

test

请求
GET/custom-info/{custom_id}?lang=en_US
1curl --location -H "X-Api-Key: 123456789" --request GET 'https://openapi.customeow.io/v1/custom-info/{custom_id}?lang=en_US'
响应
1{
2    "code": 0,
3    "message": "OK",
4    "data": {
5        "id": "1",
6        "customInfo": {
7            "preview": {
8                "effects": [],
9                "images": [],
10                "texts": []
11            },
12            "stores": [
13                {
14                    "id": "123",
15                    "key": "value",
16                    "label": "text input box",
17                    "moduleType": "text",
18                    "propertyName": "text",
19                    "type": "string",
20                    "value": "45"
21                },
22            ]
23        }
24    }
25}

获取模板数据V1

GET/custom-info/{id}/templates
获取全部模板数据用于生产

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

请求参数

id*string

定制数据ID,用户定制数据的唯一标识符。

例子:92615739516669952

响应

200400404
OK
codenumber

服务端返回的状态码

例子:

0

messagestring

请求结果的描述信息

例子:

OK

dataobject

请求返回的数据对象

customInfoIdstring

用户定制信息的唯一标识符

例子:

41518078235770880

templateobject[]

定制数据模板集合

idstring

模板 id

例子:

42196802438430111

titlestring

模板标题

例子:

Custom Clock Template

compositeIdstring

订单合成ID⽤于合成⽣产图⽚

例子:

42196802438430720

templateUsagenumber

模版用途: 0=无, 1=生产, 2=预览

例子:

1

请求
GET/custom-info/{id}/templates
1curl --location -H "X-Api-Key: 123456789" --request GET 'https://openapi.customeow.io/v1/custom-info/{id}/templates'
响应
1{
2    "code": 0,
3    "message": "OK",
4    "data": {
5        "customInfoId": "92615739516669952",
6        "template": [
7            {
8                "id": "42196802438430111",
9                "title": "Custom Clock Template(1)",
10                "compositeId": "42196802438430720",
11                "templateUsage": 1
12            }
13        ]
14    }
15}

创建⽣产模板任务V1

POST/composite/task
创建⽣产模板任务

请求头

请求头需要指定content-type为application-json

例子:Content-Type: application/json

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

请求数据

customInfoId*string

定制数据ID,用户定制数据的唯一标识符。

例子:92615739516669952

compositeId*string

订单合成ID⽤于合成⽣产图⽚

例子:42196802438430720

响应

201400404500
请求
POST/composite/task
1curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: 123456789" -d '{"customInfoId":"92615739516669952","compositeId": "42196802438430720"}' \
2    https://openapi.customeow.io/v1/composite/task
响应
1{
2    "code": 0,
3    "message": "OK",
4    "data": {
5        "id": "107530295472840704"
6    }
7}

查询任务结果V1

GET/composite/task/{id}
查询⽣产模板任务结果

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

请求参数

id*string

任务ID

例子:107530295472840704

响应

200404
OK
codenumber

服务端返回的状态码

例子:

0

messagestring

请求结果的描述信息

例子:

OK

dataobject

请求返回的数据对象

idstring

记录ID

例子:

107530295472840704

customInfoIdstring

用户定制信息的唯一标识符

例子:

41518078235770880

compositeIdstring

订单合成ID⽤于合成⽣产图⽚

例子:

42196802438430720

statusnumber

状态:0=⽆,1=处理中,2=成功,3=失败

例子:

2

failedReasonstring

失败原因

例子:

failed

resourcesstring[]

资源地址默认取第⼀张做结果图即可

例子:

https://sunzi-cn.oss-cn-hangzhou.aliyuncs.com/archive/process/202456/1f104cfc-39e1-43ed-9f61-e92bca6ec6a1.png

请求
GET/composite/task/{id}
1curl --location -H "X-Api-Key: 123456789" --request GET 'https://openapi.customeow.io/v1/composite/task/{id}'
响应
1{
2    "code": 0,
3    "message": "OK",
4    "data": {
5        "id": "107480773086429184",
6        "customInfoId": "107443911374422016",
7        "compositeId": "102731283536281600",
8        "status": 2,
9        "failedReason": "",
10        "resources": [
11            "https://sunzi-cn.oss-cn-hangzhou.aliyuncs.com/archive/process/202456/9e948f06-46ba-4af3-939c-086b41494b99.png"
12        ]
13    }
14}

Webhooks

管理 webhooks 链接

Webhooks 指南

Webhooks 是一种通过 HTTP POST 请求向服务器推送事件通知的机制。当您配置的 Webhooks 事件被触发时,定制喵 将向您配置的 Webhook 地址推送 HTTP POST 请求。它们可被视为反向 API 调用:不是您的系统调用 定制喵,而是 定制喵 回调您的服务器。这对于接收由系统触发的外部事件通知特别有用,例如:当进程任务被处理时,您可以通过 Webhooks 收到通知。

接收并处理 Webhooks 事件

当您订阅的 Webhooks 事件触发时, 定制喵 会向您所配置的 Webhooks 地址发送一个 HTTP POST 请求。请求的内容是一个 JSON 对象,包含有关事件的详细信息。

所有 Webhooks 推送结构都是相同的,只是 payload 字段的内容不同。payload 字段包含有关事件的详细信息,具体内容取决于事件的类型,可参阅 Webhooks 事件类型

以下是一个 Webhooks 请求的示例:
1{
2  "id": "123456",
3  "webhookId": "1234567",
4  "event": "order.completedCustomInfo",
5  "objectId": "task_123456",
6  "pushTime": "2024-08-31T12:00:00Z",
7  "payload": {
8    "id": "139661964069597184",
9    "quantity": 2,
10    "platformOrderId": "164055361404309504",
11    "platformStoreId": "99654562",
12    "platformOrderNo": "JHSL108884",
13    "platformCreatedAt": "2024-10-11T12:00:00Z",
14    "lineltems": [
15        {
16            "id": "137129222412967936",
17            "title": "Personalized Leather Wallet Anti-Theft Brush RFID Protected Men's Wallet",
18            "productId": "16065458009186458933240845",
19            "variantTitle": "Verbesserte Acrylversion (BESTSELLER) / Stil D",
20            "variantId": "18063863770378089369030845",
21            "sku": "CCP0P200X01",
22            "image": "https://via.placeholder.com/400x400/405f8c/9f0be3.webp",
23            "customInfoId": "157168333232275456",
24            "customizerVersion": "164044840034668544",
25            "customId": "164044840034668544",
26            "quantity": "3",
27            "platformItemId": "13006912127055"
28        }
29    ]
30  }
31}

Webhooks 请求字段说明

字段类型说明
idstring推送记录ID
webhookIdstringWebhooksID
eventstring事件类型
objectIdstring触发事件的对象的 ID
pushTimestring推送时间,格式为 yyyy-MM-dd'T'HH:mm:ss'Z'
payloadobject事件详细信息,根据 event 不同,其数据结构也不相同
idstring订单ID
quantitynumber购买商品总数
platformOrderIdstring第三方订单ID
platformStoreIdstring第三方店铺ID
platformOrderNostring第三方订单编号
platformCreatedAtstring第三方订单创建时间
lineltemsobject []订单Items
idstring订单LineItemID
titlestring商品标题
productIdstring第三方商品ID
variantTitlestring第三方变体标题
variantIdstring第三方变体ID
skustringSKU
imagestring图片
customInfoIdstring定制信息ID
customizerVersionstring定制版本号
customIdstring定制ID
quantitystring购买商品数量
platformItemIdstring第三方订单LineItemID

您需要做以下几件事情:

1. 接收请求:您的服务器需要有一个公开的 URL,可以接收 定制喵 发送的 HTTP POST 请求。

2. 验证请求:您需要验证 定制喵 发送的请求,以确保它来自 定制喵 。

3. 处理请求:您需要处理 定制喵 发送的请求,以执行您的业务逻辑。

4. 响应请求:您需要向 定制喵 发送一个 HTTP 响应。响应的状态码应该是 2xx,以确认您已成功接收并处理了请求。

Webhooks 事件类型

支持以下 Webhooks 事件类型:

1. 订单相关事件

订单完成定制信息
事件名称是否可用说明相关关联方法
order.completedCustomInfoY订单完成定制信息获取订单详情
order.completedCustomInfo

当订单完成所有定制信息时,会触发 order.completedCustomInfo 事件。

Payload:
1{
2  "id": "139661964069597184",
3  "quantity": 2,
4  "platformOrderId": "164055361404309504",
5  "platformStoreId": "99654562",
6  "platformOrderNo": "JHSL108884",
7  "platformCreatedAt": "2024-10-11T12:00:00Z",
8  "lineltems": [
9      {
10          "id": "137129222412967936",
11          "title": "Personalized Leather Wallet Anti-Theft Brush RFID Protected Men's Wallet",
12          "productId": "16065458009186458933240845",
13          "variantTitle": "Verbesserte Acrylversion (BESTSELLER) / Stil D",
14          "variantId": "18063863770378089369030845",
15          "sku": "CCP0P200X01",
16          "image": "https://via.placeholder.com/400x400/405f8c/9f0be3.webp",
17          "customInfoId": "157168333232275456",
18          "customizerVersion": "164044840034668544",
19          "customId": "164044840034668544",
20          "quantity": "3",
21          "platformItemId": "13006912127055"
22      }
23  ]
24}

2. SKU 相关事件

事件名称是否可用说明相关关联方法
sku.addY添加 SKU获取SKU列表
sku.addFeatureY添加 SKU 定制功能获取SKU列表
sku.replaceFeatureY替换 SKU 定制功能获取SKU列表
sku.deleteFeatureY当手动删除 SKU 定制功能或使用积分定制功能组件到账期后积分不足情况下时触发获取SKU列表
sku.deleteY删除 SKU 获取SKU列表

字段说明

字段类型说明
storeobject店铺信息
idstring店铺 id
namestring店铺名字
customobject定制功能信息
idstring定制功能 id
titlestring定制功能标题
skusobject[]SKU 列表
idstringSKU id
skustringSKU
integratedStatusnumber状态: 0=无, 1=未集成, 2=集成中, 3=已集成, 4=积分机制移除
createdAtstring创建时间
updatedAtstring更新时间
sku.add

当添加 SKU 时,会触发 sku.add 事件。

推送的数据
1{
2  "store": {
3    "id": "218049111163670528", 
4    "name": "CustoMeowDemoStore1"
5  },
6  "skus": [
7    {
8      "id": "218049111163670528", 
9      "sku": "CustoMeowDemoSKU1",
10      "integratedStatus": 1, 
11      "createdAt": "2025-03-07T08:49:19Z", 
12      "updatedAt": "2025-03-07T08:49:24Z"
13    },
14    {
15      "id": "218049111163670529",
16      "sku": "CustoMeowDemoSKU2", 
17      "integratedStatus": 1,
18      "createdAt": "2025-03-07T08:49:19Z",
19      "updatedAt": "2025-03-07T08:49:24Z"
20    },
21    {
22      "id": "218049111163670530",
23      "sku": "CustoMeowDemoSKU3",
24      "integratedStatus": 1,
25      "createdAt": "2025-03-07T08:49:19Z",
26      "updatedAt": "2025-03-07T08:49:24Z"
27    }
28  ]
29}
sku.addFeature

当 SKU 集成定制功能时,会触发 sku.addFeature 事件。

推送的数据
1{
2  "store":{
3    "id": "218049111163670528",
4    "name": "CustoMeowDemoStore1"
5  },
6  "skus": [
7    {
8      "id": "218049111163670528",
9      "sku": "CustoMeowDemoSKU1",
10      "integratedStatus": 3,
11      "createdAt": "2025-03-07T08:49:19Z",
12      "updatedAt": "2025-03-07T08:49:24Z"
13    },
14    {
15      "id": "218049111163670529",
16      "sku": "CustoMeowDemoSKU2",
17      "integratedStatus": 3,
18      "createdAt": "2025-03-07T08:49:19Z",
19      "updatedAt": "2025-03-07T08:49:24Z"
20    }
21  ],
22  "custom": {
23    "id": "218049112598118400",
24    "title": "Demo-Custom Photo Case"
25  }
26}
sku.replaceFeature

当 SKU 替换定制功能时,会触发 sku.replaceFeature 事件。

推送的数据
1{
2  "store":{
3    "id": "218049111163670528",
4    "name": "CustoMeowDemoStore1"
5  },
6  "skus": [
7    {
8      "id": "218049111163670528",
9      "sku": "CustoMeowDemoSKU1",
10      "integratedStatus": 3,
11      "createdAt": "2025-03-07T08:49:19Z",
12      "updatedAt": "2025-03-07T08:49:24Z"
13    },
14    {
15      "id": "218049111163670529",
16      "sku": "CustoMeowDemoSKU2",
17      "integratedStatus": 3,
18      "createdAt": "2025-03-07T08:49:19Z",
19      "updatedAt": "2025-03-07T08:49:24Z"
20    }
21  ],
22  "custom": {
23    "id": "218049112598118400",
24    "title": "Demo-Custom Photo Case"
25  }
26}
sku.deleteFeature

当 SKU 删除定制功能时,会触发 sku.deleteFeature 事件。

推送的数据
1{
2  "store":{
3    "id": "218049111163670528",
4    "name": "CustoMeowDemoStore1"
5  },
6  "skus": [
7    {
8      "id": "218049111163670528",
9      "sku": "CustoMeowDemoSKU1",
10      "createdAt": "2025-03-07T08:49:19Z",
11      "updatedAt": "2025-03-07T08:49:24Z"
12    },
13    {
14      "id": "218049111163670529",
15      "sku": "CustoMeowDemoSKU2",
16      "createdAt": "2025-03-07T08:49:19Z",
17      "updatedAt": "2025-03-07T08:49:24Z"
18    }
19  ]
20}
sku.delete

当 SKU 删除时,会触发 sku.delete 事件。

推送的数据
1{
2  "store":{
3    "id": "218049111163670528",
4    "name": "CustoMeowDemoStore1"
5  },
6  "skus": [
7    {
8      "id": "218049111163670528",
9      "sku": "CustoMeowDemoSKU1"
10    },
11    {
12      "id": "218049111163670529",
13      "sku": "CustoMeowDemoSKU2"
14    }
15  ]
16}

POD 设计器

嵌入iframe元素来访问定制功能页面。
建议将iframe元素的宽度和高度设置为100%。

创建新的设计链接

https://your-domain.podmeow.com?productId={productId}&userId={userId}&continueText={continueText}&variantId={variantId}

编辑设计链接

https://your-domain.podmeow.com?designId={designId}&userId={userId}&continueText={continueText}&variantId={variantId}

请求参数

productId*string

产品 ID

例子:122993486726201345

userId*string

用户 ID

例子:122993486726201345

designIdstring

设计 ID

例子:117929138056069120

continueTextstring

继续编辑按钮文案

例子:Continue Editing

variantIdstring

变体 ID

例子:117929138056069120

iframe

例子:

iframe嵌入代码示例

<iframe src="https://your-domain.podmeow.com?productId=122993486726201345&userId=122993486726201345"></iframe>
预览

事件

通过 window.addEventListener("message", receiveMessage) 你可以监听发送到自定义页面的事件。
相关事件:
事件名称说明请求数据
customeow-pod:mount挂载事件
customeow-pod:confirm确认事件designId: 设计 ID, 定制数据:id: 数据 ID, variantId: 变体 ID, preview: 预览数据
customeow-pod:error错误事件
customeow-pod:reload刷新事件
customeow-pod:continue继续事件
例子:
1
2    window.addEventListener('message', (event) => {
3
4      if (event.data.type === 'customeow-pod:mount') {
5        console.log('🚀 ~  : customeow-pod:mount');
6      }
7
8      if (event.data.type === 'customeow-pod:confirm') {
9        console.log('🚀 ~  : customeow-pod:confirm', event.data);
10
11        // demo data
12        {
13          "designId": "117929138056069120",
14          "customInfo": [
15            {
16              "id": "218049111163670528",
17              "variantId": "218049111163670529",
18              "preview": {
19                "effects": [
20                  "https://oss-sg.staticmeow.com/archive/designer/20250626/d93f5176-423d-436c-88ae-8108d9e4f611.webp",
21                  "https://oss-sg.staticmeow.com/archive/designer/20250626/9cb3f919-eaa6-4df3-8e5a-0f3a44894a29.webp"
22                ],
23                "images": [],
24                "texts": ["123123"]
25              },
26            }
27         ]    
28        }
29
30      if (event.data.type === 'customeow-pod:continue') {
31        console.log('🚀 ~  : customeow-pod:continue');
32      }
33
34      if (event.data.type === 'customeow-pod:error') {
35        console.log('🚀 ~  : customeow-pod:error');
36      }
37
38    });
39
40
41    const iframe = document.getElementById('iframe');
42
43    const message = {
44      type: 'customeow-pod:reload',
45      data: undefined,
46    };
47
48    iframe.contentWindow.postMessage(message, '*');
49    
50
51            

获取产品列表V1

GET/pod-products
获取 POD 产品列表

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

请求参数

keywordstring

关键字搜索

例子:title

pageSizestring

一页总数量

例子:10

pagestring

页码

例子:1

storeId*string

店铺 ID

例子:122993486726201345

响应

200400500404401
OK
codenumber

服务端返回的状态码

例子:

0

messagestring

请求结果的描述信息

例子:

OK

dataobject

请求返回的数据对象

countnumber

总数量

例子:

1

listobject[]

POD产品列表

idstring

店铺 POD 产品 ID

例子:

257898505140441089

createdAtstring

创建时间

例子:

2025-06-25T00:21:38Z

updatedAtstring

更新时间

例子:

2025-06-25T01:33:30Z

titlestring

产品标题

例子:

POD Product Demo

coverResourceUrlstring

产品封面图

例子:

https://sunzi-cn.oss-cn-hangzhou.aliyuncs.com/customeow-dev/static/myFont/photo/20250508/aee3187f8df2065b54f22b77ed4ddbf4-svg.png

variantsarray

变体信息

idstring

变体 ID

例子:

257898505140441011

titlestring

变体标题

例子:

Red/L

skustring

SKU

例子:

SKU

pricestring

价格

例子:

100.00

compareAtPricestring

比较价格

例子:

120.00

costPricestring

成本价格

例子:

80.00

isDefaultRendernumber

是否默认渲染: 0=无, 1=是, 2=否

例子:

1

mediaobject

媒体

srcstring

媒体文件URL路径

例子:

string

altstring

替代文本

例子:

string

displayNamestring

显示名称

例子:

示例图片.jpg

optionsstring[]

选项值列表

例子:

["string"]

optionsobject[]

选项列表

idstring

选项ID

例子:

9223372036854775808

namestring

选项名称

例子:

颜色, 尺寸, 材质等

positionnumber

选项显示顺序

例子:

1

valuesobject[]

选项值列表

idstring

选项值ID

例子:

9223372036854775803

namestring

选项值名称

例子:

红色, 蓝色, 绿色

positionnumber

选项值显示顺序

例子:

1

请求
GET/pod-products
1curl --location -H "X-Api-Key: 123456789" --request GET 'https://openapi.customeow.io/v1/pod-products?storeId={storeId}&page={page}&pageSize={pageSize}'
响应
1{
2    "code": 0,
3    "message": "OK",
4    "data": {
5        "count": 1,
6        "list": [
7            {
8                "id": "257898505140441089",
9                "createdAt": "2025-06-25T00:21:38Z", 
10                "updatedAt": "2025-06-25T01:33:30Z", 
11                "title": "POD Product Demo", 
12                "coverResourceUrl": "https://sunzi-cn.oss-cn-hangzhou.aliyuncs.com/customeow-dev/static/myFont/photo/20250508/aee3187f8df2065b54f22b77ed4ddbf4-svg.png",
13                "variants": [
14                    {
15                        "id": "257898505140441011",
16                        "title": "Red/L",
17                        "sku": "SKU",
18                        "price": "100.00",
19                        "compareAtPrice": "120.00",
20                        "costPrice": "80.00",
21                        "isDefaultRender": 1,
22                        "media": {
23                            "src": "string",
24                            "alt": "string",
25                            "displayName": "示例图片.jpg"
26                        },
27                        "options": [
28                            "string"
29                        ]
30                    }
31                ],
32                "options": [
33                    {
34                        "id": "9223372036854775808",
35                        "name": "颜色, 尺寸, 材质等",
36                        "position": 1,
37                        "values": [
38                            {
39                                "id": "9223372036854775808",
40                                "name": "红色, 蓝色, 绿色",
41                                "position": 1
42                            }
43                        ]
44                    }
45                ]
46            }
47        ]
48    }
49}

获取产品V1

GET/pod-product/{id}
获取 POD 产品

请求

Security: API Key

API密钥是在进行API调用时提供的令牌。将令牌包含在名为X-Api-Key

例子:X-Api-Key:123456789

请求参数

id*string

产品 id

例子:257898505140441089

storeId*string

店铺 ID

例子:122993486726201345

响应

200400500404401
OK
codenumber

服务端返回的状态码

例子:

0

messagestring

请求结果的描述信息

例子:

OK

dataobject

请求返回的数据对象

idstring

店铺 POD 产品 ID

例子:

257898505140441089

createdAtstring

创建时间

例子:

2025-06-25T00:21:38Z

updatedAtstring

更新时间

例子:

2025-06-25T01:33:30Z

titlestring

产品标题

例子:

POD Product Demo

coverResourceUrlstring

产品封面图

例子:

https://sunzi-cn.oss-cn-hangzhou.aliyuncs.com/customeow-dev/static/myFont/photo/20250508/aee3187f8df2065b54f22b77ed4ddbf4-svg.png

variantsarray

变体信息

idstring

变体 ID

例子:

257898505140441011

titlestring

变体标题

例子:

Red/L

skustring

SKU

例子:

SKU

pricestring

价格

例子:

100.00

compareAtPricestring

比较价格

例子:

120.00

costPricestring

成本价格

例子:

80.00

isDefaultRendernumber

是否默认渲染: 0=无, 1=是, 2=否

例子:

1

mediaobject

媒体

srcstring

媒体文件URL路径

例子:

string

altstring

替代文本

例子:

string

displayNamestring

显示名称

例子:

示例图片.jpg

optionsstring[]

选项值列表

例子:

["string"]

optionsobject[]

选项列表

idstring

选项ID

例子:

9223372036854775808

namestring

选项名称

例子:

颜色, 尺寸, 材质等

positionnumber

选项显示顺序

例子:

1

valuesobject[]

选项值列表

idstring

选项值ID

例子:

9223372036854775803

namestring

选项值名称

例子:

红色, 蓝色, 绿色

positionnumber

选项值显示顺序

例子:

1

请求
GET/pod-product/{id}
1curl --location -H "X-Api-Key: 123456789" --request GET 'https://openapi.customeow.io/v1/pod-product/{id}?storeId={storeId}'
响应
1{
2    "code": 0,
3    "message": "OK",
4    "data": {
5        "id": "257898505140441089",
6        "createdAt": "2025-06-25T00:21:38Z",
7        "updatedAt": "2025-06-25T01:33:30Z",
8        "title": "POD Product Demo",
9        "coverResourceUrl": "https://sunzi-cn.oss-cn-hangzhou.aliyuncs.com/customeow-dev/static/myFont/photo/20250508/aee3187f8df2065b54f22b77ed4ddbf4-svg.png",
10        "variants": [
11            {
12                "id": "257898505140441011",
13                "title": "Red/L",
14                "sku": "SKU",
15                "price": "100.00",
16                "compareAtPrice": "120.00",
17                "costPrice":"80.00",
18                "isDefaultRender":1,
19                "media": {
20                    "src": "string",
21                    "alt": "string",
22                    "displayName": "示例图片.jpg"
23                },
24                "options": [
25                    "string"
26                ]
27            }
28        ],
29        "options": [
30            {
31                "id": "9223372036854775808",
32                "name": "颜色, 尺寸, 材质等",
33                "position": 1,
34                "values": [
35                    {
36                        "id": "9223372036854775808",
37                        "name": "红色, 蓝色, 绿色",
38                        "position": 1
39                    }
40                ]
41            }
42        ]
43    }
44}