Integrator Guide v24101
Integrator Guide v24101
Version 24.10.1
The Eurosender API offers businesses a fast and efficient solution for managing orders. Key functionalities
include:
• Quote Generation: Obtain detailed quotes, including pricing and shipping options, for various service
types.
• Order Validation: Validate orders before finalizing them to ensure accuracy.
• Order Creation: Seamlessly create an order in our system and generate label.
• Order Get Pickup Timeframes: Get pickup timeframes suitable for your shipment.
• Order Pickup Creation: Set pickup timeframe on created order.
• Order Cancellation: Cancel your order.
• Order Details and Statuses: Retrieve comprehensive details and statuses for each order.
• Document Access: Access essential documents, labels, and tracking numbers.
• Delivery Monitoring: Monitor delivery statuses in real time.
• Proforma Invoices: Create and upload proforma or commercial invoices with ease.
The API features a robust set of webhooks, allowing you to subscribe to various events and receive real-time
updates, ensuring you always stay informed.
Available Webhooks
The Eurosender API offers various webhooks to provide real-time notifications and updates:
Environments
• Sandbox: A testing environment that replicates the production environment, allowing for safe testing and
development.
• Production: The live environment used for processing actual orders.
• User credit (Eurosender Wallet): prepayment with bank transfer, PayPal or Credit Card.
• Deferred payment: payment after the invoice is issued (subject to approved credit line and conditions).
Technical Specifications
Environment description
We provide separate API endpoint sets for production and sandbox environments.
Description URL
Endpoints URL for sandbox, purpose testing https://sandbox-api.eurosender.com
Endpoints URL for production, purpose https://api.eurosender.com
ordering
Please make sure your calls work on sandbox before creating production orders.
To use the Eurosender API, users must have a business account with Eurosender. API access is enabled upon
request by Eurosender technical support by visiting https://www.eurosender.com/en/public-api.
Authentication Method
• Sandbox x-api-key: Generated from the User Dashboard on the sandbox website. This key is valid
exclusively for the sandbox API.
• Production x-api-key: Generated from the User Dashboard on the production website. This key is valid
exclusively for the production API.
Sandbox balances
On sandbox environment, you can set your monetary balances to be able to test behaviour of your
integration in case of monetary limit hit.
In quotes you can get available shipping options for your order and price for them. Also in quotes
response you can check for possibility to select custom pickup timeframes. Ensure a valid x-api-key is included in
the request header.
Successful response will return information that can be used to create an order request.
Object/field Usage in
following order Explanation
request
{
"options": {
"paymentMethods": [
{
"code": "credit",
"paymentDiscount": {
"rate": "0.00 %",
"discount": {
"original": {
"currencyCode": "EUR",
"gross": 0.0, “credit” and “deferred” (if enabled for an
yes account)
"net": 0.0
Other payment methods not supported
},
"converted": null
}
}
},
{
"code": "deferred",
"paymentDiscount": null
}
"currencyCode": "EUR",
• Price Attempt. Quotes will attempt to return a price even if the order cannot be placed with the same
parameters (e.g., pickup date in the past, insufficient credits, etc.).
If serviceType in request not provided, order part of response cannot be populated.
• Time-Sensitive Variability. Response details can vary based on the time of day. For instance, a quote
request made in the morning may allow for a same-day pickup (depending on the service type), while an
afternoon request may shift the earliest pickup date to the next day.
• Price Changes. Prices are subject to change.
• If pickupTimeFrameSelectionPossible" parameter is true, then the selected courier provides an option to
select custom pickup timeframes.
For some countries, additional details such as region or city can be defined in an order request. This may
be indicated by a warning in the quotes response.
To obtain detailed information about all countries, use the GET /v1/countries endpoint. The response will provide:
• A comprehensive list of countries
• Supported service types for each country
• Any required custom fields
• Option for input region or city information, where applicable
• Full list of cities is returned from GET /v1/countries/:countryCode/regions endpoint (replace :countryCode
with proper code).
• Full list of cities is returned from GET /v1/countries/:countryCode/cities endpoint (replace :countryCode with
proper code).
Orders are placed in our system with help of POST /v1/orders endpoint. Order validation with POST
/v1/orders/validate_creation endpoint is optional, same validations are performed during order creation.
Both orders and validation endpoints use the same payload. Ensure that a valid x-api-key is included in the
request header for each request.
Label generation and pickup request placement happens after order is created in our system.
Explanation how to define custom pickup timeframes in pickup request you can find in next chapter.
"deliveryContact": { optional
string
"name":
optional special characters not allowed
"Eurosender SARL",
Latin only
"email":
"[email protected] optional string, example "[email protected]" if empty, might cause delays with shipment
om",
},
if request contains no parcels, system will create a
"parcels": { optional parcel order with one package array, default
dimensions and mock content value.
"packages": [ optional used for shipping packages
{
"parcelId": string
optional used to identify parcel in shipment
"A00001", example: A00001
if missing any of dimensions or value 0 then uses
"quantity": 1, optional
default dimension
if missing any of dimensions or value 0 then uses
"width": 14, optional
shipments are processed without delays default dimension
and intervention of Technical Support if if missing any of dimensions or value 0 then uses
"height": 14, optional
dimensions are within service limits default dimension
if missing any of dimensions or value 0 then uses
"length": 15, optional STANDARD default dimension
(selection)
Max length: 200 cm.
Length + girth ≤ 300 cm
Max weight: 30 kg
PRIORITY
(regular plus)
Max length: 274 cm
Length + girth ≤ 400 cm if missing any of dimensions or value 0 then uses
Max weight: 68 kg default dimension
"weight": 2, optional be sure to set correct weight as in some cases sending
PRIORITY EXPRESS wrong weight might cause charges or shipment might
(express) be delayed
One dimension can exceed 120 cm (up to
max 300 cm)
Max weight: 68 kg
PALLET
(freight)
Max height: 220 cm
Max weight: 1200 kg
integer
if empty, null or missing then will be added mock
"content": "books", optional special characters not allowed
content “default”
Latin only
"value": 150 optional integer parcel value recommended to be more than 0€
],
},
"serviceType": enum: "selection", "flexi", "regular_plus",
required service types described in Appendix 1
"regular_plus", "express", "freight"
"paymentMethod": payment method, where credit is for User credits (pre-paid, Wallet). Deferred must be additionally
required
"deferred", approved to be enabled for use. Other payment methods are not supported
"insuranceId": null, optional can have Id of additional insurance or removed from request.
if whole block is missing, email from user profile is
"orderContact": { optional
used
"email":
if empty, null or missing then email from user profile is
"[email protected] optional string, example "[email protected]"
used as contact email
m",
},
"comment": "2nd
optional string
floor",
Important!
"labelFormat": optional string be sure to define the desired format of the label
"pdf" pdf or zpl before the order is created (PDF or ZPL). The default
label format is PDF.
A successful request with no validation errors will return a success response code (code 200). If validation fails
for any reason, the response will include a detailed error message.
Example Error Response (Redacted):
{
"status": 422,
"violations": [
{
"propertyPath": "paymentMethod",
"message": "Selected payment method is not appropriate",
"code": "payment-method-invalid"
}
],
"detail": "paymentMethod: Selected payment method is not appropriate",
"type": "/validation_errors/payment-method-invalid",
"title": "An error occurred"
}
In a typical workflow, when an order is successfully placed via our API, the status becomes Order Received
(or Deferred Payment if using deferred payment; the status can also be tracking if labels are created immediately).
The next status, such as Confirmed or Tracking, depends on the courier. Delivery statuses are returned by specific
Troubleshooting tips: Seamless work of API depends on many interconnected systems. In case of scheduled
maintenance or technical issue courier api can be unavailable and this can cause labels not to be dispatched in
response of order request endpoint. Integrator might consider developing a fallback scenario for calling GET
/v1/orders/{orderCode} or GET /v1/orders/{orderCode}/labels in timespan of first 5 minutes, 10 minutes, 1 hour if label
or tracking number was not present in original response of order request endpoint.
Our api provides an option to set pickup timeframe for your shipment. Option is available for couriers
that support it, and this is visible in api.
If option for custom pickup timeframe is supported and desired by User, then "independentPickup"
parameter can be specified in order request to POST /v1/orders endpoint.
Use desired timeframes from response in payload for POST /v1/pickup/{orderCode} endpoint.
Caveats:
If POST /v1/pickup/{orderCode} endpoint not called within 30 minutes after order with
"independentPickup": “true” placement, pickup request is automatically placed with default pickup timeframe.
Call to endpoint /v1/pickup/{orderCode} with order code that was created with "independentPickup":
false returns error.
You can submit cancel order request with help of endpoint DELETE /v1/orders/{orderCode}
Please use {orderCode} returned in response of order creation endpoint. Ensure that a valid x-api-key is included
in the request header for each request.
Successful 204 response code indicates that order was cancelled.
Please note that system will try to cancel label and pickup request with courier so orders where
shipment was already picked up by courier cannot be cancelled. Also attempt to cancel already cancelled order
results in an error.
24 Eurosender S.à.r.l., 9 Rue du Laboratoire L-1911 Luxembourg
VAT ID: LU30797030, R.C.S. Luxembourg: B230321,
IBAN LU61 1111 7132 9655 0000 (POST Finance SWIFT / BIC: CCPLLULL)
In case specific order cancellation case is problematic our Technical Support will contact you.
To obtain full order details, use the following endpoint: GET /v1/orders/{orderCode}. Replace
{orderCode} with the specific order code that was returned during order creation.
The response from this endpoint will be the same as that from the POST /v1/orders endpoint.
Example response:
{
{
"orderCode": "625706-24",
"status": "Tracking",
"serviceType": "regular_plus",
"language": "en",
"email": "[email protected]",
"paymentMethod": "deferred",
"currencyCode": "EUR",
"vatRate": "17%",
"parcels": {
"envelopes": [],
"packages": [
{
"parcelId": "A00001",
"orderCode": "625706-24",
"type": "package",
"weight": 2.0,
"length": 15,
"width": 14,
"height": 14,
"content": "books”,
"value": 150,
"price": {
"original": {
"currencyCode": "EUR",
"gross": 14.36,
"net": 12.27
},
"converted": null
},
"tracking": {
"number": "794998428077",
"url": "https://www.fedex.com/fedextrack/?trknbr=794998428077",
"deliveryStatus": null
}
}
],
• Label Printing Requirement: The isLabelRequired field will be set to true if labels need to be printed. This
is reflected in the responses from:
oPOST /v1/quotes
oPOST /v1/orders
oGET /v1/orders/{orderCode}
• Label Retrieval: The labelLink URL is provided for retrieving labels when they become available. Note that
not all couriers generate labels at the time of order placement.
• Document IDs: The documents array includes the IDs of documents, which can be used with specific
document endpoints for further actions.
The response will provide the requested order-related document (e.g., Invoice, Label). Additional documents
that need to be printed, such as a High Value Report, can also be retrieved through this endpoint.
The response will return the order label in the format specified when the order was created.
• For PDF format, use the application/pdf Accept header.
• For ZPL (Zebra) format, use the x-application/zpl Accept header.
If the order status after creation is "Awaiting customs documentation", you have to use the Proforma endpoints.
Alternatively, you can submit the proforma by following the link provided in the email, like orders placed via the
website.
Ensure that a valid x-api-key is included in the request header for all endpoints mentioned below.
An order with the status "Awaiting customs documentation" will not be processed further until the required
additional data is sent via the POST /v1/proforma endpoint, or the proforma is uploaded through the alternative
method (e.g., via the email link).
To upload any PDF documents (such as invoices), use the POST /v1/proforma/upload endpoint. The content must
be in base64 encoded format.
Example request:
{
"name": "some_invoice",
"mimetype": "application/pdf",
"content":
"Q2ZDhlZTk5OTBjNGFmYzk4ZmVlPgo8MDNiNmIwNzMxYjdiNDZkOGVlOTk5MGM0YWZjOThmZWU+IF0gPj4Kc3RhcnR4cmVmCjgz
OTgKJSVFT0Y=......"
}
The response will provide a hashName, which can be used in the subsequent call to the POST /v1/proforma
endpoint.
To create a proforma, send a request to the POST /v1/proforma endpoint. For detailed instructions on how to fill
out a proforma, please refer to the Proforma Invoice Guide.
Example request:
A successful response code indicates that the proforma has been created.
Once the proforma is created, the order will be processed further and submitted to the courier.
After courier picks up your shipment you can monitor status events up to delivery. Delivery statuses
start to be dispatched as they are updated by the courier.
You can get status list by calling the endpoint GET /v1/orders/{orderCode}/tracking, where {orderCode} is
the code, you received when creating the order.
The response will include tracking information and statuses inside checkpoints array.
Please note that this feature is only available in the production environment.
Example response:
{
"parcels": [
{
"parcelId": "ecab2e6a-917e-49b4-99aa-3b4dc9b3ee9a",
"orderCode": "740001-20",
"trackingNumber": "91120016997",
"currentStatus": "InTransit",
"currentSubstatus": "InTransit_001",
"updatedDate": "2024-06-10T13:11:27+02:00",
"expectedDeliveryDate": null,
"pickupDate": "2024-06-10T14:34:31+02:00",
"deliveryDate": null,
"signedBy": null,
"checkpoints": [
{
"eventDate": "2024-06-10T14:34:31+02:00",
"status": "InTransit",
"substatus": "InTransit_001",
"location": null,
"countryCode": null,
"message": "Data sent"
}
]
},
{
"parcelId": "c8f25422-0078-511e-8cec-00011206943f",
"orderCode": "120014-24",
"trackingNumber": "00931017539",
"currentStatus": "InTransit",
"currentSubstatus": "InTransit_001",
"updatedDate": "2024-06-10T13:11:27+02:00",
"expectedDeliveryDate": null,
"pickupDate": "2024-06-10T14:34:31+02:00",
"deliveryDate": null,
"signedBy": null,
"checkpoints": [
{
"eventDate": "2024-06-10T14:34:31+02:00",
"status": "InTransit",
"substatus": "InTransit_001",
New delivery statuses are added as checkpoints and included in the checkpoints array as soon as they become
available. Regular updates with tracking information are also provided through webhook events.
Set up webhooks
You can subscribe to various events sent by our webhooks. To enable and manage webhooks, please
follow these steps:
1. Log in to your Eurosender business account.
2. Navigate to the User Dashboard.
3. Go to the New Order section and select the Public API tab. Here, you can enable webhooks and monitor
their status.
For example, how looks on sandbox:
1. Label(s) Ready
o ID: 1
o Code: order_label_ready
o Trigger: When label(s) for the order become available. Applies for cases where label is not ready
immediately after order creation and only for orders that require label printing.
4. Order Cancelled
o ID: 4
o Code: order_cancelled
o Trigger: When the order is cancelled.
For the webhooks “Label(s) Ready”, “Order Submitted to Courier”, “Tracking Code(s) Ready”, and “Order Cancelled”,
data is sent in the request header according to the specified pattern.
Example:
Webhook-Id: unique_id_for_each_webhook_sent
Webhook-Event: code
Webhook-Signature: ...
Data in request body (json): {
triggerId: id,
orderCode: "123456-12",
courierId: 23 // only for webhhok 2
trackingCodes: [ // only for webhooks 2, 3
{
orderCode: "123456-12",
trackingNumber: "11111111",
trackingUrl: "https://demo.com/?track=1111111"
}
]
}
The Delivery Status webhook sends data in the request header following the pattern specified below. The
payload structure is identical to that of the GET /v1/orders/{orderCode}/tracking endpoint.
Example:
{
"notifications": [
{
"trackingDetails": {
"parcels": [
{
"parcelId": "ebbfce6a-000e-00b4-99aa-004dc9b3ee9a",
"orderCode": "011231-24",
"trackingNumber": "10000010007",
"currentStatus": "InfoReceived",
"currentSubstatus": "InfoReceived_001",
In API requests and responses, we use the following names for service types: "selection", "flexi",
"regular_plus", “express", "freight".
Below you can find a mapping to names used on the platform and a brief description.
• b2b-not-confirmed Account is not confirmed and don't have access to business price list
• user-restricted Account restricted and cannot place orders
• currency-not-supported-for-payment-method Selected currency is not available for selected payment
method
• payment-method-not-enabled
• insufficient-payment-balance
• pickup-in-past
• pickup-before-min
• pickup-date-not-available
• service-switched Service type was switched
• insurance-invalid
• addon-invalid
• coupons-not-supported-for-service
• coupon-code-invalid
• coupon-discount-inferior
• global-route-not-avail
• city-mandatory-for-country
• city-invalid-for-country
• region-mandatory-for-country
• region-invalid-for-country
• address-field-length
• distance-or-geolocation-required
• parcel-type-required
• parcel-type-not-supported
• parcel-type-exclusive
• parcel-type-exclusive-expr
• parcel-over-weight
• parcel-over-weight
• parcel-over-girth
• parcel-over-dimensions