Basket Update

Basket Update

A method used to pass basket updates made by the customer in the InPost Pay app. Upon receiving an event informing the Merchant of a change in the basket, the Merchant in response should send the entire updated basket.

For this method, we require the implementation of all the fields listed in the table, as they make up the entirety of the InPost Pay service. Some of the following fields in the 'Required' column are marked as 'O', i.e. optional, due to the fact that not all products/baskets in online stores have all parameters assigned, so a basket can be created and an order placed without them. However, the implementation/deployment of all fields is REQUIRED from a business perspective.

POST /v1/izi/basket/{basket_id}/event

Parameters

 

Field name

Description

Type

Requirement status

Additional remarks

basket_id

Unique basket identifier assigned by the merchant

string

Y

 

Request

Field name

Description

Type

Requirement status

Additional remarks

event_id

Event ID

 string

 Y

 

event_data_time

Date and time when the event occurred

 string($date-time)

 Y

 

event_type

Event type.

Enum:

[ PRODUCTS_QUANTITY, PROMO_CODES, RELATED_PRODUCTS ]

 

PRODUCTS_QUANTITY – change of product quantity

PROMO_CODES – addition/update/deletion of promo code

RELATED_PRODUCTS – addition of a suggested product

 string

 Y

 

phone_number

Information about the user number to which the basket is linked

 object

 O

 

phone_number.country_prefix

Prefix

 string

 Y

 

phone_number.phone

Phone number

 string

 Y

 

quantity_event_data

An object that returns details of the PRODUCTS_QUANTITY event

 

 O

 

quantity_event_data.product_id

Product identifier assigned by the merchant

string

Y

"product_id": 26

quantity_event_data.quantity

An object used to pass information about the quantity of the product

object

Y

 

quantity_event_data.quantity.quantity

Product quantity

number ($decimal)

Y

"quantity":1

quantity_event_data.quantity.quantity_type

Type of quantity field. Available values Enum:[ DECIMAL, INTEGER ]

If the quantity_type of the product is INTEGER, then the Merchant sends the price for 1 unit of the product. If the quantity_type of the product is DECIMAL, then the Merchant sends the price for the selected quantity of the product.  

·       Example 1) We have 5 shirts at a price of PLN 10 per piece. In this case quantity_type is INTEGER and the price of the product is PLN 10.

·       Example 2) We have 0.35 kg of flour at a price of PLN 5. In this case, quantity_type is DECIMAL and the price of the product is PLN 5.

string

O

"quantity_type":"INTEGER"

quantity_event_data.quantity.quantity_unit

Product quantity unit

string

O

"quantity_unit":"pcs"

quantity_event_data.quantity.available_quantity

Quantity of the product available in the store

number ($decimal)

O

"available_quantity":26

quantity_event_data.quantity.max_quantity

The maximum quantity of a product that a customer can order, e.g. in a single order

number ($decimal)

O

"max_quantity":26

promo_codes_event_data

An object that returns details of PROMO_CODES event

 object

O

 

promo_codes_event_data.name

Code name. This field is not required in the next version of the application.

string

Y

"name ": "Promotion 5%"

promo_codes_event_data.promo_code_value

Promo code

string

Y

"promo_code_value": "INPOST10"

related_products_event_data

Object that returns the details of the RELATED_PRODUCTS event

 object

O

 

related_products_event_data.product_id

Product identifier assigned by the merchant

string

Y

"product_id": 26

related_products_event_data.ean

Ean

string

O

"ean":"0"

related_products_event_data.quantity

An object used to pass information about the quantity of the product

object

Y

 

related_products_event_data.quantity.quantity

Product quantity

number ($decimal)

Y

"quantity":1

related_products_event_data.quantity.quantity_type

Type of quantity field . available values Enum: [ DECIMAL, INTEGER ]

string

O

"quantity_type":"INTEGER"

related_products_event_data.quantity.quantity_unit

Product quantity unit

string

O

"quantity_unit":"pcs"

related_products_event_data.quantity.available_quantity

Quantity of the product available in the store

number ($decimal)

O

"available_quantity":26

related_products_event_data.quantity.max_quantity

The maximum quantity of a product that a customer can order, e.g. in a single order

number ($decimal)

O

"max_quantity":26

 

Response

Field name

Description

Type

Requirement status

Additional remarks

summary

Object used to provide basic details about the basket

object

Y

 

summary.basket_base_price

Object used to pass the base price for the basket without delivery costs

object

Y

 

summary.basket_base_price.net

Net price

number ($decimal) (10,2)

Y

