Creating an order

Creating an order

The method for creating an order

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/order

Parameters - none

Request

Field name

Description

Type

Requirement status

Additional remarks

order_details

The data for creating an order

object

Y

 

order_details.order_comments

Additional information about an order

string

O

"comments":"Zamówienie test"

order_details.basket_id

Identifier of the basket assigned by the Merchant based on which the order is to be created

string

Y

"basket_id":"4734da95-458b-44da-8d6e-854b2e501066"

order_details.currency

Currency. Currently, only PLN

string

Y

"currency":"PLN"

order_details.basket_price

The total estimated value of the basket along with the delivery costs

object

Y

 

order_details.basket_price.net

Net

number ($decimal)

Y

"basket_price":{"net":584.62,"gross":584.62,"vat":0}

order_details.basket_price.gross

Gross

number ($decimal)

Y

order_details.basket_price.vat

VAT

number ($decimal)

Y

order_details.payment_type

The payment form chosen by the user. Enum forms available:

[ CARD, CARD_TOKEN, GOOGLE_PAY, APPLE_PAY, BLIK_CODE, BLIK_TOKEN, PAY_BY_LINK, SHOPPING_LIMIT, DEFERRED_PAYMENT, CASH_ON_DELIVERY ]

string

Y

"payment_type":"PAY_BY_LINK"

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

 

order_details.basket_additional_parameters.key

Key

string

Y

 

order_details.basket_additional_parameters.value

Value

string

Y

 

account_info

Information about the account used

object

Y

 

account_info.name

First name

string

Y

"name":"Jan"

account_info.surname

Last name

string

Y

"surname":"Kowalski"

account_info.phone_number

Telephone number

object

Y

 

account_info.phone_number.country_prefix

Prefix

string

Y

"phone_number":{"country_prefix":"+48","phone":"200000000"}

account_info.phone_number.phone

User's phone number

string

Y

account_info.mail

Mail

If the user logs in to InPost Pay with the use of Apple, the e-mail address of the account includes the hash assigned by Apple, and has the form of, for instance, abc@privaterelay.appleid.com. For the Merchant to communicate with the customers using this address, the Merchant's domain must be added on the InPost account in Apple. Apple limits the number of domains assigned to an account down to 100. Hence, InPost transfers the e-mail address abc@mail.inpostpay.pl to the Merchant with the same hash, but in the mail.inpostpay.pl domain.

string

Y

"mail":"jan.nowak@t...l"

account_info.client_address

User's address

object

Y

 

account_info.client_address.country_code

Country code

string

Y

"client_address":{"country_code":"PL","city":"POZNAN","address":"Testowa 100","postal_code":"00-000","address_details":{"street":"Testowa","building":"100"}}

account_info.client_address.address

Address

string

Y

account_info.client_address.city

City

string

Y

account_info.client_address.postal_code

Postal code

string

Y

account_info.client_address.address_details

An object for transferring an unparsed address

object

O

account_info.client_address.address_details.street

Street

string

O

account_info.client_address.address_details.building

Building number

string

O

account_info.client_address.address_details.flat

Apartment number

string

O

invoice_details

Invoice data

object

O

 

invoice_details.legal_form

Legal form Enum: [PERSON, COMPANY]

string

O

