Website logo

Update a Shipping Template

Updates the shipping template with the given ID.

URL: https://api.trademe.co.nz/v1/Shipping/Templates/{shippingTemplateId}.{file_format}
HTTP Method: PUT
Requires Authentication? Yes
Permission Required: MyTradeMeWrite: Maintain your watchlist, answer questions and post comments.
Supported Formats: XML, JSON
Rate Limited? Yes

URL parameters

shippingTemplateId Integer (required)
file_format Enumeration (required) The format of the response.
xml Serialize responses into XML.
json Serialize responses into JSON.

PUT Data

<ShippingTemplateRequest>

ShippingTemplateId Integer (optional)

The ID of the shipping template. Can be omitted if it is adding a template.

Name String (required)

Name of the Shipping Template

HandlingTime TimeSpan (required)

Handling time of the Shipping Template

HandlingTimeCutOff String (required)

Handling time cut-off of the Shipping Template. It must be a 24-hour time in ISO 8601 extended format. E.g. for a cut-off time of 4:30 pm, this value should be "16:30" or "T16:30". Timezones and fractional seconds are not supported.

IsOversized Boolean (optional)

If the Shipping Template is oversized

IsRestricted Boolean (optional)

If the Shipping Template is restricted

ShippingOptions Collection of <ShippingOptionRequest> (required)

List of Shipping Options related to the Shipping Template

ShippingOptionId Integer (optional)

Unique identifier of the Shipping Option

Cost Number (required)

Cost of the Shipping Option

CarrierProductId Integer (required)

Carrier Product related to the Shipping Option

ShipToRegions Collection of Integer (optional)

List of Regions that the Shipping Option ships to. If none are provided, it will default to Nationwide.

Addons Collection of <ShippingOptionAddonRequest> (optional)

List of Addons that are available to the Shipping Option

CarrierAddonId Integer (required)

Identifier of the Carrier Addon

AdditionalCost Number (required)

Additional cost of the addon

Returns

<UpdateShippingTemplateResponse>

Success Boolean

Indicates whether the operation was successful.

Example XML Request (switch to JSON)

<ShippingTemplateRequest xmlns="http://api.trademe.co.nz/v1">
  <ShippingTemplateId>123</ShippingTemplateId>
  <Name>ABC</Name>
  <HandlingTime>PT4H5M</HandlingTime>
  <HandlingTimeCutOff>ABC</HandlingTimeCutOff>
  <IsOversized>false</IsOversized>
  <IsRestricted>false</IsRestricted>
  <ShippingOptions>
    <ShippingOptionRequest>
      <ShippingOptionId>123</ShippingOptionId>
      <Cost>123.0</Cost>
      <CarrierProductId>123</CarrierProductId>
      <ShipToRegions>
        <int>123</int>
        <int>123</int>
      </ShipToRegions>
      <Addons>
        <ShippingOptionAddonRequest>
          <CarrierAddonId>123</CarrierAddonId>
          <AdditionalCost>123.0</AdditionalCost>
        </ShippingOptionAddonRequest>
        <ShippingOptionAddonRequest>
          <CarrierAddonId>123</CarrierAddonId>
          <AdditionalCost>123.0</AdditionalCost>
        </ShippingOptionAddonRequest>
      </Addons>
    </ShippingOptionRequest>
    <ShippingOptionRequest>
      <ShippingOptionId>123</ShippingOptionId>
      <Cost>123.0</Cost>
      <CarrierProductId>123</CarrierProductId>
      <ShipToRegions>
        <int>123</int>
        <int>123</int>
      </ShipToRegions>
      <Addons>
        <ShippingOptionAddonRequest>
          <CarrierAddonId>123</CarrierAddonId>
          <AdditionalCost>123.0</AdditionalCost>
        </ShippingOptionAddonRequest>
        <ShippingOptionAddonRequest>
          <CarrierAddonId>123</CarrierAddonId>
          <AdditionalCost>123.0</AdditionalCost>
        </ShippingOptionAddonRequest>
      </Addons>
    </ShippingOptionRequest>
  </ShippingOptions>
</ShippingTemplateRequest>

Example JSON Request (switch to XML)

{
  "ShippingTemplateId": 123,
  "Name": "ABC",
  "HandlingTime": "PT4H5M",
  "HandlingTimeCutOff": "ABC",
  "IsOversized": false,
  "IsRestricted": false,
  "ShippingOptions": [
    {
      "ShippingOptionId": 123,
      "Cost": 123.0,
      "CarrierProductId": 123,
      "ShipToRegions": [
        123,
        123
      ],
      "Addons": [
        {
          "CarrierAddonId": 123,
          "AdditionalCost": 123.0
        },
        {
          "CarrierAddonId": 123,
          "AdditionalCost": 123.0
        }
      ]
    },
    {
      "ShippingOptionId": 123,
      "Cost": 123.0,
      "CarrierProductId": 123,
      "ShipToRegions": [
        123,
        123
      ],
      "Addons": [
        {
          "CarrierAddonId": 123,
          "AdditionalCost": 123.0
        },
        {
          "CarrierAddonId": 123,
          "AdditionalCost": 123.0
        }
      ]
    }
  ]
}

Example XML Response (switch to JSON)

<UpdateShippingTemplateResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
</UpdateShippingTemplateResponse>

Example JSON Response (switch to XML)

{
  "Success": false
}