Skip to main content

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 stringrequired

    Authorization cookie, obtained from OAuth 2 endpoint

Body

required

Cart object that needs to be validated

    customer

    Customer

    required

    Customer object

    mega_code stringrequired

    Mega code of the organization, unique identifier of the company.

    email stringrequired

    Customer's email.

    firstname stringrequired

    Customer's firstname.

    lastname stringrequired

    Customer's lastname.

    profession string

    Customer's profession.

    billing_address_id stringrequired

    Customer’s billing address id selected.

    delivery_address_id stringrequired

    Customer’s delivery address id selected.

    user_store stringrequired

    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.

    shipping_zone_code stringrequired

    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

  • Array [

  • offer_id numberrequired

    Unique id of offer.

    quantity numberrequired

    Quantity related to offer.

  • ]

Responses

Successful operation

Schema

    errors

    object[]

    List of the errors encountered when computing the shipping fees

  • Array [

  • error_code string

    Code of the error that made shipping computation not possible

    offer_id int64

    The id of the offer involved in the error

    shipping_type_code string

    The selected shipping type code involved in the error

  • ]

  • orders

    object[]

    List of shipping fees information per order

  • Array [

  • channel_code string

    Channel code supplied when calling the API, or null if no channel code was supplied

    currency_iso_code string

    Shop currency

    leadtime_to_ship int32

    Order lead time to ship

    offers

    object[]

    List of the offers that compose the order

  • Array [

  • allow_quote_requests boolean

    Whether the offer is eligible for quotation

    allowed_shipping_types

    object[]

    The allowed shipping types for this offer

  • Array [

  • code string

    Shipping type code

    cut_off_next_date date-time

    Next cutoff date

    cut_off_time time

    Shipping type Cutoff time

    delivery_time

    object

    Expected order delivery time

    earliest_days int32

    Earliest order delivery time

    earliest_delivery_date date-time

    Earliest order delivery date

    latest_days int32

    Latest order delivery time

    latest_delivery_date date-time

    Latest order delivery date

    label string

    Shipping type label

    shipping_additional_fields

    object[]

    Custom Shipping associated to the zone and the type

  • Array [

  • code string

    Additional field's code

    type

    string

    Possible values: [BOOLEAN, DATE, LINK, LIST, MULTIPLE_VALUES_LIST, NUMERIC, REGEX, STRING, TEXTAREA]

    Additional field's type

    value string

    Additional field's value

  • ]

  • shipping_deadline date-time

    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

    code string

    Center code

    line_only_shipping_price number

    Shipping price of the order line if the order is composed only of the offer (shipping price * 1 + additional shipping price * (quantity - 1))

    line_only_total_price number

    Total price of the order line if the order is composed only of the offer (price + shipping price of the order line)

    line_original_quantity int32

    Quantity of offers requested in the line

    line_price number

    Price of the order line (offer price * quantity) - promotions

    line_quantity int32

    Quantity of offers returned for the line

    line_shipping_price number

    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

    line_total_price number

    Total price of the order line (line_price + line_shipping_price)

    offer_additional_fields

    object[]

    List of additional fields

  • Array [

  • code string

    Additional field's code

    type

    string

    Possible values: [BOOLEAN, DATE, LINK, LIST, MULTIPLE_VALUES_LIST, NUMERIC, REGEX, STRING, TEXTAREA]

    Additional field's type

    value string

    Additional field's value

  • ]

  • offer_discount

    object

    Discount of the offer

    discount_price number

    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).

    end_date date-time

    Discount end date

    origin_price number

    Origin price

    ranges

    object[]

    Discount ranges

  • Array [

  • price number

    Price of the offer if the quantity threshold is reached

    quantity_threshold int32

    Minimum quantity to order for the given price to be applied

  • ]

  • start_date date-time

    Discount start date

    offer_id int64

    Identifier of the offer

    offer_price number

    Price of the offer

    offer_quantity int32

    Quantity of the offer

    • 0: if quantity = 0 or the offer is not available
    • x: quantity available

    product_category_code string

    Code of the category of the product of the offer

    product_tax_code string

    Product tax code

    promotions

    object[]

    List of promotions

  • Array [

  • apportioned boolean

    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.

    identifier string

    The identifier of the promotion campaign.

    configuration

    object

    Configuration used to calculate the applied promotion

    amount_off number

    The amount off of the promotion.
    Only applicable when promotion is of type AMOUNT_OFF, null otherwise.

    free_items_quantity int32

    The free item target quantity of the promotion.
    Only applicable when promotion is of type FREE_ITEMS, null otherwise.

    internal_description string

    Promotion's Internal description, set by the shop at creation

    percentage_off number

    The percentage off of the promotion.
    Only applicable when promotion is of type PERCENTAGE_OFF, null otherwise.

    type string

    Promotion's type, whether it is applied to this item (ITEM), or every items in the basket for this shop (BASKET)

    deduced_amount number

    Promotion's amount for this line.

    id string

    Promotion's id, defined by the shop

    offered_quantity int32

    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 string

    Promo code associated to the promotion

  • ]

  • shipping_price_additional_unit number

    Additional shipping price of the offer

    shipping_price_unit number

    Shipping price of the offer

    shipping_taxes

    object[]

    Taxes to be applied on the shipping price

  • Array [

  • amount number

    Tax amount

    name string

    Jurisdiction tax name

    type string

    Jurisdiction tax type (City, State...)

  • ]

  • taxes

    object[]

    Taxes to be applied on the product price

  • Array [

  • amount number

    Tax amount

    name string

    Jurisdiction tax name

    type string

    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

  • Array [

  • apportioned boolean

    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.

    identifier string

    The identifier of the promotion campaign.

    configuration

    object

    Configuration used to calculate the applied promotion

    amount_off number

    The amount off of the promotion.
    Only applicable when promotion is of type AMOUNT_OFF, null otherwise.

    free_items_quantity int32

    The free item target quantity of the promotion.
    Only applicable when promotion is of type FREE_ITEMS, null otherwise.

    internal_description string

    Promotion's Internal description, set by the shop at creation

    percentage_off number

    The percentage off of the promotion.
    Only applicable when promotion is of type PERCENTAGE_OFF, null otherwise.

    type string

    Promotion's type, whether it is applied to this item (ITEM), or every items in the basket for this shop (BASKET)

    deduced_amount number

    Promotion's amount for this line.

    id string

    Promotion's id, defined by the shop

    offered_quantity int32

    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 string

    Promo code associated to the promotion

  • ]

  • total_deduced_amount number

    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

    code string

    Shipping type code

    cut_off_next_date date-time

    Next cutoff date

    cut_off_time time

    Shipping type Cutoff time

    delivery_time

    object

    Expected order delivery time

    earliest_days int32

    Earliest order delivery time

    earliest_delivery_date date-time

    Earliest order delivery date

    latest_days int32

    Latest order delivery time

    latest_delivery_date date-time

    Latest order delivery date

    label string

    Shipping type label

    shipping_additional_fields

    object[]

    Custom Shipping associated to the zone and the type

  • Array [

  • code string

    Additional field's code

    type

    string

    Possible values: [BOOLEAN, DATE, LINK, LIST, MULTIPLE_VALUES_LIST, NUMERIC, REGEX, STRING, TEXTAREA]

    Additional field's type

    value string

    Additional field's value

  • ]

  • shipping_deadline date-time

    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_deadline date-time

    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

  • Array [

  • code string

    Shipping type code

    cut_off_next_date date-time

    Next cutoff date

    cut_off_time time

    Shipping type Cutoff time

    delivery_time

    object

    Expected order delivery time

    earliest_days int32

    Earliest order delivery time

    earliest_delivery_date date-time

    Earliest order delivery date

    latest_days int32

    Latest order delivery time

    latest_delivery_date date-time

    Latest order delivery date

    label string

    Shipping type label

    shipping_additional_fields

    object[]

    Custom Shipping associated to the zone and the type

  • Array [

  • code string

    Additional field's code

    type

    string

    Possible values: [BOOLEAN, DATE, LINK, LIST, MULTIPLE_VALUES_LIST, NUMERIC, REGEX, STRING, TEXTAREA]

    Additional field's type

    value string

    Additional field's value

  • ]

  • shipping_deadline date-time

    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 number

    Total shipping price of the shipping type for all selected offers

  • ]

  • shop_id int64

    Shop identifier

    shop_model string

    Shop model

    shop_name string

    Shop name

  • ]

  • total_count int32

    Total count of elements returned by the query (No pagination)

Loading...