This is a html view of the json schema please take the json schema as reference DOWNLOAD THE JSON SCHEMA

Punchout Shopping Cart

Type: object

Internal This schema is used internally by Spark, not for OpCo integration.
The punchout shopping cart event is pushed by the punchout MS when transmitting cart to the customer e-procurement system

No Additional Properties
Example:

{
    "eventHeader": {
        "source": "SPARK",
        "version": "v1"
    },
    "identifier": {
        "cartId": "1234567890"
    },
    "name": "Shopping Cart",
    "accountId": "account123",
    "createdOn": "2023-10-01T12:00:00Z",
    "transmittedOn": "2023-10-01T13:00:00Z",
    "lastModifiedOn": "2023-10-01T14:00:00Z",
    "billingAddress": {
        "addressId": "234564567898789",
        "opCoAddressId": "237564557868778",
        "addressLine1": "chaussée Verlinden 22",
        "addressLine2": "Apartment 2",
        "city": "Bruges",
        "countryCode": "BEL",
        "postalCode": "0287",
        "addressName": "Building #2",
        "companyName": "Easy Electric",
        "contactFirstName": "John",
        "contactLastName": "Doe",
        "contactPhoneNumber": "+333746573829",
        "deliveryIndication": "Please leave the parcel next the front door.",
        "customerReference": "Ref 364361"
    },
    "logisticDetails": {
        "logisticMethod": "DELIVERY",
        "supportedLogisticMethods": [
            "DELIVERY",
            "PICK_UP"
        ],
        "facilityId": "facility123",
        "facilityName": "Main Facility",
        "deliveryAddress": {
            "addressLine1": "456 Secondary St",
            "city": "Othertown",
            "country": "USA",
            "postalCode": "67890"
        }
    },
    "items": [
        {
            "id": "123",
            "itemType": "PRODUCT",
            "quantity": 2,
            "prices": {
                "netPrice": {
                    "amount": 100,
                    "scale": 2,
                    "currency": "USD"
                },
                "listPrice": {
                    "amount": 200,
                    "scale": 2,
                    "currency": "USD"
                },
                "taxes": [
                    {
                        "type": "VAT",
                        "surcharge": false,
                        "taxAmount": {
                            "amount": 10,
                            "scale": 2,
                            "currency": "USD"
                        },
                        "percentage": 10
                    }
                ],
                "itemPrice": {
                    "amount": 110,
                    "scale": 2,
                    "currency": "USD"
                },
                "itemTaxes": [
                    {
                        "type": "VAT",
                        "surcharge": false,
                        "amount": 10,
                        "scale": 2,
                        "currency": "USD"
                    }
                ],
                "itemPriceIncludingTaxes": {
                    "amount": 120,
                    "scale": 2,
                    "currency": "USD"
                }
            }
        }
    ],
    "coupons": [
        {
            "id": "736923",
            "code": "DISCOUNT10",
            "description": "10% off",
            "discount": {
                "amount": 10,
                "scale": 2,
                "currency": "USD"
            },
            "exclusive": true
        }
    ],
    "contributors": [
        {
            "email": "contributor@example.com",
            "fullName": "John Doe",
            "creator": true,
            "validator": false,
            "onbehalf": false
        }
    ],
    "messages": [
        {
            "severity": "INFO",
            "isBlocker": true,
            "code": "ITEM_REMOVED"
        }
    ],
    "persistentMessages": [
        {
            "id": "123456789",
            "operation": "BULK_ADD_ITEMS",
            "code": "ITEMS_NOT_ADDED",
            "reasonCode": "PRODUCT_NOT_FOUND",
            "additionalInfo": "related products : [4789651], [9820367], [39852330]"
        }
    ],
    "opcoId": "opco123",
    "orgId": "org123",
    "richSynchronizedOn": "2023-10-01T15:00:00Z",
    "opcoCartId": "opcoCart123",
    "includeAllSpas": false,
    "specialPriceAgreements": [
        {
            "id": "spa123",
            "title": "Special Price Agreement"
        }
    ],
    "project": {
        "id": "project123",
        "name": "Project Name"
    },
    "quote": {
        "id": "quote123",
        "name": "Quote Name",
        "code": "Q123",
        "version": "v1"
    },
    "totalPrice": {
        "amount": 220,
        "scale": 2,
        "currency": "USD"
    },
    "totalPriceExcludingPromotions": {
        "amount": 240,
        "scale": 2,
        "currency": "USD"
    },
    "totalPromotions": {
        "amount": 20,
        "scale": 2,
        "currency": "USD"
    },
    "totalSurchargeTaxes": {
        "amount": 5,
        "scale": 2,
        "currency": "USD"
    },
    "totalPriceIncludingSurcharges": {
        "amount": 225,
        "scale": 2,
        "currency": "USD"
    },
    "totalPriceIncludingSurchargesAndShipping": {
        "amount": 230,
        "scale": 2,
        "currency": "USD"
    },
    "totalShippingCosts": {
        "amount": 10,
        "scale": 2,
        "currency": "USD"
    },
    "totalPriceIncludingTaxes": {
        "amount": 250,
        "scale": 2,
        "currency": "USD"
    },
    "totalPriceAllIncluded": {
        "amount": 260,
        "scale": 2,
        "currency": "USD"
    },
    "totalVatByPercentage": [
        {
            "type": "VAT",
            "surcharge": false,
            "percentage": 10,
            "amount": 25,
            "scale": 2,
            "currency": "USD"
        }
    ],
    "discountDetails": [
        {
            "code": "DISCOUNT10",
            "type": "COUPON",
            "discount": {
                "amount": 10,
                "scale": 2,
                "currency": "USD"
            }
        }
    ]
}

