Generating active code
The function https://api.paczkomaty.pl/?do=revloggenerateactivecode is used to generate one active return code, with which you can send a parcel at the Parcel Locker.
For proper function, use Content-Type:application/x-www-form-urlencoded
Parameters
Parameters to the function should be passed via the POST
method:
Parameter | Description | Example | Validation |
---|---|---|---|
| Login to your InPost account(manager.paczkomaty.pl) |
| Required |
| Login to your InPost account (manager.paczkomaty.pl) |
| Required |
| Structured xml code |
| Required |
Parameters in the paczkomat
section:
Parameter | Description | Example | Validation |
---|---|---|---|
| Unique code for example order. |
| Required |
| Parcel size |
| Required |
| Expiration date of the code |
| Required |
| Phone number of the sender of the return |
| Required |
| Email address of the sender of the return |
| Required |
| Additional information shown on label |
| Not required |
Available parcel sizes for the parameter packType
:
Template name | Dimensions | Weight |
---|---|---|
| 8 x 38 x 64 cm | do 25 kg |
| 19 x 38 x 64 cm | do 25 kg |
| 41 x 38 x 64 cm | do 25 kg |
Parameters in the address
section - address data of the parcel delivery location.
The parameters are required if the address
section is passed in the query.
If the address
section is not passed, the address from the https://manager.paczkomaty.pl/ system will be assigned to the return code.
Parameter | Description | Example | Validation |
---|---|---|---|
| Company name |
| Not required |
| First name or Company name |
| Required |
| Last name or Company name |
| Required |
| Recipient's email address |
| Not required |
| Recipient's phone number |
| Not required |
| Street |
| Required |
| Building number |
| Required |
| Flat number |
| Required |
| Zip code |
| Required |
| Town |
| Required |
| Province |
| Not required |
Parameters in the section return
- Response from the API:
Parameter | Description | Example |
---|---|---|
| Sending code |
|
| Expiration date of the code |
|
| Package size |
|
| Return code status (Only an active return code can be used at Parcel Locker to send a package) |
|
| Unique code e.g. order |
|
| Additional information visible on the label |
|
| Address data of the parcel delivery location |
|
| - |
|
| - |
|
Request:
POST /?do=revloggenerateactivecode HTTP/1.1
Host: api.paczkomaty.pl
Content-Type: application/x-www-form-urlencoded
email=test@inpost.pl&password=Password123!@&content=
<paczkomaty>
<rma>4321</rma>
<packType>A</packType>
<expirationDate>2022-10-10T11:00:00</expirationDate>
<senderPhone>333222111</senderPhone>
<senderEmail>szybkie.zwroty@inpost.pl</senderEmail>
<returnDescription1>Zamówienie:312</returnDescription1>
<address>
<name>InPost</name>
<surName>Paczkomat</surName>
<email>test@inpost.pl</email>
<phoneNum>321321321</phoneNum>
<street>Cybernetyki</street>
<buldingNo>10</buldingNo>
<flatNo>4</flatNo>
<zipCode>02-677</zipCode>
<town>Warszawa</town>
<province>Mazowieckie</province>
</address>
</paczkomaty> |
Response:
<?xml version="1.0" encoding="UTF-8"?>
<paczkomaty>
<return>
<code>1240616893</code>
<expirationDate>2022-10-10T11:00:00+02:00</expirationDate>
<packType>A</packType>
<active>true</active>
<rma>4321</rma>
<returnDescription1>Zamówienie:312</returnDescription1>
<targetAddress>
<buildingNo>10</buildingNo>
<buldingNo>10</buldingNo>
<email>test@inpost.pl</email>
<flatNo>4</flatNo>
<name>InPost</name>
<phoneNum>321321321</phoneNum>
<province>Mazowieckie</province>
<street>Cybernetyki</street>
<surName>Paczkomat</surName>
<town>Warszawa</town>
<zipCode>02-677</zipCode>
</targetAddress>
<uuid>ae1e2449-30b2-483c-84dd-884f3438f65b</uuid>
<labelAttached>false</labelAttached>
</return>
</paczkomaty> |