shipping_methods

Create a shipping method

Changed on

Create a shipping method

post/shipping_methods

Request

  • Base URL
    https://{your_organization_slug}.commercelayer.io/api
  • URL
    https://{your_organization_slug}.commercelayer.io/api/shipping_methods
  • Auth
    HTTP bearer

Request body

Example request

{
  "data": {
    "attributes": {
      "name": "Standard shipping",
      "scheme": "flat",
      "currency_code": "EUR",
      "external_prices_url": "https://external_prices.yourbrand.com",
      "price_amount_cents": 1000,
      "free_over_amount_cents": 9900,
      "use_subtotal": true,
      "min_weight": 3,
      "max_weight": 300,
      "unit_of_weight": "gr",
      "tax_code": "FR010000",
      "_disable": true,
      "_enable": true,
      "external_includes": [
        "order.line_item_options"
      ],
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    },
    "relationships": {
      "market": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "shipping_zone": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "shipping_category": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "stock_location": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "shipping_method_tiers": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "tags": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The created shipping method object

Changes

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      request property / was restricted to a list of enum values

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      the request property // became optional

    • info

      the request property // became optional

    • info

      the request property default value shipping_methods was removed

    • info

      added the new shipping_methods enum value to the request property /

    • info

      added the media type application/vnd.api+json for the response with the status