GET v1​/ carts​/:cart_id

Endpoint to get the Cart with the given ID, as returned from the create cart API.

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 fetch an existing Cart
curl -i -H "Authorization: Bearer $BEARER" \
https://api.blomming.com/v1/carts/1234

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

while on failure responses (status: 404), an header only response is returned.

Request

Example Request

{
  "currency": "EUR",
  "locale": "es"
}

Request Parameters

  • currency

    the currency to use when returning prices, the default is EUR.

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

    The locale used in the Cart.

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

Response

Example Response

{
  "id": 12345,
  "url": "http://example.org/carts/12345",
  "cart_skus": [
    {
      "price": "160.0",
      "sku": {
        "id": 64314,
        "barcode": "c4bcfbf93bb8c42f01da3303d18836ad",
        "user_barcode": "spilla-1",
        "quantity": 42,
        "props": [
          {
            "value": "taglia",
            "type": {
              "name": "taglia",
              "id": 1
            }
          }
        ],
        "item": {
          "title": "Orecchini uncinetto handmade",
          "description": "A very very long description without HTML tags.",
          "raw_description": "A very very long description wit HTML tags.",
          "url": "https://api.blomming.com/v1/shops/lozoodisimona/items/115538",
          "id": "115538",
          "price": 25.0,
          "original_price": 25.0,
          "currency": "EUR",
          "quantity": 42,
          "photos": [
            "https://s3.amazonaws.com/cdn.blomming.com/items/000/179/591/large/f569f44564d8b35283783430638d03c2.jpg?1346100986"
          ],
          "created_at": "2012-08-27T20:56:36Z",
          "web_url": "http://blomming.com/mm/luciapw/items/orecchini-uncinetto-handmade--7",
          "fbcomments": "http://blomming.com/items/115538/fbcomments",
          "shop": {
            "id": "lozoodisimona",
            "url": "https://api.blomming.com/v1/shops/lozoodisimona",
            "name": "Lo Zoo di Simona",
            "image": {
            },
            "items_url": "http://example.org/shops/lozoodisimona/items"
          }
        }
      },
      "amount": 42
    }
  ],
  "payment_types": [
    {
      "code": "COD",
      "description": "Cash On Delivery",
      "pay_url": "http://example.org/v1/carts/6290/checkout/COD",
      "validate_url": "http://example.org/v1/carts/6290/validate/COD"
    }
  ],
  "total_price": "160",
  "currency": "EUR",
  "shipping_countries_url": "http://example.org/v1/carts/6290/shipping_countries"
}

