After selecting the product, you need to download the entire dictionary of add-ons available for the product (endpoint: Get addons for product) passing parameters:
product ID: productId
the same dimensions, dimensions, and number of packages as for the product search (the system will calculate the appropriate surcharge amounts)
the same country IDs and postal codes (the system will adjust and calculate the appropriate surcharge amounts)
optionally, you can add COD and insurance parameters to select the appropriate surcharge and amount to match the COD and insurance values
In response, we'll receive a list of all add-ons that meet the parameters. From the list of responses, select the add-ons you'd like to order. The response contains key information:
add-on ID: id
name: addonName
description: description
net price: price
gross price: priceGross
currency: currency
category: category
whether an add-on is required for the order: isRequired
returnLink - general address to which the user should be redirected from the payment gateway, e.g. "https://test-url.com"
returnSuccessLink - optionally, the address to which the user should be redirected from the payment gateway after successful payment, e.g. "https://test-url.com/success"
returnFailureLink - optionally, the address to which the user should be redirected after an incorrect payment from the payment gateway, e.g. "https://test-url.com/failure"
payment other than prepaid must be made after the order is placed
At each stage of collecting data for placing an order, you can verify the accuracy of the data (e.g. after collecting address data). This saves the customer time when trying to place an order and correcting data. Endpoint: Partial order validation
Once all data has been validated and the user has confirmed all the summaries, an order can be created in the system. Endpoint Create order: Key elements sent in the body:
in the shipment section: dimensions, overall dimensions, number of packages as when searching for products, productId - the exact ID selected by the user.
in the senderAddress section:
countryId - country id as in product search
pointId - code of the point / PUDO / terminal where the shipment will be sent (if applicable for the selected product) - optional.
in the receiverAddress section:
countryId - country id as in product search
pointId - code of the point / PUDO / terminal where the shipment will be collected (if applicable for the selected product) - mandatory.
in the general section:
content - contents of the shipment
paymentId - payment method (for prepaid: id=3 or id=9) the shipment will be paid immediately and a waybill will be generated, for id=2 - online - payment integration must be completed - point 7)
agreements - consents are required to process the order. Currently required consents can be retrieved via the endpoint.: Get agreements for the filters parameter[module] = order e.g.
"receiveElectronicBills": true,
"processingPersonalData": true },
in the addons section exactly the same additional services as in the quote. The IDs of additional services are crucial.
After generating the order, the response will contain information about the order number and the order hash. These numbers are used for further processing.