Pircel public API
Pircel provides you with APIs that you can use for processes involving your store and your partner carriers. For a procedure such as "Create Voucher", we provide you with an API call for all delivery companies.
How to send a request?
const response = await fetch("https://test-api.pircel.com", {
method: "POST",
mode: "cors",
headers: new Headers({
"Content-Type": "application/json",
// replace '1234' with your API key
apikey: "1234"
}),
body: JSON.stringify({
query: `mutation createVoucher(: String, : String!, : Int!, : Date){
createVoucher(notes: , orderId: , packagesQuantity: , pickupDate: ){
voucherPrintDocuments
vouchers
}
}`,
variables: {
notes: "Fragile packages",
orderId: "14317",
packagesQuantity: 2,
pickupDate: "2023-10-03",
}
})
});
With JavaScript, it is possible to just use a template literal and simplify the API call body.
const response = await fetch('https://test-api.pircel.com', {
method: 'POST',
mode: 'cors',
headers: new Headers({
'Content-Type': 'application/json',
// replace '1234' with your API key
apikey: '1234',
}),
body: JSON.stringify({
query: `mutation {
createVoucher(
notes: "Fragile",
orderId: "A1",
packagesQuantity: 1,
pickupDate: "2023-03-06",
) {
vouchers
voucherPrintDocuments
}
}`
}),
});
You can find a working example on codesandbox.
We are using GraphQL API.
GraphQL is a query language and server-side runtime for application programming interfaces (APIs) that prioritizes giving clients exactly the data they request and no more. GraphQL is designed to make APIs fast, flexible, and developer-friendly.
API are separate in two categories query & mutation:
query: When we want to read an information that is already stored.
structure:
{
field(arg: "value") {
subField
}
}
mutation: When we want to change information (create, update, delete).
structure:
mutation {
field (arg: "value") {
subField
}
}
You can go to https://test-api.pircel.com and have access to try all the queries/mutations (API) we provide to you.
To try any of the API first you should add a shipment.
Follow the link and run the default mutation that we provide to you.
The following error messages were suggested:
'addShipment.invalidPostcode' ⇒ Μη έγκυρος ταχυδρομικός κώδικας
'addShipment.orderIdAlreadyExists' ⇒ Η παραγγελία υπάρχει ήδη
'authenticate.invalidSession' ⇒ Μη έγκυρο session, παρακαλώ συνδεθείτε ξανά
'cancelVoucher.eshopNotFound' ⇒ Δεν βρέθηκε ηλεκτρονικό κατάστημα
'cancelVoucher.orderNotFound' ⇒ Δεν βρέθηκε η παραγγελία
'createPickupList.invalidDeliveryCompany' ⇒ Μη έγκυρη μεταφορική εταιρεία
'createPickupList.noShipmentsForSelectedDeliveryCompanies' ⇒ Δεν βρέθηκαν οι αποστολές για τις επιλεγμένες μεταφορικές εταιρείες
'createPickupList.noShipmentsFound' ⇒ Δεν βρέθηκαν οι αποστολές
'createPickupList.unprintedVouchers' ⇒ Βρέθηκαν μη εκτυπωμένα παραστατικά
'createVoucher.invalidDeliveryCompany' ⇒ Μη έγκυρη μεταφορική εταιρεία
'createVoucher.invalidPickupDate' ⇒ Μη έγκυρη ημερομηνία παραλαβής
'createVoucher.newArgsCancelFirstExistingVouchers' ⇒ Αδυναμία δημιουργίας ή λήψης νέου παραστατικού. Το παραστατικό έχει ήδη δημιουργηθεί για αυτή την παραγγελία. Παρακαλούμε για να προβείτε σε νέα δημιουργία ακυρώστε πρώτα το προηγούμενο παραστατικό.
'createVoucher.orderNotFound' ⇒ Δεν βρέθηκε παραγγελία
'forbidden'⇒ Απαγορεύεται η πρόσβαση
'invalidpickuDateType', ⇒ Μη έγκυρη μορφή ημερομηνίας παραλαβής
'login.userNotFound' ⇒ Δεν βρέθηκε ο χρήστης
'pintVoucher.canceledVouchersFound' ⇒ Βρέθηκαν ακυρωμένα παραστατικά
'printVoucher.orderNotFound' ⇒ Δεν βρέθηκε η παραγγελία
'printVoucher.vouchersNotFound' ⇒ Δεν βρέθηκαν παραστατικά
'updateShipment.invalidPostcode' ⇒ Μη έγκυρος ταχυδρομικός κώδικας
'updateShipment.orderIdCannotChange' ⇒ Ο κωδικός της παραγγελίας δεν μπορεί να αλλάξει
'updateShipment.shipmentCannotChange' ⇒ Η παραγγελία δεν μπορεί να αλλάξει γιατι έχουν ήδη δημιουργηθεί παραστατικά
'speedex.apiInaccessible' ⇒ Το API της Speedex δεν είναι διαθέσιμο
'speedex.cannotCreateSession' ⇒ Το API της Speedex δεν είναι διαθέσιμο
'createVoucher.speedex.invalidPostcode' ⇒ Μη έγκυρος ταχυδρομικός κώδικας
'speedex.noResponse' ⇒ Το API της Speedex δεν είναι διαθέσιμο
'printPickupList.speedex.noPickupListNumber' ⇒ Δεν υπάρχει αριθμός λίστας παραλαβής
'printVoucher.speedex.noVoucher' ⇒ Δεν βρέθηκε παραστατικό
API Endpoints
# Test (Currently offline):
https://test-api.pircel.com
# Production:
https://api.pircel.com
Headers
# Your API token from the dashboard. Must be included in all API calls.
apikey: <YOUR_TOKEN_HERE>
Queries
eshop
Description
Get eshop details
Example
Query
query Eshop($_id: ObjectID) {
eshop(_id: $_id) {
_id
address
addressBook {
_id
address {
...AddressFragment
}
contact {
...ContactFragment
}
isDefault
name
}
city
deliveryCompanies {
name
}
name
phone
postcode
}
}
Variables
{"_id": "5e5677d71bdc2ae76344968c"}
Response
{
"data": {
"eshop": {
"_id": "5e5677d71bdc2ae76344968c",
"address": "abc123",
"addressBook": [AddressBookEntryType],
"city": "xyz789",
"deliveryCompanies": [DeliveryCompanyLight],
"name": "abc123",
"phone": "xyz789",
"postcode": "xyz789"
}
}
}
trackVoucher
Response
Returns [VoucherTracking]
Arguments
Name | Description |
---|---|
code - String
|
Voucher code |
Example
Query
query TrackVoucher($code: String) {
trackVoucher(code: $code) {
checkpointAction
checkpointDateTime
checkpointLocation
checkpointNotes
code
shipmentId
}
}
Variables
{"code": "abc123"}
Response
{
"data": {
"trackVoucher": [
{
"checkpointAction": "abc123",
"checkpointDateTime": "2007-12-03T10:15:30Z",
"checkpointLocation": "xyz789",
"checkpointNotes": "abc123",
"code": "xyz789",
"shipmentId": "5e5677d71bdc2ae76344968c"
}
]
}
}
Mutations
addShipment
Description
Add a shipment.
Response
Returns a Shipment
Arguments
Name | Description |
---|---|
buyerNotes - String
|
Customer's notes. |
eshopId - ObjectID
|
Required if the user belongs to or owns multiple eshops. Admins must specify an eshop. Not required for eshop integrations. |
geniki - GenikiInput
|
Geniki delivery company specific fields |
height - Float!
|
Parcel's height. |
isB2BInvoice - Boolean
|
Indicates if the shipment is for a B2B invoice (true) or B2C invoice (false). False by default. |
length - Float!
|
Parcel's length. |
orderId - String
|
Order's id. Must be provided for the prod-test environment |
paymentMethod - ShipmentPaymentMethodEnum
|
Customer's payment method. |
products - [ProductInput]!
|
List of products. |
productsQuantity - Int!
|
Products quantity. |
recipient - RecipientCreateInput!
|
Recipient details including address and contact information. |
selectedRate - SelectedRateInput
|
The selected service and rate for the shipment |
senderNotes - String
|
Sender's notes. |
shipper - ShipperInput
|
Shipper details including address and contact information. |
status - ShipmentStatusEnum
|
Shipment's status. For non-admin users, the only valid option is NEW, MANUALLY_CREATED or CHECKOUT_COMPLETE. |
weight - Float!
|
Parcel's weight. |
width - Float!
|
Parcel's width. |
Example
Query
mutation AddShipment(
$buyerNotes: String,
$eshopId: ObjectID,
$geniki: GenikiInput,
$height: Float!,
$isB2BInvoice: Boolean,
$length: Float!,
$orderId: String,
$paymentMethod: ShipmentPaymentMethodEnum,
$products: [ProductInput]!,
$productsQuantity: Int!,
$recipient: RecipientCreateInput!,
$selectedRate: SelectedRateInput,
$senderNotes: String,
$shipper: ShipperInput,
$status: ShipmentStatusEnum,
$weight: Float!,
$width: Float!
) {
addShipment(
buyerNotes: $buyerNotes,
eshopId: $eshopId,
geniki: $geniki,
height: $height,
isB2BInvoice: $isB2BInvoice,
length: $length,
orderId: $orderId,
paymentMethod: $paymentMethod,
products: $products,
productsQuantity: $productsQuantity,
recipient: $recipient,
selectedRate: $selectedRate,
senderNotes: $senderNotes,
shipper: $shipper,
status: $status,
weight: $weight,
width: $width
) {
_id
actions {
info
time
type
}
availableRates {
deliveryCompany
rating
services {
...ServiceFragment
}
}
buyerNotes
costSummary {
deliveryCost
productsTotal
totalCost
}
createdAt
eshopId
geniki {
chargeCode
jobId
}
isB2BInvoice
orderId
otherDocuments {
documentType
encodedDocument
externalId
}
packagesQuantity
parcels {
billableWeight
dimensions {
...ParcelDimensionsFragment
}
volumetricWeight
weight
}
paymentMethod
pickupAddress {
address
addressId
city
country
countryCode
name
postcode
}
pickupDate
products {
countryOfOrigin
description
dimensions {
...ProductDimensionsFragment
}
extraAttributes
harmonizedSystemCode
price
quantity
size
sku
title
weight
}
productsQuantity
recipient {
address {
...AddressFragment
}
contact {
...ContactFragment
}
}
selectedRate {
costs {
...CostsFragment
}
deliveryCompany
priceComponents {
...PricingComponentFragment
}
rating
serviceCode
serviceName
}
senderNotes
shipmentPurpose
shipper {
address {
...AddressFragment
}
addressId
contact {
...ContactFragment
}
}
shippingRegionType
status
voucherPrintDocuments {
encodedDocument
status
}
vouchers {
code
status
type
}
}
}
Variables
{
"buyerNotes": "xyz789",
"eshopId": "5e5677d71bdc2ae76344968c",
"geniki": GenikiInput,
"height": 123.45,
"isB2BInvoice": false,
"length": 987.65,
"orderId": "abc123",
"paymentMethod": "BANK_DEPOSIT",
"products": [ProductInput],
"productsQuantity": 987,
"recipient": RecipientCreateInput,
"selectedRate": SelectedRateInput,
"senderNotes": "xyz789",
"shipper": ShipperInput,
"status": "CANCELED",
"weight": 123.45,
"width": 123.45
}
Response
{
"data": {
"addShipment": {
"_id": "5e5677d71bdc2ae76344968c",
"actions": [ShipmentAction],
"availableRates": [DeliveryRate],
"buyerNotes": "abc123",
"costSummary": CostSummary,
"createdAt": "2007-12-03T10:15:30Z",
"eshopId": "5e5677d71bdc2ae76344968c",
"geniki": GenikiFields,
"isB2BInvoice": false,
"orderId": "abc123",
"otherDocuments": [OtherDocument],
"packagesQuantity": 123,
"parcels": [Parcel],
"paymentMethod": "BANK_DEPOSIT",
"pickupAddress": PickupAddress,
"pickupDate": "2007-12-03",
"products": [Product],
"productsQuantity": 987,
"recipient": Recipient,
"selectedRate": SelectedRate,
"senderNotes": "xyz789",
"shipmentPurpose": "GIFT",
"shipper": Shipper,
"shippingRegionType": "DOMESTIC",
"status": "CANCELED",
"voucherPrintDocuments": [VoucherPrintDocument],
"vouchers": [Voucher]
}
}
}
cancelVoucher
Description
To cancel all vouchers of a specific order
Response
Returns a CanceledVouchers
Arguments
Name | Description |
---|---|
eshopId - ObjectID
|
Required if the user belongs to or owns multiple eshops. Admins must specify an eshop. Not required for eshop integrations. |
orderId - String
|
The order id. Either orderId or shipmentId must be provided |
shipmentId - ObjectID
|
The shipment id. Either orderId or shipmentId must be provided |
Example
Query
mutation CancelVoucher(
$eshopId: ObjectID,
$orderId: String,
$shipmentId: ObjectID
) {
cancelVoucher(
eshopId: $eshopId,
orderId: $orderId,
shipmentId: $shipmentId
) {
canceledVouchers
}
}
Variables
{
"eshopId": "5e5677d71bdc2ae76344968c",
"orderId": "abc123",
"shipmentId": "5e5677d71bdc2ae76344968c"
}
Response
{
"data": {
"cancelVoucher": {
"canceledVouchers": ["xyz789"]
}
}
}
createPickupList
Description
Create a pickup list for all delivery companies which had been chosen for this pickup date
Response
Returns a CreatePickupListReturn
Arguments
Name | Description |
---|---|
closeTime - String!
|
The latest time "HH:MM" that the shipment can be picked up |
deliveryCompanies - [DeliveryCompanyEnum!]!
|
The preferred delivery companies (based on the shop's cooperated delivery companies) to generate a pick-up list |
eshopId - ObjectID
|
Required if the user belongs to or owns multiple eshops. Admins must specify an eshop. Not required for eshop integrations. |
pickupDate - String!
|
The date "YYYY-MM-DD" that the delivery company should receive the shipment from the shop, this should be the same pickup date with createVouchers pickupDate. Defaults to today |
readyTime - String!
|
The time "HH:MM" that the shipment is ready to be picked up |
Example
Query
mutation CreatePickupList(
$closeTime: String!,
$deliveryCompanies: [DeliveryCompanyEnum!]!,
$eshopId: ObjectID,
$pickupDate: String!,
$readyTime: String!
) {
createPickupList(
closeTime: $closeTime,
deliveryCompanies: $deliveryCompanies,
eshopId: $eshopId,
pickupDate: $pickupDate,
readyTime: $readyTime
) {
lists {
code
deliveryCompany
printDocument
}
}
}
Variables
{
"closeTime": "xyz789",
"deliveryCompanies": ["ACS"],
"eshopId": "5e5677d71bdc2ae76344968c",
"pickupDate": "xyz789",
"readyTime": "abc123"
}
Response
{
"data": {
"createPickupList": {"lists": [PickupListsList]}
}
}
createVoucher
Description
To create one or more vouchers for your order
Response
Returns a CreateVoucherReturn
Arguments
Name | Description |
---|---|
eshopId - ObjectID
|
Required if the user belongs to or owns multiple eshops. Admins must specify an eshop. Not required for eshop integrations. |
generateCommercialInvoice - Boolean
|
Whether to generate a commercial invoice. Defaults to true for international shipments. |
notes - String
|
Notes/comments for the delivery company |
orderId - String
|
The id of the order. Either orderId or shipmentId must be provided |
packagesQuantity - Int!
|
The quantity of the items/packages that are needed to have a voucher |
pickupDate - String
|
Date "YYYY-MM-DD" that the delivery company should receive the package from the shop. Defaults to today. |
shipmentId - ObjectID
|
The id of the shipment. Either orderId or shipmentId must be provided |
shipmentPurpose - ShipmentPurposeEnum
|
The purpose of the shipment |
Example
Query
mutation CreateVoucher(
$eshopId: ObjectID,
$generateCommercialInvoice: Boolean,
$notes: String,
$orderId: String,
$packagesQuantity: Int!,
$pickupDate: String,
$shipmentId: ObjectID,
$shipmentPurpose: ShipmentPurposeEnum
) {
createVoucher(
eshopId: $eshopId,
generateCommercialInvoice: $generateCommercialInvoice,
notes: $notes,
orderId: $orderId,
packagesQuantity: $packagesQuantity,
pickupDate: $pickupDate,
shipmentId: $shipmentId,
shipmentPurpose: $shipmentPurpose
) {
voucherPrintDocuments
vouchers
}
}
Variables
{
"eshopId": "5e5677d71bdc2ae76344968c",
"generateCommercialInvoice": false,
"notes": "abc123",
"orderId": "abc123",
"packagesQuantity": 987,
"pickupDate": "xyz789",
"shipmentId": "5e5677d71bdc2ae76344968c",
"shipmentPurpose": "GIFT"
}
Response
{
"data": {
"createVoucher": {
"voucherPrintDocuments": ["xyz789"],
"vouchers": ["xyz789"]
}
}
}
printVoucher
Description
Print a voucher
Response
Returns a VoucherPrintDocuments
Arguments
Name | Description |
---|---|
eshopId - ObjectID
|
Required if the user belongs to or owns multiple eshops. Admins must specify an eshop. Not required for eshop integrations. |
orderId - String
|
The order id. Either orderId or shipmentId must be provided |
shipmentId - ObjectID
|
The shipment id. Either orderId or shipmentId must be provided |
Example
Query
mutation PrintVoucher(
$eshopId: ObjectID,
$orderId: String,
$shipmentId: ObjectID
) {
printVoucher(
eshopId: $eshopId,
orderId: $orderId,
shipmentId: $shipmentId
) {
voucherPrintDocuments
}
}
Variables
{
"eshopId": "5e5677d71bdc2ae76344968c",
"orderId": "xyz789",
"shipmentId": "5e5677d71bdc2ae76344968c"
}
Response
{
"data": {
"printVoucher": {
"voucherPrintDocuments": ["abc123"]
}
}
}
Types
Address
Fields
Field Name | Description |
---|---|
addressLine1 - String
|
Address line 1. |
addressLine2 - String
|
Address line 2. |
addressLine3 - String
|
Address line 3. |
city - String
|
City. |
country - String
|
Country. |
countryCode - String
|
Country code in ISO 3166-1 alpha-2 format. |
county - String
|
County. |
postcode - String
|
Postcode. |
Example
{
"addressLine1": "abc123",
"addressLine2": "xyz789",
"addressLine3": "xyz789",
"city": "xyz789",
"country": "xyz789",
"countryCode": "xyz789",
"county": "abc123",
"postcode": "xyz789"
}
AddressBookEntryType
AddressInput
Fields
Input Field | Description |
---|---|
addressLine1 - String
|
Address line 1. |
addressLine2 - String
|
Address line 2. |
addressLine3 - String
|
Address line 3. |
city - String
|
City. |
country - String
|
Country. |
countryCode - String
|
Country code in ISO 3166-1 alpha-2 format. |
county - String
|
County. |
postcode - String
|
Postcode. |
Example
{
"addressLine1": "abc123",
"addressLine2": "xyz789",
"addressLine3": "abc123",
"city": "xyz789",
"country": "abc123",
"countryCode": "abc123",
"county": "xyz789",
"postcode": "abc123"
}
Boolean
Description
The Boolean
scalar type represents true
or false
.
Example
true
CanceledVouchers
Fields
Field Name | Description |
---|---|
canceledVouchers - [String]
|
The voucher codes that have been canceled (all voucher codes associated with this orderId) |
Example
{"canceledVouchers": ["xyz789"]}
Contact
Example
{
"companyName": "xyz789",
"email": "xyz789",
"firstname": "xyz789",
"lastname": "abc123",
"phone": "abc123"
}
ContactInput
Fields
Input Field | Description |
---|---|
companyName - String
|
Company name. Either company name OR first and last name is required. |
email - String
|
Email address. |
firstname - String
|
First name. Either first and last name OR company name is required. |
lastname - String
|
Last name. Either first and last name OR company name is required. |
phone - String
|
Phone number. |
Example
{
"companyName": "abc123",
"email": "xyz789",
"firstname": "abc123",
"lastname": "xyz789",
"phone": "abc123"
}
CostSummary
Costs
Description
Cost breakdown for a service
Fields
Field Name | Description |
---|---|
basePrice - Float
|
Base price before any surcharges, fees, or taxes |
codSurcharge - Float
|
Cash on delivery surcharge |
feesTotal - Float
|
Total of all fees |
finalPrice - Float
|
Final price after all fees, surcharges and taxes with multiplier and minimum price constraints applied |
priceMultiplier - Float
|
Multiplier applied to the price |
surchargesTotal - Float
|
Total of all surcharges |
taxesAndDutiesTotal - Float
|
Total of all taxes and duties |
totalPriceBeforeMultiplier - Float
|
Total price before multiplier and minimum price constraints applied |
Example
{
"basePrice": 987.65,
"codSurcharge": 987.65,
"feesTotal": 123.45,
"finalPrice": 123.45,
"priceMultiplier": 987.65,
"surchargesTotal": 987.65,
"taxesAndDutiesTotal": 123.45,
"totalPriceBeforeMultiplier": 987.65
}
CreatePickupListReturn
Fields
Field Name | Description |
---|---|
lists - [PickupListsList]
|
Example
{"lists": [PickupListsList]}
CreateVoucherReturn
Date
Description
A date string, such as 2007-12-03, compliant with the full-date
format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
Example
"2007-12-03"
DateTime
Description
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time
format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
Example
"2007-12-03T10:15:30Z"
DeliveryCompanyEnum
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"ACS"
DeliveryCompanyLight
Fields
Field Name | Description |
---|---|
name - DeliveryCompanyEnum
|
Example
{"name": "ACS"}
DeliveryRate
Description
Available rates for a delivery company with all available service options
Fields
Field Name | Description |
---|---|
deliveryCompany - DeliveryCompanyEnum
|
Delivery company identifier |
rating - Float
|
Rating of the delivery company |
services - [Service]
|
Available services from this carrier |
Example
{
"deliveryCompany": "ACS",
"rating": 123.45,
"services": [Service]
}
DocumentTypeEnum
Values
Enum Value | Description |
---|---|
|
|
|
|
|
Example
"COMMERCIAL_INVOICE"
Eshop
Fields
Field Name | Description |
---|---|
_id - ObjectID
|
|
address - String
|
|
addressBook - [AddressBookEntryType]
|
|
city - String
|
|
deliveryCompanies - [DeliveryCompanyLight]
|
|
name - String
|
|
phone - String
|
|
postcode - String
|
Example
{
"_id": "5e5677d71bdc2ae76344968c",
"address": "abc123",
"addressBook": [AddressBookEntryType],
"city": "abc123",
"deliveryCompanies": [DeliveryCompanyLight],
"name": "abc123",
"phone": "xyz789",
"postcode": "abc123"
}
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
123.45
GenikiFields
GenikiInput
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
ObjectID
Description
A field whose value conforms with the standard mongodb object ID as described here: https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId. Example: 5e5677d71bdc2ae76344968c
Example
"5e5677d71bdc2ae76344968c"
OtherDocument
Fields
Field Name | Description |
---|---|
documentType - DocumentTypeEnum
|
Type of the document. |
encodedDocument - String
|
Base64 encoded document content. |
externalId - String
|
External identifier for the document. |
Example
{
"documentType": "COMMERCIAL_INVOICE",
"encodedDocument": "xyz789",
"externalId": "xyz789"
}
Parcel
Fields
Field Name | Description |
---|---|
billableWeight - Float
|
Parcel's billable weight in kilograms. (The weight used for the price calculation. The greater of actual weight or volumetric weight) |
dimensions - ParcelDimensions
|
|
volumetricWeight - Float
|
Parcel's volumetric weight in kilograms. The overall size of a parcel measured in volumetric kilograms. |
weight - Float
|
Parcel's weight in kilograms. |
Example
{
"billableWeight": 123.45,
"dimensions": ParcelDimensions,
"volumetricWeight": 987.65,
"weight": 123.45
}
ParcelDimensions
PickupAddress
Example
{
"address": "abc123",
"addressId": "5e5677d71bdc2ae76344968c",
"city": "abc123",
"country": "xyz789",
"countryCode": "xyz789",
"name": "xyz789",
"postcode": "abc123"
}
PickupListsList
Fields
Field Name | Description |
---|---|
code - String
|
Pickup list number |
deliveryCompany - DeliveryCompanyEnum
|
Delivery company's name |
printDocument - String
|
Pickup list number |
Example
{
"code": "xyz789",
"deliveryCompany": "ACS",
"printDocument": "xyz789"
}
PricingComponent
Description
A single pricing component like a surcharge, tax, or fee
Fields
Field Name | Description |
---|---|
amount - Float
|
Amount of the pricing component |
category - PricingComponentCategory
|
Category of the pricing component |
code - String
|
Carrier-specific code for this component, if available |
description - String
|
Description of the pricing component |
name - String
|
Human-readable name of the pricing component |
surchargeType - SurchargeType
|
Type of surcharge, applicable when category is SURCHARGE |
Example
{
"amount": 123.45,
"category": "BASE",
"code": "abc123",
"description": "xyz789",
"name": "abc123",
"surchargeType": "ADDITIONAL_HANDLING"
}
PricingComponentCategory
Description
Categories of pricing components
Values
Enum Value | Description |
---|---|
|
Base shipping charge |
|
Import/export duties |
|
Processing or service fees |
|
Other fees/charges that don't fit other categories |
|
Additional charges applied to shipment |
|
Government taxes (VAT, sales tax, etc.) |
Example
"BASE"
Product
Fields
Field Name | Description |
---|---|
countryOfOrigin - String
|
The country of origin of the product |
description - String
|
A brief description of the product. |
dimensions - ProductDimensions
|
The dimensions of the product |
extraAttributes - [ProductExtraAttributesEnumType]
|
List of extra attributes for the product, e.g., gift. |
harmonizedSystemCode - String
|
The harmonized system code of the product |
price - Float!
|
The price of the product. |
quantity - Int!
|
The quantity of the product. |
size - ProductSizeEnumType
|
The size of the product. Not required if the shipment's dimensions and weight are provided. |
sku - String
|
The stock keeping unit (SKU) to identify the product. |
title - String
|
The title or name of the product. |
weight - Float
|
The weight of the product in kilograms |
Example
{
"countryOfOrigin": "xyz789",
"description": "abc123",
"dimensions": ProductDimensions,
"extraAttributes": ["GIFT"],
"harmonizedSystemCode": "xyz789",
"price": 987.65,
"quantity": 123,
"size": "L",
"sku": "abc123",
"title": "xyz789",
"weight": 987.65
}
ProductDimensions
ProductDimensionsInput
ProductExtraAttributesEnumType
Values
Enum Value | Description |
---|---|
|
The product is marked as a gift. |
Example
"GIFT"
ProductInput
Fields
Input Field | Description |
---|---|
countryOfOrigin - String
|
The country of origin of the product |
description - String
|
A brief description of the product. |
dimensions - ProductDimensionsInput
|
The dimensions of the product |
extraAttributes - [ProductExtraAttributesEnumType]
|
List of extra attributes for the product, e.g., gift. |
harmonizedSystemCode - String
|
The harmonized system code of the product |
price - Float!
|
The price of the product. |
quantity - Int!
|
The quantity of the product. |
size - ProductSizeEnumType
|
The size of the product. Not required if the shipment's dimensions and weight are provided. |
sku - String
|
The stock keeping unit (SKU) to identify the product. |
title - String
|
The title or name of the product. |
weight - Float
|
The weight of the product in kilograms |
Example
{
"countryOfOrigin": "abc123",
"description": "xyz789",
"dimensions": ProductDimensionsInput,
"extraAttributes": ["GIFT"],
"harmonizedSystemCode": "xyz789",
"price": 987.65,
"quantity": 987,
"size": "L",
"sku": "xyz789",
"title": "abc123",
"weight": 123.45
}
ProductSizeEnumType
Values
Enum Value | Description |
---|---|
|
Large size. |
|
Medium size. |
|
Small size. |
|
Extra Large size. |
|
Extra Small size. |
|
Double Extra Large size. |
Example
"L"
Recipient
RecipientAddressCreateInput
Description
Input type for recipient address used for shipment creation.
Fields
Input Field | Description |
---|---|
addressLine1 - String!
|
Address line 1. |
addressLine2 - String
|
Address line 2. |
addressLine3 - String
|
Address line 3. |
city - String!
|
City. |
country - String!
|
Country. |
countryCode - String
|
Country code in ISO 3166-1 alpha-2 format. |
county - String
|
County. |
postcode - String!
|
Postcode. |
Example
{
"addressLine1": "abc123",
"addressLine2": "abc123",
"addressLine3": "xyz789",
"city": "abc123",
"country": "abc123",
"countryCode": "xyz789",
"county": "abc123",
"postcode": "xyz789"
}
RecipientContactCreateInput
Description
Input type for recipient contact used for shipment creation.
Fields
Input Field | Description |
---|---|
companyName - String
|
Company name. Either company name OR first and last name is required. |
email - String
|
Email address. |
firstname - String
|
First name. Either first and last name OR company name is required. |
lastname - String
|
Last name. Either first and last name OR company name is required. |
phone - String
|
Phone number. |
Example
{
"companyName": "abc123",
"email": "abc123",
"firstname": "xyz789",
"lastname": "xyz789",
"phone": "xyz789"
}
RecipientCreateInput
Description
Input type for recipient details used for shipment creation.
Fields
Input Field | Description |
---|---|
address - RecipientAddressCreateInput!
|
Recipient address. |
contact - RecipientContactCreateInput!
|
Recipient contact. |
Example
{
"address": RecipientAddressCreateInput,
"contact": RecipientContactCreateInput
}
SelectedRate
Description
The selected service and rate for a shipment
Fields
Field Name | Description |
---|---|
costs - Costs
|
Cost breakdown for the selected service |
deliveryCompany - DeliveryCompanyEnum
|
Selected delivery company |
priceComponents - [PricingComponent]
|
Detailed pricing components for the selected service |
rating - Float
|
Rating of the selected service |
serviceCode - String
|
Selected service code |
serviceName - String
|
Selected service name |
Example
{
"costs": Costs,
"deliveryCompany": "ACS",
"priceComponents": [PricingComponent],
"rating": 123.45,
"serviceCode": "abc123",
"serviceName": "abc123"
}
SelectedRateInput
Description
Input for selecting a shipping rate
Fields
Input Field | Description |
---|---|
deliveryCompany - DeliveryCompanyEnum!
|
The carrier providing the service |
serviceCode - String!
|
The specific service code to select from the available rates |
Example
{
"deliveryCompany": "ACS",
"serviceCode": "xyz789"
}
Service
Description
A carrier service option with pricing details
Fields
Field Name | Description |
---|---|
costs - Costs
|
Cost breakdown for this service |
priceComponents - [PricingComponent]
|
Detailed breakdown of all price components |
serviceCode - String
|
Carrier-specific service code (e.g. FEDEX_GROUND, UPS_NEXT_DAY_AIR) |
serviceName - String
|
Human-readable service name |
transitTime - TransitTime
|
Delivery time information |
Example
{
"costs": Costs,
"priceComponents": [PricingComponent],
"serviceCode": "xyz789",
"serviceName": "abc123",
"transitTime": TransitTime
}
Shipment
Fields
Field Name | Description |
---|---|
_id - ObjectID
|
Shipment's id. |
actions - [ShipmentAction]
|
History of actions performed on this shipment. |
availableRates - [DeliveryRate]
|
Available delivery rates from all carriers with their services |
buyerNotes - String
|
Buyer's notes. |
costSummary - CostSummary
|
Summary of costs associated with the shipment. |
createdAt - DateTime
|
The date and time when the shipment was created. |
eshopId - ObjectID
|
Eshop's id. |
geniki - GenikiFields
|
Geniki delivery company specific fields |
isB2BInvoice - Boolean
|
Indicates if the shipment is for a B2B invoice (true) or B2C invoice (false). False by default. |
orderId - String
|
The unique order id |
otherDocuments - [OtherDocument]
|
Additional documents related to the shipment, like invoices. |
packagesQuantity - Int
|
Number of packages in this shipment. |
parcels - [Parcel]
|
List of parcels in this shipment, each with their own dimensions and weights. |
paymentMethod - ShipmentPaymentMethodEnum
|
Customer's payment method. |
pickupAddress - PickupAddress
|
The address where the package should be picked up from. |
pickupDate - Date
|
Date "YYYY-MM-DD" that the delivery company should receive the package from the shop. Defaults to today |
products - [Product]
|
List of products in the shipment. |
productsQuantity - Int
|
Products quantity. |
recipient - Recipient!
|
Recipient details including address and contact information. |
selectedRate - SelectedRate
|
The selected service and rate for this shipment |
senderNotes - String
|
Sender's notes. |
shipmentPurpose - ShipmentPurposeEnum
|
The purpose of the shipment. |
shipper - Shipper
|
Shipper details including address and contact information. |
shippingRegionType - ShippingRegionTypeEnum
|
The type of shipping region. |
status - ShipmentStatusEnum
|
Transction's status. |
voucherPrintDocuments - [VoucherPrintDocument]
|
The document of the signed voucher that can be printed and put on the package(s) |
vouchers - [Voucher]
|
The shipment's voucher based on the selected delivery company. |
Example
{
"_id": "5e5677d71bdc2ae76344968c",
"actions": [ShipmentAction],
"availableRates": [DeliveryRate],
"buyerNotes": "xyz789",
"costSummary": CostSummary,
"createdAt": "2007-12-03T10:15:30Z",
"eshopId": "5e5677d71bdc2ae76344968c",
"geniki": GenikiFields,
"isB2BInvoice": false,
"orderId": "abc123",
"otherDocuments": [OtherDocument],
"packagesQuantity": 987,
"parcels": [Parcel],
"paymentMethod": "BANK_DEPOSIT",
"pickupAddress": PickupAddress,
"pickupDate": "2007-12-03",
"products": [Product],
"productsQuantity": 987,
"recipient": Recipient,
"selectedRate": SelectedRate,
"senderNotes": "xyz789",
"shipmentPurpose": "GIFT",
"shipper": Shipper,
"shippingRegionType": "DOMESTIC",
"status": "CANCELED",
"voucherPrintDocuments": [VoucherPrintDocument],
"vouchers": [Voucher]
}
ShipmentAction
Fields
Field Name | Description |
---|---|
info - String
|
Additional information about the action. |
time - DateTime
|
When the action occurred. |
type - ShipmentActionType
|
Type of action. |
Example
{
"info": "xyz789",
"time": "2007-12-03T10:15:30Z",
"type": "CANCEL_SHIPMENT"
}
ShipmentActionType
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"CANCEL_SHIPMENT"
ShipmentPaymentMethodEnum
Values
Enum Value | Description |
---|---|
|
The customer will pay for the order by bank deposit. |
|
The customer will pay for the order by card. |
|
The customer will pay for the order by cash on delivery. |
|
The customer will not be charged for the order. |
|
The customer will pay for the order by PayPal. |
Example
"BANK_DEPOSIT"
ShipmentPurposeEnum
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"GIFT"
ShipmentStatusEnum
Values
Enum Value | Description |
---|---|
|
When the shipment has been canceled. |
|
When the customer has completed the checkout process. |
|
When the shipment has been manually created. |
|
When the shipment is just created and the customer still edit the delivery form |
|
When a pickup list has been created for the shipment. |
|
When a voucher has been canceled for the shipment. |
|
When a voucher has been created for the shipment. |
Example
"CANCELED"
Shipper
Description
Shipper details including address and contact information.
Example
{
"address": Address,
"addressId": "5e5677d71bdc2ae76344968c",
"contact": Contact
}
ShipperInput
Description
Input type for shipper details.
Fields
Input Field | Description |
---|---|
address - AddressInput
|
Shipper address. |
addressId - ObjectID
|
Reference to an address from the Eshop address book. |
contact - ContactInput
|
Shipper contact. |
Example
{
"address": AddressInput,
"addressId": "5e5677d71bdc2ae76344968c",
"contact": ContactInput
}
ShippingRegionTypeEnum
Description
Enum representing the type of shipping region.
Values
Enum Value | Description |
---|---|
|
Shipping within the same country. |
|
Shipping between countries in different regions. |
|
Shipping between African countries. |
|
Shipping between ASEAN member countries. |
|
Shipping between Asian countries. |
|
Shipping between European countries. |
|
Shipping between Middle Eastern countries. |
|
Shipping between North American countries. |
|
Shipping between Oceanian countries. |
|
Shipping between South American countries. |
|
Shipping between USMCA member countries (US, Mexico, Canada). |
|
Other shipping region type not covered by other categories. |
Example
"DOMESTIC"
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"
SurchargeType
Description
Types of surcharges
Values
Enum Value | Description |
---|---|
|
Additional handling surcharge |
|
Cash on delivery surcharge |
|
Delivery area surcharge |
|
Fuel surcharge |
|
Other surcharge type |
|
Saturday delivery surcharge |
Example
"ADDITIONAL_HANDLING"
TransitTime
Description
Delivery time information
Example
{
"estimatedDeliveryDate": "2007-12-03",
"guaranteed": false,
"maxDays": 123,
"minDays": 123
}
Voucher
Fields
Field Name | Description |
---|---|
code - String
|
The voucher code |
status - VoucherStatusEnum
|
|
type - VouchertypeEnum
|
Example
{
"code": "abc123",
"status": "ACTIVE",
"type": "MAIN"
}
VoucherPrintDocument
Fields
Field Name | Description |
---|---|
encodedDocument - String
|
Base64 encoded document content. |
status - VoucherStatusEnum
|
Example
{
"encodedDocument": "abc123",
"status": "ACTIVE"
}
VoucherPrintDocuments
Fields
Field Name | Description |
---|---|
voucherPrintDocuments - [String]
|
The documents of the signed vouchers that can be printed and put on the package(s) |
Example
{"voucherPrintDocuments": ["abc123"]}
VoucherStatusEnum
Values
Enum Value | Description |
---|---|
|
The voucher is active |
|
The voucher is canceled |
Example
"ACTIVE"
VoucherTracking
Example
{
"checkpointAction": "xyz789",
"checkpointDateTime": "2007-12-03T10:15:30Z",
"checkpointLocation": "xyz789",
"checkpointNotes": "xyz789",
"code": "abc123",
"shipmentId": "5e5677d71bdc2ae76344968c"
}
VouchertypeEnum
Values
Enum Value | Description |
---|---|
|
The main voucher |
|
A sub voucher |
Example
"MAIN"