2. Overall Description
BASE_URL=https://api.speedy.bg/v1
2.1. Shipment Service
Web service URL: BASE_URL/shipment
2.1.1.1. Create Shipment Request (CreateShipmentRequest)
Method: POST
Content-type: application/json;
charset=utf-8
Input parameters:
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
id |
String |
No |
Shipment id |
Shipment ID from provided range. If shipment ID is empty the system will generate and return it in response |
sender |
ShipmentSender |
No |
Defines the sender of the shipment and shipment's pickup place. If not specified, the logged user is considered as a sender. |
|
recipient |
ShipmentRecipient |
Yes |
Defines the recipient of the shipment and shipment’s delivery place. |
|
service |
ShipmentService |
Yes |
Defines shipment service level agreement. |
|
content |
ShipmentContent |
Yes |
Defines shipment’s content - number of parcels, weight, size, etc. |
|
payment |
ShipmentPayment |
Yes |
Defines who-pays-what in shipment and other payment parameters. |
|
shipmentNote |
String |
No |
Customer’s note associated with the shipment. |
200 characters |
ref1 |
String |
No |
Reference number or text. |
30 |
ref2 |
String |
No |
Reference number or text. |
30 |
consolidationRef |
String |
No |
Consolidation reference number or text. |
30 |
requireUnsuccessfulDeliveryStickerImage |
Boolean |
No |
Require unsuccessful delivery sticker image flag. |
|
View the examples
2.1.1.2. Create Shipment Response (CreateShipmentResponse)
Output parameters:
Name |
Type |
Data |
id |
String |
Generated shipment id. |
parcels |
CreatedShipmentParcel[]
|
Generated parcels. |
price |
ShipmentPrice |
Returned, if customer has access to view the amounts of the shipment. |
pickupDate |
Date (date) |
Shipment pickup date. |
deliveryDeadline |
Date (datetime) |
Deadline for delivery. Returned, if available. |
error |
Error |
Response error. |
2.1.2.1. Cancel Shipment Request (CancelShipmentRequest)
Web service URL: BASE_URL/shipment/cancel
Method: POST
Content-type: application/json;
charset=utf-8
Or
Web service URL: BASE_URL/shipment
Method: DELETE
Content-type: application/json;
charset=utf-8
Cancel shipment. Shipment can be cancelled, it is not ordered yet.
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
shipmentId |
String |
Yes |
Shipment id |
Should have access rights to cancel the shipment. |
comment |
String |
Yes |
Cancel comment |
Max 1024 |
2.1.2.2. Cancel Shipment Response (CancelShipmentResponse)
Cancel response is an empty JSON, if the shipment is successfully cancelled. Otherwise, an error is included.
Name |
Type |
Data |
error |
Error |
Response error |
2.1.3.1. Add parcel Request (AddParcelRequest)
Parcels can be added to shipments in pending parcels state (shipments created with pendingParcels flag true)
Web service URL: BASE_URL/shipment/add_parcel
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
shipmentId |
String |
Yes |
Shipment id |
Should refer shipment in pending parcels state (not finalized yet with finalizePendingShipment method). |
parcel |
ShipmentParcel |
Yes |
Parcel to add. Parcel id and sequence number are auto-generated and therefore ignored if present in request |
|
codAmount |
Double |
No |
COD amount to add with this parcel to increase total COD amount |
|
codFiscalReceiptItems |
ShipmentCODFiscalReceiptItem[] |
This feature depends on country regulations and must be enabled for client contract. The value in codAmount is ignored if fiscal receipt items are provided. To use fiscal receipt items in this method the shipment must have COD defined with fiscal receipt already or COD must be emty | List of items to add in current fiscal receipt items list to issue receipt on behalf of client If shipment has fiscal receipt items, the COD amount is the total amount with VAT of all fiscal receipt items. |
|
declaredValueAmount |
Double |
No |
Declared value (extended liability) amount to add with this parcel to increase total amount |
If this parcel increases the amount of declared value, the shipment should be opened with Declared value (extended liability) additional service |
2.1.3.2. Add Parcel Response (AddParcelResponse)
Add parcel response returns generated parcel. Otherwise, an error is included.
Name |
Type |
Data |
parcel |
CreatedShipmentParcel |
Created shipment parcel (with generated id and sequence number) |
error |
Error |
Response error |
2.1.4.1. Finalize Pending Shipment Request (FinalizePendingShipmentRequest)
Pending shipments (opened with pendingParcels flag equal to true) should be finalized with this method
Web service URL: BASE_URL/shipment/finalize
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
shipmentId |
String |
Yes |
Shipment id |
Should refer shipment in pending parcels state (not finalized yet with finalizePendingShipment method). |
2.1.4.2. Finalize Pending Shipment Response (FinalizePendingShipmentResponse)
The response is the same as
CreateShipmentResponse.
2.1.5.1. Shipment Information Request (ShipmentInformationRequest)
This method provides shipment information
Web service URL: BASE_URL/shipment/info
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
shipmentIds |
String[] |
Yes |
Shipment ids |
|
2.1.5.2. Shipment Information Response (ShipmentInformationResponse)
Name |
Type |
Data |
shipments |
Shipment[] |
Shipment information |
error |
Error |
Response error |
2.1.6.1. Secondary Shipments Request (SecondaryShipmentsRequest)
This method provides secondary shipments information
Web service URL: BASE_URL/shipment/
{shipmentId}/secondary
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
types |
enum[] (array with values from enum:
["RETURN_SHIPMENT", "STORAGE_PAYMENT", "REDIRECT", "SEND_BACK", "MONEY_TRANSFER", "TRANSPORT_DAMAGED", "RETURN_VOUCHER"])
(Same as enum in field type in PrimaryShipment) |
Yes |
Filters the list for shipments of the specified type(s) only. No filter is applied if not provided (all secondary shipments are returned). - RETURN_SHIPMENT - any of return of documents (rod) / returnReceipt / swap / return of pallets (rop)
- STORAGE_PAYMENT - warehouse charges
- REDIRECT - redirect shipment
- SEND_BACK - return to sender
- MONEY_TRANSFER - money transfer
- TRANSPORT_DAMAGED - damaged shipment transport
- VOUCHER_RETURN - return with voucher
|
|
2.1.6.2. Secondary Shipments Response (SecondaryShipmentsResponse)
Name |
Type |
Data |
shipments |
SecondaryShipment[] |
List of secondary shipments |
error |
Error |
Response error |
2.1.7.1. Update Shipment Request (UpdateShipmentRequest)
Web service URL: BASE_URL/shipment/update
Method: POST
Content-type: application/json;
charset=utf-8
Full update of already created shipment. Allowed only if shipment is not requested for pick up or is not picked up yet.
Currently saved shipment data is cleared and replaced with new shipment data
Input parameters:
Name |
Type |
Required |
Data |
Constraints |
CreateShipmentRequest fields are here |
id |
String |
Yes |
Shipment id |
Shipment with that id must exisists, should be accessible to method caller and shipment state must allow requested property update |
2.1.7.2. Update Shipment Response (UpdateShipmentResponse)
Response is
CreateShipmentResponse - same returned in createShipment method
Output parameters:
2.1.8.1. Update Shipment Properties Request (UpdateShipmentPropertiesRequest)
Web service URL: BASE_URL/shipment/update/properties
Method: POST
Content-type: application/json;
charset=utf-8
Update shipment properties. All properties can be changed if shipment is not requested for pick up or is not picked up yet.
Recipient phone and COD properties can be updated after pickup request if shipment is still not given to courier for delivery and is not cancelled or closed
Input parameters:
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
id |
String |
Yes |
Shipment id |
Shipment with that id must exisists, should be accessible to method caller and shipment state must allow requested property update |
properties |
Map<String, String> |
Yes |
The map key is shipment property name and the map value is new propery value to be set in shipment. |
The allowed key (property) names are the same as url parameter names (synonims) defined in CreateShipmentRequest
The values expected to be in the format defined for corresponding url parameter in that method sepcification. |
2.1.8.2. Update Shipment Propeties Response (UpdateShipmentPropertiesResponse)
Response is
UpdateShipmentResponse - same returned in updateShipment method
Output parameters:
2.1.9.1. Find Parcels By Reference Request (FindParcelsByRefRequest)
This method returns parcels by reference number
Web service URL: BASE_URL/shipment/search
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
ref |
String |
Yes |
Client reference |
|
searchInRef |
int |
Yes |
Specifies where to search: 0 means [Ref1 or Ref2], 1 means [Ref1], 2 means [Ref2] |
|
shipmentsOnly |
boolean |
No |
If true - search in shipments only, otherwise in shipment and parcels. Default is true |
|
includeReturns |
boolean |
No |
If true - search in return shipments also. Default is false |
|
fromDateTime |
Date
(String in format "yyyy-MM-dd'T'HH:mm:ssZ") |
No |
Pick-up date - from. Up to 6 months before |
|
toDateTime |
Date
(String in format "yyyy-MM-dd'T'HH:mm:ssZ") |
No |
Pick-up date - to |
|
2.1.9.2. Find Parcels By Reference Response (FindParcelsByRefResponse)
Name |
Type |
Data |
barcodes |
String[] |
List of barcodes found |
error |
Error |
Response error |
2.1.10.1. Handover To Courier Request (HandoverToCourierRequest)
Register handover to courier barcode operations
Web service URL: BASE_URL/shipment/handover
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
parcels |
ParcelHandover[] |
Yes |
Parcel barcodes with datetime to register handover to courier operations |
Should refer accessible shipment parcels |
2.1.10.2. Handover To Courier Response (HandoverToCourierResponse)
Response is empty on success. Otherwise, an error is included.
Name |
Type |
Data |
error |
Error |
Response error |
2.1.11.1. Handover To Midway Carrier Request (HandoverToMidwayCarrierRequest)
Register handover to midway carrier barcode operations
Web service URL: BASE_URL/shipment/handover-to-midway-carrier
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
parcels |
MidwayCarrierParcelHandover[] |
Yes |
Parcel barcodes with datetime, country and site name to register handover to midway carrier operations |
Should refer accessible shipment parcels |
2.1.11.2. Handover To Midway Carrier Response (HandoverToMidwayCarrierResponse)
Response is empty on success. Otherwise, an error is included.
Name |
Type |
Data |
error |
Error |
Response error |
Get parcel information by parcel barcode
Web service URL: BASE_URL/shipment/barcode-information
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
parcel |
ShipmentParcelRef |
Yes |
Parcel to get info for |
Validated for allowed access. |
Barcode information response
Name |
Type |
Data |
labelInfo |
LabelInfo |
Label info |
primaryShipment |
PrimaryShipment |
Primary shipment. |
primaryParcelId |
String |
Primary parcel id. |
returnShipmentId |
String |
Return shipment id. |
returnParcelId |
String |
Return parcel id. |
redirectShipmentId |
String |
Redirect shipment id. |
redirectParcelId |
String |
Redirect parcel id. |
initialShipmentId |
String |
Initial shipment id. |
initialParcelId |
String |
Initial parcel id. |
error |
Error |
Response error |
2.2 Print Service
Web service URL: BASE_URL/print Used to create labels (waybills, stickers and etc.)
PDF Examples:
2.2.1.1. Print Request (PrintRequest)
Web service URL: BASE_URL/print
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
format |
enum ["pdf", "zpl"] |
No (default is pdf) |
Output format |
|
paperSize |
enum ["A4", "A6", "A4_4xA6"] |
Yes |
Print paper size |
Validated for allowed format. For example zpl is allowed with A6 only. |
parcels |
ParcelToPrint[] |
Yes |
Parcels to print |
Validated for allowed access. |
printerName |
String |
No |
Printer name to be used for direct printing. |
|
dpi |
enum ["dpi203", "dpi300"] |
No (default is dpi203) |
Dpi used for rendering. Makes sense for zpl format, otherwise ignored |
|
additionalWaybillSenderCopy |
enum ["NONE", "ON_SAME_PAGE", "ON_SINGLE_PAGE"] |
No (default is NONE) |
Defines whether and how to print additional waybill copy for sender. |
A4 pdf printing is required if print mode is different than NONE. |
View the examples
2.2.1.2. Print Response (PrintResponse)
In case the response is a PDF document, the result content type is application/pdf.
Content-type: application/pdf
And content contains pdf bytes.
In case it is a zpl, the content type is text/plain.
Content-type:text/plain
And content contains zpl text string.
In case of an error, the content type is application/json.
Content-type:application/json
And content is a JSON with
Error structure.
2.2.2.1. Extended Print Request
Web service URL: BASE_URL/print/extended
Method: POST
Content-type: application/json;
charset=utf-8
The same
PrintRequest structure is send to /extended path to get JSON response with an extended routing information described in next section.
2.2.2.2. Extended Print Response (ExtendedPrintResponse)
Name |
Type |
Data |
data |
byte[]
(BASE64 encoded string) |
Response data - base64 encoded binary data (pdf) |
printLabelsInfo |
LabelInfo[] |
Print labels info |
error |
Error |
Response error |
2.2.3.1. Label Info Request (LabelInfoRequest)
Web service URL: BASE_URL/print/labelInfo
Method: POST
Content-type: application/json; charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
|
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
parcels |
ShipmentParcelRef[] |
Yes |
Parcels to get label info for |
Validated for allowed access. |
2.2.3.2. Label Info Response (LabelInfoResponse)
Name |
Type |
Data |
printLabelsInfo |
LabelInfo[] |
Print labels info |
error |
Error |
Response error |
2.2.4.1. Print Voucher Request (PrintVoucherRequest)
Web service URL: BASE_URL/print/voucher
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
shipmentIds |
String[] |
Yes |
Shipment ids |
Validated for allowed access. All shipments must have voucher request |
printerName |
String |
No |
Printer name to be used for direct printing. Includes javascript in pdf to print document directly to the provided printer on document opening. |
|
format |
enum ["pdf", "zpl"] |
No (default is pdf) |
Output format |
|
dpi |
enum ["dpi203", "dpi300"] |
No (default is dpi203) |
Dpi used for rendering. Makes sense for zpl format, otherwise ignored |
|
2.2.4.2. Print Voucher Response (PrintVoucherResponse)
The result content type is application/pdf.
Content-type: application/pdf
And content contains pdf bytes.
In case of an error, the content type is application/json.
Content-type:application/json
And content is a JSON with
Error structure.
2.3. Track And Trace Service
Web service URL: BASE_URL/track
2.3.1.1. Track Request (TrackRequest)
Web service URL: BASE_URL/track
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
parcels |
TrackShipmentParcelRef[] |
Yes |
Parcels to track |
Allowed are up to 10 parcels |
lastOperationOnly |
Boolean |
No |
Flag to return last operation only’ |
|
View the examples
2.3.1.2. Track Response (TrackResponse)
Name |
Type |
Mandatory |
Data |
parcels |
TrackedParcel[] |
Yes |
Parcel track information |
error |
Error |
No |
Response error |
2.3.2.1. Bulk Tracking Data Files Request (BulkTrackingDataFilesRequest)
Bulk tracking data files are json files with file id assigned and contain data in format:
TrackedParcel[]
A greater file id corresponds to a later file publishing.
This method is used to provide links for downloading published data files with tracking information.
This method requires bulk tracking service enrolment, for which you may contact your key account manager. ;
Web service URL: BASE_URL/track/bulk
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
lastProcessedFileId |
Long |
Yes |
The greatest data file id processed in client system. To get all published data files during last 10 days use 0 as lastProcessedFileId |
The last processed file id must refer to a file published during last 10 days. Otherwise, error is returned. |
2.3.2.2. Bulk Tracking Data Files Response (BulkTrackingDataFilesResponse)
Name |
Type |
Mandatory |
Data |
files |
BulkTrackingDataFile[] |
Yes |
Bulk tracking data files ordered by file id in ascending order. The greatest file id returned in this response is expected to be passed in next request for incremental processing |
error |
Error |
No |
Response error |
2.4. Pickup
Web service URL: BASE_URL/pickup
2.4.1.1. Pickup Request (PickupRequest)
Web service URL: BASE_URL/pickup
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
pickupDateTime |
Date
(String in format "yyyy-MM-dd'T'HH:mm:ssZ") |
No
|
Pickup datetime. If not provided, it is assumed now. Seconds and milliseconds are ignored. |
|
autoAdjustPickupDate |
Boolean |
No (default value is false) |
To find first available date for pickup starting from pickupDate according to pickup schedule for services |
|
pickupScope |
enum ["EXPLICIT_SHIPMENT_ID_LIST",
"ALL_CREATED_BY_LOGGED_USER",
"ALL_CREATED_BY_SAME_CLIENT"]
"ALL_CREATED_BY_SAME_CONTRACT_USERS"]
|
No Default is EXPLICIT_SHIPMENT_ID_LIST |
Scope of shipments to order. |
ALL_CREATED_BY_SAME_CONTRACT_USERS can be used in case a logged user have the access rights to access shipments created by other users in the same contract. |
explicitShipmentIdList |
String[] |
No
Required when pickup scope is EXPLICIT_SHIPMENT_ID_LIST |
|
|
visitEndTime |
String (format HH:ss) |
Yes Example 9:30, or 11:35 |
The last possible time when the address could be visited on the pickup date. |
|
contactName |
String |
No |
Contact name. |
|
phoneNumber |
ShipmentPhoneNumber |
No |
Customer’s phone number. |
|
2.4.1.2. Pickup Response (PickupResponse)
Name |
Type |
Mandatory |
Data |
orders |
PickupOrder[] |
Yes |
Pickup orders created |
error |
Error |
No |
Response error |
2.4.2.1. Pickup Terms Request (PickupTermsRequest)
Web service URL: BASE_URL/pickup/terms
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
serviceId |
int |
Yes |
Service Id |
|
startingDate |
Date (String in format "yyyy-MM-dd") |
No |
The first date when the shipment will be ready for pickup. If not provided, it is assumed today. |
Should not be a date before today |
sender |
CalculationSender |
No (If not specifed, logged user is used) |
Client and location for pickup. |
|
senderHasPayment |
Boolean |
No |
Flag to indicate, whether sender should pay at least one of courier service, declared value or packings.If this parameter is missing assumed value is - false. |
|
2.4.2.2. Pickup Terms Response (PickupTermsResponse)
Name |
Type |
Mandatory |
Data |
cutoffs |
DateTime[]
(format yyyy-MM-dd'T'HH:mm:ssZ) |
Yes |
Pickup cutoffs for next days. Pickup is not allowed for missing days in the result list |
error |
Error |
No |
Response error |
2.5. Location Service
Web service URL: BASE_URL/location
2.5.1. Country
This section specifies methods to query system for allowed countries
Web service URL: BASE_URL/location/country
2.5.1.1.1. Get Country Request (GetCountryRequest)
Web service URL: BASE_URL/location/country/
{id}
Method: POST
Content-type: application/json;
charset=utf-8
Get country by id. Country id is provided as parameter in URL path
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.1.1.2. Get Country Response (GetCountryResponse)
Name |
Type |
Mandatory |
Data |
country |
Country |
No |
Found country or null if not found |
error |
Error |
No |
Response error |
2.5.1.2.1. Find Country Request (FindCountryRequest)
Web service URL: BASE_URL/location/country
Method: POST
Content-type: application/json;
charset=utf-8
Find country using search criteria
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
Name |
String |
No |
Country search term. Filters the results by country name prefix or part of country name |
|
isoAlpha2 |
String |
No |
Country iso alpha 2. Filters result by exact match if presents. ISO alpha 2 value uniquely identifies country and other criterias are not needed if this one presents |
|
isoAlpha3 |
String |
No |
Country iso alpha 3. Filters result by exact match if presents. ISO alpha 3 value uniquely identifies country and other criterias are not needed if this one presents |
|
View the examples
2.5.1.2.2. Find Country Response (FindCountryResponse)
The countries in return are these that match search criteria in request and ordered by:
- Exact match is on top, followed by
- Country name prefix matches, followed by
- Country name contains matches (search term is in the name but not a prefix)
The result is limited to 10 records.
Name |
Type |
Mandatory |
Data |
countries |
Country[] |
No |
Array of countries |
error |
Error |
No |
Response error |
2.5.1.3.1. Get All Countries Request (GetAllCountriesRequest)
Web service URL: BASE_URL/location/country/csv
Method: POST
Content-type: application/json;
charset=utf-8
Get all countries as csv file
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.1.3.2. Get All Countries Response (GetAllCountriesResponse)
See
Country data structure for additional information.
Response is CSV (comma separated) file int UTF8 encoding. The format is:
- id - ISO country id
- name - Country name in local language
- nameEn - Country name in English
- isoAlpha2 - ISO alpha 2 code
- isoAlpha3 - ISO alpha 3 code
- postCodeFormats - all allowed postcode patterns are separated with comma and the whole value is escaped with quotation marks
- requireState - flag whether country requires state
- addressType - address type (1 or 2 - see ShipmentAddress) for this country
- currencyCode - current active currency code used for COD
- defaultOfficeId - default office id
- streetTypes - comma separated list of all street types escaped with quotation marks in local language. This value is applicable for addressType 1 only
- streetTypesEn - comma separated list of all street types escaped with quotation marks in English. This value is applicable for addressType 1 only
- complexTypes - comma separated list of all complex types escaped with quotation marks in local language. This value is applicable for addressType 1 only
- complexTypesEn - comma separated list of all complex types escaped with quotation marks in English. This value is applicable for addressType 1 only
- siteNomen - site nomenclature (0, 1 ,2)
2.5.2. State
This section specifies methods to query system for allowed states
Web service URL: BASE_URL/location/state
2.5.2.1.1. Get State Request (GetStateRequest)
Web service URL: BASE_URL/location/state/
{id}
Method: POST
Content-type: application/json;
charset=utf-8
Get state by id. State id is provided as parameter in URL path
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
View the examples
2.5.2.1.2. Get State Response (GetStateResponse)
Name |
Type |
Mandatory |
Data |
site |
State |
No |
State found or null if not found |
error |
Error |
No |
Response error |
2.5.2.2.1. Find State Request (FindStateRequest)
Web service URL: BASE_URL/location/state
Method: POST
Content-type: application/json;
charset=utf-8
Find state using search criteria
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
countryId |
integer |
Yes |
Country id |
|
Name |
String |
No |
Search term for state name. Filters the results by state name prefix or part of state name. |
|
2.5.2.2.2. Find State Response (FindStateResponse)
The states in return are these that match search criteria in request and ordered by:
- Exact match is on top, followed by
- State name prefix matches, followed by
- State name contains matches (search term is in the name but not a prefix)
The result is limited to 10 records.
Name |
Type |
Mandatory |
Data |
states |
State[] |
No |
Array of sites |
error |
Error |
No |
Response error |
2.5.2.3.1. Get All States Request (GetAllStatesRequest)
Web service URL: BASE_URL/location/state/csv/
{countryId}
Method: POST
Content-type: application/json;
charset=utf-8
Get all states for a country in csv file. Country id is specified as path parameter
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.2.3.2. Get All States Response (GetAllStatesResponse)
See
State data structure for additional information.
Response is CSV (comma separated) file int UTF8 encoding. The format is:
- id - state id
- name - state name in local language
- nameEn - state name in English
- isoAlpha - ISO alpha code
- countryId - country id (ISO code)
2.5.3. Site
This section specifies methods to query system for allowed sites
Web service URL: BASE_URL/location/site
2.5.3.1.1. Get Site Request (GetSiteRequest)
Web service URL: BASE_URL/location/site/
{id}
Method: POST
Content-type: application/json;
charset=utf-8
Get site by id. Site id is provided as parameter in URL path
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.3.1.2. Get Site Response (GetSiteResponse)
Name |
Type |
Mandatory |
Data |
site |
Site |
No |
Found site or null if not found |
error |
Error |
No |
Response error |
2.5.3.4. Find Site Request (FindSiteRequest)
Web service URL: BASE_URL/location/site
Method: POST
Content-type: application/json;
charset=utf-8
Find site using search criteria
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
countryId |
integer |
Yes |
Country id |
|
Name |
String |
No |
Search term for site name. Filters the results by site name prefix or part of site name. |
|
postCode |
String |
No |
Filter results by postcode - valid postcode for site |
|
type |
String |
No |
Filter results by site type (exact match) |
|
municipality |
String |
No |
Filter by municipality (prefix match) |
|
region |
String |
No |
Filter by region (prefix match) |
|
View the examples
2.5.3.5. Find Site Response (FindSiteResponse)
The sites in return are these that match search criteria in request and ordered by:
- Exact match is on top, followed by
- Site name prefix matches, followed by
- Site name contains matches (search term is in the name but not a prefix)
The result is limited to 10 records.
Name |
Type |
Mandatory |
Data |
sites |
Site[] |
No |
Array of sites |
error |
Error |
No |
Response error |
2.5.3.3.1. Get All Sites Request (GetAllSitesRequest)
Web service URL: BASE_URL/location/site/csv/
{countryId}
Method: POST
Content-type: application/json;
charset=utf-8
Get all sites for a country in csv file. Country id is specified as path parameter
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.3.3.2. Get All Sites Response (GetAllSitesResponse)
See
Site data structure for additional information.
Response is CSV (comma separated) file int UTF8 encoding. The format is:
- id - site id
- countryId - country id (ISO code)
- mainSiteId - reference to main site if this site is a "satellite" one
- type - site type in local language
- typeEn - site type in English
- name - site name in local language
- nameEn - site name in English
- municipality - municipality in local language
- municipalityEn - municipality in English
- region - region in local language
- regionEn - region in English
- postCode - default post code for this site (if any)
- addressNomenclature - code for address nomenclature (streets, complexes, blocks, poi) support. Values are: 0 - no address nomenclature, 1 - partial address nomenclature, 2 - full address nomenclature
- x - X (longitude) coordinate of site center
- y - Y (latitude) coordinate of site center
- servingDays - serving days for this site. Format: 7 serial digits (0 or 1) where each digit corresponds to a day in week (the first digit corresponds to Monday, the second to Tuesday and so on). Value of '0' (zero) means that the site is not served by Speedy on this day while '1' (one) means that it is served. (Example: the text "0100100" means that the site is served on Tuesday and Friday only.)
- servingOfficeId - Site's serving office
- servingHubOfficeId - The hub office ID to which serving office is connected
2.5.4. Street
This section specifies methods to query system for allowed streets
Web service URL: BASE_URL/location/street
2.5.4.1.1. Get Street Request (GetStreetRequest)
Web service URL: BASE_URL/location/street/
{id}
Method: POST
Content-type: application/json;
charset=utf-8
Get street by id. Street id is provided as parameter in URL path
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.4.1.2. Get Street Response (GetStreetResponse)
Name |
Type |
Mandatory |
Data |
street |
Street |
No |
Found street or null if not found |
error |
Error |
No |
Response error |
2.5.4.4. Find Street Request (FindStreetRequest)
Web service URL: BASE_URL/location/street
Method: POST
Content-type: application/json;
charset=utf-8
Find street using search criteria
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
siteId |
integer |
Yes |
Site id |
|
Name |
String |
No |
Search term for street name. Filters the results by street name prefix or part of street name. |
|
type |
String |
No |
Filter results by street type (exact match) |
|
View the examples
2.5.4.5. Find Street Response (FindStreetResponse)
The streets in return are these that match search criteria in request and ordered by:
- Exact match is on top, followed by
- Street name prefix matches, followed by
- Street name contains matches (search term is in the name but not a prefix)
The result is limited to 10 records.
Name |
Type |
Mandatory |
Data |
streets |
Street[] |
No |
Array of streets |
error |
Error |
No |
Response error |
2.5.4.7. Get All Streets Request (GetAllStreetsRequest)
Web service URL: BASE_URL/location/street/csv/
{countryId}
Method: POST
Content-type: application/json;
charset=utf-8
Get all streets for a country in csv file. Country id is specified as path parameter.
This method requires a license (additional licensing contract) and permissions (access rights).
To obtain such license please contact your key account manager.
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.4.8. Get All Streets Response (GetAllStreetsResponse)
See
Street data structure for additional information.
Response is CSV (comma separated) file int UTF8 encoding. The format is:
- id - street id
- siteId - site id
- type - street type in local language
- typeEn - street type in English
- name - street name in local language
- nameEn - street name in English
- actualId - actual street id (in case this street is renamed)
2.5.5. Complex
This section specifies methods to query system for allowed complexes
Web service URL: BASE_URL/location/complex
2.5.5.1.1. Get Complex Request (GetComplexRequest)
Web service URL: BASE_URL/location/complex/
{id}
Method: POST
Content-type: application/json;
charset=utf-8
Get complex by id. Complex id is provided as parameter in URL path
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.5.1.2. Get Complex Response (GetComplexResponse)
Name |
Type |
Mandatory |
Data |
complex |
Complex |
No |
Complex found or null if not found |
error |
Error |
No |
Response error |
2.5.5.2.1. Find Complex Request (FindComplexRequest)
Web service URL: BASE_URL/location/complex
Method: POST
Content-type: application/json;
charset=utf-8
Find complex using search criteria
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
siteId |
integer |
Yes |
Site id |
|
Name |
String |
No |
Search term for complex name. Filters the results by complex name prefix or part of complex name. |
|
type |
String |
No |
Filter results by complex type (exact match) |
|
View the examples
2.5.5.2.2. Find Complex Response (FindComplexResponse)
The complexes in return are these that match search criteria in request and ordered by:
- Exact match is on top, followed by
- Complex name prefix matches, followed by
- Complex name contains matches (search term is in the name but not a prefix)
The result is limited to 10 records.
Name |
Type |
Mandatory |
Data |
complexes |
Complex[] |
No |
Array of complexes |
error |
Error |
No |
Response error |
2.5.5.3.1. Get All Complexes Request (GetAllComplexesRequest)
Web service URL: BASE_URL/location/complex/csv/
{countryId}
Method: POST
Content-type: application/json;
charset=utf-8
Get all complexes for a country in csv file. Country id is specified as path parameter.
This method requires a license (additional licensing contract) and permissions (access rights).
To obtain such license please contact your key account manager.
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.5.3.2. Get All Complexes Response (GetAllComplexesResponse)
See
Complex data structure for additional information.
Response is CSV (comma separated) file int UTF8 encoding. The format is:
- id - street id
- siteId - site id
- type - street type in local language
- typeEn - street type in English
- name - street name in local language
- nameEn - street name in English
- actualId - actual street id (in case this street is renamed)
2.5.6. Block
This section specifies methods to query system for allowed blocks
Web service URL: BASE_URL/location/block
2.5.6.1.1. Find Block Request (FindBlockRequest)
Web service URL: BASE_URL/location/block
Method: POST
Content-type: application/json;
charset=utf-8
Find block using search criteria
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
siteId |
integer |
Yes |
Site id |
|
Name |
String |
No |
Search term for block name. Filters the results by block name prefix or part of block name. |
|
2.5.6.1.2. Find Block Response (FindBlockResponse)
The blocks in return are these that match search criteria in request and ordered by:
- Exact match is on top, followed by
- Block name prefix matches, followed by
- Block name contains matches (search term is in the name but not a prefix)
The result is limited to 10 records.
Name |
Type |
Mandatory |
Data |
blocks |
Block[] |
No |
Array of blocks |
error |
Error |
No |
Response error |
2.5.6.2.1. Get All Blocks Request (GetAllBlocksRequest)
Web service URL: BASE_URL/location/block/csv/
{countryId}
Method: POST
Content-type: application/json;
charset=utf-8
Get all blocks for a country in csv file. Country id is specified as path parameter.
This method requires a license (additional licensing contract) and permissions (access rights).
To obtain such license please contact your key account manager.
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.6.2.2. Get All Blocks Response (GetAllBlocksResponse)
See
Block data structure for additional information.
Response is CSV (comma separated) file int UTF8 encoding. The format is:
- siteId - site id
- name - block name in local language
- nameEn - block name in English
2.5.7. POI (Point of Interest)
This section specifies methods to query system for allowed points of interest
Web service URL: BASE_URL/location/poi
2.5.7.1.1. Get POI Request (GetPOIRequest)
Web service URL: BASE_URL/location/poi/
{id}
Method: POST
Content-type: application/json;
charset=utf-8
Get POI by id. POI id is provided as parameter in URL path
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.7.1.2. Get POI Response (GetPOIResponse)
Name |
Type |
Mandatory |
Data |
poi |
PointOfInterest |
No |
POI found or null if not found |
error |
Error |
No |
Response error |
2.5.7.2.1. Find POI Request (FindPOIRequest)
Web service URL: BASE_URL/location/poi
Method: POST
Content-type: application/json;
charset=utf-8
Find POI using search criteria
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
siteId |
integer |
Yes |
Site id |
|
Name |
String |
No |
Search term for POI name. Filters the results by POI name prefix or part of POI name. |
|
View the examples
2.5.7.2.2. Find POI Response (FindPOIResponse)
The points of interest in return are these that match search criteria in request and ordered by:
- Exact match is on top, followed by
- POI name prefix matches, followed by
- POI name contains matches (search term is in the name but not a prefix)
The result is limited to 10 records.
Name |
Type |
Mandatory |
Data |
pois |
PointOfInterest[] |
No |
Array of points of interest |
error |
Error |
No |
Response error |
2.5.7.3.1. Get All Points of Interest Request (GetAllPOIRequest)
Web service URL: BASE_URL/location/poi/csv/
{countryId}
Method: POST
Content-type: application/json;
charset=utf-8
Get all Points of Interest for a country in csv file. Country id is specified as path parameter.
This method requires a license (additional licensing contract) and permissions (access rights).
To obtain such license please contact your key account manager.
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.7.3.2. Get All Points of Interest Response (GetAllPOIResponse)
See
PointOfInterest data structure for additional information.
Response is CSV (comma separated) file int UTF8 encoding. The format is:
- id - POI id
- siteId - site id
- name - POI name in local language
- nameEn - POI name in English
- address - POI address in local language
- addressEn - POI address in English
- x - X coordinate
- y - Y coordinate
- type - POI type in local language
- typeEn - POI type in English
2.5.8. Postcodes
This section specifies methods to query system for allowed country postcodes
Web service URL: BASE_URL/location/postcode
2.5.8.1.1. Get All Postcodes Request (GetAllPostcodesRequest)
Web service URL: BASE_URL/location/postcode/csv/
{countryId}
Method: POST
Content-type: application/json;
charset=utf-8
Get all postcodes for a country in csv file. Country id is specified as path parameter.
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.8.1.2. Get All Postcodes Response (GetAllPostcodesResponse)
Response is CSV (comma separated) file int UTF8 encoding. The format is:
- postcode - Postcode
- siteId - site id
2.5.9. Office
This section specifies methods to query system for available offices
Web service URL: BASE_URL/location/office
2.5.9.1.1. Get Office Request (GetOfficeRequest)
Web service URL: BASE_URL/location/office/
{id}
Method: POST
Content-type: application/json;
charset=utf-8
Get office by id. Office id is provided as parameter in URL path
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.5.9.1.2. Get Office Response (GetOfficeResponse)
Name |
Type |
Mandatory |
Data |
office |
Office |
No |
Office found or null if not found |
error |
Error |
No |
Response error |
2.5.9.2.1. Find Office Request (FindOfficeRequest)
Web service URL: BASE_URL/location/office
Method: POST
Content-type: application/json;
charset=utf-8
Find office using search criteria
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
countryId |
Integer |
No |
Country id ISO. Limits the search scope in the set of offices for specified country. System default country is used if country id is omitted. If -1 is specified - offices in all countires are searched |
|
siteId |
Long |
No |
Site id. Limits the search scope in the set of offices for specified site. If omitted - all country offices are searched |
|
siteName |
String |
No |
Filters the results by office site name prefix or part of it. |
|
Name |
String |
No |
Search term for office name. Filters the results by office name prefix or part of site name. |
|
limit |
Long |
No |
The number of records to return in response. All records are returned if this parameter is ommited |
|
View the examples
2.5.9.2.2. Find Office Response (FindOfficeResponse)
The offices in return are these that match search criteria in request and ordered by:
- Exact match is on top, followed by
- Office name prefix matches, followed by
- Office name contains matches (search term is in the name but not a prefix)
Name |
Type |
Mandatory |
Data |
offices |
Office[] |
No |
Array of offices |
error |
Error |
No |
Response error |
2.5.9.3.1. Find Nearest Offices Request (FindNearestOfficesRequest)
Web service URL: BASE_URL/location/office/nearest-offices
Method: POST
Content-type: application/json;
charset=utf-8
Find nearest offices using search criteria
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
address |
ShipmentAddress |
Yes |
Address to which the nearest offices are searched |
Only country id is mandatory |
distance |
Integer |
No |
Maximum office distance ( in meters ) from provided address |
|
limit |
Integer |
No |
The number of records to return in response. |
|
officeType |
enum ["OFFICE", "APT"] |
No |
Filter offices by type. |
|
officeFeatures |
enum ["CARD_PAYMENT", "CASH_PAYMENT", "DROP_OFF", "PICK_UP", "CARGO_TYPE_PARCEL", "CARGO_TYPE_PALLET", "CARGO_TYPE_TYRE"][] |
No |
Supported office features |
|
2.5.9.3.2. Find Nearest Offices Response (FindNearestOfficesResponse)
The offices in return are these that match search criteria in request and ordered by distance
Name |
Type |
Mandatory |
Data |
offices |
OfficeResult[] |
No |
Array of offices |
x |
Double |
No |
Provided address X coord |
y |
Double |
No |
Provided address Y coord |
error |
Error |
No |
Response error |
2.6. Calculation Service
Web service URL: BASE_URL/calculate
2.6.1. Calculation Request (CalculationRequest)
Web service URL: BASE_URL/calculate
Method: POST
Content-type: application/json;
charset=utf-8
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
sender |
CalculationSender |
No
|
Defines the pickup place. If not specified, the logged user location is considered as a sender location. |
|
recipient |
CalculationRecipient |
Yes |
Defines the recipient delivery place. |
|
service |
CalculationService |
Yes |
Defines service agreemen |
|
content |
CalculationContent |
Yes |
Defines content - parcels, weight and etc |
|
payment |
ShipmentPayment |
Yes |
Defines who-pays-what in shipment |
|
View the examples
2.6.2. Calculation Response (CalculationResponse)
Name |
Type |
Mandatory |
Data |
calculations |
CalculationResult[][] |
Yes |
Calculations for all service ids in request |
error |
Error |
No |
Response error |
2.7. Client Service
Web service URL: BASE_URL/client
2.7.1.1. Get Client Request (GetClientRequest)
Web service URL: BASE_URL/client/
{id}
Method: POST
Content-type: application/json;
charset=utf-8
Get client by id. Client id is provided as parameter in URL path
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.7.1.2. Get Client Response (GetClientResponse)
Name |
Type |
Mandatory |
Data |
client |
Client |
No |
Client data |
error |
Error |
No |
Response error |
2.7.2.1. Get Contract Clients Request (GetContractClientsRequest)
Web service URL: BASE_URL/client/contract
Method: POST
Content-type: application/json;
charset=utf-8
Get clients with same contract as logged user's one, if any
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
View the examples
2.7.2.2. Get Contract Clients Response (GetContractClientsResponse)
Name |
Type |
Mandatory |
Data |
clients |
Client[] |
No |
Clients with same contract as logged users's one, if any |
error |
Error |
No |
Response error |
Web service URL: BASE_URL/client/contact
Method: POST
Content-type: application/json;
charset=utf-8
Create contact associating externalId as unique reference
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
externalContactId |
String |
Yes |
External contact id (caller client Id unique reference) |
Max 36 characters. Unique for caller |
secretKey |
String |
No |
External contact secret key |
Max 36 characters |
phone1 |
ShipmentPhoneNumber |
Yes |
Contact phone number (for example: +40799123456, 0040799123456, +359999123456 - international format numbers or 0799123456, 0999123456 - local numbers). |
Max size is 20 chars. Phone numbers must contain digits only. The "+" sign is also permitted as a leading symbol. Only spaces are allowed as separators. Only phone numbers starting with "0" (zero) or "+" sign are allowed. |
phone2 |
ShipmentPhoneNumber |
No |
Contact phone number 2. |
Validate for valid phone number, if presents. |
clientName |
String |
Yes |
Contact customer name. |
Validate for valid name (minimum 3 symbols, maximum 60). |
objectName |
String |
Forbidden for private persons. Not mandatory for companies |
Contact customer object name. |
Validate for valid name (maximum 60 symbols). |
contactName |
String |
Forbidden for private persons. Required for companies |
Contact name of contact |
Maximum 60 |
email |
String |
No |
Contact email. |
Maximum 255 |
privatePerson |
Boolean |
Yes |
Private person flag. |
|
address |
ShipmentAddress |
Yes |
Contact address. |
Validated for valid values. |
Name |
Type |
Mandatory |
Data |
clientId |
Long |
No |
Client Id associated for created contact in the system |
error |
Error |
No |
Response error |
Web service URL: BASE_URL/client/contact/external/
{id}
Method: POST
Content-type: application/json;
charset=utf-8
Get contact by external id. External client id is provided as parameter in URL path
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
secretKey |
String |
No |
Secret key |
Max 36 characters |
Name |
Type |
Mandatory |
Data |
client |
Client |
No |
Client data |
error |
Error |
No |
Response error |
2.7.5.1. Get Own Client Id Request (GetOwnClientIdRequest)
Web service URL: BASE_URL/client
Method: POST
Content-type: application/json;
charset=utf-8
Get own client id
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.7.5.2. Get Own Client Id Response (GetOwnClientIdResponse)
Name |
Type |
Mandatory |
Data |
clientId |
Long |
Yes |
Own client id |
error |
Error |
No |
Response error |
2.7.6.1. Contract Info Request (ContractInfoRequest)
Web service URL: BASE_URL/client/contract/info
Method: POST
Content-type: application/json;
charset=utf-8
Get information about logged user contract
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
2.7.6.2. Contract Info Response (ContractInfoResponse)
2.8. Validation Service
Web service URL: BASE_URL/validation
2.8.1.1. Validate Address Request (ValidateAddressRequest)
Web service URL: BASE_URL/validation/address
Method: POST
Content-type: application/json;
charset=utf-8
This method validates shipment address
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
address |
ShipmentAddress |
No |
Shipment address to validate |
|
2.8.1.2. Validate Address Response (ValidationResponse)
Name |
Type |
Mandatory |
Data |
valid |
Boolean |
No |
Validation result flag |
error |
Error |
No |
Response error |
2.8.2.1. Validate Post Code Request (ValidatePostCodeRequest)
Web service URL: BASE_URL/validation/postcode
Method: POST
Content-type: application/json;
charset=utf-8
This method validates post code
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
countryId |
Integer |
Yes - if siteId is not specified |
Country id |
|
siteId |
Long |
Yes - if countryId is not specified |
Site id |
|
postCode |
String |
Yes |
Postcode to validate |
|
2.8.2.2. Validate Post Code Response (ValidationResponse)
Same as
2.8.2 ValidationResponse
2.8.3.1. Validate Phone Request (ValidatePhoneRequest)
Web service URL: BASE_URL/validation/phone
Method: POST
Content-type: application/json;
charset=utf-8
This method validates phone number
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
number |
String |
Yes |
Phone number |
|
ext |
String |
No |
Phone number extension |
|
2.8.3.2. Validate Phone Response (ValidationResponse)
Same as
2.8.2 ValidationResponse
2.8.4.1. Validate Shipment Request (ValidateShipmentRequest)
Web service URL: BASE_URL/validation/shipment
Method: POST
Content-type: application/json;
charset=utf-8
This method applies validation on shipment request
Input parameters:
2.8.4.2. Validate Shipment Response (ValidateShipmentResponse)
Same as
2.8.2. ValidationResponse
2.9. Services Service
Web service URL: BASE_URL/services
2.9.1.1. Services Request (ServicesRequest)
Web service URL: BASE_URL/services
Method: POST
Content-type: application/json;
charset=utf-8
Get available services for date
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
date |
Date (yyyy-MM-dd) |
No |
Date. Current date is assumed if not provided |
|
2.9.1.2. Services Response (ServicesResponse)
Name |
Type |
Mandatory |
Data |
services |
CourierService[] |
Yes |
Available courier services |
error |
Error |
No |
Response error |
2.9.2.1. Destination Services Request (DestinationServicesRequest)
Web service URL: BASE_URL/services/destination
Method: POST
Content-type: application/json;
charset=utf-8
Get available services for date and destination
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
date |
Date (yyyy-MM-dd) |
No |
Date. Current date is assumed if not provided |
|
sender |
CalculationSender |
No |
Defines the pickup place. If not specified, the logged user client location is considered as a sender location. |
|
recipient |
CalculationRecipient |
Yes |
Defines the recipient delivery place. |
|
View the examples
2.9.2.2. Destination Services Response (DestinationServicesResponse)
Name |
Type |
Mandatory |
Data |
services |
ExtendedCourierService[] |
Yes |
Available courier services for destination |
error |
Error |
No |
Response error |
2.10. Payments Service
Web service URL: BASE_URL/payments
2.10.1.1. Payout Request (PayoutRequest)
Web service URL: BASE_URL/payments
Method: POST
Content-type: application/json;
charset=utf-8
Get shipment payout details for a period
Name |
Type |
Required |
Data |
Constraints |
userName |
String |
Yes |
User name |
|
password |
String |
Yes |
Password |
|
language |
String |
No |
Language ("EN", "BG"). Default is the default system language (BG). |
|
clientSystemId |
Long |
No |
Client system id |
Validated against system register for external customers. |
fromDate |
DateTime (yyyy-MM-dd'T'HH:mm:ssZ) |
Yes |
Start of period date time. |
|
toDate |
DateTime (yyyy-MM-dd'T'HH:mm:ssZ) |
Yes |
End of period date time. |
|
includeDetails |
boolean |
No (default value is false) |
Include payout details flag |
|
2.10.1.2. Payout Response (PayoutResponse)
Name |
Type |
Mandatory |
Data |
payouts |
Payout[] |
Yes |
Shipment payouts for a period |
error |
Error |
No |
Response error |
3. Data Structures
3.1. Shipment Service (ShipmentService)
Shipment service defines service level agreement for the shipment - when shipment should be picked up, service code to be used, sub-services, etc.
Name |
Type |
Required |
Data |
Constraints |
pickupDate |
Date Example: "2017-11-21" |
No (default value is today) |
The date for shipment pickup. |
Could be today or a future date. |
autoAdjustPickupDate |
Boolean |
No (default value is false) |
To find first available date for pickup starting from pickupDate according to pickup schedule for services |
|
serviceId |
int |
Yes |
Service to be used for the shipment. |
Service id (code) should be valid for the destination. |
additionalServices |
ShipmentAdditionalServices |
No |
Defines sub-services (like COD, Declared value, etc.) associated with the shipment. |
Sub-services may be allowed or forbidden for selected service and/or destination. |
deferredDays |
Integer |
No (default value is 0) |
This parameter allows users to specify by how many (business) days they would like to postpone the shipment delivery from the standard term. |
Allowed values are 0, 1 and 2. |
saturdayDelivery |
Boolean |
No |
This parameter may adjust delivery date to the first business day, if the standard calculated delivery day is a half-working day. If not specified, system will determine this flag based on configured delivery customer working schedule. |
|
3.1.1. Shipment Additional Services (ShipmentAdditionalServices)
Allowance of additional services usage in the shipments is controlled and determined by the courier service configuration. All shipment additional services could be either:
- forbidden for usage with selected courier service
- allowed for usage with selected courier service
- required for usage with selected courier service
Some of the additional services may require additional prerequisites (like valid contracts and annexes or serving offices in pickup or delivery site) to be available for usage.
Name |
Type |
Required |
Data |
Constraints |
cod |
ShipmentCODAdditionalService |
No |
Defines shipment COD sub-service. |
Seller could be required to have a valid contract and annex for COD for the destination. |
obpd |
ShipmentOBPD |
No |
Defines shipment options before payment details. |
|
declaredValue |
ShipmentDeclaredValueAdditionalService |
No |
Defines shipment declared value (extended liability) sub-service. |
|
fixedTimeDelivery |
Integer |
No |
This option fixes the time of delivery on the delivery date. 1130 - means 11:30, 920 - means 09:20 |
This option is checked against the configured allowed time frame for the service. |
returns |
ShipmentReturnAdditionalServices |
No |
Defines a return sub-services. |
Return shipments are verified for a return destination. |
specialDeliveryId |
Integer |
No |
Specifies special delivery identifier for the shipments. Identifiers are determined in a special delivery annex. |
Requires an annex for special delivery. |
deliveryToFloor |
Integer |
No |
Specifies the floor number in the building where to deliver the shipment. |
This sub-service requires an annex. |
3.1.1.1. COD Additional Service (ShipmentCODAdditionalService)
Name |
Type |
Required |
Data |
Constraints |
amount |
double |
Yes |
Defines shipment COD base amount. |
Validated against the maximum allowed amounts for the destination. |
currencyCode |
String |
No (default is the currency code for destination country) |
Defines shipment COD currency code. |
Validated against the allowed currency code for destination country. |
processingType |
enum ["CASH", "POSTAL_MONEY_TRANSFER"] |
No (default is "CASH") |
Defines COD processing type. |
Appropriate contract and annexes may be required. |
payoutToThirdParty |
Boolean |
No |
If this flag is set, the COD is paid to third party (not to the sender). |
Requires a third party to be the payer of the courier service. |
payoutToLoggedClient |
Boolean |
No |
If this flag is set, the COD is paid to the logged client. |
|
includeShippingPrice |
Boolean |
No |
Flag indicating whether the shipping price should be included in the COD. |
|
cardPaymentForbidden |
Boolean |
No |
Flag indicating that COD/PMT card payment is forbidden. |
|
fiscalReceiptItems |
ShipmentCODFiscalReceiptItem[] |
This feature depends on country regulations and must be enabled for client contract. The value in amount field is ignored if fiscal receipt items are provided. |
List of items to issue fiscal receipt on behalf of client If shipment has fiscal receipt items, the COD amount is the total amount with VAT of all fiscal receipt items. |
|
3.1.1.1.1. Shipment COD Fiscal Receipt Item (ShipmentCODFiscalReceiptItem)
COD fiscal receipt item is used to form COD fiscal receipt to be issued on behalf of client
Name |
Type |
Required |
Data |
Constraints |
description |
String |
Yes |
Fiscal receipt item description |
Max 50 characters |
vatGroup |
String |
Yes |
VAT group |
Must match one of available VAT groups (for example "А" - 0% VAT, "Б" - 20% VAT, "Г" - 9% VAT). |
amount |
double |
Yes |
Item amount before VAT. |
Must be positive value |
amountWithVat |
double |
Yes |
Item amount with VAT included |
Must not be lower that amount before VAT |
3.1.1.2. Declared Value (Extended Liability) Additional Service(ShipmentDeclaredValueAdditionalService)
Name |
Type |
Required |
Data |
Constraints |
amount |
double |
Yes |
Defines shipment Declared Value base amount. Declared value amount is always in local system currency. |
Validated against the maximum allowed amounts. |
fragile |
Boolean |
No |
Defines fragile flag for shipment content. |
Fragile shipments require a declared value sub service. |
ignoreIfNotApplicable |
Boolean |
No (Used in calculation service only, ignored in create shipment service) |
Flag to ignore declared value additional service in case it is not applicable for shipment on calculation |
E-shops usually configure declared value (extended liability) by default for their shipments, However there are some certain internal rules when this option is not available. The flag is used in calculation service to provide price to end clients without repeating the calculation request with removed additional service |
3.1.1.3. Shipment Return Additional services (ShipmentReturnAdditionalServices)
Defines series of return sub-services, which require a reverse shipment to be generated at primary shipment delivery. All the reverse shipments are validated for allowance and for destination.
Name |
Type |
Required |
Data |
Constraints |
rod |
ShipmentRODAdditionalService |
No |
Defines Return Of Documents (ROD) sub-service. |
The reverse shipment is validated for service and destination. |
returnReceipt |
ShipmentReturnReceiptAdditionalService |
No |
Defines Return Receipt sub-service. Cannot be specified if electronicReturnReceipt is provided |
The reverse shipment is validated for service and destination. |
electronicReturnReceipt |
ShipmentElectronicReturnReceiptAdditionalService |
No |
Defines electronic Return Receipt sub-service (return receipt by email). Cannot be specified if returnReceipt is provided. |
Electronic return receipt requires email. |
swap |
ShipmentSWAPAdditionalService |
No |
Defines SWAP sub-service. |
The reverse shipment is validated for service and destination. |
rop |
ShipmentROPAdditionalService |
No |
Defines Return Of Pallets (ROP) sub-service. |
The reverse shipment is validated for service and destination. |
returnVoucher |
ShipmentReturnVoucherAdditionalService |
No |
Defines Return Voucher associated with the shipment. |
The reverse shipment is validated for service and destination. |
sendBackClientId |
Long |
No |
Client id to specify send back address in case of a shipment return. Used in shipment returns after Check/Test or in case recipient is not found. If not specified the shipment is returned to the primary shipment sender. |
Should be a customer address (object) in the same contract as the sender of the shipment. |
3.1.1.3.1. Return of Documents (ROD) Additional service (ShipmentRODAdditionalService)
Return of Documents (ROD) additional service requires documents to be returned upon the delivery of the primary shipment.
Name |
Type |
Required |
Data |
Constraints |
enabled |
boolean |
Yes |
Enabled flag |
|
comment |
String |
No |
Return documents comment. |
Max size 512 |
returnToClientId |
Long |
No |
Defines the recipient for the ROD shipment. If not specified and returnToOfficeId is not specified also, the reverse shipment is returned to the primary shipment sender. |
Cannot be specified together with returnToOfficeId. The same value should be set for ROD and Return Receipt, if the sub-service presents. Cannot be specified if SWAP presents |
returnToOfficeId |
Integer |
No |
Defines delivery pickup depot for the ROD shipment. If not specified and returnToClientId is not specified also, the reverse shipment is returned to the primary shipment sender. |
Cannot be specified together with returnToClientId. The same value should be set for ROD, Return Receipt and SWAP, if the sub-service presents. |
thirdPartyPayer |
Boolean |
No |
Defines a third party payer for the ROD shipment. Otherwise the payer is the primary shipment sender. |
Requires a third party payer of the primary shipment. The same value should be set for ROD, Return Receipt, ROP and SWAP, if the sub-service presents. |
3.1.1.3.2. Return Receipt Additional Service (ShipmentReturnReceiptAdditionalService)
Return Receipt additional service requires receipt to be returned upon the delivery of the primary shipment.
See also
Electronic Return Receipt
Name |
Type |
Required |
Data |
Constraints |
enabled |
boolean |
Yes |
Enabled flag |
|
returnToClientId |
Long |
No |
Defines the recipient for the Return Receipt shipment. If not specified and returnToOfficeId is not specified also, the reverse shipment is returned to the primary shipment sender. |
Cannot be specified together with returnToOfficeId. The same values should be set for ROD and Return Receipt, if the sub service presents. Cannot be specified if SWAP presents |
returnToOfficeId |
Integer |
No |
Defines delivery pickup depot for the Return Receipt shipment. If not specified and returnToClientId is not specified also, the reverse shipment is returned to the primary shipment sender. |
Cannot be specified together with returnToClientId. The same values should be set for ROD, Return Receipt and SWAP, if the sub service presents. |
thirdPartyPayer |
Boolean |
No |
Defines a third party payer for the Return Receipt. Otherwise the payer is the primary shipment sender. |
Requires a third party payer of the primary shipment. The same values should be set for ROD, Return Receipt / Electronic Return Receipt, ROP and SWAP, if the sub service presents. |
3.1.1.3.3. SWAP Additional Service (ShipmentSWAPAdditionalService)
SWAP additional service requires shipment with predefined parameters to be returned upon the delivery of the primary shipment.
Name |
Type |
Required |
Data |
Constraints |
serviceId |
int |
Yes |
Service to be used in return. |
Validated for allowance and destination. |
parcelsCount |
int |
Yes |
Number of parcels to return. |
Validated against maximum allowed parcels. |
declaredValue |
Double |
No |
Declared value (extended liability) for the reverse shipment. |
Validated for allowance and maximum amount. |
fragile |
Boolean |
No |
Fragile content flag for the reverse shipment. |
Fragile shipments require declared value. |
returnToOfficeId |
Integer |
No |
Defines delivery pickup depot for the SWAP shipment. If not specified, the reverse shipment is returned to the primary shipment sender. |
The same values should be set for ROD, Return Receipt and SWAP, if the sub-service presents. |
thirdPartyPayer |
Boolean |
No |
Defines a third party payer for the SWAP shipment. Otherwise the payer is the primary shipment recipient. |
Requires a third party payer of the primary shipment. The same value should be set for ROD, Return Receipt, ROP and SWAP, if the sub-service presents. |
3.1.1.3.4. Return of Pallets (ROP) Additional Service (ShipmentROPAdditionalService)
Return Of Pallets additional service requires shipment with predefined parameters to be returned upon the delivery of the primary shipment.
Name |
Type |
Required |
Data |
Constraints |
pallets |
ShipmentROPAdditionalServiceLine[] |
Yes |
Defines pallets to return grouped by service id. |
Total number of returned pallets should not exceed the parcel count of the primary shipment. |
thirdPartyPayer |
Boolean |
No |
Defines a third party payer for the returned pallets. Otherwise the payer is the primary shipment sender. |
Requires a third party payer of the primary shipment. The same values should be set for ROD, Return Receipt / Electronic Return Receipt, ROP and SWAP, if the sub service presents. |
3.1.1.3.4.1. ROP Additional Service Lines (ShipmentROPAdditionalServiceLine)
Return Of Pallet (ROP) sub service lines define for each return of pallet service how many parcels (pallets) should be returned.
Name |
Type |
Required |
Data |
Constraints |
serviceId |
int |
Yes |
ROP service to be used. |
Validated against destination. |
parcelsCount |
int |
Yes |
Number of parcels to return. |
|
3.1.1.3.5. Return Voucher Additional Service (ShipmentReturnVoucherAdditionalService)
Return Voucher sub service provides an option to the recipient to initiate a return within predefined voucher validity period, using the voucher preferences.
Name |
Type |
Required |
Data |
Constraints |
serviceId |
int |
Yes |
Service id of the return shipment. |
|
payer |
enum [ "SENDER", "RECIPIENT", "THIRD_PARTY" ] |
Yes |
Defines a return voucher payer. |
Allowed payers are validated against the service configuration and destination. |
validityPeriod |
Integer |
Required if caller client has no annex for return voucher. |
Return voucher validity period in days. The annex return voucher period is used by default in case caller client has such in his contract and value is omitted |
Verified to not exceed the configured internal maximum in the system |
3.1.1.3.6. Electronic Return Receipt Additional Service (ShipmentElectronicReturnReceiptAdditionalService)
Electronic Return Receipt additional service requires receipt to be returned as an email attachment upon the delivery of the shipment
Name |
Type |
Required |
Data |
Constraints |
recipientEmails |
String[] |
Yes |
List of electronic return receipt recipient emails |
|
thirdPartyPayer |
Boolean |
No |
Defines a third party payer for the Electronic Return Receipt. Otherwise the payer is the primary shipment sender. |
Requires a third party payer of the primary shipment. The same values should be set for ROD, Return Receipt / Electronic Return Receipt, ROP and SWAP, if the sub service presents. |
3.1.1.4. Options before payment details Additional Service (ShipmentOBPD)
Options before payment are needed to define what options recipient has on delivery before the payment of the COD. User can open parcels or open and test the content of the parcels. Recipient may accept parcels and pay the COD or refuse to pay and return the parcels. The return shipment details are specified in the options also.
Name |
Type |
Required |
Data |
Constraints |
option |
enum["OPEN", "TEST"] |
Yes |
Defines the option to be used. Open parcels on payment or open and test parcels before payment. |
|
returnShipmentServiceId |
Integer |
Yes |
Defines service id to be used on return. |
|
returnShipmentPayer |
enum ["SENDER", "RECIPIENT", "THIRD_PARTY"] |
Yes |
Defines who pays the return shipment. |
|
3.2. Shipment Content (ShipmentContent)
Shipment content is used to describe what is to be delivered with the shipment.
Name |
Type |
Required |
Data |
Constraints |
parcelsCount |
Integer/td>
| Required when parcels list is empty. |
Total shipment parcels count. Ignored, if parcels list is not empty. The parcels count is the number of parcels in the lits in that case. |
Validated against the minimum and maximum allowed for the service. |
totalWeight |
Double |
Required when parcels list is empty. |
Total weight declared for the shipment. Ignored, if parcels list is not empty. The total weight is the sum of all parcels declaredWeight in that case. |
Validated against the minimum and maximum allowed for the service. |
contents |
String |
Yes |
Shipment content’s description. |
100 |
package |
String |
Yes |
Shipment package. |
50 |
documents |
Boolean |
No |
Documents flag of the shipment. |
|
palletized |
Boolean |
No |
Palletized flag of the shipment. |
|
parcels |
ShipmentParcel[] |
Required for pallet and postal services. |
Parcels. If omitted a single default (first) parcel will be created for non-pallet and non-postal services. |
Validated against the service configuration and pickup and delivery capacity of the depots and couriers. |
pendingParcels |
Boolean |
No |
If this flag is true, the shipment is created in pending parcels state.
Shipments in pending parcels state allows adding parcels with addParcel method.
Pending parcels state is closed with finalizePendingShipment method. |
|
exciseGoods |
Boolean |
No |
Flag shipment contains excise goods. |
|
lq |
Boolean |
No |
Flag shipment contains dangerous goods in limited quantities. |
|
goodsValue |
Double |
No Required for pallet services (for Romanian shipments) |
Defines shipment goods value amount. |
Validated against maximum allowed amount. |
goodsValueCurrencyCode |
String |
No Required, if goodsValue is provided. |
Defines shipment goods value currency code. |
Requires a valid currency code. |
uitCode |
String |
No Required for Romanian shipments in cases defined by Romanian regulations. |
Shipment UIT code. |
Requires a valid UIT code. |
3.2.1. Shipment Parcel (ShipmentParcel)
Shipment parcel data structure.
Name |
Type |
Required |
Data |
Constraints |
id |
String |
No |
Parcel identifier - barcode (if it is known). |
|
seqNo |
Integer |
Required in createShipment method. Ignored in addParcel (auto-generated in this case) |
Parcel sequence number in the shipment. |
Should be unique for the shipment. |
packageUniqueNumber |
Long |
No |
Package number associated with parcel. |
|
size |
ShipmentParcelSize |
Required for pallet and postal services. |
Parcel size (width, height, depth) in cm. |
Validated against the capacity of the couriers and depots. Used to calculate the volume weight, if applicable. |
weight |
double |
Yes |
Parcel weight in kg. |
Validated against the capacity of the couriers and depots and service configuration. |
ref1 |
String |
No |
Reference number or text. |
20 |
ref2 |
String |
No |
Reference number or text. |
20 |
pickupExternalCarrierParcelNumber |
ExternalCarrierParcelNumber |
No |
External carrier parcel id for pickup |
|
deliveryExternalCarrierParcelNumber |
ExternalCarrierParcelNumber |
No |
External carrier parcel id for delivery |
|
The declared weight of a parcel (used for price calculation) is the maximum of the weight and the volume weight (calculated from size). Volume weight in some cases is not calculated (for example for pallets).
View the examples
3.2.1.1. Shipment Parcel Size (ShipmentParcelSize)
Shipment parcel size structure defines parcel size in the shipment.
Name |
Type |
Required |
Data |
Constraints |
width |
int |
Yes |
Parcel width |
|
depth |
int |
Yes |
Parcel depth |
|
height |
int |
Yes |
Parcel height |
|
3.2.1.2. External carrier parcel number (ExternalCarrierParcelNumber)
Parcel number from external carrier linked to local shipment parcel
Name |
Type |
Required |
Data |
Constraints |
externalCarrier |
enum ["ACS"] |
Yes |
External carrier reference name |
|
parcelNumber |
String |
Yes |
External carrier parcel number |
|
3.3. Shipment Payment (ShipmentPayment)
Shipment payment structure defines who-pays-what in the shipment.
Name |
Type |
Required |
Data |
Constraints |
courierServicePayer |
enum [ "SENDER", "RECIPIENT", "THIRD_PARTY" ] |
Yes |
Courier service payer. |
Validated against the service, destination, contracts and annexes. |
declaredValuePayer |
enum [ "SENDER", "RECIPIENT", "THIRD_PARTY" ] |
No |
Declared value (extended liability) payer. If not provided, the courier service payer is assumed. |
Validated against the service, destination, contracts and annexes. |
packagePayer |
enum [ "SENDER", "RECIPIENT", "THIRD_PARTY" ] |
No |
Package payer. If not provided, the courier service payer is assumed. |
Validated against the service, destination, contracts and annexes. |
thirdPartyClientId |
Long |
No |
Defines shipment third party - used as a payer of any of shipment payable components. |
Third party customer should be a registered customer with valid contract and annex for delayed payment at pickup date. The third party customer should be a customer (object) in the same contract as the logged user. |
discountCardId |
ShipmentDiscountCardId |
No |
Discount card to be used for discount calculation. |
Validated against a referred contract. |
senderBankAccount |
BankAccount |
No |
Sender COD payout account information. |
Valid IBAN should be present if bank account is provided. |
administrativeFee |
Boolean |
No |
Flag to apply administrative fee on price calculations |
Usage of administrative fee is enabled and configured in client contract. Ignored if not applicable for user |
3.3.1. Shipment Discount Card (ShipmentDiscountCardId)
Discount cards provide promotional discounts.
Name |
Type |
Required |
Data |
Constraints |
contractId |
long |
Yes |
Fixed discount card contract id. |
Validated against the accessible contract. |
cardId |
long |
Yes |
Fixed discount card id. |
Validated against the fixed discount card register. |
3.3.2. Bank Account (BankAccount)
Bank account information.
Name |
Type |
Required |
Data |
Constraints |
iban |
String |
Yes |
IBAN. |
Validated according to IBAN standards. |
accountHolder |
String |
Yes |
Bank account holder. |
|
3.4. Shipment Sender And Recipient
3.4.1. Shipment Sender (ShipmentSender)
Shipment sender is not mandatory. If not specified, for the sender is considered the logged user.
Name |
Type |
Required |
Data |
Constraints |
clientId |
Long |
No |
Client id to refer a sender. |
Validate for existence. |
phone1 |
ShipmentPhoneNumber |
Yes |
Sender phone number (for example: +40799123456, 0040799123456, +359999123456 - international format numbers or 0799123456, 0999123456 - local numbers). |
Max size is 20 chars. Phone numbers must contain digits only. The "+" sign is also permitted as a leading symbol. Only spaces are allowed as separators. Only phone numbers starting with "0" (zero) or "+" sign are allowed. |
phone2 |
ShipmentPhoneNumber |
No |
Sender phone number 2. |
Validate for valid phone number, if presents. |
phone3 |
ShipmentPhoneNumber |
No |
Sender phone number 3. |
Validate for valid phone number, if presents. |
clientName |
String |
If clientId is provided, it is forbidden. Otherwise, it is mandatory. |
Sender customer name. |
Validate for valid name (minimum 3 symbols, maximum 60). |
contactName |
String |
No. Forbidden for private persons. Required for companies. |
Sender contact name. |
Maximum 60 |
email |
String |
No |
Sender email. |
Maximum 255 |
privatePerson |
Boolean |
If clientId is provided, it is forbidden. Otherwise, it is mandatory. |
Sender private person flag. |
|
address |
ShipmentAddress |
If clientId is provided or dropoff office is provided, it is forbidden. Otherwise, it is mandatory. |
Sender address. |
Validated for valid values. |
dropoffOfficeId |
Integer |
Required, if the sender is an internal Speedy customer. If the address is provided, it is forbidden. |
Drop off office id. |
Should refer to a valid accessible office. |
dropoffGeoPUDOId |
String |
No. Must be empty if dropoffOfficeId is provided |
DPD drop off office PUDO id |
Should refer to a valid accessible DPD office. |
3.4.2. Shipment Recipient (ShipmentRecipient)
Name |
Type |
Required |
Data |
Constraints |
clientId |
Long |
No |
Client id to refer recipient. |
Validate for existence. |
phone1 |
ShipmentPhoneNumber |
Required, if shipment is with the same day delivery or delivery date is a half-working day or delivery country is abroad. |
Recipient phone number (for example: +40799123456, 0040799123456, +359999123456 - international format numbers or 0799123456, 0999123456 - local numbers). |
Max size is 20 chars. Phone numbers must contain digits only. The "+" sign is also permitted as a leading symbol. Only spaces are allowed as separators. Only phone numbers starting with "0" (zero) or "+" sign are allowed. |
phone2 |
ShipmentPhoneNumber |
No |
Recipient phone number 2. |
Validate for valid phone number, if presents. |
phone3 |
ShipmentPhoneNumber |
No |
Recipient phone number 3. |
Validate for valid phone number, if presents. |
clientName |
String |
If clientId is provided, it is forbidden. Otherwise, it is mandatory. |
Recipient customer name. |
Validate for valid name (minimum 3 symbols, maximum 60). |
objectName |
String |
If clientId is provided, it is forbidden. Otherwise, it is not mandatory. |
Recipient customer object. |
Validate for valid name (maximum 60 symbols). |
contactName |
String |
No. Forbidden for private persons. Required for companies. |
Recipient contact name. |
Maximum 60 |
email |
String |
No |
Recipient email |
Maximum 255. Mandatory for international shipments |
privatePerson |
Boolean |
If clientId is provided, it is forbidden. Otherwise, it is mandatory. |
Recipient private person flag. |
|
address |
ShipmentAddress |
If clientId is provided or pickup office is provided, it is forbidden. Otherwise, it is mandatory. |
Recipient address. |
Validated for valid values. |
pickupOfficeId |
Integer |
Required, if the recipient is an internal Speedy customer. If address is provided, it is forbidden. |
Pickup office id. |
Should refer to a valid accessible office. |
pickupGeoPUDOId |
String |
No. Must be empty if pickupOfficeId is provided |
DPD pickup office PUDO id |
Should refer to a valid accessible DPD office. |
autoSelectNearestOffice |
boolean |
No |
Not supported for every destination country |
Must be supported for destination country |
autoSelectNearestOfficePolicy |
AutoSelectNearestOfficePolicy |
No |
Defines policy for nearest office auto selection. By default the system tries to find nearest office and if office cannot be determined the shipment is delivered to client address |
Applicable if autoSelectNearestOffice is true |
3.4.3. Shipment Address (ShipmentAddress)
This structure is used to provide addresses. Addresses are two types:
- Address type 1 (local addresses - currently supported by Romania and Bulgaria)
- Address type 2 (foreign addresses - all non-local countries)
Address type 1 supports the following requisites:
- countryId
- siteId
- siteType
- siteName
- postCode
- complexId
- complexType
- complexName
- streetId
- streetType
- streetName
- streetNo
- blockNo
- entranceNo
- floorNo
- apartmentNo
- poiId
- addressNote
- x
- y
Address type 2 supports the following requisites:
- countryId
- stateId
- siteId
- siteName
- postCode
- addressLine1
- addressLine2
- x
- y
Name |
Type |
Required |
Data |
Constraints |
countryId |
Integer |
No |
Country ISO code. If not provided, local country is assumed. Used for all address types. |
Validate for valid country code. |
stateId |
String |
Required, if country supports states. |
Country state. Used for addresses of type 2 (foreign address). |
Validate for valid country state. |
siteId |
Long |
Required, if country has full site nomenclature and pair (siteType, siteName) is not provided. |
Site id. Used for all address types. |
Validate for valid site and value is required. |
siteType |
String |
Forbidden, if siteId is provided. Otherwise, is not mandatory. |
Site type can be used in conjunction with countryId and siteName to find unique site. Used for addresses of type 1 (local address). |
Max 20 |
siteName |
String |
Forbidden, if siteId is provided. Otherwise, is not mandatory. |
Site type can be used in conjunction with countryId and siteName to find unique site. Used for all address types. |
Max 50 |
postCode |
String |
No |
Can be used in conjunction with countryId to find unique site. Used for all address types. |
Validated for valid postcode in site and country. Max 10 |
streetId |
Long |
No |
Street identifier. If not provided, but street type and street name are provided - the system will try to find unique match by them in site.
Used for addresses of type 1 (local address). |
Validate for valid street. |
streetType |
String |
No. Forbidden, if streetId is provided. |
Street type. Used for addresses of type 1 (local address). |
Max 15 |
streetName |
String |
No. Forbidden, if streetId is provided. |
Street name. Used for addresses of type 1 (local address). |
Max 50 |
streetNo |
String |
No |
Street number. Used for addresses of type 1 (local address). |
Max 10 |
complexId |
Long |
No |
Complex identifier. If not provided, but complex type and complex name are provided - the system will try to find unique match by them in site.
Used for addresses of type 1 (local address). |
Validate for valid complex. |
complexType |
String |
No. Forbidden, if complexId is provided. |
Complex type. Used for addresses of type 1 (local address). |
Max 15 |
complexName |
String |
No. Forbidden, if complexId is provided. |
Complex name. Used for addresses of type 1 (local address). |
Max 50 |
blockNo |
String |
No |
Block No. Used for addresses of type 1 (local address). |
Max 32 |
entranceNo |
String |
No |
Entrance. Used for addresses of type 1 (local address). |
Max 10 |
floorNo |
String |
No |
Floor. Used for addresses of type 1 (local address). |
Max 10 |
apartmentNo |
String |
No |
Apartment. Used for addresses of type 1 (local address). |
Max 10 |
poiId |
Long |
No |
Point of interest identifier. Used for addresses of type 1 (local address). |
Validate for valid point of interest. |
addressNote |
String |
No |
Address note. Used for addresses of type 1 (local address). |
200 |
addressLine1 |
String |
Required for address type 2. |
Address line 1. Used for addresses of type 2 (foreign address). |
Max 35 |
addressLine2 |
String |
No |
Address line 2. Used for addresses of type 2 (foreign address). |
Max 35 |
x |
Double |
No |
GIS coordinates - X .Used for all address types. |
|
y |
Double |
No |
GIS coordinates - Y. Used for all address types. |
|
For address type 1, special validation rule is applied:
- not empty street (ID or Type&Name) and (streetNo or blockNo) or
- not empty complex (ID or Type&Name) and (streetNo or blockNo) or
- not empty poiId or
- all components of the address within the site stored in addressNote
View the examples
3.4.3.1. Address (Address)
This structure extends Shipment Address structure with additional fields for address represntation.
This structure is returned in responses.
Name |
Type |
Required |
Data |
Constraints |
ShipmentAddress fields are here |
fullAddressString |
String |
Yes |
Full address in a single text field |
|
siteAddressString |
String |
Yes |
The address site description in a single text |
|
localAddressString |
String |
Yes |
The address within the site in a single text |
|
3.4.4. Shipment Phone Number (ShipmentPhoneNumber)
This structure is used to provide phone numbers.
Name |
Type |
Required |
Data |
Constraints |
number |
String |
Yes
|
Phone number. |
Validate for valid phone number. |
extension |
String |
No |
Extension. |
Validate for valid extension, if presents. |
3.4.5. Auto-select Nearest Office Policy (AutoSelectNearestOfficePolicy)
This structure is used to define policy for nearest office auto selection. By default the system tries to find nearest office and if office cannot be determined the shipment is delivered to client address
Name |
Type |
Required |
Data |
Constraints |
unavailableNearestOfficeAction |
enum ["DELIVERY_TO_ADDRESS", "CANCEL_WITH_ERROR"] |
No Default is "DELIVERY_TO_ADDRESS" |
The action to take if nearest office is unavailable. Values can be:
- "DELIVERY_TO_ADDRESS" - do not change recipient location and deliver to client address
- "CANCEL_WITH_ERROR" - cancel shipment and return error in response
|
|
officeType |
enum ["OFFICE", "APT"] |
No |
Office type filter. Values can be:
- "OFFICE" - select nearest office
- "APT" - select nearest locker (APT)
No office filter selection is applied if value is not specified |
Not supported for every destination country |
3.5. Shipment Parcels
Shipment parcel reference is returned in response of the create shipment request, it describes the generated parcel and references to it.
3.5.1. Created Shipment Parcel (CreatedShipmentParcel)
Name |
Type |
Mandatory |
Data |
seqNo |
int |
Yes |
Sequence number within the shipment. |
id |
String |
Yes |
Generated parcel id. |
externalCarrierId |
Integer |
No |
External carrier id in case this parcel is mapped to an external carrier system |
externalCarrierParcelNumber |
String |
No |
External carrier parcel number in case this parcel is mapped to an external carrier system |
3.5.2 Shipment Parcel Reference (ShipmentParcelRef)
Name |
Type |
Mandatory |
Data |
Constraint |
id |
String |
No If externalCarrierParcelNumber is not provided, it is mandatory. |
Parcel id |
|
externalCarrierParcelNumber |
String |
No |
External carrier parcel number used to create parcels. |
|
fullBarcode |
String |
No |
No If id or externalCarrierParcelNumber is not provided, it is mandatory. |
|
3.5.3. Parcel Handover (ParcelHandover)
This structure extends ShipmentParcelRef structure with additional fields.
Name |
Type |
Mandatory |
Data |
Constraint |
dateTime |
DateTime in format(yyyy-MM-dd'T'HH:mm:ssZ) |
Yes |
Datetime for handover operation |
|
ShipmentParcelRef fields are here |
3.5.4. Track Shipment Parcel Reference (TrackShipmentParcelRef)
Name |
Type |
Mandatory |
Data |
Constraint |
ref |
String |
No |
Reference to parcel or shipment.
The reference is searched in ref1 and ref2 fields in parcels
or in ref1 and ref2 fields in shipment. A parcel is included in tracking if reference is found in parcel references.
Otherwise, only first shipment parcel (this one with the same number as shipment id) is included in tracking
in case reference is found in shipment references. |
If externalCarrierParcelNumber or parcelId is provided, it is ignored.
Since the reference is not unique, the maximum barcodes to include for tracking is limited to 10 per reference in request. |
ShipmentParcelRef fields are here |
3.5.5. Midway Carrier Parcel Handover (MidwayCarrierParcelHandover)
Name |
Type |
Mandatory |
Data |
Constraint |
id |
String |
Yes |
Parcel id |
|
countryId |
Long |
Yes |
Country ISO id |
|
dateTime |
DateTime in format(yyyy-MM-dd'T'HH:mm:ssZ) |
Yes |
Datetime for handover operation |
|
siteName |
String |
No |
Site name |
|
3.6. Shipment Price (ShipmentPrice)
Shipment price structure is returned in response of the calculations or create shipment requests.
Name |
Type |
Mandatory |
Data |
amount |
double |
Yes |
Total amount (before VAT) in customer’s currency. |
vat |
double |
Yes |
VAT amount in customer’s currency. |
total |
double |
Yes |
Total amount (amount + vat) in customer’s currency. |
currency |
String |
Yes |
Customer currency code. |
details |
Map<String, ShipmentPriceAmount> |
Yes |
Amounts that form totals in customer’s currency (including net, discounts, surcharges). Keys in the map are the titles of the items included in the receipt. |
amountLocal |
double |
Yes |
Total amount before VAT in local system currency. |
vatLocal |
double |
Yes |
VAT in local system currency. |
totalLocal |
double |
Yes |
Total amount in local system currency (amountLocal + vatLocal). |
currencyLocal |
String |
Yes |
Local system currency code. |
detailsLocal |
Map<String, ShipmentPriceAmount> |
Yes |
Amounts that form totals in local system currency (including net, discounts, surcharges). Keys in the map are the titles of the items included in the receipt. |
currencyExchangeRateUnit |
int |
Yes |
Currency exchange rate unit for customer currency (1 unit of local system currency is equal to exchangeRateUnit / exchangeRate). |
currencyExchangeRate |
double |
Yes |
Currency exchange rate used for customer currency conversion. |
returnAmounts |
ReturnAmounts |
No |
Shipment returns amounts due |
3.6.1. Shipment Price Amount (ShipmentPriceAmount)
Shipment price amount is returned as a part of receipts in calculation responses.
Name |
Type |
Mandatory |
Data |
amount |
double |
Yes |
Shipment price amount. Discounts are negative. Surcharges and net amount are positive. |
percent |
Double |
No |
Percent field is returned, if there is a percent associated with the amount. Fixed price amounts do not have a percent value. 20% is returned as 0.2. |
vatPercent |
double |
Yes |
VAT percent applicable to the amount. Amounts without VAT have 0.0 value in that field. Amounts with 20% VAT have 0.2 value in that field. |
3.6.2. Return Amounts (ReturnAmounts)
Shipment price return amounts represents return services due amounts.
3.6.2.1. Money Transfer Premium (MoneyTransferPremium)
Money transfer premium amount due.
Name |
Type |
Mandatory |
Data |
amount |
Double |
No |
Amount due in client currency |
amountLocal |
Double |
No |
Amount due in local currency |
payer |
senum ["SENDER", "RECIPIENT", "THIRD_PARTY"] |
No |
The payer of money transfer premium |
3.7. Errors (Error)
Errors are returned in responses.
Name |
Type |
Mandatory |
Data |
context |
String |
No |
Message context, if associated. This refers to an item that is wrong and should be corrected. |
message |
String |
Yes |
Error message in language specified in the request. |
id |
String |
Yes |
System generated unique error id to be used as this error reference. |
code |
int |
Yes |
Error code. See Appendix 3 - Error Codes for more details. |
component |
String |
No |
The request component, if applicable, relevant to this error in JSONPath format with dot notation.
(For example $.sender.address.siteId refers to siteId property in sender address.) |
3.8. Parcel to Print (ParcelToPrint)
3.8.1. Parcel to Print Additional Barcode (ParcelToPrintAdditionalBarcode)
Additional barcode information to print in the label is provided in this structure.
Name |
Type |
Mandatory |
Data |
Constraints |
value |
String |
Yes |
Barcode value. |
For barcode formats other than 'CODE128' it must contain digits only. |
label |
String |
No |
It is printed just below the barcode image. |
For barcode formats other than 'CODE128' label must be equal to the value. |
format |
enum ["CODE128", "EAN13", "EAN8", "UPCA", "UPCE"] |
Yes |
Additional barcode format. |
|
3.8.2. Label Info (LabelInfo)
Print label information.
Name |
Type |
Mandatory |
Data |
Constraints |
parcelId |
String |
Yes |
Parcel id. |
|
hubId |
Integer |
No |
Delivery Hub id. |
|
officeId |
Integer |
No |
Delivery Office id. |
|
officeName |
String |
No |
Delivery Office name. |
|
deadlineDay |
Integer |
No |
Delivery deadline day of month. |
|
deadlineMonth |
Integer |
No |
Delivery deadline month . |
|
tourId |
Integer |
No |
Tour Id. |
|
fullBarcode |
String |
Yes |
Barcode containing the parcel number and important routing information. |
|
exportPriority |
Integer |
Yes |
Export priority |
|
3.9. TrackedParcel (TrackedParcel)
Track parcel information.
Name |
Type |
Mandatory |
Data |
Constraints |
parcelId |
String |
Yes |
Parcel id. |
|
externalCarrierParcelNumbers |
String[] |
No |
The list of all external carrier parcel numbers associated with the parcel. |
|
operations |
TrackedParcelOperation[] |
Yes |
The list of operations (scans). |
|
externalCarrierParcelNumbersDetails |
Map<String, ExternalCarrierParcelNumberDetails> |
No |
Map of external carrier parcel details. Keys in the map are external carrier parcel numbers. |
|
error |
Error |
No |
Error for this parcel. |
|
3.9.1. Tracked Parcel Operation (TrackedParcelOperation)
Name |
Type |
Mandatory |
Data |
Constraints |
dateTime |
Date (datetime) |
Yes |
Operation date time. |
|
operationCode |
int |
Yes |
Operation code. See Appendix1 for reference. |
|
place |
String |
No |
Place of operation. |
|
description |
String |
Yes |
Operation description. |
|
comment |
String |
No |
Operation comment. |
|
exceptionCodes |
String[] |
No |
List of exception codes for this operation. See Appendix2 for references. |
|
returnShipmentId |
String |
No |
If operation leads to return - the return shipment id is in this field. |
|
redirectShipmentId |
String |
No |
If operation leads to redirect - the redirected shipment id is in this field. |
|
consignee |
String |
No |
If operation leads to delivery - the recipient name is in this field. |
|
podImageURL |
String |
No |
If operation leads to pod capture - the pod image URL is in this field. |
|
additionalInfo |
TrackedParcelOperationAdditionalInfo |
No |
Additional information for operation |
|
3.9.1.1. Tracked Parcel Operation Additional Info(TrackedParcelOperationAdditionalInfo)
Name |
Type |
Mandatory |
Data |
Constraints |
officeURL |
String |
No |
Pickup office URL (applicable for operation 134) |
|
geoPUDOId |
String |
No |
Pickup office PUDO id in case pickup office is a DPD office (applicable for operation 134) |
|
predict |
TrackedParcelOperationAdditionalInfoPredict |
For operation with code 175 (Predict) |
Predict details |
|
3.9.1.1.1. Tracked Parcel Predict Operation Additional Info(TrackedParcelOperationAdditionalInfoPredict)
Name |
Type |
Mandatory |
Data |
Constraints |
predictedVisitDateTimeFrom |
Datetime (format: yyyy-MM-dd'T'HH:mm:ssZ) |
Yes |
Start of expected time window for delivery |
|
predictedVisitDateTimeTo |
Datetime (format: yyyy-MM-dd'T'HH:mm:ssZ) |
Yes |
End of expected time window for delivery |
|
includedDelayInMinutes |
Integer |
No |
Expected delivery time delay in minutes (if any). The expected time window for delivery is adjusted with this delay |
|
canceled |
boolean |
Yes |
The value is true in case the predict is cancelled |
|
3.9.2. External Carrier Parcel Number Details(ExternalCarrierParcelNumberDetails)
Name |
Type |
Mandatory |
Data |
Constraints |
externalCarrierId |
int |
Yes |
Id of the external carrier |
|
externalCarrierName |
String |
Yes |
Name of the external carrier |
|
trackAndTraceUrl |
String |
No |
Track and trace URL of the external carrier |
|
3.10. Pickup order (PickupOrder)
Pickup order data.
Name |
Type |
Mandatory |
Data |
Constraints |
id |
long |
Yes |
Order id. |
|
shipmentIds |
String[] |
Yes |
The list of all shipments associated with the order. |
|
pickupPeriodFrom |
Datetime (format: yyyy-MM-dd'T'HH:mm:ssZ) |
No |
Estimated period start for courier pickup visit |
|
pickupPeriodTo |
Datetime (format: yyyy-MM-dd'T'HH:mm:ssZ) |
No |
Estimated period end for courier pickup visit |
|
3.11. Country
Country data
Name |
Type |
Data |
id |
integer |
Country ISO |
Name |
String |
Country name in requested language |
nameEn |
String |
Country name in English |
isoAlpha2 |
String |
Country ISO alpha 2 code |
isoAlpha3 |
String |
Country ISO alpha 3 code |
postCodeFormats |
String[] |
Allowed postcode format patterns.
If empty string presents in allowed patterns this means - postcode format is not restricted and post code validation is not applied on addresses in this country. For non-empty patterns, the following characters are placeholders for:
- N - digit
- A - letter
- ? - digit or letter
- B - letter
- O - digit
|
requireState |
String |
Require state flag |
addressType |
integer |
Address type for this country (1 or 2 - see ShipmentAddress) |
currencyCode |
String |
Currency code used for COD in this country |
defaultOfficeId |
Integer |
Default office id |
streetTypes |
AddressNomenclatureType[] |
Valid street types for country (applicable if addressType is equal to 1) |
complexTypes |
AddressNomenclatureType[] |
Valid complex types for country (applicable if addressType is equal to 1) |
siteNomen |
integer |
Specifies site nomenclature (sites) for this country. Values can be:
- 0 - No site nomenclature for this country.
- 1 - Full site nomenclature for this country.
- 2 - Partial site nomenclature for this country.
|
3.11.1. Address Nomenclature Type (AddressNomenclatureType)
Used for address type 1 street types and complex types
Name |
Type |
Data |
Name |
String |
Address nomenclature type name in requested language |
nameEn |
String |
Address nomenclature type name in English |
3.12. State
State data
Name |
Type |
Data |
id |
String |
State id |
Name |
String |
State name in requested language |
nameEn |
String |
State name in English |
stateAlpha |
String |
State ISO alpha code |
countryId |
integer |
State country id |
3.13. Site
Site dats
Name |
Type |
Data |
id |
long |
Site id |
countryId |
integer |
Site country id |
mainSiteId |
Long |
Here we have reference to main site if this site is a "satellite" one.
A satellite site is considered equal (to their main site) in context of "same city" service allowance |
type |
String |
Site type in requested language |
typeEn |
String |
Site type in English |
Name |
String |
Site name in requested language |
nameEn |
String |
Site name in English |
municipality |
String |
Municipality name in requested language |
municipalityEn |
String |
Municipality name in English |
region |
String |
Region name in requested language |
regionEn |
String |
Region name in English |
postCode |
String |
Default post code for this site (if any) |
addressNomenclature |
integer |
Code for address nomenclature (streets, complexes, blocks, poi) support.
- 0 - no address nomenclature
- 1 - full address nomenclature
- 2 - partial address nomenclature
|
x |
Double |
Site center GPS X (longitude) coordinate |
y |
Double |
Site center GPS Y (latitude) coordinate |
servingDays |
String |
Serving days for this site.
Format: 7 serial digits (0 or 1) where each digit corresponds to a day in week (the first digit corresponds to Monday, the second to Tuesday and so on).
Value of '0' (zero) means that the site is not served on this day while '1' (one) means that it is served.
(Example: the text "0100100" means that the site is served on Tuesday and Friday only) |
servingOfficeId |
Integer |
Site's serving office |
servingHubOfficeId |
Integer |
The hub office ID to which serving office is connected |
3.14. Street
Street data
Name |
Type |
Data |
id |
long |
Street id |
siteId |
long |
Street site id |
type |
String |
Street type in requested language |
typeEn |
String |
Street type in English |
Name |
String |
Street name in requested language |
nameEn |
String |
Street name in English |
actualId |
Long |
Actual street id (if this street is old and renamed) |
actualType |
String |
Actual street type in requested language (if this street is old and renamed) |
actualTypeEn |
String |
Actual street type in English (if this street is old and renamed) |
actualName |
String |
Actual street name in local language |
actualNameEn |
String |
Actual street name in English |
3.15. Complex
Complex data
Name |
Type |
Data |
id |
long |
Complex id |
siteId |
long |
Complex site id |
type |
String |
Complex type in requested language |
typeEn |
String |
Complex type in English |
Name |
String |
Complex name in requested language |
nameEn |
String |
Complex name in English |
actualId |
Long |
Actual complex id (if this complex is old and renamed) |
actualType |
String |
Actual complex type in requested language (if this complex is old and renamed) |
actualTypeEn |
String |
Actual complex type in English (if this complex is old and renamed) |
actualName |
String |
Actual complex name in requested language (if this complex is old and renamed) |
actualNameEn |
String |
Actual complex name in English (if this complex is old and renamed) |
3.16. Block
Block data
Name |
Type |
Data |
siteId |
long |
Block site id |
Name |
String |
Block name in requested language |
nameEn |
String |
Block name in English |
3.17. Point of interest (PointOfInterest)
Point of interest data
Name |
Type |
Data |
id |
long |
POI id |
siteId |
long |
POI site id |
Name |
String |
POI name in requested language |
nameEn |
String |
POI name in English |
type |
String |
POI type in requested language |
typeEn |
String |
POI type in English |
address |
String |
POI address in requested language |
addressEn |
String |
POI address in English |
x |
Double |
POI GPS X (longitude) coordinate |
y |
Double |
POI GPS Y (latitude) coordinate |
3.18. Office (Office)
Office data
Name |
Type |
Data |
id |
Integer |
Office id |
Name |
String |
Office name in requested language |
nameEn |
String |
Office name in English |
siteId |
long |
Office site id |
address |
Address |
Office address in requested language |
workingTimeFrom |
String ("HH:mm") |
Office work time start for days with standard (FULL) working schedule |
workingTimeTo |
String ("HH:mm") |
Office work time end for days with standard (FULL) working schedule |
workingTimeHalfFrom |
String ("HH:mm") |
Office work time start for days with saturday (HALF) working schedule |
workingTimeHalfTo |
String ("HH:mm") |
Office work time end for days with saturday (HALF) working schedule |
workingTimeDayOffFrom |
String ("HH:mm") |
Office work time start for non-working days (DAY OFF) |
workingTimeDayOffTo |
String ("HH:mm") |
Office work time end for non-working days (DAY OFF) |
sameDayDepartureCutoff |
String ("HH:mm") |
Office same day departure cutoff for days with standard (FULL) working schedule (departure of parcels delivered to office after the cutoff time is next working day) |
sameDayDepartureCutoffHalf |
String ("HH:mm") |
Office same day departure cutoff for days with saturday (HALF) working schedule (departure of parcels delivered to office after the cutoff time is next working day) |
sameDayDepartureCutoffDayOff |
String ("HH:mm") |
Office same day departure cutoff for non-working days (DAY OFF) working schedule (departure of parcels delivered to office after the cutoff time is next working day) |
maxParcelDimensions |
ShipmentParcelSize |
Max parcels dimensions for this office |
maxParcelWeight |
double |
Max parcel weight |
type |
enum ["OFFICE", "APT"] |
Office type |
nearbyOfficeId |
Integer |
Nearby office id |
workingTimeSchedule |
OfficeWorkingTimeSchedule[] |
Office work time schedule for next days |
palletOffice |
boolean |
Pallet office flag |
cardPaymentAllowed |
boolean |
Flag, indicating this office allows card payments |
cashPaymentAllowed |
boolean |
Flag, indicating this office allows cash payments |
validFrom |
Date (yyyy-MM-dd) |
Valid from date |
validTo |
Date (yyyy-MM-dd) |
Valid to date |
cargoTypesAllowed |
enum[]
(array with values from enum:
["PARCEL", "PALLET", "TYRE"])
(Same as enum in field cargoType in CourierService) |
Allowed cargo types |
pickUpAllowed |
boolean |
Flag, indicating whether parcels can be picked up from office |
dropOffAllowed |
boolean |
Flag, indicating whether parcels can be dropped-off in office |
3.18.1. Office Working Time Schedule (OfficeWorkingTimeSchedule)
Name |
Type |
Data |
date |
Date (format: "yyyy-MM-dd") |
Date this schedule is applicable for |
workingTimeFrom |
String ("HH:mm") |
Office working time start for this date |
workingTimeTo |
String ("HH:mm") |
Office working time end for this date |
sameDayDepartureCutoff |
String ("HH:mm") |
Office same day departure cutoff for this day (departure of parcels delivered to office after the cutoff time is next working day) |
standardSchedule |
boolean |
If true - it is from standard schedule, otherwise office working time is overridden for this specific day |
3.19. Calculation Service
Calculation service defines service level agreement for the shipment - when shipment should be picked up, service code to be used, sub-services, etc
Name |
Type |
Required |
Data |
Constraints |
pickupDate |
Date (Example: 2017-11-12) |
No (default value is today) |
The date for shipment pickup. |
Could be today or a future date |
autoAdjustPickupDate |
Boolean |
No (default value is false) |
To find first available date for pickup starting from pickupDate according to pickup schedule for services |
|
serviceIds |
integer[] |
Yes |
Services for which calculation is requested |
Each service id (code) should be valid for the destination. |
additionalServices |
ShipmentAdditionalServices |
No |
Defines sub-services (like COD, Declared value, etc.) associated with the shipment. |
Sub-services may be allowed or forbidden for selected service and/or destination. |
deferredDays |
Integer |
No (default value is 0) |
This parameter allows users to specify by how many (business) days they would like to postpone the shipment delivery from the standard term. |
Allowed values are 0, 1 and 2 |
saturdayDelivery |
Boolean |
No |
This parameter may adjust delivery date to the first business day, if the standard calculated delivery day is a half-working day. If not specified, system will determine this flag based on configured delivery customer working schedule |
|
3.20. Calculation Sender
Calculation sender is not mandatory. If not specified logged user is the sender.
Name |
Type |
Required |
Data |
Constraints |
clientId |
Long |
No |
Client id to refer serving client |
Validate for existence. |
privatePerson |
Boolean |
If clientId is provided, it is forbidden. Otherwise, it is mandatory. |
Private person flag. |
|
addressLocation |
AddressLocation |
Required if office id and clientId are missing. Otherwise it is forbidden |
Address location, implies pickup at client address |
|
dropoffOfficeId |
Integer |
Required if address location and clientId are missing. If address location presents it is forbidden |
Drop-off office id |
Validated for valid office. |
dropoffGeoPUDOId |
String |
No. Must be empty if dropoffOfficeId is provided |
DPD drop off office PUDO id |
Should refer to a valid accessible DPD office. |
3.21. Calculation Recipient
Name |
Type |
Required |
Data |
Constraints |
clientId |
Long |
No |
Client id to refer serving client |
Validate for existence. |
privatePerson |
Boolean |
If clientId is provided, it is forbidden. Otherwise, it is mandatory. |
Private person flag. |
|
addressLocation |
AddressLocation |
Required if office id and clientId are missing. Otherwise it is forbidden |
Address location, implies delivery at client address |
|
pickupOfficeId |
Integer |
Required if address location and clientId are missing. If address location presents it is forbidden |
Pickup office id |
Validated for valid office. |
pickupGeoPUDOId |
String |
No. Must be empty if pickupOfficeId is provided |
DPD pickup office PUDO id |
Should refer to a valid accessible DPD office. |
3.22. Calculation Address Location
Name |
Type |
Required |
Data |
Constraints |
countryId |
Integer |
No |
Country ISO code. If not provided, local country is assumed. Used for all address types. |
Validated for valid country code. |
stateId |
String |
Required, if country supports states |
Country state. Used for addresses of type 2 (foreign address). |
Validated for valid country state. |
siteId |
Long |
Required, if country has full site nomenclature and pair (siteType, siteName) is not provided. |
Site id. Used for all address types. |
Validated for valid site |
siteType |
String |
Forbidden, if siteId is provided. Otherwise, is not mandatory |
Site type can be used in conjunction with countryId and siteName to find unique site. Used for addresses of type 1 (local address). |
Max 20 characters |
siteName |
String |
Forbidden, if siteId is provided. Otherwise, is not mandatory |
Site type can be used in conjunction with countryId and siteName to find unique site. Used for all address types. |
Max 50 characters |
postCode |
String |
Required if country requires postcode for addresses |
Can be used in conjunction with countryId to find unique site. Used for all address types. |
Validated for valid postcode in site and country. Max 10 characters |
3.23. Calculation Content
Calculation content is used to describe what is to be delivered with the shipment for calculation purposes.
Name |
Type |
Required |
Data |
Constraints |
parcelsCount |
Integer |
Required when parcels list is empty |
Total shipment parcels count. Ignored, if parcels list is not empty. |
Validated against the minimum and maximum allowed for the service. |
totalWeight |
Double |
Required when parcels list is empty |
Total weight declared for the shipment. Ignored, if parcels list is not empty. The total weight is the sum of all parcels declaredWeight in that case. |
Validated against the minimum and maximum allowed for the service. |
documents |
Boolean |
No |
Documents flag of the shipment |
|
palletized |
Boolean |
No |
Palletized flag of the shipment. |
|
parcels |
ShipmentParcel[] |
Required for pallet and postal services. |
List of parcels |
Validated against the service configuration and pickup and delivery capacity of the depots and couriers. |
3.24. Calculation Result
Name |
Type |
Data |
serviceId |
integer |
Service id |
additionalServices |
ShipmentAdditionalServices |
Additional services included in calculation |
price |
ShipmentPrice |
Returned, if customer has access to view the amounts of the shipment. |
pickupDate |
Date |
Pickup date. |
deliveryDeadline |
DateTime |
Deadline for delivery. Returned, if available |
error |
Error |
Response error. |
3.25. Client
Name |
Type |
Data |
clientId |
Long |
Client id |
clientName |
String |
Client name |
objectName |
String |
Object name |
contactName |
String |
Contact name |
address |
Address |
Client address |
email |
String |
Client email |
privatePerson |
Boolean |
Private person flag. |
3.26. Shipment
Name |
Type |
Data |
id |
String |
Shipment id |
sender |
Sender |
Shipment sender. |
recipient |
Recipient |
Shipment recipient. |
service |
ShipmentService |
Shipment service level agreement. |
content |
Content |
Shipment content. |
payment |
Payment |
Shipment payment. |
shipmentNote |
String |
Customer’s note associated with the shipment. |
ref1 |
String |
Reference number or text. |
ref2 |
String |
Reference number or text. |
price |
ShipmentPrice |
Shipment payment. |
delivery |
ShipmentDelivery |
Shipment delivery. |
primaryShipment |
PrimaryShipment |
Primary shipment. |
returnShipmentId |
String |
Return shipment id (in case this shipment is returned to sender) |
redirectShipmentId |
String |
Redirect shipment id (in case this shipment is redirected to new delivery location) |
pendingShipment |
Boolean |
If this flag is true, the shipment is created in pending shipment state.
Shipments in pending shipment state can have incomplete data that defines logistics (without complete addresses, only sites)
Pending shipment state is closed with updateShipment method that makes shipments complete. |
3.26.1. Sender (Sender)
This structure extends Client structure with additional fields.
Name |
Type |
Data |
Client fields are here |
dropoffOfficeId |
Integer |
Drop-off office id |
dropoffGeoPUDOId |
String |
DPD PUDO Id |
3.26.2. Recipient (Recipient)
This structure extends Client structure with additional fields.
Name |
Type |
Data |
Client fields are here |
pickupOfficeId |
Integer |
Pickup office id |
pickupGeoPUDOId |
String |
DPD PUDO Id |
3.26.3. Content (Content)
Name |
Type |
Data |
parcelsCount |
Integer |
Total shipment parcels count. |
declaredWeight |
Double |
Shipment declared weight |
measuredWeight |
Double |
Shipment measured weight |
calculationWeight |
Double |
Shipment calculation weight |
contents |
String |
Shipment content’s description. |
package |
String |
Shipment package. |
documents |
Boolean |
Documents flag of the shipment (shipment content is documents) |
palletized |
Boolean |
Palletized flag of the shipment. |
parcels |
Parcel[] |
Shipment parcels |
pendingParcels |
Boolean |
If this flag is true, the shipment is created in pending parcels state.
Shipments in pending parcels state allows adding parcels with addParcel method.
Pending parcels state is closed with finalizePendingShipment method. |
3.26.3.1. Parcel (Parcel)
Shipment parcel details
Name |
Type |
Data |
id |
String |
Parcel id |
seqNo |
Integer |
Parcel sequence number within the shipment |
packageUniqueNumber |
Long |
Package number associated with parcel. |
declaredSize |
ShipmentParcelSize |
Parcel declared size |
measuredSize |
ShipmentParcelSize |
Parcel measured size |
calculationSize |
ShipmentParcelSize |
Parcel calculation size |
declaredWeight |
Double |
Parcel declared weight |
measuredWeight |
Double |
Parcel measured weight |
calculationWeight |
Double |
Parcel calculation weight |
externalCarrierParcelNumbers |
String[] |
External carrier parcel numbers associated with this parcel |
baseType |
String |
Base type name |
size |
String |
Size name |
3.26.4. Payment (Payment)
Name |
Type |
Data |
courierServicePayer |
enum ["SENDER", "RECIPIENT", "THIRD_PARTY"] |
Courier service payer. |
declaredValuePayer |
enum ["SENDER", "RECIPIENT", "THIRD_PARTY"] |
Declared value payer |
packagePayer |
enum ["SENDER", "RECIPIENT", "THIRD_PARTY"] |
Package payer |
thirdPartyClientId |
Long |
Third party payer client id in case one of the payers is THIRD_PARTY |
discountCardId |
ShipmentDiscountCardId |
Discount card used in calculation. |
codPayment |
CODPayment |
COD Payment details |
3.26.4.1. CODPayment (CODPayment)
COD payment details
Name |
Type |
Data |
date |
Datetime (format yyyy-MM-dd'T'HH:mm:ssZ) |
Pay out date |
totalPayedOutAmount |
double |
Total paid out COD amount |
3.26.5. Shipment Delivery (ShipmentDelivery)
Name |
Type |
Data |
deadline |
Datetime (format: yyyy-MM-dd'T'HH:mm:ssZ) |
Deadline for this shipment |
deliveryDateTime |
Datetime (format: yyyy-MM-dd'T'HH:mm:ssZ) |
Datetime of actual delivery (if shipment is delivered) |
consignee |
String |
Shipment consignee (if shipment is delivered) |
deliveryNote |
String |
Shipment delivery note (if shipment is delivered) |
3.26.6. PrimaryShipment (PrimaryShipment)
Name |
Type |
Data |
id |
String |
Primary shipment id |
type |
enum ["RETURN_SHIPMENT", "STORAGE_PAYMENT", "REDIRECT", "SEND_BACK", "MONEY_TRANSFER", "TRANSPORT_DAMAGED", "RETURN_VOUCHER"] |
Primary shipment type - how this secondary shipment is related to primary one
- RETURN_SHIPMENT - if this shipment is one of return of documents (rod) / returnReceipt / swap / return of pallets (rop) for a primary one
- STORAGE_PAYMENT - if this shipment is for warehouse charges for a primary one
- REDIRECT - if this shipment redirects primary one
- SEND_BACK - if this shipment returns primary one to sender
- MONEY_TRANSFER - if this shipment is a money transfer for a primary one
- TRANSPORT_DAMAGED - if this shipment is for damaged primary shipment transport
- VOUCHER_RETURN - if this shipment is a voucher return for a primary one
|
3.26.7. Secondary Shipment(SecondaryShipment)
Name |
Type |
Data |
id |
String |
Secondary shipment id |
type |
enum ["RETURN_SHIPMENT", "STORAGE_PAYMENT", "REDIRECT", "SEND_BACK", "MONEY_TRANSFER", "TRANSPORT_DAMAGED", "RETURN_VOUCHER"]
(Same as enum in field type in PrimaryShipment) |
Primary shipment type - how this secondary shipment is realted to primary one
- RETURN_SHIPMENT - if this shipment is one of return of documents (rod) / returnReceipt / swap / return of pallets (rop) for a primary one
- STORAGE_PAYMENT - if this shipment is for warehouse charges for a primary one
- REDIRECT - if this shipment redirects primary one
- SEND_BACK - if this shipment returns primary one to sender
- MONEY_TRANSFER - if this shipment is a money transfer for a primary one
- TRANSPORT_DAMAGED - if this shipment is for damaged primary shipment transport
- VOUCHER_RETURN - if this shipment is a voucher return for a primary one
|
parcels |
ShipmentParcelNumber[] |
Shipment parcels |
pickupDate |
Date (yyyy-MM-dd) |
Secondary shipment pickup date |
serviceId |
int |
Secondary shipment service id |
hasScans |
boolean |
Flag that shows whether the secondary shipment is scanned |
3.26.8. Shipment Parcel Number(ShipmentParcelNumber)
Name |
Type |
Data |
id |
String |
Parcel id |
seqNo |
int |
Parcel sequence number in the shipment. |
3.27. Courier Service
Name |
Type |
Data |
id |
int |
Courier service id |
Name |
String |
Courier service name in local language |
nameEn |
String |
Courier service name in English |
additionalServices |
AdditionalCourierServices |
Additional services options |
cargoType |
enum ["PARCEL", "PALLET", "TYRE"] |
Cargo type |
requireParcelWeight |
boolean |
Require weight for each parcel on create shipment |
requireParcelSize |
boolean |
Require size for each parcel on create shipment |
3.27.1. Additional Courier Services
3.27.1.1. Additional Courier Service
Name |
Type |
Data |
allowance |
enum
["FORBIDDEN", "ALLOWED", "REQUIRED"] |
Allowance value - Forbidden - this additional service is not allowed for courier service
- Allowed - this additional service is allowed for usage for courier service. It could be either used or skipped on create shipment
- Required - this additional service is mandatory to be used with courier service on create shipment
|
3.28. Extended Courier Service
Name |
Type |
Data |
CourierService fields are here |
deadline |
Date (yyyy-MM-dd'T'HH:mm:ssZ) |
Deadline for delivery |
3.29. Bulk Tracking Data File
Name |
Type |
Data |
id |
long |
File id |
url |
String |
File url |
3.30. Payout
Name |
Type |
Data |
date |
Date (yyyy-MM-dd) |
Payout date |
docId |
Long |
Payout document id |
docType |
enum ["CASH", "POSTAL_MONEY_TRANSFER"] |
Payout document type |
paymentType |
enum ["CASH", "BANK"] |
Payout payment type |
payee |
String |
Payee |
currency |
String |
Payout currency |
amount |
double |
Payout amount |
details |
PayoutDetails[] |
List of payout details |
3.30.1. Payout Details
Name |
Type |
Data |
lineNo |
int |
Payout line number |
shipmentId |
String |
Payout shipment id |
pickupDate |
Date (yyyy-MM-dd) |
Date of shipment pickup |
primaryShipmentPickupDate |
Date (yyyy-MM-dd) |
Date of primary shipment pickup in case this shipment is a secondary one |
deliveryDate |
Date (yyyy-MM-dd) |
Shipment delivery date |
sender |
String |
Shipment sender |
recipient |
String |
Shipment recipient |
note |
String |
Shipment note |
ref1 |
String |
Shipment ref1 (reference) |
ref2 |
String |
Shipment ref2 (reference) |
currency |
String |
Payout currency |
order |
Long |
Order id |
amount |
Double |
Payout amount |
3.31. SpecialDeliveryRequirements
Name |
Type |
Data |
requiredForAllShipments |
boolean |
Indicates whether special delivery requirements are mandatory for each shipment |
requirements |
Requirement[] |
List of requirements |
3.31.1. Requirement
Name |
Type |
Data |
id |
int |
Special delivery requirement id |
text |
String |
Requirement text |
3.32. OfficeResult
This structure extends Office structure with additional fields.
Name |
Type |
Data |
distance |
Integer |
Distance from searched location |
Office fields are here |
3.33. CODAdditionalServiceContractInfo
Name |
Type |
Data |
moneyTransferAllowed |
boolean |
COD as money transfer allowed flag |
codFiscalReceiptAllowed | boolean | Issuing COD fiscal receipt on behalf of client allowed flag |
hasCODAnnex | boolean | Logged client has COD annex flag |
internationalCODAnnexes |
CODInternationalAnnexContractInfo[] |
List of international COD annex contract info |
3.33.1. CODInternationalAnnexContractInfo
Name |
Type |
Data |
countryId |
int |
International annex country id |
countryName |
String |
International annex country name |