"summary":{"basket_base_price":{"net":"250.00","gross":"307.50","vat":"57.5

summary.basket_base_price.gross

Gross price (net + VAT)

number ($decimal) (10,2)

Y

summary.basket_base_price.vat

VAT

number ($decimal) (10,2)

Y

summary.basket_final_price

An object used to pass the final price of a basket with a promotion and discount code included on the basket, without delivery costs.
The value of the discount on the basket resulting from the application of the code (a promotional code that is not regulated by the OMNIBUS Directive), shown in the basket summary, will be the difference between promo_price and final_price or base_price and final_price, if the basket is not covered by a promotion.

object

O

 

summary.basket_final_price.net

Net price

number ($decimal) (10,2)

Y

"basket_final_price":{"net":"220.00","gross":"270.60","vat":"50.60"}

summary.basket_final_price.gross

Gross price (net + VAT)

number ($decimal) (10,2)

Y

summary.basket_final_price.vat

VAT

number ($decimal) (10,2)

Y

summary.free_basket

The flag indicating whether the basket without delivery costs is free.

boolean

O

 

summary.basket_promo_price

An object for passing the price of a basket with a promotion included for the basket, but without an applied discount code and without delivery costs.

object

O

 

summary.basket_promo_price.net

Net price

number ($decimal) (10,2)

Y

"basket_promo_price":{"net":"220.00","gross":"270.60","vat":"50.60"}

summary.basket_promo_price.gross

Gross price (net + VAT)

number ($decimal) (10,2)

Y

summary.basket_promo_price.vat

VAT

number ($decimal) (10,2)

Y

summary.currency

Basket currency. The only currency currently supported is PLN

string

Y

"currency":"PLN"

summary.basket_expiration_date

Basket expiration/validity date. This is the date after which the basket will be automatically removed from the InPost Pay app (will expire). The date cannot be a past date.

string($date-time)

O

"basket_expiration_date":"2023-09-13T07:40:53.000Z"

summary.basket_additional_information

This field is used to provide additional information about the basket that, from the merchant's point of view, may be relevant to the customer

string

O

"basket_additional_information": "Order today, and receive a discount code for future purchases"

summary.payment_type

Preferred payment method for the basket. The merchant passs a list of preferred payment methods for the basket from which the customer can then select payment methods when creating an order. If an empty list is passed, the customer will be presented with a default list of payments according to the merchant's configuration in the payment gateway and CASH_ON_DELIVERY when "delivery_code_value" ="COD" has been passed for the relevant delivery option in "delivery".

List with possible payment types: [ CARD, CARD_TOKEN, GOOGLE_PAY, APPLE_PAY, BLIK_CODE, BLIK_TOKEN, PAY_BY_LINK, SHOPPING_LIMIT, DEFERRED_PAYMENT, CASH_ON_DELIVERY ]

object

Y

"payment_type":["CARD","CARD_TOKEN","APPLE_PAY","BLIK_CODE","BLIK_TOKEN","PAY_BY_LINK","SHOPPING_LIMIT","DEFERRED_PAYMENT","GOOGLE_PAY"],

summary.basket_notice

An object with additional information about the basket that the merchant wants to provide to the customer in the InPost Pay app

object

O

 

summary.basket_notice.type

Type of information. There are two types of information based on which the application will present the appropriate format of the message Enum: [ ATTENTION, ERROR ]:

ATTENTION – used when we want to inform the customer about important information on the basket, such as the application of a promotional code, the addition of a free product, etc.

ERROR – used when some action on the basket failed, such as an invalid promo code or a failed attempt to add a suggested product.

 

string

Y

"type":"ATTENTION"

summary.basket_notice.description

The contents of the message presented to the customer in the InPost Pay app for the relevant notice.type

string

Y

"description": "the code has been activated"

summary.basket_additional_parameters

An object used to pass additional basket parameters that are saved in the basket details during basket creation/update. The Merchant can use this object, for example, to save parameters that will enable identification/association of the basket with a campaign. Additional parameters are not displayed in the application.

array

O

 

summary.basket_additional_parameters.key

Key

string

Y

 

summary.basket_additional_parameters.value

Value

string

Y

 

delivery

An object used to provide information about the preferred delivery options for the relevant basket

array

Y

 

delivery.delivery_type

Delivery option. Enum:[ APM, COURIER, DIGITAL ].  

APM – automated parcel machine, COURIER – InPost courier service 
DIGITAL – digital delivery

string

Y

"delivery_type":"APM"

delivery.delivery_date

Suggested delivery date

string($date-time)

Y

"delivery_date":"2023-09-14T12:00:00.000Z"

delivery.delivery_options

An object used for passing additional delivery options.  Currently, two additional delivery options are available:

PWW – weekend parcel

COD – cash on delivery. If the CASH_ON_DELIVERY value is passed for the relevant basket in payment_type, it is mandatory to pass COD as an additional delivery option