GET v1​/ carts​/:cart_id​/validate​/:payment_type

Endpoint to check the validness of an Order retative to 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:

Try to perform the validation of your Cart
curl -i --get -H "Authorization: Bearer $BEARER" \
https://api.blomming.com/v1/carts/1234/validate/MOO \
-d "order[ship_to_first_name]=Andrea" \
-d "order[ship_to_last_name]=Salicetti" \
-d "order[email][email protected]" \
-d "order[ship_to_address]=Via%20Teodosio%2065" \
-d "order[ship_to_postal_code]=20100" \
-d "order[ship_to_city]=Milano" \
-d "order[ship_to_province]=MI" \
-d "order[ship_to_country]=Italy" \
-d "order[bill_is_ship]=false" \
-d "order[bill_to_first_name]=Nicola%20Junior" \
-d "order[bill_to_last_name]=Vitto" \
-d "order[bill_to_address]=Via%20Teodosio%2065" \
-d "order[bill_to_postal_code]=20100" \
-d "order[bill_to_city]=Milano" \
-d "order[bill_to_province]=MI" \
-d "order[bill_to_country]=Italy" \
-d "order[bill_to_company]=Blomming%20SpA" \
-d "order[bill_to_vat_number]=IT07199240966" \
-d "order[phone_number3]=32812345678"

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

while on failure responses (status: 400 or 404):

Request

Example Request

{
  "currency": "EUR",
  "locale": "es",
  "order": {
    "ship_to_first_name": "Andrea",
    "ship_to_last_name": "Salicetti",
    "ship_to_address": "via%20Teodosio%2065",
    "ship_to_postal_code": 20100,
    "ship_to_city": "Milano",
    "ship_to_province": "MI",
    "ship_to_country": "Italy",
    "bill_is_ship": "false",
    "bill_to_first_name": "Nicola%20Junior",
    "bill_to_last_name": "Vitto",
    "bill_to_address": "via%20Teodosio%2065",
    "bill_to_postal_code": "20100",
    "bill_to_city": "Milano",
    "bill_to_province": "MI",
    "bill_to_country": "Italy",
    "bill_to_company": "Blomming%20SpA",
    "bill_to_vat_number": "IT07199240966",
    "phone_number3": ""
  }
}

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"
  • order

    The details of the Order.

    • Required: yes
    • ship_to_first_name

      The first name of the recipient.

      • Required: yes
      • Type: string
      • Example: "Andrea"
    • ship_to_last_name

      The last name of the recipient.

      • Required: yes
      • Type: string
      • Example: "Salicetti"
    • ship_to_address

      The address of the recipient.

      • Required: yes
      • Type: string
      • Example: "via%20Teodosio%2065"
    • ship_to_postal_code

      The postal code of the recipient.

      • Required: yes
      • Type: string
      • Example: 20100
    • ship_to_city

      The city of the recipient.

      • Required: yes
      • Type: string
      • Example: "Milano"
    • ship_to_province

      The province of the recipient.

      • Required: yes
      • Type: string
      • Example: "MI"
    • ship_to_country

      The country of the recipient.

      • Required: yes
      • Type: string
      • Example: "Italy"
    • bill_is_ship

      A flag that specifies if the the shipping address is the same. as the billing address.

      • Required: yes
      • Type: boolean
      • Example: "false"
    • bill_to_first_name

      The first name of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "Nicola%20Junior"
    • bill_to_last_name

      The last name of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "Vitto"
    • bill_to_address

      The address of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "via%20Teodosio%2065"
    • bill_to_postal_code

      The postal code of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "20100"
    • bill_to_city

      The city of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "Milano"
    • bill_to_province

      The province of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "MI"
    • bill_to_country

      The country of the recipient.

      • Required: no
      • Type: string
      • Example: "Italy"
    • bill_to_company

      of the invoice.

      • Required: no
      • Type: string
      • Example: "Blomming%20SpA"
    • bill_to_vat_number

      of the invoice.

      • Required: no
      • Type: string
      • Example: "IT07199240966"
    • phone_number3

      of the invoice.

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

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 with 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",
  "total_price_incl_shipping": "170",
  "shipping_cost": "10",
  "shipping_countries_url": {
  }
}

Response Parameters

  • id

    The id of the Car.

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

    This UR.

    • 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 sku.

      • Required: yes
      • price

        The price at which this SKU has been inserte.

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

        The SKU that has been adde.

        • Required: yes
        • id

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

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

          the barcode of this SK.

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

          the shop defined barcode of this SK.

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

          The number of Items in stock for this SK.

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

          The definition of the properties of this SK.

          • Required: yes
          • Type: array
          • Items

            The propertie.

            • Required: yes
            • value

              The value of the propert.

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

              The type of this propert.

              • Required: yes
              • name

                The name of the property typ.

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

                The id of the property typ.

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

          The Item included in the SK.

          • Required: yes
          • title

            The title of the Ite.

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

            The description of the ite.

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

            The description of the item with html tag.

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

            The URL to fetch the details of the Ite.

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

            The id of this Ite.

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

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

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

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

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

            The currency in which the prices are expose.

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

            The number of items present in the stor.

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

            The photo of this Item with resolution Xx.

            • Required: yes
            • Type: array
            • Items

              The URL of the phot.

              • 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 create.

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

            The URL on the web of this resourc.

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

            The URL to display the facebook comment.

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

            The properties of the shop’s this Item belong.

            • Required: yes
            • id

              The id of the shop this Item belon.

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

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

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

              The name of the sho.

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

              The logo of the sho.

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

              the url of the items sold by this sho.

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

        The number of SKUs of this type in the Car.

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

    The payment types supported by this car.

    • Required: yes
    • Type: array
    • Items

      List of accepted Payment Types for the Cart.

      • Required: yes
      • code

        The code of the payment typ.

        • 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 issuin. 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 b. 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 car.

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

    The currency in which the prices are expose.

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

    The total price of the items in the cart with the shipping cost.

    • Required: yes
    • Type: string
    • Example: "170"
  • shipping_cost

    The price to ship the items in this Cart to the given destinatio.

    • Required: yes
    • Type: string
    • Example: "10"
  • shipping_countries_url

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

    • Required: yes
    • Type: uri
    • Format: uri
    • Example: "http://example.org/v1/carts/6290/shipping_countries"

Response Codes

Successful Response Codes

Failure Response Codes