需要 write_shipping 权限点。
更多权限点使用信息,请参考:
PUT https://{handle}.myshopline.com/admin/openapi/v20250601/carrier_services/:carrier_service_id.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
更新指定运营商服务。只有创建运营商服务的应用才可以更新它。
路径参数
  • carrier_service_id string required
    承运商服务ID
    Example: 123456
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
  • carrier_serviceobject
    承运商服务信息
  • active boolean
    承运商服务是否激活
    Example: true
  • service_name string
    运输服务名称
    Example: Shipping Rate Provider
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • traceId
    traceId
响应体
  • carrier_serviceobject
    承运商服务信息
  • active boolean
    承运商服务是否激活
    Example: true
  • callback_url string
    请求计算运费所需的 URL,必须是公网 URL。
    Example: http://shipping.example.com
  • carrier_service_type string
    用于区别API运费和商家运费
    Example: api:应用参与配置运费; merchant:商家后台配置
  • id string
    承运商服务的ID
    Example: "123456"
  • name string
    运输服务名称
    Example: Shipping Rate Provider
  • service_discovery boolean
    商家是否能够通过 Shopline 后台承运商服务发送虚拟数据以查看运费示例
    Example: true
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

path required
header required

Body

required
{
  "carrier_service": {
    "active": true,
    "service_name": "Shipping Rate Provider"
  }
}

Language

curl --request PUT \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/carrier_services/carrier_service_id.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json' \
--data '
{
"carrier_service": {
"active": true,
"service_name": "Shipping Rate Provider"
}
}
'
这篇文章对你有帮助吗?

Error loading component.

Error loading component.