Type: object

Contains information about the event, including the source, version, and scopes.

Type: enum (of string)

Represents the origin of the event.

Must be one of:

  • "SPARK"

Type: enum (of string)

Represents the version of the event schema. It's used to handle changes and evolution of the event structure over time.

Must be one of:

  • "v1"

Type: object

Contains the unique identifier for the logistic order.

Type: string

Cart id. This field is a 64-bit long number represented as a string to avoid unwanted conversions to scientific notation when dealing with the model inside js code

Must match regular expression: ^[0-9]+$
Example:

"17050283147243520"

Type: string

Unique identifier for OpCo.


Example:

"USA-SPRFLD"

Type: string

Cart name. If the name is not filled in, its value will be set to "Shopping Cart".


Example:

"Shopping Cart."

Type: string

OpCo account's identifier from which the cart is created.

Must match regular expression: ^(?=\s*\S).*$
Example:

"4999569661752721026"

Type: string

Commerce organization identifier. Only present if the account includes one.

Must match regular expression: ^(?=\s*\S).*$
Example:

"org1"

Type: stringFormat: date-time

Creation date time of the cart


Example:

"2020-10-12T08:30:22.8045280+00:00"

Type: stringFormat: date-time

transmission date of the cart to the external system


Example:

"2020-10-12T08:30:22.8045280+00:00"

Type: stringFormat: date-time

last modification date time of the cart


Example:

"2020-10-12T14:30:45.1076240+00:00"

Type: stringFormat: date-time

Last date-time of cart rich synchronization with Opco ERP


Example:

"2020-10-12T14:30:50.1076240+00:00"

Address

Type: object

Address to which the billing informations would be sent


Example:

{
    "addressLine1": "chaussée Verlinden 22",
    "addressLine2": "Apartment 2",
    "city": "Bruges",
    "country": "BEL",
    "postalCode": "0287"
}

Type: string

Address unique identifier on spark. Its value must contain a 64-bit long number represented as a string.


Example:

"234564567898789"

Type: string

OpCo internal system's unique identifier for the address.


Example:

"237564557868778"

Type: string

According to ISO 19160 the 1/3 component of the street address. This usually contains the whole address though


Example:

"chaussée Verlinden 22"

Type: string

According to ISO 19160 the 2/3 component of the street address.


Example:

"1st floor"

Type: string

According to ISO 19160 the 3/3 component of the street address.


Example:

"Apparment 2"

Type: string

The city name


Example:

"Bruges"

Type: string

The region name


Example:

"Frandre"

Type: string

The department name


Example:

"NA"

Type: string

Country code

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"Belgium"

Type: string

Postal code


Example:

"0287"

Type: string

Extra description about the address


Example:

"Building site 1"

Type: string

Company name, it might differ from the account name


Example:

"Easy Electric"

Type: string

Address contact's first name


Example:

