Validate cart
POST/validate-cart
This endpoint can be used once the cart of the customer is created, to get the shipping data, like shipping methods and their prices.
Request
Header Parameters
Authorization cookie, obtained from OAuth 2 endpoint
- application/json
Body
required
Cart object that needs to be validated
- Array [ 
- ] 
customer
Customer
required
Customer object
Mega code of the organization, unique identifier of the company.
Customer's email.
Customer's firstname.
Customer's lastname.
Customer's profession.
Customer’s billing address id selected.
Customer’s delivery address id selected.
Possible values: [fr_fr, be_fr, be_nl, de_de, es_es, pt_pt, nl_nl, pl_pl, uk_en]
Locale of user in Magento.
Possible values: [FR-FR, BE-BE, BL-BL, DE-DE, ES-ES, PT-PT, NL-NL, PL-PL, UK-UK]
Code of the customer shipping zone.
items
ValidateCartItem[]
required
Array of offer/quantity
Unique id of offer.
Quantity related to offer.
Responses
- 200
- 400
- 401
- 503
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
- Array [ 
- ] 
- Array [ 
- Array [ 
- Array [ 
- Array [ 
- BOOLEAN
- DATE
- LINK
- LIST
- MULTIPLE_VALUES_LIST
- NUMERIC
- REGEX
- STRING
- TEXTAREA
- ] 
- ] 
- Array [ 
- BOOLEAN
- DATE
- LINK
- LIST
- MULTIPLE_VALUES_LIST
- NUMERIC
- REGEX
- STRING
- TEXTAREA
- ] 
- Array [ 
- ] 
- 0: if quantity = 0 or the offer is not available
- x: quantity available
- Array [ 
- ] 
- Array [ 
- ] 
- Array [ 
- ] 
- ] 
- Array [ 
- ] 
- Array [ 
- BOOLEAN
- DATE
- LINK
- LIST
- MULTIPLE_VALUES_LIST
- NUMERIC
- REGEX
- STRING
- TEXTAREA
- ] 
- Array [ 
- Array [ 
- BOOLEAN
- DATE
- LINK
- LIST
- MULTIPLE_VALUES_LIST
- NUMERIC
- REGEX
- STRING
- TEXTAREA
- ] 
- ] 
- ] 
errors
object[]
List of the errors encountered when computing the shipping fees
Code of the error that made shipping computation not possible
The id of the offer involved in the error
The selected shipping type code involved in the error
orders
object[]
List of shipping fees information per order
Channel code supplied when calling the API, or null if no channel code was supplied
Shop currency
Order lead time to ship
offers
object[]
List of the offers that compose the order
Whether the offer is eligible for quotation
allowed_shipping_types
object[]
The allowed shipping types for this offer
Shipping type code
Next cutoff date
Shipping type Cutoff time
delivery_time
object
Expected order delivery time
Earliest order delivery time
Earliest order delivery date
Latest order delivery time
Latest order delivery date
Shipping type label
shipping_additional_fields
object[]
Custom Shipping associated to the zone and the type
Additional field's code
type
string
Possible values: [BOOLEAN, DATE, LINK, LIST, MULTIPLE_VALUES_LIST, NUMERIC, REGEX, STRING, TEXTAREA]
Additional field's type
Additional field's value
Additional field's value
Additional field's value
Additional field's value
Values of the additional field
Additional field's value
Additional field's value
Additional field's value
Additional field's value
Estimated shipping date, that includes business closing days and cut-off configured on the platform. Add the earliest and latest delivery times to calculate the estimated delivery date to customers
fulfillment
object
Fulfillment information of the offer
center
object
Fulfillment center code
Center code
Shipping price of the order line if the order is composed only of the offer (shipping price * 1 + additional shipping price * (quantity - 1))
Total price of the order line if the order is composed only of the offer (price + shipping price of the order line)
Quantity of offers requested in the line
Price of the order line (offer price * quantity) - promotions
Quantity of offers returned for the line
Shipping price of the order line 
If the shipping price of the offer is the biggest in the order for the shop: shipping price * 1 + additional shipping price * (quantity - 1). Else: additional shipping price * quantity
Total price of the order line (line_price + line_shipping_price)
offer_additional_fields
object[]
List of additional fields
Additional field's code
type
string
Possible values: [BOOLEAN, DATE, LINK, LIST, MULTIPLE_VALUES_LIST, NUMERIC, REGEX, STRING, TEXTAREA]
Additional field's type
Additional field's value
Additional field's value
Additional field's value
Additional field's value
Values of the additional field
Additional field's value
Additional field's value
Additional field's value
Additional field's value
offer_discount
object
Discount of the offer
Discount price. Not to be read if discount with ranges is specified (i.e. discount with at least one range with quantity threshold greater than one).
Discount end date
Origin price
ranges
object[]
Discount ranges
Price of the offer if the quantity threshold is reached
Minimum quantity to order for the given price to be applied
Discount start date
Identifier of the offer
Price of the offer
Quantity of the offer
Code of the category of the product of the offer
Product tax code
promotions
object[]
List of promotions
true when the promotion's reward amount is divided and allocated proportionally to multiple order lines.false when the entire reward amount is allocated to one order line, or when the same discount percentage is applied to several order lines (one-step percentage off promotions).
campaign
object
Promotion campaign information, when applicable.
The identifier of the promotion campaign.
configuration
object
Configuration used to calculate the applied promotion
The amount off of the promotion. 
Only applicable when promotion is of type AMOUNT_OFF, null otherwise.
The free item target quantity of the promotion. 
Only applicable when promotion is of type FREE_ITEMS, null otherwise.
Promotion's Internal description, set by the shop at creation
The percentage off of the promotion. 
Only applicable when promotion is of type PERCENTAGE_OFF, null otherwise.
Promotion's type, whether it is applied to this item (ITEM), or every items in the basket for this shop (BASKET)
Promotion's amount for this line.
Promotion's id, defined by the shop
The quantity of free items offered by the promotion for this line. 
Only applicable when promotion is of type FREE_ITEMS, null otherwise.
Promo code associated to the promotion
Additional shipping price of the offer
Shipping price of the offer
shipping_taxes
object[]
Taxes to be applied on the shipping price
Tax amount
Jurisdiction tax name
Jurisdiction tax type (City, State...)
taxes
object[]
Taxes to be applied on the product price
Tax amount
Jurisdiction tax name
Jurisdiction tax type (City, State...)
promotions
object
A summary of the promotions applied to the order
applied_promotions
object[]
The promotions applied on this order
true when the promotion's reward amount is divided and allocated proportionally to multiple order lines.false when the entire reward amount is allocated to one order line, or when the same discount percentage is applied to several order lines (one-step percentage off promotions).
campaign
object
Promotion campaign information, when applicable.
The identifier of the promotion campaign.
configuration
object
Configuration used to calculate the applied promotion
The amount off of the promotion. 
Only applicable when promotion is of type AMOUNT_OFF, null otherwise.
The free item target quantity of the promotion. 
Only applicable when promotion is of type FREE_ITEMS, null otherwise.
Promotion's Internal description, set by the shop at creation
The percentage off of the promotion. 
Only applicable when promotion is of type PERCENTAGE_OFF, null otherwise.
Promotion's type, whether it is applied to this item (ITEM), or every items in the basket for this shop (BASKET)
Promotion's amount for this line.
Promotion's id, defined by the shop
The quantity of free items offered by the promotion for this line. 
Only applicable when promotion is of type FREE_ITEMS, null otherwise.
Promo code associated to the promotion
The total amount deduced on this order thanks to the promotions
selected_shipping_type
object
Shipping type selected for the shop and used to calculate the shipping price for each offers
Shipping type code
Next cutoff date
Shipping type Cutoff time
delivery_time
object
Expected order delivery time
Earliest order delivery time
Earliest order delivery date
Latest order delivery time
Latest order delivery date
Shipping type label
shipping_additional_fields
object[]
Custom Shipping associated to the zone and the type
Additional field's code
type
string
Possible values: [BOOLEAN, DATE, LINK, LIST, MULTIPLE_VALUES_LIST, NUMERIC, REGEX, STRING, TEXTAREA]
Additional field's type
Additional field's value
Additional field's value
Additional field's value
Additional field's value
Values of the additional field
Additional field's value
Additional field's value
Additional field's value
Additional field's value
Estimated shipping date, that includes business closing days and cut-off configured on the platform. Add the earliest and latest delivery times to calculate the estimated delivery date to customers
Estimated shipping date, that includes business closing days and cut-off configured on the platform. Add the earliest and latest delivery times to calculate the estimated delivery date to customers
shipping_types
object[]
List of shipping types compatible with all the offers composing the order
Shipping type code
Next cutoff date
Shipping type Cutoff time
delivery_time
object
Expected order delivery time
Earliest order delivery time
Earliest order delivery date
Latest order delivery time
Latest order delivery date
Shipping type label
shipping_additional_fields
object[]
Custom Shipping associated to the zone and the type
Additional field's code
type
string
Possible values: [BOOLEAN, DATE, LINK, LIST, MULTIPLE_VALUES_LIST, NUMERIC, REGEX, STRING, TEXTAREA]
Additional field's type
Additional field's value
Additional field's value
Additional field's value
Additional field's value
Values of the additional field
Additional field's value
Additional field's value
Additional field's value
Additional field's value
Estimated shipping date, that includes business closing days and cut-off configured on the platform. Add the earliest and latest delivery times to calculate the estimated delivery date to customers
Total shipping price of the shipping type for all selected offers
Shop identifier
Shop model
Shop name
Total count of elements returned by the query (No pagination)
{
  "errors": [
    {
      "error_code": "string",
      "offer_id": 0,
      "shipping_type_code": "string"
    }
  ],
  "orders": [
    {
      "channel_code": "string",
      "currency_iso_code": "string",
      "leadtime_to_ship": 0,
      "offers": [
        {
          "allow_quote_requests": true,
          "allowed_shipping_types": [
            {
              "code": "string",
              "cut_off_next_date": "2024-07-29T15:51:28.071Z",
              "cut_off_time": "string",
              "delivery_time": {
                "earliest_days": 0,
                "earliest_delivery_date": "2024-07-29T15:51:28.071Z",
                "latest_days": 0,
                "latest_delivery_date": "2024-07-29T15:51:28.071Z"
              },
              "label": "string",
              "shipping_additional_fields": [
                {
                  "code": "string",
                  "type": "string"
                }
              ],
              "shipping_deadline": "2024-07-29T15:51:28.071Z"
            }
          ],
          "fulfillment": {
            "center": {
              "code": "string"
            }
          },
          "line_only_shipping_price": 0,
          "line_only_total_price": 0,
          "line_original_quantity": 0,
          "line_price": 0,
          "line_quantity": 0,
          "line_shipping_price": 0,
          "line_total_price": 0,
          "offer_additional_fields": [
            {
              "code": "string",
              "type": "string"
            }
          ],
          "offer_discount": {
            "discount_price": 0,
            "end_date": "2024-07-29T15:51:28.071Z",
            "origin_price": 0,
            "ranges": [
              {
                "price": 0,
                "quantity_threshold": 0
              }
            ],
            "start_date": "2024-07-29T15:51:28.071Z"
          },
          "offer_id": 0,
          "offer_price": 0,
          "offer_quantity": 0,
          "product_category_code": "string",
          "product_tax_code": "string",
          "promotions": [
            {
              "apportioned": true,
              "campaign": {
                "identifier": "string"
              },
              "configuration": {
                "amount_off": 0,
                "free_items_quantity": 0,
                "internal_description": "string",
                "percentage_off": 0,
                "type": "string"
              },
              "deduced_amount": 0,
              "id": "string",
              "offered_quantity": 0,
              "promo_code": "string"
            }
          ],
          "shipping_price_additional_unit": 0,
          "shipping_price_unit": 0,
          "shipping_taxes": [
            {
              "amount": 0,
              "name": "string",
              "type": "string"
            }
          ],
          "taxes": [
            {
              "amount": 0,
              "name": "string",
              "type": "string"
            }
          ]
        }
      ],
      "promotions": {
        "applied_promotions": [
          {
            "apportioned": true,
            "campaign": {
              "identifier": "string"
            },
            "configuration": {
              "amount_off": 0,
              "free_items_quantity": 0,
              "internal_description": "string",
              "percentage_off": 0,
              "type": "string"
            },
            "deduced_amount": 0,
            "id": "string",
            "offered_quantity": 0,
            "promo_code": "string"
          }
        ],
        "total_deduced_amount": 0
      },
      "selected_shipping_type": {
        "code": "string",
        "cut_off_next_date": "2024-07-29T15:51:28.071Z",
        "cut_off_time": "string",
        "delivery_time": {
          "earliest_days": 0,
          "earliest_delivery_date": "2024-07-29T15:51:28.071Z",
          "latest_days": 0,
          "latest_delivery_date": "2024-07-29T15:51:28.071Z"
        },
        "label": "string",
        "shipping_additional_fields": [
          {
            "code": "string",
            "type": "string"
          }
        ],
        "shipping_deadline": "2024-07-29T15:51:28.071Z"
      },
      "shipping_deadline": "2024-07-29T15:51:28.071Z",
      "shipping_types": [
        {
          "code": "string",
          "cut_off_next_date": "2024-07-29T15:51:28.071Z",
          "cut_off_time": "string",
          "delivery_time": {
            "earliest_days": 0,
            "earliest_delivery_date": "2024-07-29T15:51:28.071Z",
            "latest_days": 0,
            "latest_delivery_date": "2024-07-29T15:51:28.071Z"
          },
          "label": "string",
          "shipping_additional_fields": [
            {
              "code": "string",
              "type": "string"
            }
          ],
          "shipping_deadline": "2024-07-29T15:51:28.071Z",
          "total_shipping_price": 0
        }
      ],
      "shop_id": 0,
      "shop_model": "string",
      "shop_name": "string"
    }
  ],
  "total_count": 0
}
Invalid input
Unauthorized
Mirakl is unavailable. We retried 5 times every 5 seconds. Please try again later