Fetching an order list
This article describes a method that returns information about orders created in the InPost application, along with an example of how to implement the method in PHP.
On this page:
Description of the method
A method that returns information about orders created in the InPost Pay application. This method is not used in the process of linking and handling of baskets/orders by the customer.
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.
Parameters
Field name | Description | Type | Requirement status | Additional remarks |
| Page index | string | O |
|
| Page size | string | O |
|
| Order ID | string | O |
|
Request – none
Response
Field name | Description | Type | Requirement status | Additional remarks |
| Page size | integer | O |
|
| Total number of items | integer | O |
|
| Page index | integer | O |
|
| An object that returns a list of orders | object | O |
|
| Order details | object | Y |
|
| Comments about the order | string | O |
|
| Order ID assigned by the Merchant | string | Y |
|
| Order ID presented to the customer and used for payment. If missing, the order_id is used. | string | O |
|
| POS id | string | Y |
|
| Date when the order was created | string($date-time) | Y |
|
| Last date when the order was updated | string($date-time) | O |
|
| An object that returns payment information | object | O |
|
| 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 status Enum:[ UNPAID, STARTED, PENDING, AUTHORIZED, DECLINED, CANCELLED, ERROR, COD ] | string | Y |
|
| Payment methods available for the relevant order. List with possible values : [ CARD, CARD_TOKEN, GOOGLE_PAY, APPLE_PAY, BLIK_CODE, BLIK_TOKEN, PAY_BY_LINK, SHOPPING_LIMIT, DEFERRED_PAYMENT, CASH_ON_DELIVERY ]
| array | O |
|
| Payment details | object | O |
|
| Reference number | string | Y |
|
| Payment ID | string | O |
|
| Security token used | string | O |
|
| Type of payment | string | Y |
|
| Card token | string | O |
|
| Card information | object | O |
|
| Last 4 digits of the card | string | O |
|
| The scheme in which the card operates | string | O |
|
| Card type [ DEBIT, CREDIT, PREPAID, CHARGE, DEFERRED_DEBIT ] | string | O |
|
| Payment status | string | O |
|
| Payment code | string | O |
|
| Additional information about the payment | string | O |
|
| Error code | string | O |
|
| Payment message (code) | string | O |
|
| Transaction date | string($date-time) | O |
|
| Technical status – used to determine the permissions that the customer can exercise on the order in the InPost Pay application. There are 3 technical statuses:
| string | Y |
|
| 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 |
|
| Price for the order excluding delivery costs | object | Y |
|
| Net | number ($decimal) | Y |
|
| Gross | number ($decimal) | Y | |
| VAT | number ($decimal) | Y | |
| Price per order including delivery costs | object | Y |
|
| Net | number ($decimal) | Y |
|
| Gross | number ($decimal) | Y | |
| VAT | number ($decimal) | Y | |
| Value of discount codes applied to the order | number($decimal) | Y |
|
| Order currency (currently only PLN) | string | Y |
|
| List of assigned order shipment numbers | array | O |
|
| An object with additional order parameters saved in the order details and passed by the Merchant upon creation/update of the order. | array | O |
|
| Key | string | Y |
|
| Value | string | Y |
|
| User account information | object | Y |
|
| First name | string | Y |
|
| Last name | string | Y | |
| Phone number | object | Y | |
| Prefix | string | Y | |
| User phone number | string | Y | |
| E-mail address of the InPost Pay application user. Merchant can use the above e-mail address only for the purposes of setting up a customer account, user verification, etc. If the user logs in to InPost Pay using Apple, the account's email address contains the hash assigned by Apple and is passed in the following form: abc@privaterelay.appleid.com, for example. In order for a Merchant to communicate with a customer using this address, the Merchant's domain must be added to the InPost account in Apple. Apple limits the number of domains that may be assigned to an account to 100. Therefore, InPost forwards the e-mail address abc@mail.inpostpay.pl to Merchant with the same hash, but in the domain mail.inpostpay.pl. | string | Y |
|
| User address | object | Y |
|
| Country code | string | Y |
|
| Address | string | Y | |
| City | string | Y | |
| Postal code | string | Y | |
| Invoice details | object | O |
|
| Legal form [ PERSON, COMPANY ] | string | O |
|
| Country code | string | O | |
| ID prefix | string | O | |
| Tax ID | string | O | |
| Company name | string | O | |
| First name | string | O | |
| Last name | string | O | |
| City | string | O | |
| Street name | string | O | |
| Building number | string | O | |
| Flat number | string | O | |
| Postal code | string | O | |
| string | O | ||
| Registration date | string | O | |
| Additional information | string | O | |
| Delivery information | object | Y |
|
| Delivery option. Enum:[ APM, COURIER, DIGITAL ]. APM – automated parcel machine, COURIER – InPost courier service | string | Y |
|
| Delivery date | string($date-time) | Y |
|
| Selected delivery options | array | O |
|
| Name | string | Y |
|
| Option code | string | Y | |
| Amount of delivery option | object | Y | |
| Net | number ($decimal) | Y | |
| Gross | number ($decimal) | Y | |
| VAT | number ($decimal) | Y | |
| The masked e-mail address of the user in the order.inpostpay.pl domain, which the Merchant must mandatorily use to handle the created order, in particular registration/shipping (the parcel should be shipped to the e-mail from delivery.mail, which will enable its proper monitoring and to link the created order in InPost Pay with the parcel shipped for the order). | string | O |
|
| The e-mail address to which the digital product is to be sent. Passed only if there is a digital product in the basket. If the address contains a hash assigned by Apple and is in the form of abc@privaterelay.appleid.com, for example. In order for the Merchant to communicate with a customer using this address, the Merchant's domain must be added to the InPost account in Apple. Apple limits the number of domains that may be assigned to an account to 100. Therefore, InPost forwards the e-mail address abc@mail.inpostpay.pl to Merchant with the same hash, but in the domain mail.inpostpay.pl. | string | O |
|
| Phone number | object | O |
|
| Prefix | string |