"John"

Type: string

Address contact's last name


Example:

"Doe"

Type: string

Address contact's Phone number. The phone number is E164 format

Must match regular expression: ^\+[1-9]\d{1,14}$
Example:

"+330287345678"

Type: string

Optional indications or instructions about the delivery


Example:

"Please leave the parcel next the front door"

Type: string

Optional reference about the customer


Example:

"Reference 123"

LogisticDetails

Type: object

Information about the logistic details of the current cart (logistic method, logistic preferences, logistic options, delivery address, facility id)

Type: enum (of string)

Logistic method chosen for the cart

Must be one of:

  • "DELIVERY"
  • "PICK_UP"

Example:

"PICK_UP"

Type: array of enum (of string)

List of supported logistic methods for the current cart. This field is temporary and should only be used in agreement with the C&C team

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: enum (of string)

Must be one of:

  • "DELIVERY"
  • "PICK_UP"

Examples:

"DELIVERY"
"PICK_UP"

Type: string

Unique identifier of the consolidated distribution center facility from which the order will be delivered


Example:

"cdc_erp_id_1"

Type: string

Unique identifier of the facility.


Example:

"395"

Type: string

Name of the facility used.


Example:

"SONEPAR Facility"

Address

Type: object

The address used for delivery when logistic method is 'DELIVERY'


Example:

{
    "addressId": "234564567898789",
    "opCoAddressId": "237564557868778",
    "addressLine1": "chauss�e Verlinden 22",
    "addressLine2": "Apartment 2",
    "city": "Bruges",
    "country": "BEL",
    "postalCode": "0287",
    "addressName": "Building #2",
    "companyName": "Easy Electric",
    "contactFirstName": "John",
    "contactLastName": "Doe",
    "contactPhoneNumber": "+333746573829",
    "deliveryIndication": "Please leave the parcel next the front door.",
    "customerReference": "Ref 364361"
}

Type: string

Address unique identifier on spark. Its value must contain a 64-bit long number represented as a string.


Example:

"234564567898789"

Type: string

OpCo internal system's unique identifier for the address.


Example:

"237564557868778"

Type: string

According to ISO 19160 the 1/3 component of the street address. This usually contains the whole address though


Example:

"chaussée Verlinden 22"

Type: string

According to ISO 19160 the 2/3 component of the street address.


Example:

"1st floor"

Type: string

According to ISO 19160 the 3/3 component of the street address.


Example:

"Apparment 2"

Type: string

The city name


Example:

"Bruges"

Type: string

The region name


Example:

"Frandre"

Type: string

The department name


Example:

"NA"

Type: string

Country code

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"Belgium"

Type: string

Postal code


Example:

"0287"

Type: string

Extra description about the address


Example:

"Building site 1"

Type: string

Company name, it might differ from the account name


Example:

"Easy Electric"

Type: string

Address contact's first name


Example:

"John"

Type: string

Address contact's last name


Example:

"Doe"

Type: string

Address contact's Phone number. The phone number is E164 format

Must match regular expression: ^\+[1-9]\d{1,14}$
Example:

"+330287345678"

Type: string

Optional indications or instructions about the delivery


Example:

"Please leave the parcel next the front door"

Type: string

Optional reference about the customer


Example:

"Reference 123"

Type: string

The cart or the open order identifier at opco system level


Example:

"cart-1615220019126"

Type: boolean Default: false

If its value set to true, then all special price agreements (SPAs) should be included in the price calculation.
If its value set to false, then all SPAs should be excluded in the price calculation.
The presence of specialPriceAgreements array will override this parameter and this parameter should be ignored.


Example:

false

Type: array

Special price agreements

No Additional Items

Each item of this array must be:

SpecialPriceAgreement

Type: object

Special price agreement

Type: string

Identifier of the special price agreement


Example:

"47384781"

Type: string

Title of the special price agreement


Example:

"SPA 1 cheaper than base and SPA 2"

Examples:

{
    "id": "47384781",
    "title": "SPA 1 cheaper than base and SPA 2"
}
{
    "id": "47384782",
    "title": "SPA 2 cheaper than base but more expensive than SPA 2"
}

Project

Type: object

The project associated to the cart

Type: string

Unique identifier of the project


Example:

"47384783"

Type: string

The name of the project


Example:

