Skip to content

Adding a shipping method

Request

Adds a new shipping method for the specific e-shop, including its complete configuration — pricing, allowed payment methods,

sales-channel bindings and listing position. A method created with a full request body needs no follow-up setup in the administration.

Should you wish to implement an addon implementing a shipping method, contact our partner support and request the creation

of a new "shipping company code" identifier.

The request body includes the mandatory attributes name and shippingMethodCode. The other parameters are not

mandatory and their default values will be used:

  • description - null

  • visible - false

  • wholesale - false

  • priority - null (the method is appended to the end of the listing)

  • atypicalProductAllowed - false

  • cPostBoxSize - null

  • salesChannelGuids - the primary market's sales channel when the method is visible, otherwise none

  • logo - null

  • priceList.allowFreeShipping - true

  • priceList.pairedPaymentMethodGuids - every payment method of the same retail/wholesale group

  • priceList.priceTiers - a single tier for the default country, currency and tax class, priced 0.00

The priceList object mirrors the one returned by GET /api/shipping-methods/{guid}?include=priceList, so the same structure

can be read back after creation.

Send the logo of the shipping method as the file content, encoded with base64, in data.logo.content request item.

Please note that name cannot be longer than 255 characters.

Deprecated request fields — still accepted, do not use in new integrations:

  • visibility - use visible instead. Sending both with contradicting values is rejected with invalid-parameter.

  • minimalShippingPrice - use priceList.priceTiers instead. The two cannot be combined.

Deprecated response field — visibility carries the same value as visible; read visible.

trackingUrl is read-only. It comes from the carrier codebook and cannot be set per shipping method.

Security
shoptetAccessToken or shoptetPrivateApiToken
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
curl -i -X POST \
  https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/shipping-methods \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "name": "Shipping name",
      "description": "Shipping description",
      "shippingMethodCode": "intime-colli-small",
      "visible": true,
      "visibility": true,
      "wholesale": true,
      "priority": 3,
      "atypicalProductAllowed": false,
      "cPostBoxSize": "M",
      "salesChannelGuids": [
        "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed"
      ],
      "logo": {
        "filename": "logo_shipping.png",
        "content": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABaElEQVR42mNk==="
      },
      "minimalShippingPrice": "21.00",
      "priceList": {
        "allowFreeShipping": true,
        "pairedPaymentMethodGuids": [
          "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed"
        ],
        "priceTiers": [
          {
            "countryCode": "cz",
            "regionId": 5,
            "currencyCode": "CZK",
            "priceFrom": "21.00",
            "priceUntil": "21.00",
            "weightFrom": "1.234",
            "weightUntil": "1.234",
            "price": "21.00",
            "includingVat": true,
            "taxClassId": 1
          }
        ]
      }
    }
  }'

Responses

OK

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": { "guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed", "name": "Shipping company", "description": "Delivery within 48 hours", "shippingCompany": { … }, "trackingUrl": "http://www.ppl.cz/main2.aspx?cls=Package&idSearch=#PACKAGE_NUMBER#", "visible": true, "visibility": true, "priority": 16, "wholesale": true, "logoUrl": "https://www.example.com/logo.png", "priceList": { … } }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }