Shipments API v2
Use this page for the Merchant API v2 shipment flows, including voucher
creation, cancellation, printing, and manifest generation.
Table of Contents
Variables
merchantAPIEndpoint:https://merchant.api.shopflix.gr/v2orderId:GR--3001--MER78
Shipments
1. Create Voucher
POST {{merchantAPIEndpoint}}/shipments/{orderId}Request Body
Content-Type: application/json
{
"numberOfPackages": 1, // number_of_packages={X} int default 1
"packageComment": "Test"
}Response
Status:
200 OKContent-Type: application/json
{
"voucher": {
"carrierName": "Courier Center",
"deliveryKey":"courier_center_clever_point",
"deliveryName": "Courier Center Clever Points",
"trackingNumber": "013670308212",
"deliveryToCourierEstimationDate": "1701958406"
}
}For possible deliveryKey values, see
Carrier Delivery Method Values.
Error Response
Status:
400 BAD REQUESTresponse
{
"error": {
"errorCode": "10352",
"message": "Voucher already exists for this shipment."
}
}response
{
"error": {
"errorCode": "10350",
"message": "The sale order could not be found."
}
}2. Cancel Voucher
DELETE {{merchantAPIEndpoint}}/shipments/{orderId}Response
Status:
204 No ContentStatus:
400 BAD REQUESTresponse
{
"error": {
"errorCode": "10353",
"message": "There is no voucher for this sale order."
}
}3. Print Voucher
GET {{merchantAPIEndpoint}}/shipments/{orderId}/printParameters
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
labelFormat | string | Voucher label format. Use one of the values listed below for the shipment carrier. | No | Carrier default |
Available Label Format Options
| Service | Available Values | Default | Example |
|---|---|---|---|
| Diakinisis | a4, a6, a4-3 | a4 | &labelFormat=a4 |
| Courier Center | pdf, clean, singlepdf, singleclean, thermiko | pdf | &labelFormat=pdf |
| Box Now | singlepdf_100x150 | singlepdf_100x150 | &labelFormat=singlepdf_100x150 |
Example Request
GET {{merchantAPIEndpoint}}/shipments/{orderId}/print?labelFormat=pdfResponse
Status:
200 OKContent-Type: application/json
response
{
"shipments": [
{
"orderId": "GR--82--MER1243",
"carrierName": "Courier Center",
"deliveryName": "Box Now",
"deliveryKey": "courier_center_box_now",
"trackingNumber": "21456678909876",
"voucherContent": "frregerthwhrhreher",
"voucherFormat": "pdf",
"deliveryToCourierEstimationDate": "1701958406",
"error": null
}
]
}4. Print Mass Shipment Vouchers
GET {{merchantAPIEndpoint}}/shipments/{orderId1},{orderId2}/printResponse
Status:
200 OKresponse
{
"shipments": [
{
"orderId": "GR--81--MER1243", // Order reference associated with the shipment
"carrierName": "Courier Center", // Courier company name
"deliveryName": "Box Now", // Delivery service name
"deliveryKey": "courier_center_box_now", // Internal delivery method identifier
"trackingNumber": "", // Tracking number (empty if not yet available)
"voucherContent": "", // Encoded voucher content (empty if voucher not generated)
"voucherFormat": "pdf", // Voucher file format (e.g. pdf)
"deliveryToCourierEstimationDate": "1701958406", // Estimated pickup date by courier (Unix timestamp)
"error": {
"errorMessage": "There is no voucher for this sale order.", // Human-readable error description
"errorCode": "10353" // Internal error code
}
},
{
"orderId": "GR--82--MER1243", // Order reference associated with the shipment
"carrierName": "Courier Center", // Courier company name
"deliveryName": null, // Delivery service name (null if not specified)
"deliveryKey": null, // Delivery method key (null if not specified)
"trackingNumber": "21456678909876", // Shipment tracking number
"voucherContent": "frregerthwhrhreher", // Encoded voucher content
"voucherFormat": "pdf", // Voucher file format
"deliveryToCourierEstimationDate": "1701958406", // Estimated pickup date by courier (Unix timestamp)
"error": null // No error occurred for this shipment
}
// Additional shipment entries may be listed here...
]
}5. Create Manifest
POST {{merchantAPIEndpoint}}/shipments/{orderId}/manifestResponse
Error Response
Status:
400 BAD REQUESTReturned when the manifest cannot be created because no eligible sales orders were found.
response
{
"manifestContent": null,
"error": {
"errorMessage": "The manifest could not be created due to the absence of sales orders",
"errorCode": 10400
}
}Possible Reasons
- Order does not exist for the given shipment_id.
- Order is not ready for shipment.
Error Codes
| Code | Message | Explanation |
|---|---|---|
10301 | The order with id was not found | The provided orderId does not exist or is invalid. |
10350 | The sale order could not be found | The sale order ID does not match any existing record. |
10352 | Voucher already exists for this shipment. | A shipment voucher has already been created for this order. |
10353 | There is no voucher for this sale order. | Cannot cancel or print a voucher because none exists for the given order. |
10400 | The manifest could not be created due to the absence of sales orders. | There are no eligible sales orders for manifest creation. |
10401 | The order cannot be accepted. | The order is in an invalid state for this action. |
Quick Reference
| Endpoint | Description | Method | Response |
|---|---|---|---|
/shipments/{orderId} | Create shipment voucher | POST | Voucher details |
/shipments/{orderId} | Cancel shipment voucher | DELETE | 204 No Content |
/shipments/{orderId}/print | Print shipment voucher | GET | Voucher file |
/shipments/{orderId1},{orderId2}/print | Print vouchers for multiple shipments | GET | Multiple vouchers |
/shipments/{orderId}/manifest | Create shipment manifest | POST | Manifest file |