"invoice_details":{"legal_form":"COMPANY","country_code":"PL","tax_id":"0000000000","company_name":TEST","city":"Warszawa","street":"ul. Krakowska","building":"10A","postal_code":"00-000","mail":"test@m..l","registration_data_edited":"true"}

invoice_details.country_code

Country code

string

O

invoice_details.tax_id_prefix

Id prefix

string

O

invoice_details.tax_id

tax identifier

string

O

invoice_details.company_name

Company name

string

O

invoice_details.name

First name

string

O

invoice_details.surname

Last name

string

O

invoice_details.city

City

string

O

invoice_details.street

Street

string

O

invoice_details.building

Building number

string

O

invoice_details.flat

Apartment number

string

O

invoice_details.postal_code

Postal code

string

O

invoice_details.mail

Mail

string

O

invoice_details.registration_data_edited

Registration date

string

O

invoice_details.additional_information

Additional information

string

O

delivery

Delivery Information

object

Y

 

delivery.delivery_type

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

APM – parcel locker device, COURIER – Inpost courier, DIGITAL – digital delivery

string

Y

"delivery_type":"APM"

delivery.delivery_codes

Selected delivery options - list

array

O

"delivery_codes":["PWW"]

delivery.mail

Mail

If the user logs in to InPost Pay with the use of Apple, the e-mail address of the account includes the hash assigned by Apple, and has the form of, for instance, abc@privaterelay.appleid.com. For the Merchant to communicate with the customers using this address, the Merchant's domain must be added on the InPost account in Apple. Apple limits the number of domains assigned to an account down to 100. Hence, InPost transfers the e-mail address abc@mail.inpostpay.pl to the Merchant with the same hash, but in the mail.inpostpay.pl domain.

string

O

"mail":"test@m..m"

delivery.digital_delivery_email

The email address to which the digital product should be sent

string

O

"digital_delivery_email":"jankowalski@g...m"

delivery.phone_number

Telephone number

object

O

 

delivery.phone_number.country_prefix

Prefix

string

Y

"phone_number":{"country_prefix":"+48","phone":"600000000"}

delivery.phone_number.phone

Number

string

Y

delivery.delivery_point

Automatic parcel locker delivery site

string

O

"delivery_point":"RSL218"

delivery.delivery_address

Delivery address

object

O

 

delivery.delivery_address.name

Name

string

Y

"name":"Jan Kowalski"

delivery.delivery_address.country_code

Country code

string

O

"country_code":"PL"

delivery.delivery_address.address

Address

string

Y

"address":"SW.Jana 100"

delivery.delivery_address.city

City

string

Y

"city":"POZNAN"

delivery.delivery_address.postal_code

Postal code

string

Y

"postal_code":"11-005"

address_details

Unparsed address

object

O

 

address_details.street

Street

string

O

"address_details":{"street":"Swmichala","building":"100"}

address_details.building

Building number

string

O

address_details.flat

Premises number

string

O

delivery.courier_note

Notes for the courier

string

O

"courier_note ":"Proszę o przekazanie przesyłki po godzinie 16"

consents

An object intended to transfer information related to the consents expressed by the customer for a given order

array

Y

 

consents.consent_id

consent Id

string

Y

"consent_id":3

consents.consent_version

Consent version

string

O

"consent_version":1

consents.is_accepted

Info, whether or not the consent has been expressed

boolean

Y

"is_accepted": true

Response

Field name

Description

Type

Requirement status

Additional remarks

order_details

Order details

object

Y

 

order_details.order_comments

Comments about the order

string

O

"comments ": "Zamówienie przetwarzane"

order_details.order_id

Order ID assigned by the Merchant

string

Y

"order_id":"3433d1b7-fd9b-484b-aa68-80fccc575407"

order_details.customer_order_id

Order ID presented to the customer and used for payment. If missing, the order_id is used

string

O

"customer_order_id":"3433d1b7”

order_details.pos_id

POS id

string

Y

"pos_id":"V000000000"

order_details.order_creation_date

Date when the order was created

string($date-time)

Y

"order_creation_date":"2023-09-07T14:18:41.949Z"

order_details.basket_id

Basket ID on the basis of which the order was created

string

Y

"basket_id":"f55646f7-5773-0009-d8ba-000064fae5e1"

order_details.payment_type

Selected payment method. Enum:

[ CARD, CARD_TOKEN, GOOGLE_PAY, APPLE_PAY, BLIK_CODE, BLIK_TOKEN, PAY_BY_LINK, SHOPPING_LIMIT, DEFERRED_PAYMENT, CASH_ON_DELIVERY ]

string

Y

"payment_type":"BLIK_CODE"

order_details.order_merchant_status_description

Descriptive status presented to the customer in the InPost Pay app - each Merchant can transfer the status so that the statuses presented in InPost Mobile are consistent with the statuses presented to the customer in the Merchant's store.

string

Y

"order_merchant_status_description": "W trakcie realizacji"

order_details.order_base_price

Price for the order excluding delivery costs

object

Y

 

order_details.order_base_price.net

Net

number ($decimal)

Y

"order_base_price":{"net":202.51,"gross":263.0,"vat":60.49},

order_details.order_base_price.gross

Gross

number ($decimal)

Y

order_details.order_base_price.vat

VAT

number ($decimal)

Y

order_details.order_final_price

Price per order including delivery costs

object

Y

 

order_details.order_final_price.net

Net

number ($decimal)

Y

"order_final_price":{"net":208.2,"gross":270.0,"vat":61.8}

order_details.order_final_price.gross

Gross

number ($decimal)

Y

order_details.order_final_price.vat

VAT

number ($decimal)

Y

order_details.order_discount

Value of discount codes applied to the order

number($decimal) 

"order_discount": 20.2

order_details.currency

Order currency (currently only PLN)

string

Y

"currency":"PLN"

order_details.delivery_references_list

List of assigned order shipment numbers

array

O

"delivery_references_list":[12345678]

order_details. order_additional_parameters

An object used to pass additional order parameters that are saved in order details. Merchant can use the object, for example, to save parameters that will allow to identify/link the order to the campaign. The additional parameters are not presented in the application.

array

O

 

order_details. order_additional_parameters.key

Key

string

Y

 

order_details. order_additional_parameters.value

Value

string

Y

 

account_info

User account information

object

Y

 

account_info.name

First name

string