"StandElec project"

Quote

Type: object

The quote associated to the cart

Type: string

Unique identifier of the quote


Example:

"quote-001"

Type: string

The name of the quote


Example:

"Quote 001"

Type: string

The quote code provided by the OpCo for the Customer. If this field is provided, spark will display it to the customer instead of the quoteId


Example:

"49995666"

Type: string

The version of this quote. Used by some opco system to select the right version of the quote.


Example:

"1"

Type: array

list of items added to the cart. Last added item is in the top

No Additional Items

Each item of this array must be:

Item

Type: object

This object represent a product item into cart

Type: string

Unique Id to identify an item's occurrence in the cart. This field is a 64-bit long number represented as a string to avoid unwanted conversions to scientific notation when dealing with the model inside js code

Must match regular expression: ^[0-9]+$
Example:

"2196602318024039368"

Prices

Type: object

Contains the detail of prices related to the current product and line item

Price

Type: object

This is the product unit price that the customer will pay to the OPCO, without taxes, before applying promotion.


Example:

{
    "amount": 1000,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

List price of the product, to be used/shown in case there is no customer negotiated net price


Example:

{
    "amount": 1000,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: number

Promotion percentage for the net price. No promotion percentage means there is either no promotion, or the promotion is not based on a promotion percentage.


Example:

10

Price

Type: object

This is the product unit price that the customer will pay to the OPCO, without taxes, after applying promotion. No promotional net price on the response means that no promotion is applied to the product


Example:

{
    "amount": 900,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

PromotionDetails

Type: object

Details of the promotion applied to this item


Example:

{
    "campaignId": "7575785",
    "title": "10% de r�duction jusqu'� �puisement du stock",
    "alternateProductId": "9898989"
}

Type: string

Campaign id to which this promotion is associated


Example:

"7575785"

Type: string

A human readable description explaining the promotions eligibility according to chosen language


Example:

"Achetez 3 articles et obtenez 10% de réduction"

Type: string

the alternate product id (Since promotions in cebeo is handled by maintaining 2 different id for normal and promotional product), might not be required by other opcos


Example:

"9898989"

Price

Type: object

This is the product unit price that the customer will pay, without taxes, after applying the quote discount.


Example:

{
    "amount": 900,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

SpecialPriceAgreement

Type: object

Special price agreement applied to this item


Example:

{
    "id": "47384781",
    "title": "SPA 1 cheaper than base and SPA 2"
}

Type: string

Identifier of the special price agreement


Example:

"47384781"

Type: string

Title of the special price agreement


Example:

"SPA 1 cheaper than base and SPA 2"

PriceContext

Type: object

Details about the type of this price.


Example:

{
    "id": "47384781",
    "title": "SPA 1 cheaper than base and SPA 2",
    "type": "SPECIAL_PRICE_AGREEMENT"
}

Type: string

an identifier of the contract or project related to this price


Example:

"7575785"

Type: string

A short title for this price according the selected language of the customer (Accept-Language)


Example:

"Contract schneider"

Type: enum (of string)

The type of this price when set to
- SPECIALPRICEAGREEMENT the id field should contains the contractId
- PROJECT the id field should contains the projectId
- STANDARD the id field can contains any identifier of this price, example the contractId (DEFAULT)
- MARKETPLACE for products that are from marketplace

Must be one of:

  • "SPECIAL_PRICE_AGREEMENT"
  • "PROJECT"
  • "STANDARD"
  • "MARKETPLACE"

Example:

"SPECIAL_PRICE_AGREEMENT"

Type: array

List of taxes to be applied to net price or promotional net price in case of promotion

No Additional Items

Each item of this array must be:

Tax

Type: object

Contains information about a tax. May contain a percentage or a taxAmount or both.

Type: string

The type of the tax.


Example:

"VAT"

Type: boolean

Is the tax applied as a surcharge or not (non-surcharge taxes apply to the price including surcharges).


Example:

false

Price

Type: object

Amount of the tax


Example:

{
    "amount": 2160,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: number

Percentage of the tax


Example:

20

Example:

{
    "type": "VAT",
    "surcharge": false,
    "percentage": 20
}

Price

Type: object

This is the line item price that the customer will pay to the OPCO, without taxes, after applying promotion. Equals (netPrice * quantity) for items without promotion or (promotionalNetPrice * quantity) for items with promotion


Example:

{
    "amount": 1800,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: array

List of taxes to be applied to item price

No Additional Items

Each item of this array must be:

Tax

Type: object

Contains information about a tax. May contain a percentage or a taxAmount or both.

Type: string

The type of the tax.


Example:

"VAT"

Type: boolean

Is the tax applied as a surcharge or not (non-surcharge taxes apply to the price including surcharges).


Example:

false

Price

Type: object

Amount of the tax


Example:

{
    "amount": 2160,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: number

Percentage of the tax


Example:

20

Example:

{
    "type": "VAT",
    "surcharge": false,
    "taxAmount": {
        "amount": 360,
        "scale": 2,
        "currency": "EUR"
    },
    "percentage": 20
}

Price

Type: object

This is the line item price that the customer will pay to the OPCO, including taxes, after applying promotion. Equals (netPrice * quantity + taxes) for items without promotion or (promotionalNetPrice * quantity + taxes) for items with promotion


Example:

{
    "amount": 2160,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: string

The identifier of the line item within the quote in the OpCo system. It can be an alpha numeric value.


Example:

"4999569661752721026"

Type: enum (of string) Default: "PRODUCT"

Different types of line items :
* PRODUCT - when the item contains a product available in spark catalog
* PROMOTION - when the line item is a cart promotion

Must be one of:

  • "PRODUCT"
  • "PROMOTION"
  • "OFFLINE_PRODUCT"

Example:

"PRODUCT"

Type: array of string

A list of item ids related to the current item. In case of promotion, they refer to the items that triggered the promotion

No Additional Items

Each item of this array must be:


Example:

"1234"

Type: enum (of string)

A flag to identify whether the item was added from spark or during the synchronization with opco. An item with null source should be considered as an item added from spark

Must be one of:

  • "SPARK"
  • "OPCO"
  • "MARKETPLACE"

Example:

"SPARK"

Product

Type: object

Details of the product.

Type: string

unique product identifier.


Example:

"9554961192345"

Type: string

This is the local product id could be specific to opcos, most cases it is same as manufacturer id but could be different as well


Example:

"732D16"

Type: object

Offline product details.


Example:

{
    "brandName": "Legrand",
    "productTitle": "BATTERY CABINETS"
}

Type: string

short description of the product


Example:

"LIGHT 274498 Metal Halide Lamp"

Type: string

Brand name


Example:

"SASS"

Type: integer

number of units added to the cart.


Example:

2

Type: array

In Pilot A list of cut items representing the number of same-length cuts of an item

No Additional Items

Each item of this array must be:

LineCuts

Type: object

Represents a line cut

Type: string

The id of the cut

Must match regular expression: ^[0-9]+$
Example:

"17050283147243520"

Type: string

The id of the cut group

Must match regular expression: ^[0-9]+$
Example:

"17050283147243520"

Type: integer

The quantity of cuts for the specified length.

Value must be greater or equal to 1


Example:

3

Type: integer

The length of the cable cut in order unit in the product ordering detail.

Value must be greater or equal to 1


Example:

10

Type: string

The reel option selected by the customer for a cuttable item. Possible values are described here.


Example:

"COILED"

Examples:

{
    "id": "1",
    "cutGroupId": "1",
    "numberOfCuts": 2,
    "length": 3,
    "reelOption": "COILED"
}
{
    "id": "2",
    "cutGroupId": "1",
    "numberOfCuts": 4,
    "length": 2,
    "reelOption": "SPOOLED"
}
{
    "id": "3",
    "cutGroupId": "2",
    "numberOfCuts": 1,
    "length": 10,
    "reelOption": "SPOOLED"
}

Examples:

{
    "id": "47138067260809216",
    "productId": "3675925",
    "itemType": "PRODUCT",
    "source": "SPARK",
    "quantity": 2,
    "prices": {
        "netPrice": {
            "amount": 1000,
            "scale": 2,
            "currency": "EUR"
        },
        "listPrice": {
            "amount": 800,
            "scale": 2,
            "currency": "EUR"
        },
        "promotionalNetPercentage": 10,
        "promotionalNetPrice": {
            "amount": 900,
            "scale": 2,
            "currency": "EUR"
        },
        "promotionDetails": {
            "campaignId": "7575785",
            "title": "10% de réduction jusqu'à épuisement du stock",
            "alternateProductId": "9898989"
        },
        "specialPriceAgreement": {
            "id": "47384781",
            "title": "SPA 1 cheaper than base and SPA 2"
        },
        "context": {
            "type": "SPECIAL_PRICE_AGREEMENT",
            "id": "47384781",
            "title": "SPA 1 cheaper than base and SPA 2"
        },
        "taxes": [
            {
                "type": "VAT",
                "surcharge": false,
                "percentage": 20
            },
            {
                "type": "BEBAT",
                "surcharge": true,
                "taxAmount": {
                    "amount": 100,
                    "scale": 2,
                    "currency": "EUR"
                },
                "percentage": 10
            }
        ],
        "itemPrice": {
            "amount": 1800,
            "scale": 2,
            "currency": "EUR"
        },
        "itemTaxes": [
            {
                "type": "VAT",
                "surcharge": false,
                "taxAmount": {
                    "amount": 400,
                    "scale": 2,
                    "currency": "EUR"
                },
                "percentage": 20
            },
            {
                "type": "BEBAT",
                "surcharge": true,
                "taxAmount": {
                    "amount": 200,
                    "scale": 2,
                    "currency": "EUR"
                },
                "percentage": 10
            }
        ],
        "itemPriceIncludingTaxes": {
            "amount": 2400,
            "scale": 2,
            "currency": "EUR"
        }
    }
}
{
    "id": "47138067260809230",
    "productId": "3675921",
    "itemType": "PRODUCT",
    "source": "OPCO",
    "quantity": 3,
    "prices": {
        "netPrice": {
            "amount": 4000,
            "scale": 2,
            "currency": "EUR"
        },
        "listPrice": {
            "amount": 800,
            "scale": 2,
            "currency": "EUR"
        },
        "taxes": [
            {
                "type": "VAT",
                "surcharge": false,
                "percentage": 30
            }
        ],
        "itemPrice": {
            "amount": 12000,
            "scale": 2,
            "currency": "EUR"
        },
        "itemTaxes": [
            {
                "type": "VAT",
                "surcharge": false,
                "taxAmount": {
                    "amount": 3600,
                    "scale": 2,
                    "currency": "EUR"
                },
                "percentage": 30
            }
        ],
        "itemPriceIncludingTaxes": {
            "amount": 15600,
            "scale": 2,
            "currency": "EUR"
        }
    }
}
{
    "id": "47138067260809450",
    "productId": "3675934",
    "itemType": "OFFLINE_PRODUCT",
    "source": "OPCO",
    "offlineProduct": {
        "brandName": "Legrand",
        "productTitle": "BATTERY CABINETS"
    },
    "quantity": 1,
    "prices": {
        "netPrice": {
            "amount": 500,
            "scale": 2,
            "currency": "EUR"
        },
        "listPrice": {
            "amount": 800,
            "scale": 2,
            "currency": "EUR"
        },
        "taxes": [
            {
                "type": "VAT",
                "surcharge": false,
                "percentage": 30
            }
        ],
        "itemPrice": {
            "amount": 500,
            "scale": 2,
            "currency": "EUR"
        },
        "itemTaxes": [
            {
                "type": "VAT",
                "surcharge": false,
                "taxAmount": {
                    "amount": 150,
                    "scale": 2,
                    "currency": "EUR"
                },
                "percentage": 30
            }
        ],
        "itemPriceIncludingTaxes": {
            "amount": 650,
            "scale": 2,
            "currency": "EUR"
        }
    }
}

Type: array

List of coupons applied to the cart.

No Additional Items

Each item of this array must be:

Coupon

Type: object

This object represents a coupon into cart

Type: string

Unique Id to identify a coupon occurrence in the cart. This field is a 64-bit long number represented as a string to avoid unwanted conversions to scientific notation when dealing with the model inside js code

Must match regular expression: ^[0-9]+$
Example:

"2196602318024039368"

Type: string

The coupon code


Example:

"SONEPAR_BIRTHDAY23"

Type: string

A description of the coupon


Example:

"50% discount on cart because it is our birthday"

Price

Type: object

The discount provided by the coupon


Example:

{
    "amount": 5000,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: boolean

A flag showing whether or not the presence of other coupons is tolerated


Example:

true

Type: array of string

A list of item ids related to the coupon.

No Additional Items

Each item of this array must be:


Examples:

"1234"
"5647"

Type: array

Informations about the coupon

No Additional Items

Each item of this array must be:

Message

Type: object

This object represents a business message to show to the end user. A message could contain either a code or a text.

Type: object

Type: enum (of string)

the severity of the message that could be used to decide on message formatting

Must be one of:

  • "INFO"
  • "WARN"
  • "ERROR"

Example:

"INFO"

Type: boolean

A 'blocker' message prevents the redirection to the checkout page. This flag is set to 'true' when the message requires customer attention.


Example:

true

MessageCode

Type: object

Type: enum (of string)

the code of the message

Must be one of:

  • "ITEM_REMOVED"
  • "ITEM_ADDED"
  • "ITEM_PRICES_CHANGED"
  • "ITEM_QUANTITY_CHANGED"
  • "COUPON_REMOVED"
  • "ITEM_REEL_OPTION_CHANGED"
  • "MULTI_SPA_IN_GROUP_REJECTED"

Example:

"ITEM_REMOVED"

MessageText

Type: object

Type: string

the text of the message


Example:

"we would aim to provide all products to you by tomorrow"

Examples:

{
    "severity": "WARN",
    "isBlocker": false,
    "text": "15? stil remaining before applying coupon"
}
{
    "severity": "WARN",
    "isBlocker": false,
    "text": "The coupon will expire soon"
}

Example:

{
    "id": "47138067260809216",
    "code": "WINTER_2022",
    "description": "Winter is coming! 50? special discount!",
    "discount": {
        "amount": 5000,
        "scale": 2,
        "currency": "EUR"
    },
    "exclusive": true,
    "relatedLineItemsIds": [],
    "messages": [
        {
            "type": "COUPON",
            "severity": "WARN",
            "text": "This coupon cannot be combined with other"
        }
    ]
}

Type: array

The list of cart contributors

No Additional Items

Each item of this array must be:

Contributor

Type: object

Type: string

The contributor's email


Example:

"john.doe@sonepar.com"

Type: string

The contributor's full name


Example:

"John Doe"

Type: boolean

A flag to define whether the contributor is the creator of the cart or not


Example:

true

Type: boolean

A flag to define whether the contributor is a validator of the cart or not


Example:

false

Type: boolean

A flag to define whether the contributor is using an onbehalf session on or not


Example:

false

Examples:

{
    "contactId": "14569778234085376",
    "email": "john.doe@sonepar.com",
    "fullName": "John Doe",
    "creator": true,
    "validator": false,
    "onbehalf": false
}
{
    "email": "jane.doe@sonepar.com",
    "fullName": "Jane Doe",
    "creator": false,
    "validator": true,
    "onbehalf": true
}

Price

Type: object

The total price of all the items added to the cart after applying promotions and coupons, without taxes. This field is included in the response only if the cart contains items.


Example:

{
    "amount": 13800,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

The total price of all the items added to the cart before applying promotions and coupons, without taxes. This field is included in the response only if the cart contains items.


Example:

{
    "amount": 1400,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

The total discount (Promotions + Coupons) applied to the cart. This field is included in the response only if the cart contains items.


Example:

{
    "amount": 7000,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

The surchage taxes of items added to the cart. This field is included in the response only if the cart contains items.


Example:

{
    "amount": 200,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

The total price of all items added to the cart after applying promotions and coupons, including surcharges. This field is included in the response only if the cart contains items.


Example:

{
    "amount": 14000,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

The total price of all items added to the cart after applying promotions and coupons, including taxes except the VAT tax, and shipping cost relative to the logistic choices. This field is included in the response only if the cart contains items.


Example:

{
    "amount": 14015,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

The total of shipping cost relative to the selected option and scenario. This field is calculated by summing the cost related to the option to the cost related to the scenario. This field is included in the response only if the cart contains items.


Example:

{
    "amount": 15,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

The total price of all items added to the cart after applying promotions and coupons, including all taxes. This field is included in the response only if the cart contains items.


Example:

{
    "amount": 18000,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

The total price of all items added to the cart after applying promotions and coupons, including shipping cost, surcharges, and taxes. This field is included in the response only if the cart contains items.


Example:

{
    "amount": 18015,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: array

Total amount of vat applied to items aggregated and sorted in ascending order by vat percentage. This field is included in the response only if the cart contains items and VAT taxes are applied to one or more items.

No Additional Items

Each item of this array must be:

Tax

Type: object

Contains information about a tax. May contain a percentage or a taxAmount or both.

Type: string

The type of the tax.


Example:

"VAT"

Type: boolean

Is the tax applied as a surcharge or not (non-surcharge taxes apply to the price including surcharges).


Example:

false

Price

Type: object

Amount of the tax


Example:

{
    "amount": 2160,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: number

Percentage of the tax


Example:

20

Examples:

{
    "type": "VAT",
    "surcharge": false,
    "taxAmount": {
        "amount": 360,
        "scale": 2,
        "currency": "EUR"
    },
    "percentage": 20
}
{
    "type": "VAT",
    "surcharge": false,
    "taxAmount": {
        "amount": 3600,
        "scale": 2,
        "currency": "EUR"
    },
    "percentage": 30
}

Type: array

Give the detail of all discounts applied to the cart

No Additional Items

Each item of this array must be:

DiscountDetail

Type: object

Type: string

code identifying the discount. Equivalent to 'productId' when the discount is given by a COUPON and 'title' when it is given by PROMOTION


Example:

"WINTER_2022"

Type: enum (of string)

Indicating the type of the discount

Must be one of:

  • "COUPON"
  • "PROMOTION"

Example:

"COUPON"

Price

Type: object

amount of the discount, in absolute value


Example:

{
    "amount": 25000,
    "scale": 2,
    "currency": "EUR"
}

Type: integerFormat: int64

Unscaled price amount


Example:

20000

Type: integerFormat: int32

the scale to be applied on the amount


Example:

2

Type: string

the currency code following ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Example:

{
    "code": "WINTER_2022",
    "type": "COUPON",
    "discount": {
        "amount": 5000,
        "scale": 2,
        "currency": "EUR"
    }
}

Type: array

An array of message to display to the end user related to the cart

No Additional Items

Each item of this array must be:

Message

Type: object

This object represents a business message to show to the end user. A message could contain either a code or a text.

Type: object

Type: enum (of string)

the severity of the message that could be used to decide on message formatting

Must be one of:

  • "INFO"
  • "WARN"
  • "ERROR"

Example:

"INFO"

Type: boolean

A 'blocker' message prevents the redirection to the checkout page. This flag is set to 'true' when the message requires customer attention.


Example:

true

MessageCode

Type: object

Type: enum (of string)

the code of the message

Must be one of:

  • "ITEM_REMOVED"
  • "ITEM_ADDED"
  • "ITEM_PRICES_CHANGED"
  • "ITEM_QUANTITY_CHANGED"
  • "COUPON_REMOVED"
  • "ITEM_REEL_OPTION_CHANGED"
  • "MULTI_SPA_IN_GROUP_REJECTED"

Example:

"ITEM_REMOVED"

MessageText

Type: object

Type: string

the text of the message


Example:

"we would aim to provide all products to you by tomorrow"

Type: array

An array of persistent messages to display to the end user related to the cart

No Additional Items

Each item of this array must be:

PersistentMessage

Type: object

This object contains all mandatory informations to show to the end user persistent message. A persistent message is showed to the user until this last acknowledges it

Type: string

Identifier used to access to the persistent message


Example:

"123456789"

Type: enum (of string)

The operation performed which has raised the message

Must be one of:

  • "BULK_ADD_ITEMS"

Example:

"BULK_ADD_ITEMS"

Type: enum (of string)

The error code

Must be one of:

  • "ITEMS_NOT_ADDED"

Example:

"ITEMS_NOT_ADDED"

Type: enum (of string)

The reason that has made the error happened

Must be one of:

  • "PRODUCT_NOT_FOUND"
  • "PRICE_NOT_FOUND"
  • "TECHNICAL_FAILURE"
  • "PRODUCT_BAD_QUANTITY"
  • "CART_NOT_FOUND"
  • "BULK_ADD_ITEMS_NOT_FOUND"

Example:

"PRODUCT_NOT_FOUND"

Type: string

A short text dealing additional informations about the message


Example:

"related products : [4789651], [9820367], [39852330]"