{
    "info": {
        "_postman_id": "00000000-0000-4000-8000-000000000001",
        "name": "商城完整 API（旧版账号 / Bearer v1 / ACGV3 / Dujiao-Next / 刷粉 / 代理 IP / 查活）",
        "description": "同一集合保留原有账号 API，并提供新的统一 Bearer API、ACGV3 Shared 和 Dujiao-Next 上游协议兼容入口。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY；Dujiao-Next 对应金额统一返回 USD。两者都只转换 API 输出，实际扣款仍以商城内部金额为准。账号目录同时包含本地库存和已适配连接商品；下单前必须读取实时 orderable、stock 及 variants/SKU。查活结果枚举为 live、dead、unknown；当前 Facebook 检测只会输出 live 或 unknown，dead 为后续可靠失效检测预留。unknown 不得当作存活或失效。所有 ID 与密钥均为占位值；每笔新订单或新检测请生成并保存新的幂等值，超时重试原请求时必须保持该值不变。",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{api_key}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "site_url",
            "value": "https://bstacc.com",
            "type": "string"
        },
        {
            "key": "base_url",
            "value": "https://bstacc.com/api/v1",
            "type": "string"
        },
        {
            "key": "api_key",
            "value": "",
            "type": "string"
        },
        {
            "key": "legacy_username",
            "value": "",
            "type": "string"
        },
        {
            "key": "legacy_password",
            "value": "",
            "type": "string"
        },
        {
            "key": "legacy_product_id",
            "value": "1001",
            "type": "string"
        },
        {
            "key": "legacy_category",
            "value": "美国",
            "type": "string"
        },
        {
            "key": "acgv3_app_id",
            "value": "",
            "type": "string"
        },
        {
            "key": "acgv3_app_key",
            "value": "",
            "type": "string"
        },
        {
            "key": "acgv3_sign",
            "value": "",
            "type": "string"
        },
        {
            "key": "acgv3_category_id",
            "value": "1",
            "type": "string"
        },
        {
            "key": "acgv3_shared_code",
            "value": "1001",
            "type": "string"
        },
        {
            "key": "acgv3_race",
            "value": "美国",
            "type": "string"
        },
        {
            "key": "acgv3_trade_no",
            "value": "DO替换为实际订单号",
            "type": "string"
        },
        {
            "key": "dujiao_base_url",
            "value": "https://bstacc.com/api/v1/upstream",
            "type": "string"
        },
        {
            "key": "dujiao_api_key",
            "value": "",
            "type": "string"
        },
        {
            "key": "dujiao_api_secret",
            "value": "",
            "type": "string"
        },
        {
            "key": "dujiao_timestamp",
            "value": "",
            "type": "string"
        },
        {
            "key": "dujiao_signature",
            "value": "",
            "type": "string"
        },
        {
            "key": "dujiao_product_id",
            "value": "1001",
            "type": "string"
        },
        {
            "key": "dujiao_sku_id",
            "value": "1",
            "type": "string"
        },
        {
            "key": "dujiao_order_id",
            "value": "1",
            "type": "string"
        },
        {
            "key": "dujiao_callback_url",
            "value": "",
            "type": "string",
            "description": "可选；留空使用轮询。启用回调时填写 Dujiao-Next 的公网 HTTPS 回调地址。"
        },
        {
            "key": "dujiao_downstream_order_no",
            "value": "djn-order-20260729-000001",
            "type": "string",
            "description": "每笔新购买更换；同一次超时重试必须复用原值。"
        },
        {
            "key": "acgv3_request_no",
            "value": "acgv3-order-20260727-000001",
            "type": "string",
            "description": "每笔新购买更换；同一次超时重试必须复用原值。"
        },
        {
            "key": "legacy_request_no",
            "value": "legacy-order-20260727-000001",
            "type": "string",
            "description": "每笔新购买更换；同一次超时重试必须复用原值。"
        },
        {
            "key": "account_idempotency_key",
            "value": "account-order-20260727-000001",
            "type": "string"
        },
        {
            "key": "social_idempotency_key",
            "value": "social-order-20260727-000001",
            "type": "string"
        },
        {
            "key": "proxy_idempotency_key",
            "value": "proxy-order-20260727-000001",
            "type": "string"
        },
        {
            "key": "proxy_renew_idempotency_key",
            "value": "proxy-renew-20260804-000001",
            "type": "string"
        },
        {
            "key": "checker_idempotency_key",
            "value": "checker-job-20260727-000001",
            "type": "string"
        },
        {
            "key": "account_product_id",
            "value": "1001",
            "type": "string"
        },
        {
            "key": "account_variant_key",
            "value": "美国",
            "type": "string"
        },
        {
            "key": "social_service_id",
            "value": "2104",
            "type": "string"
        },
        {
            "key": "proxy_country",
            "value": "us",
            "type": "string"
        },
        {
            "key": "proxy_renewal_token",
            "value": "pr1_替换为代理订单交付中的renewal_token",
            "type": "string"
        },
        {
            "key": "order_id",
            "value": "DO替换为实际订单号",
            "type": "string"
        },
        {
            "key": "checker_platform",
            "value": "facebook",
            "type": "string"
        },
        {
            "key": "check_id",
            "value": "CK替换为实际检测编号",
            "type": "string"
        }
    ],
    "item": [
        {
            "name": "账号 API（旧版兼容，继续可用）",
            "item": [
                {
                    "name": "旧版：查询余额",
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "host": [
                                "{{site_url}}"
                            ],
                            "path": [
                                "api",
                                "GetBalance.php"
                            ],
                            "query": [
                                {
                                    "key": "username",
                                    "value": "{{legacy_username}}",
                                    "type": "text"
                                },
                                {
                                    "key": "password",
                                    "value": "{{legacy_password}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "description": "旧版账号兼容接口，继续供已有客户使用。必须通过 HTTPS 请求；新项目建议使用 Bearer /api/v1。"
                    }
                },
                {
                    "name": "旧版：商品列表",
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "host": [
                                "{{site_url}}"
                            ],
                            "path": [
                                "api",
                                "ListResource.php"
                            ],
                            "query": [
                                {
                                    "key": "username",
                                    "value": "{{legacy_username}}",
                                    "type": "text"
                                },
                                {
                                    "key": "password",
                                    "value": "{{legacy_password}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "description": "旧版账号兼容接口，继续供已有客户使用。必须通过 HTTPS 请求；新项目建议使用 Bearer /api/v1。"
                    }
                },
                {
                    "name": "旧版：商品详情",
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "host": [
                                "{{site_url}}"
                            ],
                            "path": [
                                "api",
                                "InfoResource.php"
                            ],
                            "query": [
                                {
                                    "key": "username",
                                    "value": "{{legacy_username}}",
                                    "type": "text"
                                },
                                {
                                    "key": "password",
                                    "value": "{{legacy_password}}",
                                    "type": "text"
                                },
                                {
                                    "key": "id",
                                    "value": "{{legacy_product_id}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "description": "旧版账号兼容接口，继续供已有客户使用。必须通过 HTTPS 请求；新项目建议使用 Bearer /api/v1。"
                    }
                },
                {
                    "name": "旧版：购买账号",
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "host": [
                                "{{site_url}}"
                            ],
                            "path": [
                                "api",
                                "BResource.php"
                            ],
                            "query": [
                                {
                                    "key": "username",
                                    "value": "{{legacy_username}}",
                                    "type": "text"
                                },
                                {
                                    "key": "password",
                                    "value": "{{legacy_password}}",
                                    "type": "text"
                                },
                                {
                                    "key": "id",
                                    "value": "{{legacy_product_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "amount",
                                    "value": "1",
                                    "type": "text"
                                },
                                {
                                    "key": "request_no",
                                    "value": "{{legacy_request_no}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "description": "旧版账号兼容接口，继续供已有客户使用。必须通过 HTTPS 请求；新项目建议使用 Bearer /api/v1。"
                    }
                },
                {
                    "name": "旧版：购买多规格账号",
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "host": [
                                "{{site_url}}"
                            ],
                            "path": [
                                "api",
                                "BResource.php"
                            ],
                            "query": [
                                {
                                    "key": "username",
                                    "value": "{{legacy_username}}",
                                    "type": "text"
                                },
                                {
                                    "key": "password",
                                    "value": "{{legacy_password}}",
                                    "type": "text"
                                },
                                {
                                    "key": "id",
                                    "value": "{{legacy_product_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "amount",
                                    "value": "1",
                                    "type": "text"
                                },
                                {
                                    "key": "request_no",
                                    "value": "{{legacy_request_no}}",
                                    "type": "text"
                                },
                                {
                                    "key": "category",
                                    "value": "{{legacy_category}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "description": "旧版账号兼容接口，继续供已有客户使用。必须通过 HTTPS 请求；新项目建议使用 Bearer /api/v1。"
                    }
                }
            ]
        },
        {
            "name": "基础",
            "item": [
                {
                    "name": "API 索引",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                },
                {
                    "name": "查询余额",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/balance",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                }
            ]
        },
        {
            "name": "账号商品（Bearer v1）",
            "item": [
                {
                    "name": "账号目录",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/catalog/accounts?limit=20&cursor=0",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                },
                {
                    "name": "购买账号",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{account_idempotency_key}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/orders",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"account\",\n    \"product_id\": \"{{account_product_id}}\",\n    \"quantity\": 1\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "购买多规格账号",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{account_idempotency_key}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/orders",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"account\",\n    \"product_id\": \"{{account_product_id}}\",\n    \"quantity\": 1,\n    \"variant_key\": \"{{account_variant_key}}\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "账号商品（ACGV3 Shared 兼容，金额 CNY）",
            "item": [
                {
                    "name": "连接测试",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/authentication/connect",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "分类列表",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/categories",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "指定分类商品",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "category_id",
                                    "value": "{{acgv3_category_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/categoryItems",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "全部商品",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/items",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "单个商品（新版平铺响应）",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "code",
                                    "value": "{{acgv3_shared_code}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/item",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "单个商品（旧版分类响应）",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sharedCode",
                                    "value": "{{acgv3_shared_code}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/item",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "库存数量",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "code",
                                    "value": "{{acgv3_shared_code}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/stock",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "聚合库存与规格配置",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sharedCode",
                                    "value": "{{acgv3_shared_code}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/inventory",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "指定规格库存",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sharedCode",
                                    "value": "{{acgv3_shared_code}}",
                                    "type": "text"
                                },
                                {
                                    "key": "race",
                                    "value": "{{acgv3_race}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/inventory",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "库存可购买检测",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "shared_code",
                                    "value": "{{acgv3_shared_code}}",
                                    "type": "text"
                                },
                                {
                                    "key": "card_id",
                                    "value": "0",
                                    "type": "text"
                                },
                                {
                                    "key": "num",
                                    "value": "1",
                                    "type": "text"
                                },
                                {
                                    "key": "race",
                                    "value": "{{acgv3_race}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/inventoryState",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "余额创建订单",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "shared_code",
                                    "value": "{{acgv3_shared_code}}",
                                    "type": "text"
                                },
                                {
                                    "key": "contact",
                                    "value": "api-client@example.com",
                                    "type": "text"
                                },
                                {
                                    "key": "num",
                                    "value": "1",
                                    "type": "text"
                                },
                                {
                                    "key": "card_id",
                                    "value": "0",
                                    "type": "text"
                                },
                                {
                                    "key": "race",
                                    "value": "{{acgv3_race}}",
                                    "type": "text"
                                },
                                {
                                    "key": "request_no",
                                    "value": "{{acgv3_request_no}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/trade",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "按订单号查询",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "tradeNo",
                                    "value": "{{acgv3_trade_no}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/query",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                },
                {
                    "name": "按请求号查询",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const values = {};",
                                    "pm.request.body.urlencoded.each(function (field) {",
                                    "  if (!field.disabled && field.key !== \"sign\") {",
                                    "    const rawValue = typeof field.value === \"undefined\" ? \"\" : String(field.value);",
                                    "    const value = pm.variables.replaceIn(rawValue);",
                                    "    if (value !== \"\") values[field.key] = value;",
                                    "  }",
                                    "});",
                                    "const query = Object.keys(values).sort().map(function (key) {",
                                    "  return key + \"=\" + values[key];",
                                    "}).join(\"&\");",
                                    "const appKey = pm.collectionVariables.get(\"acgv3_app_key\") || \"\";",
                                    "pm.variables.set(\"acgv3_sign\", CryptoJS.MD5(query + \"&key=\" + appKey).toString());"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/x-www-form-urlencoded",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "app_id",
                                    "value": "{{acgv3_app_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "requestNo",
                                    "value": "{{acgv3_request_no}}",
                                    "type": "text"
                                },
                                {
                                    "key": "sign",
                                    "value": "{{acgv3_sign}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": "{{site_url}}/shared/commodity/query2",
                        "description": "预请求脚本会按 ACGV3 规则生成 sign；请先填写 collection variables 中的 app_id/app_key。ACGV3 的余额、商品价格和订单金额统一返回人民币 CNY。"
                    }
                }
            ]
        },
        {
            "name": "账号商品（Dujiao-Next 上游协议兼容，金额 USD）",
            "item": [
                {
                    "name": "连接与余额测试",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const timestamp = Math.floor(Date.now() / 1000).toString();",
                                    "let body = \"\";",
                                    "if (pm.request.body && pm.request.body.mode === \"raw\") {",
                                    "  body = pm.variables.replaceIn(pm.request.body.raw || \"\");",
                                    "  pm.request.body.update(body);",
                                    "}",
                                    "const requestPath = pm.variables.replaceIn(pm.request.url.getPath());",
                                    "const bodyMd5 = CryptoJS.MD5(body).toString(CryptoJS.enc.Hex);",
                                    "const signText = pm.request.method.toUpperCase() + \"\\n\" + requestPath + \"\\n\" + timestamp + \"\\n\" + bodyMd5;",
                                    "const secret = pm.collectionVariables.get(\"dujiao_api_secret\") || \"\";",
                                    "const signature = CryptoJS.HmacSHA256(signText, secret).toString(CryptoJS.enc.Hex);",
                                    "pm.variables.set(\"dujiao_timestamp\", timestamp);",
                                    "pm.variables.set(\"dujiao_signature\", signature);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Api-Key",
                                "value": "{{dujiao_api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Timestamp",
                                "value": "{{dujiao_timestamp}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Signature",
                                "value": "{{dujiao_signature}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{dujiao_base_url}}/ping",
                        "description": "预请求脚本按 Dujiao-Next 官方协议计算 HMAC-SHA256；API Key 与 API Secret 请填写在 Collection Variables。Dujiao-Next 的余额、商品价格和订单金额统一返回 USD。"
                    }
                },
                {
                    "name": "分类列表",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const timestamp = Math.floor(Date.now() / 1000).toString();",
                                    "let body = \"\";",
                                    "if (pm.request.body && pm.request.body.mode === \"raw\") {",
                                    "  body = pm.variables.replaceIn(pm.request.body.raw || \"\");",
                                    "  pm.request.body.update(body);",
                                    "}",
                                    "const requestPath = pm.variables.replaceIn(pm.request.url.getPath());",
                                    "const bodyMd5 = CryptoJS.MD5(body).toString(CryptoJS.enc.Hex);",
                                    "const signText = pm.request.method.toUpperCase() + \"\\n\" + requestPath + \"\\n\" + timestamp + \"\\n\" + bodyMd5;",
                                    "const secret = pm.collectionVariables.get(\"dujiao_api_secret\") || \"\";",
                                    "const signature = CryptoJS.HmacSHA256(signText, secret).toString(CryptoJS.enc.Hex);",
                                    "pm.variables.set(\"dujiao_timestamp\", timestamp);",
                                    "pm.variables.set(\"dujiao_signature\", signature);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Api-Key",
                                "value": "{{dujiao_api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Timestamp",
                                "value": "{{dujiao_timestamp}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Signature",
                                "value": "{{dujiao_signature}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{dujiao_base_url}}/categories",
                        "description": "预请求脚本按 Dujiao-Next 官方协议计算 HMAC-SHA256；API Key 与 API Secret 请填写在 Collection Variables。Dujiao-Next 的余额、商品价格和订单金额统一返回 USD。"
                    }
                },
                {
                    "name": "商品列表（自动保存首个商品与 SKU）",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const timestamp = Math.floor(Date.now() / 1000).toString();",
                                    "let body = \"\";",
                                    "if (pm.request.body && pm.request.body.mode === \"raw\") {",
                                    "  body = pm.variables.replaceIn(pm.request.body.raw || \"\");",
                                    "  pm.request.body.update(body);",
                                    "}",
                                    "const requestPath = pm.variables.replaceIn(pm.request.url.getPath());",
                                    "const bodyMd5 = CryptoJS.MD5(body).toString(CryptoJS.enc.Hex);",
                                    "const signText = pm.request.method.toUpperCase() + \"\\n\" + requestPath + \"\\n\" + timestamp + \"\\n\" + bodyMd5;",
                                    "const secret = pm.collectionVariables.get(\"dujiao_api_secret\") || \"\";",
                                    "const signature = CryptoJS.HmacSHA256(signText, secret).toString(CryptoJS.enc.Hex);",
                                    "pm.variables.set(\"dujiao_timestamp\", timestamp);",
                                    "pm.variables.set(\"dujiao_signature\", signature);"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const json = pm.response.json();",
                                    "if (json.ok && Array.isArray(json.items) && json.items.length) {",
                                    "  const product = json.items[0];",
                                    "  pm.collectionVariables.set(\"dujiao_product_id\", String(product.id));",
                                    "  if (Array.isArray(product.skus) && product.skus.length) {",
                                    "    pm.collectionVariables.set(\"dujiao_sku_id\", String(product.skus[0].id));",
                                    "  }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Api-Key",
                                "value": "{{dujiao_api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Timestamp",
                                "value": "{{dujiao_timestamp}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Signature",
                                "value": "{{dujiao_signature}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{dujiao_base_url}}/products?page=1&page_size=20",
                        "description": "预请求脚本按 Dujiao-Next 官方协议计算 HMAC-SHA256；API Key 与 API Secret 请填写在 Collection Variables。Dujiao-Next 的余额、商品价格和订单金额统一返回 USD。"
                    }
                },
                {
                    "name": "商品详情（自动保存首个 SKU）",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const timestamp = Math.floor(Date.now() / 1000).toString();",
                                    "let body = \"\";",
                                    "if (pm.request.body && pm.request.body.mode === \"raw\") {",
                                    "  body = pm.variables.replaceIn(pm.request.body.raw || \"\");",
                                    "  pm.request.body.update(body);",
                                    "}",
                                    "const requestPath = pm.variables.replaceIn(pm.request.url.getPath());",
                                    "const bodyMd5 = CryptoJS.MD5(body).toString(CryptoJS.enc.Hex);",
                                    "const signText = pm.request.method.toUpperCase() + \"\\n\" + requestPath + \"\\n\" + timestamp + \"\\n\" + bodyMd5;",
                                    "const secret = pm.collectionVariables.get(\"dujiao_api_secret\") || \"\";",
                                    "const signature = CryptoJS.HmacSHA256(signText, secret).toString(CryptoJS.enc.Hex);",
                                    "pm.variables.set(\"dujiao_timestamp\", timestamp);",
                                    "pm.variables.set(\"dujiao_signature\", signature);"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const json = pm.response.json();",
                                    "if (json.ok && json.product && Array.isArray(json.product.skus) && json.product.skus.length) {",
                                    "  pm.collectionVariables.set(\"dujiao_sku_id\", String(json.product.skus[0].id));",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Api-Key",
                                "value": "{{dujiao_api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Timestamp",
                                "value": "{{dujiao_timestamp}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Signature",
                                "value": "{{dujiao_signature}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{dujiao_base_url}}/products/{{dujiao_product_id}}",
                        "description": "预请求脚本按 Dujiao-Next 官方协议计算 HMAC-SHA256；API Key 与 API Secret 请填写在 Collection Variables。Dujiao-Next 的余额、商品价格和订单金额统一返回 USD。"
                    }
                },
                {
                    "name": "创建订单（自动保存订单 ID）",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const timestamp = Math.floor(Date.now() / 1000).toString();",
                                    "let body = \"\";",
                                    "if (pm.request.body && pm.request.body.mode === \"raw\") {",
                                    "  body = pm.variables.replaceIn(pm.request.body.raw || \"\");",
                                    "  pm.request.body.update(body);",
                                    "}",
                                    "const requestPath = pm.variables.replaceIn(pm.request.url.getPath());",
                                    "const bodyMd5 = CryptoJS.MD5(body).toString(CryptoJS.enc.Hex);",
                                    "const signText = pm.request.method.toUpperCase() + \"\\n\" + requestPath + \"\\n\" + timestamp + \"\\n\" + bodyMd5;",
                                    "const secret = pm.collectionVariables.get(\"dujiao_api_secret\") || \"\";",
                                    "const signature = CryptoJS.HmacSHA256(signText, secret).toString(CryptoJS.enc.Hex);",
                                    "pm.variables.set(\"dujiao_timestamp\", timestamp);",
                                    "pm.variables.set(\"dujiao_signature\", signature);"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const json = pm.response.json();",
                                    "if (json.ok && json.order_id) {",
                                    "  pm.collectionVariables.set(\"dujiao_order_id\", String(json.order_id));",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Api-Key",
                                "value": "{{dujiao_api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Timestamp",
                                "value": "{{dujiao_timestamp}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Signature",
                                "value": "{{dujiao_signature}}",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{dujiao_base_url}}/orders",
                        "description": "预请求脚本按 Dujiao-Next 官方协议计算 HMAC-SHA256；API Key 与 API Secret 请填写在 Collection Variables。Dujiao-Next 的余额、商品价格和订单金额统一返回 USD。",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"sku_id\": \"{{dujiao_sku_id}}\",\n    \"quantity\": 1,\n    \"downstream_order_no\": \"{{dujiao_downstream_order_no}}\",\n    \"trace_id\": \"{{dujiao_downstream_order_no}}\",\n    \"callback_url\": \"{{dujiao_callback_url}}\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "查询订单",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const timestamp = Math.floor(Date.now() / 1000).toString();",
                                    "let body = \"\";",
                                    "if (pm.request.body && pm.request.body.mode === \"raw\") {",
                                    "  body = pm.variables.replaceIn(pm.request.body.raw || \"\");",
                                    "  pm.request.body.update(body);",
                                    "}",
                                    "const requestPath = pm.variables.replaceIn(pm.request.url.getPath());",
                                    "const bodyMd5 = CryptoJS.MD5(body).toString(CryptoJS.enc.Hex);",
                                    "const signText = pm.request.method.toUpperCase() + \"\\n\" + requestPath + \"\\n\" + timestamp + \"\\n\" + bodyMd5;",
                                    "const secret = pm.collectionVariables.get(\"dujiao_api_secret\") || \"\";",
                                    "const signature = CryptoJS.HmacSHA256(signText, secret).toString(CryptoJS.enc.Hex);",
                                    "pm.variables.set(\"dujiao_timestamp\", timestamp);",
                                    "pm.variables.set(\"dujiao_signature\", signature);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Api-Key",
                                "value": "{{dujiao_api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Timestamp",
                                "value": "{{dujiao_timestamp}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Signature",
                                "value": "{{dujiao_signature}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{dujiao_base_url}}/orders/{{dujiao_order_id}}",
                        "description": "预请求脚本按 Dujiao-Next 官方协议计算 HMAC-SHA256；API Key 与 API Secret 请填写在 Collection Variables。Dujiao-Next 的余额、商品价格和订单金额统一返回 USD。"
                    }
                },
                {
                    "name": "尝试取消订单",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const timestamp = Math.floor(Date.now() / 1000).toString();",
                                    "let body = \"\";",
                                    "if (pm.request.body && pm.request.body.mode === \"raw\") {",
                                    "  body = pm.variables.replaceIn(pm.request.body.raw || \"\");",
                                    "  pm.request.body.update(body);",
                                    "}",
                                    "const requestPath = pm.variables.replaceIn(pm.request.url.getPath());",
                                    "const bodyMd5 = CryptoJS.MD5(body).toString(CryptoJS.enc.Hex);",
                                    "const signText = pm.request.method.toUpperCase() + \"\\n\" + requestPath + \"\\n\" + timestamp + \"\\n\" + bodyMd5;",
                                    "const secret = pm.collectionVariables.get(\"dujiao_api_secret\") || \"\";",
                                    "const signature = CryptoJS.HmacSHA256(signText, secret).toString(CryptoJS.enc.Hex);",
                                    "pm.variables.set(\"dujiao_timestamp\", timestamp);",
                                    "pm.variables.set(\"dujiao_signature\", signature);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Api-Key",
                                "value": "{{dujiao_api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Timestamp",
                                "value": "{{dujiao_timestamp}}",
                                "type": "text"
                            },
                            {
                                "key": "Dujiao-Next-Signature",
                                "value": "{{dujiao_signature}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{dujiao_base_url}}/orders/{{dujiao_order_id}}/cancel",
                        "description": "预请求脚本按 Dujiao-Next 官方协议计算 HMAC-SHA256；API Key 与 API Secret 请填写在 Collection Variables。Dujiao-Next 的余额、商品价格和订单金额统一返回 USD。"
                    }
                }
            ]
        },
        {
            "name": "刷粉服务",
            "item": [
                {
                    "name": "刷粉目录",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/catalog/social?limit=20&cursor=0",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                },
                {
                    "name": "创建刷粉订单",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{social_idempotency_key}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/orders",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"social\",\n    \"service_id\": \"{{social_service_id}}\",\n    \"url\": \"https://example.com/post/1\",\n    \"quantity\": 100\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "代理 IP",
            "item": [
                {
                    "name": "代理目录",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/catalog/proxy",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                },
                {
                    "name": "可自选 IP",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/catalog/proxy/ips?kind=dedicated_ipv4&country={{proxy_country}}",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                },
                {
                    "name": "购买前报价",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/catalog/proxy/quote",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"kind\": \"dedicated_ipv4\",\n    \"country\": \"{{proxy_country}}\",\n    \"period\": 30,\n    \"quantity\": 1\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "创建代理订单",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{proxy_idempotency_key}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/orders",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"proxy\",\n    \"kind\": \"dedicated_ipv4\",\n    \"country\": \"{{proxy_country}}\",\n    \"period\": 30,\n    \"quantity\": 1\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "代理续费报价",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/catalog/proxy/renew/quote",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"renewal_tokens\": [\n        \"{{proxy_renewal_token}}\"\n    ],\n    \"period\": 30\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "提交代理续费",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{proxy_renew_idempotency_key}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/orders/proxy/renew",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"renewal_tokens\": [\n        \"{{proxy_renewal_token}}\"\n    ],\n    \"period\": 30\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "订单查询",
            "item": [
                {
                    "name": "订单列表",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/orders?limit=50",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                },
                {
                    "name": "订单详情",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/orders/{{order_id}}",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                }
            ]
        },
        {
            "name": "账号查活",
            "item": [
                {
                    "name": "查活能力与限额",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/checker/capabilities",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                },
                {
                    "name": "创建查活检测",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{checker_idempotency_key}}",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/checker/checks",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"platform\": \"{{checker_platform}}\",\n    \"identifiers\": [\n        \"100000000000001\",\n        \"100000000000002\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "查询查活结果",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "{{base_url}}/checker/checks/{{check_id}}",
                        "description": "请求前请从对应目录读取实时参数，并确认 orderable=true。"
                    }
                }
            ]
        }
    ]
}