PUT v1​/ carts​/:cart_id​/clear

Endpoint to empty (that is, remove all SKUs from) the Cart.

Instant gratification

Do it yourself from console!

Assuming that you have a valid token previously exported into BEARER env variable
and that 1234 is the :cart_id of a valid cart of yours (see here to see how a new cart can be get).

Try to empty your Cart
curl -X PUT -i -H "Authorization: Bearer $BEARER" \
https://api.blomming.com/v1/carts/1234/clear

On successfull response (status: 200), an object with the following properties is returned:

while on failure responses (status: 400 or 404), the only property returned in the response object is errors.

Request

Example Request

{
  "currency": "EUR"
}

Request Parameters

  • currency

    The currency in which the prices are exposed.

    • Required: no
    • Type: string
    • Example: "EUR"

Response

Example Response

{
  "errors": [
    {
      "message": "missing SKU"
    }
  ],
  "id": 9,
  "url": "http://example.org/carts/9",
  "cart_skus": [
    null
  ],
  "payment_types": [
    null
  ],
  "total_price": "0.0",
  "currency": "EUR",
  "shipping_countries_url": "http://example.org/v1/carts/9/shipping_countries"
}

Response Parameters

  • errors

    An object containing the errors of this call. When present, this is the only property of the JSON object returned.

    • Required: no
    • Type: array
    • Items

      An array of errors.

      • Required: yes
      • message

        A descriptive message of the Error.

        • Required: yes
        • Type: string
        • Example: "missing SKU"
  • id

    The identifier of the Cart.

    • Required: no
    • Type: integer
    • Example: 9
  • url

    The URL at which this Cart is accessible.

    • Required: no
    • Type: string
    • Format: uri
    • Example: "http://example.org/carts/9"
  • cart_skus

    The SKUs that were inserted in this cart. Should be an empty array.

    • Required: no
    • Type: array
    • Example:
      [
      
      ]
  • payment_types

    The payment types supported by this cart. Should be an empty array.

    • Required: no
    • Type: array
    • Example:
      [
      
      ]
  • total_price

    The total price of the items in the cart. Should be “0.0”.

    • Required: no
    • Type: string
    • Example: "0.0"
  • currency

    The currency in which the prices are exposed

    • Required: no
    • Type: string
    • Example: "EUR"
  • shipping_countries_url

    The url at which is possible to know the countries to which this Cart can be shipped. This endpoind is accessible by GET.

    • Required: no
    • Type: string
    • Format: uri
    • Example: "http://example.org/v1/carts/9/shipping_countries"

Response Codes

Successful Response Codes

Failure Response Codes