Skip to content

Adding a shipping method

Request

Adds a new shipping method for the specific e-shop.

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 (or deprecated shippingCompanyCode). The other parameters are not

mandatory and their default values will be used:

  • description - null

  • visibility - false

  • wholesale - false

  • logo - null

  • minimalShippingPrice - 0.00

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.

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",
      "visibility": true,
      "wholesale": true,
      "logo": {
        "filename": "logo_shipping.png",
        "content": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABaElEQVR42mNk==="
      },
      "minimalShippingPrice": "21.00"
    }
  }'

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", "visibility": true, "wholesale": true, "logoUrl": "https://www.example.com/logo.png", "shippingCompany": {} }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }