Kanorio

API 參考

Shipping options

Management API: PATCH /sites/{id}/shipping-options/{optionId}

此頁只有英文版。API 參考、Webhook 事件及變更紀錄維持英文,與程式碼中的欄位名稱、錯誤碼一致。
Base URL https://app.kanorio.com/api/v1ErrorsPagination

Update a shipping option

PATCH/sites/{id}/shipping-options/{optionId}
betafulfillment:managedefault (120/minute per token)

Update one shipping option: whether its shipping profile offers the method (isActive), its prices and its free shipping threshold. Only the fields you send change. Carriers price per package size: specPrices merges by specCode (use the method's specs), amount null removes a size so it is not offered. Custom methods price per order: amount plus additionalItemAmount for each unit after the first. Amounts are minor units of the option's currency. Send expectedUpdatedAt (options[].updatedAt from your last read); if the option changed since, nothing is written and you get CONFLICT with the current updatedAt: read again and retry. The default profile always offers every method that is on; turn a method off for the whole store with delivery_methods.update. Errors: FORBIDDEN, SHIPPING_OPTION_NOT_FOUND, CONFLICT (details.conflict.updatedAt), VALIDATION (details.reason DEFAULT_PROFILE_ALWAYS_OFFERED, SPEC_PRICES_FOR_FLAT_OPTION, FLAT_AMOUNT_FOR_PACKAGE_OPTION, or SPEC_NOT_FOR_CARRIER with details.specCodes).

Parameters

  • idstring · pathrequired

    Website id. Get it from sites.list or from sites.create.

  • optionIdstring · pathrequired

    Shipping option id from shipping.get_settings (options[].id).

Request body

  • expectedUpdatedAtstringrequired

    options[].updatedAt from your last read.

  • isActiveboolean
  • amountinteger

    FLAT pricing only (custom methods).

  • additionalItemAmountinteger

    FLAT pricing only (custom methods).

  • freeShippingThresholdinteger

    0 turns free shipping off.

  • specPricesobject[]

    PACKAGE pricing only (carriers). Merged by specCode; sizes you leave out keep their price.

  • specPrices[].specCodestringrequired
  • specPrices[].amountinteger | nullrequired

    Price per package; null stops offering this size.

Response 200

  • idstringrequired
  • methodIdstringrequired
  • profileIdstringrequired
  • zoneIdstringrequired
  • marketIdstringrequired
  • isActivebooleanrequired

    Whether products in this shipping profile can use this method. Always true in the default profile.

  • currencystringrequired

    Currency of every amount on this option (the market currency).

  • amountintegerrequired

    FLAT pricing: price per order, minor units.

  • additionalItemAmountintegerrequired

    FLAT pricing: added for each unit after the first, minor units.

  • freeShippingThresholdintegerrequired

    Free shipping when the discounted merchandise subtotal reaches this amount; 0 = no free shipping.

  • specPricesobject[]required

    PACKAGE pricing: price per package size. A size without a price is not offered.

  • specPrices[].specCodestringrequired
  • specPrices[].amountintegerrequired

    Price per package, minor units.

  • specPrices[].activatedbooleanrequired

    false while the carrier is not set up for this temperature; buyers do not see it yet.

  • updatedAtstringrequired

    Send it back as expectedUpdatedAt in shipping_options.update.

Errors

  • FORBIDDEN 403
  • SHIPPING_OPTION_NOT_FOUND 404
  • CONFLICT 409 · details.conflict.updatedAt
  • VALIDATION 400 · details.reason DEFAULT_PROFILE_ALWAYS_OFFERED, SPEC_PRICES_FOR_FLAT_OPTION, FLAT_AMOUNT_FOR_PACKAGE_OPTION, or SPEC_NOT_FOR_CARRIER with details.specCodes

MCP tool shipping_options_update

curlTypeScript
curl -X PATCH "https://app.kanorio.com/api/v1/sites/{id}/shipping-options/{optionId}" \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"expectedUpdatedAt":"2026-10-06T08:00:00.000Z","freeShippingThreshold":150000,"specPrices":[{"specCode":"payuni_unimart_ambient","amount":7000}]}'
Response
{
  "id": "so_example01",
  "methodId": "dm_example01",
  "profileId": "shpprof_default",
  "zoneId": "zone_example01",
  "marketId": "mkt_example01",
  "isActive": true,
  "currency": "twd",
  "amount": 0,
  "additionalItemAmount": 0,
  "freeShippingThreshold": 150000,
  "specPrices": [
    {
      "specCode": "payuni_unimart_ambient",
      "amount": 7000,
      "activated": true
    }
  ],
  "updatedAt": "2026-11-19T08:30:00.000Z"
}