Courier management

Through courier management, it is possible to define the courier's authentication data and at the same time define the list of AlzaBoxes for which these authentication data will be valid with combination of the AlzaBoxes' access type,

  • To create a new access, use endpoint /courier and the HTTP verb POST.

  • To update the data for the courier, i.e. when you want to change the PIN or when you want to change the list of boxes to which he should have access or you want to change access type, also use the endpoint /courier, but the HTTP verb PATCH.

  • If you want to add the courier's access to all boxes, use the same endpoint and also the HTTP verb PATCH, but do not specify any in the alzabox list and use FULL access type.

  • If you want to remove the courier's access to all boxes, use the same endpoint and also the HTTP verb PATCH, but do not specify any in the alzabox list.

  • If you want to add boxes to the courier to which he does not yet have access, you must provide a list of all alzaboxes, i.e. those he already had and those you want to add.

  • If you want to delete a courier access, you must use endpoint /courier and PATCH list of none alzaboxes

  • Since the API allows for the creation of both login and password with upper and lower case letters, it's important to note that the application in the Alzaboxes operates case insensitively, and the letter case provided in the API doesn't matter.

Couriers can log in to alzabox by scanning a QR code with his access details

If you want the couriers to log in by the QR, use this format for creating it:

<PartnerID>0x1F<CourierLogin>0x1F<CourierPin>

Where you should replace <> with the following variables:

  • <PartnerID> - Static code AlzaBox system generates to recognize the partner in our system. If you haven’t received one, contact us for support.

  • <CourierLogin> - ID of the courier. This is defined by the partner and cannot be changed later on (similarly to an email address). Thanks to that we can find out in the logs which courier handled which shipment. Each partner can create as many unique Logins as he needs.

  • <CourierPin> Partner-defined password to strengthen AB login security. The password is assigned to the each Login and can be changed. If the password is not filled in, the courier logs in only with his Login.

  • To separate individual parts, we use the unprinted ASCII character 31 (0x1F) Unit Separator. You can find more info about the character here.

  • Don't encode the <> signs, as those just indicates variables that shouls be used in the QR.

Image of the QR example

Suppose we want to generate a QR code for the following values:

<PartnerID> = 1, <CourierLogin> = 123456 and <CourierPin> = 123456.

To generate it, we can proceed as follows:

  1. Go to ASCII to Hex | Text to Hex Code Converter and convert 1123456123456 (<PartnerID><CourierLogin><CourierPin>) to hexadecimal format.
    The result is 31 31 32 33 34 35 36 31 32 33 34 35 36.

  2. Then we add the character 1F to the hexadecimal code in the right places (<PartnerID>1F<CourierLogin>1F<CourierPin>).
    The result is 31 1F 31 32 33 34 35 36 1F 31 32 33 34 35 36

  3. We will convert this result to ASCII text (Hex to ASCII Text String Converter).
    The result is the string 1123456123456

  4. We then copy the ASCII text into the QR generator QRCode Monkey - The free QR Code Generator to create custom QR and generate the resulting QR code.

  5. We can verify the validity of the QR code, for example, using the barcode reader application from TeaCapps (QR & Barcode Reader - Apps on Google Play), which should display the string - 1␟123456␟123456 after scanning.

You can use any proces or platform as you like, but the result will has to be the same as is the image od the QR example

 

Example request for create a new courier’s access with specific boxes

{ "data": { "courier": { "login": "123456", "pin" : "121223" "boxesAccessType": "SPECIFIC", "boxes": [ { "id": "65431" }, { "id": "65432" } ] } } }

Example request for create a new courier’s access with all boxes

{ "data": { "courier": { "login": "123456", "pin" : "121223" "boxesAccessType": "FULL" } } }

Example request for disable access

{ "data": { "courier": { "login": "123456", "boxesAccessType": "SPECIFIC", "boxes": [] } } }