Response Parameters

  • id

    The ID of the Cart.

    • Required: yes
    • Type: integer
    • Example: 12345
  • url

    This URL.

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

    The SKUs that were inserted in this cart.

    • Required: yes
    • Type: array
    • Items

      The skus

      • Required: yes
      • price

        The price at which this SKU has been inserted.

        • Required: yes
        • Type: string
        • Example: "160.0"
      • sku

        The SKU present into the Cart.

        • Required: yes
        • id

          The ID of the SKU, to be used to add item to the Cart.

          • Required: yes
          • Type: integer
          • Example: 64314
        • barcode

          the barcode of this SKU.

          • Required: yes
          • Type: string
          • Example: "c4bcfbf93bb8c42f01da3303d18836ad"
        • user_barcode

          the shop defined barcode of this SKU.

          • Required: no
          • Type: string
          • Example: "spilla-1"
        • quantity

          The number of Items in stock for this SKU.

          • Required: yes
          • Type: integer
          • Example: 42
        • props

          The definition of the properties of this SKU.

          • Required: yes
          • Type: array
          • Items

            The properties

            • Required: yes
            • value

              The value of the property.

              • Required: yes
              • Type: string
              • Example: "taglia"
            • type

              The type of this property.

              • Required: yes
              • name

                The name of the property type.

                • Required: yes
                • Type: string
                • Example: "taglia"
              • id

                The id of the property type.

                • Required: yes
                • Type: integer
                • Example: 1
        • item

          The Item included in the SKU.

          • Required: yes
          • title

            The title of the Item.

            • Required: yes
            • Type: string
            • Example: "Orecchini uncinetto handmade"
          • description

            The description of the Item.

            • Required: yes
            • Type: string
            • Example: "A very very long description without HTML tags."
          • raw_description

            The description of the Item.

            • Required: yes
            • Type: string
            • Example: "A very very long description wit HTML tags."
          • url

            The URL to fetch the details of the Item.

            • Required: yes
            • Type: string
            • Format: uri
            • Example: "https://api.blomming.com/v1/shops/lozoodisimona/items/115538"
          • id

            The ID of this Item.

            • Required: yes
            • Type: string
            • Example: "115538"
          • price

            The price of this Item in the currency passed as parameter.

            • Required: yes
            • Type: string
            • Example: 25.0
          • original_price

            The origin (non-discounted) price of this Item in the currency passed as parameter

            • Required: yes
            • Type:
              • string
              • null
            • Example: 25.0
          • currency

            The currency in which the prices are exposed.

            • Required: yes
            • Type: string
            • Example: "EUR"
          • quantity

            The number of Items present in the store.

            • Required: yes
            • Type: integer
            • Example: 42
          • photos

            The photo of this Item with resolution XxY.

            • Required: yes
            • Type: array
            • Items

              The URL of the photo.

              • Required: yes
              • Type: string
              • Format: uri
              • Example: "https://s3.amazonaws.com/cdn.blomming.com/items/000/179/591/large/f569f44564d8b35283783430638d03c2.jpg?1346100986"
          • created_at

            The date at which this Item has been created.

            • Required: yes
            • Type: string
            • Format: date-time
            • Example: "2012-08-27T20:56:36Z"
          • web_url

            The URL on the web of this resource.

            • Required: yes
            • Type: string
            • Format: uri
            • Example: "http://blomming.com/mm/luciapw/items/orecchini-uncinetto-handmade--7"
          • fbcomments

            The URL to display the facebook comments.

            • Required: yes
            • Type: string
            • Format: uri
            • Example: "http://blomming.com/items/115538/fbcomments"
          • shop

            The properties of the shop’s this Item belongs.

            • Required: yes
            • id

              The id of the shop this Item belong.

              • Required: yes
              • Type: string
              • Example: "lozoodisimona"
            • url

              The URL to fetch the details of the Shop to which this Item belong.

              • Required: yes
              • Type: string
              • Format: uri
              • Example: "https://api.blomming.com/v1/shops/lozoodisimona"
            • name

              The name of the shop.

              • Required: yes
              • Type: string
              • Example: "Lo Zoo di Simona"
            • image

              The logo of the shop.

              • Required: yes
              • Type: uri
              • Format: uri
              • Example: "http://yourdomain.com/path/to/a/photo"
            • items_url

              the url of the Items sold by this shop.

              • Required: yes
              • Type: string
              • Format: uri
              • Example: "http://example.org/shops/lozoodisimona/items"
      • amount

        The number of SKUs of this type in the Cart.

        • Required: yes
        • Type: integer
        • Example: 42
  • payment_types

    The payment types supported by this Cart.

    • Required: yes
    • Type: array
    • Items

      A list of Payment Types.

      • Required: yes
      • code

        The code of the payment type.

        • Required: yes
        • Type: string
        • Example: "COD"
      • description

        The description of the payment type.

        • Required: yes
        • Type: string
        • Example: "Cash On Delivery"
      • pay_url

        The checkout URL that can be used to checkout by issuing a POST.

        • Required: yes
        • Type: string
        • Format: uri
        • Example: "http://example.org/v1/carts/6290/checkout/COD"
      • validate_url

        The checkout URL that can be used to validate the order by issuing a GET.

        • Required: yes
        • Type: string
        • Format: uri
        • Example: "http://example.org/v1/carts/6290/validate/COD"
  • total_price

    The total price of the Items in the Cart.

    • Required: yes
    • Type: string
    • Example: "160"
  • currency

    The currency in which the prices are exposed.

    • Required: yes
    • 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: yes
    • Type: string
    • Format: uri
    • Example: "http://example.org/v1/carts/6290/shipping_countries"

Response Codes

Successful Response Codes

Failure Response Codes