Documentation for integration with the WAPI system via the API - wapicom/API GitHub Wiki

Warehouse API is a service that provides easy and understandable working with warehouses and courier services throughout the Europe.

How the process works:

  • you send an order via API to the WAPI system
  • the order is handled by the WAPI system (if there are no errors, lack of inventory, etc.)
  • the WAPI system sends the order to the warehouse system
  • the warehouse picks and packs the parcel and passes the parcel to the courier
  • the parcel goes to the final customer

Each of these stages is marked with a certain status (Pending >> Assigned to Partner >> In Transit >> Delivered / Returning>Returned), which you can both get from the API and see in the interface of the WAPI system.

In this document you will find the technical information regarding API work and methods. If you have any questions, feel free to ask your manager or WAPI IT support.

API access

API base URL is:

https://api.wapi.com/API/hs/v1/ExternalAPI/APIIntegration/{method}

The endpoint is protected by the authentication token. The personalized token must be specified in a request's header. Please ask WAPI IT team for a token.

On testing step you need to create test orders (with correct real contact data). Please do not use random data for test orders, it will lead to Error status. After test step, if everything is ok and it's approved by Wapi IT, you can send real orders.

Link to the production user interface: https://ui.wapi.com/ (please ask your manager for an access).

Order statuses in WAPI

  • New - when the order was just created in the system
  • On hold - when the order is waiting to be sent to the warehouse system according to preferred delivery date
  • Pending - when the order was accepted by WAPI and a warehouse was assigned
  • Updated - when the order was updated by the user in UI - for example, after some validation errors
  • Assigned to partner - when the order was transferred to the warehouse system
  • Tracking number received - when the parcel has received a tracking number
  • Label created – when shipment label is created on Wapi side (not warehouse side)
  • Label to send – when shipment label was registered for sending (needed in some cases)
  • Label sent – when shipment label is sent to the client system (needed in some cases)
  • Shipment created - when the tracking number was registered in a tracking system
  • In transit - when the parcel is on the way to the customer
  • Delivered - when the customer received the parcel
  • Returning - when the parcel is on the way to the warehouse
  • Returned to sender - when the parcel is returned to the warehouse
  • Return processed - when the parcel was accepted by the warehouse, internal tech status
  • Error - when the order cannot be transferred to the warehouse system due to errors in the order or due to a technical error
  • Out of stock - when the order can't be assigned to any warehouse due to: out of stock, financial rules, forbidden country etc.
  • Cancelled - when the order is cancelled
  • Damaged - when the parcel is damaged
  • Lost - when the parcel is lost
  • Info event - when a courier service, for example, notified customer by SMS/email

List of orders trouble statuses

  • IncorrectAddress
  • IsAbsent
  • IsRefused
  • RecipientDidNotPay
  • CannotLocateConsignee
  • Moved to pickup point
  • OtherIncident
  • Is shipped
  • IncorrectAddress
  • Will be delivered today
  • Comment to courier service
  • Courier service email notification
  • Courier service SMS notification
  • Email to customer was sent
  • SMS to customer was sent

Codes of warehouses

Code Country
CYWH1 Cyprus
GRWH1 Greece
DEWH4 Germany
DEWH7 Germany
ITWH2 Italy
ITWH6 Italy
ITWH7 Italy
PLWH1 Poland
BGWH2 Romania
SKWH1 Slovakia
SKWH2 Slovakia
ESWH3 Spain
ESWH4 Spain
UKWH1 United Kingdom
USWH1 USA

List of courier services

Code Country Courier service
CYWH1 Cyprus ACS
GRWH1 Greece ACS
GRWH1 Greece BIZCourier
GRWH1 Greece CityCourier
GRWH1 Greece Elta GR
GRWH1 Greece Green Courier
GRWH1 Greece Pack-man courier
GRWH1 Greece One Courier
GRWH1 Greece BoxNow
DEWH4 Germany DHL
DEWH4 Germany UPS
DEWH7 Germany Warenpost
DEWH7 Germany DHL
DEWH7 Germany GLS
DEWH7 Germany PostAT
DEWH7 Germany DPD
ITWH2 Italy PostAT
ITWH2 Italy GLS
ITWH2 Italy BRT
ITWH6 Italy SDA
ITWH7 Italy GLS
PLWH1 Poland DPD PL
PLWH1 Poland InPost
PLWH1 Poland Allegro
PLWH1 Poland Packeta
BGWH2 Romania FanCourier
BGWH2 Romania Ekont
BGWH2 Romania Packeta
BGWH2 Romania Speedy
BGWH2 Romania GLS
SKWH1 Slovakia Hermes
SKWH1 Slovakia Croatia Post
SKWH1 Slovakia Packeta
SKWH1 Slovakia DPD
SKWH1 Slovakia GLS
SKWH1 Slovakia PostAT
SKWH1 Slovakia Slovenian Post
SKWH1 Slovakia PPL
SKWH1 Slovakia DHL
SKWH1 Slovakia BRT
SKWH1 Slovakia Speedy
SKWH1 Slovakia Sameday
SKWH1 Slovakia Cargus
SKWH1 Slovakia Colis Prive
SKWH2 Slovakia Packeta
SKWH2 Slovakia DPD
SKWH2 Slovakia GLS
ESWH3 Spain CorreosExpress
ESWH3 Spain MRW
ESWH3 Spain SEUR
ESWH3 Spain CTT
ESWH3 Spain Nacex
ESWH4 Spain CorreosExpress
ESWH4 Spain CTT
ESWH4 Spain Nacex
UKWH1 United Kingdom DPD
UKWH1 United Kingdom Evri
USWH1 USA UPS

How to send order to WAPI

POST /CreateOrder

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

{
"order":
  {
    "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",           // Required,  (Type: String, Integer),                  Order uuid in your system.  If your system hasn't an id, specify your order number here. 
    "number":"712838612",                                  // Required,  (Type: String, Integer),                  Number of the order in your system
    "externalNumber":"982782587RR"                         // Optional,  (Type: String, Integer - By default: ""), External order number from a marketplace or something like that
  },

"date":"2023-04-25T10:54:12",                              // Required,  (Type: String),                           String with a date of the order in UTC
"taxIncludedInPrice":true,                                 // Optional,  (Type: Boolean - By default: true),       Used for the invoices for the orders to the customs zone. If you specify it as "false" - you need to fill "tax" field in the product line section
"comment":"some comment ",                                 // Optional,  (Type: String - By default: ""),          Shipment label comment, Recommended length - maximum 30 characters (depending on courier service)
"currency":"EUR",                                          // Required,  (Type: String - By default: "EUR"),       Used for the invoices for the orders to the customs zone. Code of currency by ISO-(4217). 
"codCurrency":"CZK",                                       // Required for COD orders. The currency that the customer will pay to to the carrier. Code of currency by ISO-(4217). 
"preferredDeliveryDate":"2023-04-27T10:54:12",             // Optional,  (Type: Date - By default: null),          The day when the order should be delivered to the buyer. The mechanism calculates approximately when to send the order to the warehouse based on the delivery time statistics. Needs to be discussed with your manager
"products":
  [
    {
      "product":
        {
           "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",    // Optional,  (Type: String, Integer),             Product's uuid in your system. You can pass this field only if you created your products by API (check request CreateProducts).
           "uuid":"4d6991de-87e8-42e9-bfc9-992be1cc7e95",  // Optional,  (Type: String),                      Product's uuid in the WAPI system
           "name":"Demo Product-1",                        // Optional,  (Type: String),                      Name of the product
           "sku":"AA19-55",                                // Optional,  (Type: String),                      SKU or alias of the product
           "barcode":"123766912311"                        // Optional,  (Type: String),                      Barcode of the product
                                                           // At least one of the above fields (product's identifier) is required
        },
      "quantity":2,                                        // Required,  (Type: Float),                       How many items of this product should be sent
      "price":10.00,                                       // Required,  (Type: Float),                       The price of this product line for one quantity. Fur Hungary orders this field must be a multiple of 5. Can be 0 (for example, if the product is free shipping)
      "discount":2.00,                                     // Optional,  (Type: Float),                       Amount of discount of this product line
      "tax":3.00,                                          // Optional,  (Type: Float),                       Amount of tax for this product line. If tax is not included in "cod" field, you need to specify "taxIncludedInPrice" field as False
      "total":18.00,                                       // Required,,  (Type: Float),                       Total amount = (price multiple quantity minus discount plus tax) of this product line. Required for customs zone orders. If this is a COD-order, "total" is equal to "cod" field
      "cod":18.00,                                         // Optional,  (Type: Float),                       Amount of cash-on-delivery. Required for cash-on-delivery orders
      "lineId":"1",                                        // Optional,  (Type: String, Integer),             Used when you need to send only specific lines from the order
      "additionalService":false                            // Optional,  (Type: Boolean - By default: false), Specify as true if it is an additional service (for example, additional packing material)
    },
    {
      "product":
        {
           "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95", 
           "uuid":"4d6991de-87e8-42e9-bfc9-992be1cc7e95",
           "name":"Delivery", 
           "sku":"", 
           "barcode":""  
        },
      "quantity":1, 
      "price":5.00,
      "discount":0.00, 
      "tax":0.50, 
      "total":5.00, 
      "cod":5.00, 
      "lineId":"2", 
      "additionalService":true
    }
],
"warehouse":
  {
    "code":"ITWH6",                                        // Optional,  (Type: String),  Code of the warehouse if you want to choose this warehouse for sending your parcel. Ask your manager for the full list of warehouses' names and codes
    "name":"Warehouse1",                                   // Optional,  (Type: String),  Name of the warehouse
    "mandatory":true                                       // Optional,  (Type: Boolean), If you specify as true - this warehouse will be considered as priority
  },
// The list of warehouses can be found in the table above https://github.com/wapicom/API/wiki/Documentation-for-integration-with-the-WAPI-system-via-the-API#codes-of-warehouses
// The order distribution system for more efficient delivery works as follows:
// -the system checks the stock in all warehouses and sorts those warehouses where there is a stock on the basis of "warehouse country = // recipient country" - in order for the local warehouse to be the priority.
// -further, among these selected warehouses, the system selects the warehouses which have courier services that fall under the order // condition:
//  - cash on delivery in the order
//  - order is selfcollect or not
//  - local or cross-border delivery

// Further, if several warehouses are chosen after the selection, then the cost of delivery is determined and the optimal one is selected.

// In the future, we plan to add an additional criterion after determining the price - the delivery time. 
"courierService":
  {
    "name":"CorreosExpress",                              // Optional,  (Type: String),   Name of preferred courier service. If the parcel can't be shipped by specified courier service, the system will decide which courier service will deliver the parcel. Ask your manager for more details. 
    "mandatory":true                                      // Optional,  (Type: Boolean), If you specify as true - this courier service will be considered as priority
  },      



// The list of courier services can be found in the table above https://github.com/wapicom/API/wiki/Documentation-for-integration-with-the-WAPI-system-via-the-API#list-of-courier-services
// Please make sure that the courier service you specify is agreed with your manager and is included in your price lists.
 

"receiver": 
  {  
    "fullName":"receiver's name",                         // Required,  (Type: String),   Full name of the customer, max 40 symbols
    "phone":"123456789",                                  // Required,  (Type: String),   Customer's phone number
    "email":"[email protected]",                              // Optional,  (Type: String),   Customer's email address, max 40 symbols. Required for some courier services.
    "address":"Via Francesco II di Borbone, 14",          // Required,  (Type: String),   Street, building, apartment, etc. Recommended length - maximum 60 characters (depending on courier service)
    "city":"Arco",                                        // Required,  (Type: String),   Name of the city. 
    "county":"TN",                                        // Required,  (Type: String),   Province/region. Required for orders to Italy, Romania, Bulgaria, Hungary. For orders to Italy, the province must be specified in the form of two characters. For orders to USA a state must be specified in the form of two characters.
    "country":"IT",                                       // Required,  (Type: String),   Code of a country in Alpha-2 code
    "zipCode":"38062"                                     // Required,  (Type: String),   Customer's zipcode
  },
"pickUpPoint":                                           // All fields in this section are required if "selfCollect" field is true
  {
    "id":"NTM07M",                                       // Required,   (Type: String),   Сode of a pickup point
    "description":"Vicino all'ospedale di Arco" ,        // Required,   (Type: String),   Some additional information
    "name":"point NTM07M",                               // Required,   (Type: String),   Name of a pickup point
    "country":"IT",                                      // Required,   (Type: String),   Code of a country in Alpha-2 code
    "zipCode":"38062",                                   // Required,   (Type: String),   ZipCode of a pickup point
    "city":"Arco",                                       // Required,   (Type: String),   City of a pickup point
    "address":"Via Francesco II di Borbone, 12"          // Required,   (Type: String),   An address of a pickup point
  },


// Please note that for Greece warehouse for ACS/Elta self-collect orders you don't need to pass pickup point data - you need to pass only receiver address and "selfCollect":true, then warehouse will choose pickup point by themselsevles.
"selfCollect":true,                                      // Optional,   (Type: Boolean - By default: false), Specify as true if the parcel must be delivered to a pickup point
"reasonForExport":"sale",                                // Optional,   (Type: String - by default: sale),   Free text with the reason for custom service. Required for customs zone orders
"attachments":                                           // File attachment must be agreed with your manager. Must be PDF A4
  [
    {
      "name":"name of a file",                           // Optional,   (Type: String),   Name of a file with extension. Required if you want to attach a file
      "body":"base64 string of byte array",              // Optional,   (Type: String),   Binary object of file. Required if you want to attach a file
      "type":"Invoice"                                   // Optional,   (Type: String),   Can be "Invoice", "Customs invoice", "Delivery note", "Return form", "Other". Required if you want to attach a file
    }
  ]

}

Response:

// a response if the order was accepted 
{
  "success": true,
  "errorMessage": null,
  "warehouse": "ESWH3",
  "statusInfo": "Rubiks cube twist",
  "data": {
    "uuid": "a8b38af4-110d-11ef-abc3-40b076915bcc",
    "wapiTrackingNumber": "WH0001338999"
},
"status": "Pending"
}
// a response if the order is out of stock 
{
  "success": false,
  "errorMessage": null,
  "warehouse": null,
  "statusInfo": "Not enough stock",
  "data": {
    "uuid": "a8b38af4-110d-11ef-abc3-40b076915bcc",
    "wapiTrackingNumber": "WH0001338999"
},
"status": "Out of stock"
}
// a response if the order has preferred delivery date and get on hold status
{
  "success": true,
  "errorMessage": null,
  "warehouse": "ESWH3",
  "statusInfo": "Rubiks cube twist",
  "data": {
    "uuid": null,
    "wapiTrackingNumber": "WH0001338999"
},
"status": "On hold"
}
// a response if the order wasn't accepted (some validation error)
{
  "success": false,
  "errorMessage": "Validation error: incorrect zipcode",
  "warehouse": null,
  "statusInfo": null,
  "data": {
    "uuid": null,
    "wapiTrackingNumber": null
},
"status": null
}

If you need to get a webhook when order status is changed, please contact Wapi IT department. If we receive status code 200 in response, then we consider it accepted.

Validation rules

Wapi has 3-level validation. This means that the order is validated by three sources:

  • validation on the Wapi side (occurs at the moment of receiving the order before the order is assigned a specific warehouse or courier service)
  • validation based on warehouse rules (occurs after the order is assigned a specific warehouse)
  • validation based on courier service rules (occurs after the order is assigned a specific courier service)

The validation rules at each level are listed below (will be updated over time).

Wapi validation

Error message What this error means
Cod amount < 0 COD amount can't be < 0
Cod exists and Cod currency is empty If it's a COD parcel, COD currency can't be empty
Order currency is empty Please fill in "Currency" field
Weight of order > 30 kg Parcel weight can't be more than 30 kg; please contact your manager
Volume weight of order > 30 kg Parcel volume weight can't be more than 30 kg; please contact your manager
Wrong country Country is empty / Country is not found / Country format is incorrect (must be ISO)
Wrong city City is empty / City contains zipcode only
Wrong zip Zipcode is empty / Zipcode is considered as Error when the format of zipcode is not correct for the given country
Receiver address is empty Please fill in "Address" field in "Receiver" section
Receiver address length exceeds 100 symbols Please correct the length of the address
Receiver name length exceeds 50 symbols Please correct the length of the receiver name
Phone is empty The order can't be accepted without phone number. We can replace this field with some date by your request
Receiver's phone is incorrect If the phone number has a code of a specified country - it is checked for the format. if the phone number code is for another country - the check is ignored and the phone is considered ok
Order comment length > 250 symbols Max length can't be more than 250 symbols
Pickup point [field] is empty If "selfCollect" is true - fields "id", "name" and "address" in pickup point structure can't be empty
Wrong pickup point [field] Same errors like by country, city, zipcode from pickup point structure
Some pickup point fields are filled, selfcollect is off If "selfCollect" is False/not filled and any of fields in pickup point structure is filled
In line [] product is absent Product is empty or product is not found in WAPI system
In line [] Total Amount < 0 "Total" field in line items can't be < 0
In line [] Price <= 0 "Price" field in line items can't be <= 0
In line [] Quantity = 0 "Quantity" field in line items can't be = 0
In line [] Tax >= Total "Tax" field in line items can't be >= "Total" field
In line [] Cod < 0 "Cod" field in line items can't be < 0
In line [] Cod < 0 "Cod" field in line items can't be < 0

Warehouse validation

Warehouse code Field Requirements for this field Error message
SKWH2 Email Must be filled in Email is empty
SKWH2 Receiver name Must be no longer than 40 characters Full name exceeds 40 symbols
ESWH4 Receiver name Must be no longer than 40 characters Full name exceeds 40 symbols

Courier service validation

CS name Field Requirements for this field Error message
Nacex Address Must be no longer than 60 characters Address exceeds 60 symbols
Nacex Address Shouldn't contain cyrillic symbols Address contains cyrillic symbols
Nacex Receiver name Shouldn't contain cyrillic symbols Full name contains cyrillic symbols
Nacex Comment Shouldn't contain cyrillic symbols Comment contains cyrillic symbols
Nacex City Shouldn't contain cyrillic symbols City contains cyrillic symbols
Ekont Pickup point description Shouldn't contain any characters except numbers and @ PickupPoint Description contents incorrect value
SDA Address Must be no longer than 32 characters Address exceeds 32 symbols
Nacex Zip-code ZIP must be like XXXX-XXX (for Portugal) ZIP must be like XXXX-XXX
BRT Address Must be no longer than 35 characters Address exceeds 35 symbols
BRT Address Shouldn't contain cyrillic symbols Address contains cyrillic symbols
BRT Comment Must be no longer than 15 characters Comment exceeds 15 symbols
BRT Comment Shouldn't contain cyrillic symbols Comment contains cyrillic symbols

How to cancel an order

POST /CancelOrder

You can cancel an order if it is in the "Pending", "New", "Error", "Out of stock" status. The order is sent to the warehouse system 1 time in half an hour. At this moment, the order status changes from "Pending" to "Assigned to partner". So, you need to keep in mind that you have only 30 minutes to cancel the order.

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

{
"order":
  {  
    "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",           // Order uuid in your system
    "uuid":"4cbfacf0-e07c-11ed-9b50-5bad0f6899d0",         // Uuid of the order in the WAPI system
    "wapiTrackingNumber":"WH0000000024",                   // Wapi tracking number of the order you want to cancel   
    "number":"712838612",                                  // Number of the order in your system
    "externalNumber":"982782587RR"                         // External order number from a marketplace or something like that
                                                           // At least one of the above fields (order's identifier) is required
  },
"comment":"test order"                                     // Required,   (Type: String), The reason of cancellation
}

Response:

// a response when the order was successfully cancelled
{
  "success":true,
  "errorMessage":null
}
// a response when the order can't be cancelled
{
  "success":false,
  "errorMessage":"Order has already been delivered".       // Can be string or array
}

How to request a stock

GET/POST /GetStock

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

// if you don't pass any of the parameters, you'll get the stock information for all your products in all warehouses. 
// An empty value (null) will also work as a filter. 
// If you don't need to filter, just don't pass the parameter (product/country/warehouse).
{
  "product":
    {
      "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",         // Product's uuid in your system
      "uuid":"4d6991de-87e8-42e9-bfc9-992be1cc7e95",       // Product's uuid in the WAPI system
      "name":"Demo Product-1",                             // Name of the product
      "sku":"AA19-55",                                     // SKU or alias of the product  
      "barcode":"123766912311"                             // Barcode of the product
                                                           // At least one of the above fields must be specified if you want to check stock levels for special product
    },   
  "country":"IT",                                          // Code of a country in Alpha-2 code
  "warehouseCode":"ITWH2"                                  // Code of the warehouse       
}

Response:

// successful response
{
"success":true,
"errorMessage":null,
"data": 
  [
    {
      "total": 100,
      "reserved": 5,
      "damaged": 1,
      "expired": 1,
      "undefinedStatus": 1,
      "withoutBox": 1,
      "forPlacement": 10,
      "sellable": 96,
      "available": 91,
// total = all stock including all product status
// sellable (calculated field) = total - damaged - expired - undefinedStatus - withoutBox
// reserved = products that were booked for current orders until they are shipped from the warehouse
// available (calculated field) = sellable - reserved
// forPlacement = returned products but not sellable yet (not included in total)
// undefinedStatus = when the status of the product is not defined yet but will be defined during returned processing (app. 72-96 working hours). For example, the product is returned to the warehouse, warehouse didn't put the product back to the stock. After checking the product can be damaged/sellable/without_box and the warehouse put it back to the stock with the status sellable/damaged/without_box.

      "product":
        {
          "id": "2c6991de-87e8-42e9-bfc9-992be1cc7e95",   
          "uuid": "4d6991de-87e8-42e9-bfc9-992be1cc7e95", 
          "name": "Demo Product-1", 
          "sku": "AA19-55"
        },
      "warehouseName": "Warehouse1",
      "warehouseCode": "ITWH2",
      "country": "IT"
      },
    {
      "total": 200,
      "reserved": 5,
      "damaged": 1,
      "expired": 1,
      "undefinedStatus": 1,
      "withoutBox": 1,
      "forPlacement": 10,
      "sellable": 196,
      "available": 191,
      "product":
        {
          "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95", 
          "uuid":"4d6991de-87e8-42e9-bfc9-992be1cc7e95", 
          "name":"Demo Product-1", 
          "sku":"AA19-55" 
        },
      "warehouseName": "Warehouse2",
      "warehouseCode": "ITWH3",
      "country": "IT"
    }
  ]
}
// unsuccessful response
{
  "success":false,
  "errorMessage":"incorrect incoming data",                // Can be string or array 
  "data":[]
}

How to request status information

GET/POST /GetStatusHistory

Wapi can send you a webhook when the order contains a trouble status. If you need to get a webhook when trouble status occurs, please contact Wapi IT department. If we receive status code 200 in response, then we consider it accepted.

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

{
"requestType":"full history",				   // Optional,   (Type: String),   Can be "full history" or "current status" 
"orders":
  [
    { 
      "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",         // Uuid of the order in your system 
      "uuid":"4cbfacf0-e07c-11ed-9b50-5bad0f6899d0",       // Uuid of the order in the WAPI system
      "wapiTrackingNumber":"WH0000000024",                 // Wapi tracking number of the order you want to check
      "number":"712838612",                                // Number of the order in your system
      "externalNumber":"982782587RR"                       // External order number from a marketplace or something like that
                                                           // At least one of the above fields (order's identifier) is required
    },
    {
      "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e92",       
      "uuid":"5cbfacf0-e07c-11ed-9b50-5bad0f6899d0", 
      "wapiTrackingNumber":"WH0000000078", 
      "number":"712838612",   
      "externalNumber":"982782587RR"
    }
  ]
}

Response:

// a response if you request full status history ("requestType":"full history")
{
"success":true,
"errorMessage": null,
"orders":
  [
    {
      "order":
        {
          "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",     // Uuid of the order in your system 
          "uuid":"4cbfacf0-e07c-11ed-9b50-5bad0f6899d0",   // Uuid of the order in the WAPI system
          "wapiTrackingNumber":"WH0000000024",             // Wapi tracking number of the order 
          "number":"712838612",                            // Number of the order in your system
          "externalNumber":"982782587RR"                   // External order number from a marketplace or something like that
        },
      "lastUpdateDate":"2023-04-25T10:54:12",
      "success":true,
      "errorMessage": null,
      "courierName": "SDA",                                // Name of the courier service where the parcel was registered
      "status":"In transit",                               // Current status of the order
      "courierSite": "https://www.sda.it",                 // Site of the courier service where the parcel was registered
      "claimExists":true,                                  // True if order claim exists
      "trackingNumbers":                                   // If the order is multi-parcel, there will be several tracking numbers
// In this example we use a multi-parcel case - when one order has two or more tracking numbers. If you have single-parcel order (only one tracking number), there will be one element of an array
        [        
          {
            "status": "In transit",                        // Current status for a tracking number
            "troubleStatus": "MovedToPickupPoint",         // If current status is a trouble status and its type
            "pickupPointLocation": "Branch Markische Str.172 42881 Wuppertul",  // Pickup point location, If trouble status is MovedToPickupPoint (available only for DHL)
            "statusDate": "2023-04-20T23:41:00",           // Last update date in UTC 0
            "offset": "+01:00",                            // Offset in hours, max = 14 hours, min = -12 hours
            "additionalInfo": "[20.04.2022 20:43:00] Status: 'InTransit'; Comments: 'DESTINATARIO ASSENTE -CONTATTA CALL CENTER'",        
            "trackingNumber": "383148H047484",             // First registered tracking number
            "currentTrackingNumber": "0000025007612M",     // Can be empty. If the first tracking number has changed, here will be a current tracking number
            "trackingLink": "[https://www.sda.it/wps/portal/Servizi_online/dettaglio-spedizione?locale=it&tracing.letteraVettura=0000025007612M"](https://www.sda.it/wps/portal/Servizi_online/dettaglio-spedizione?locale=it&tracing.letteraVettura=0000025007612M%22)
          },    
          {
            "status": "In transit", 
            "troubleStatus": "",                           // If current status is a trouble status
            "statusDate": "2023-01-04T23:41:00",           
            "offset": "+01:00",                            
            "additionalInfo": "[04.05.2022 20:43:00] Status: 'InTransit'; Comments: 'Disponibile per il ritiro presso il Centro Operativo SDA'",        
            "trackingNumber": "383148H047485",
            "currentTrackingNumber": "",
            "trackingLink": "[https://www.sda.it/wps/portal/Servizi_online/dettaglio-spedizione?locale=it&tracing.letteraVettura=383148H047485"](https://www.sda.it/wps/portal/Servizi_online/dettaglio-spedizione?locale=it&tracing.letteraVettura=383148H047485%22)
          }    
        ],


      "statusHistory": 
        [
          {
            "status": "Pending",
            "troubleStatus": "",            
            "trackingNumber": "",
            "statusDate": "2023-04-18T07:10:52",
            "offset": "+01:00",
            "additionalInfo": ""
          },
          {
            "status": "Assigned to partner",
            "troubleStatus": "",             
            "trackingNumber": "",
            "statusDate": "2023-04-18T08:00:52",
            "offset": "+01:00",
            "additionalInfo": "[18.04.2023 08:00:49] Status: 'AssignedToPartner'"
          },
          {
            "status": "In transit",
            "troubleStatus": "",           
            "trackingNumber": "383148H047484",
            "statusDate": "2023-04-19T18:51:06",
            "offset": "+01:00",
            "additionalInfo": "[19.04.2023 18:51:00] Status: 'InTransit'; Comments: 'EN RUTA A LOCALIDAD DE DESTINO. Su envío está en uno de nuestro vehículos siendo transportado a la localidad de destino. Lo recibirá en la fecha de entrega prevista.'; Location: 'VALENCIA'"
          },
          {
            "status": "In transit",
            "troubleStatus": "",            
            "trackingNumber": "383148H047484",
            "statusDate": "2023-04-19T18:51:06",
            "offset": "+01:00",
            "additionalInfo": "[19.04.2023 18:51:00] Status: 'InTransit'; Comments: 'EN RUTA A LOCALIDAD DE DESTINO. Su envío está en uno de nuestro vehículos siendo transportado a la localidad de destino. Lo recibirá en la fecha de entrega prevista.'; Location: 'VALENCIA'"
          },
          {
            "status": "In transit",
            "troubleStatus": "",           
            "trackingNumber": "383148H047484",
            "statusDate": "2023-04-19T18:51:07",
            "offset": "+01:00",
            "additionalInfo": "[19.04.2023 18:51:00] Status: 'InTransit'; Comments: 'ADMITIDO'; Location: 'VALENCIA'"
          },
          {
            "status": "In transit",
            "troubleStatus": "",           
            "trackingNumber": "383148H047485",
            "statusDate": "2023-04-19T18:51:07",
            "offset": "+01:00",
            "additionalInfo": "[20.04.2023 18:51:00] Status: 'InTransit'; Comments: 'ADMITIDO'; Location: 'VALENCIA'"
          },
          {
            "status": "In transit",
            "troubleStatus": "MovedToPickupPoint",       
            "pickupPointLocation": "Branch Markische Str.172 42881 Wuppertul",  // Pickup point location, If trouble status is MovedToPickupPoint (available only for DHL)         
            "trackingNumber": "383148H047484",
            "statusDate": "2023-04-20T08:45:07",
            "offset": "+01:00",
            "additionalInfo": "[20.04.2023 08:45:00] Status: 'InTransit'; Comments: 'DESTINATARIO ASSENTE -CONTATTA CALL CENTER'; Location: 'LEIRIA'"
          }
        ]
    },
    {
      "order":
        {
          "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95", 
          "uuid":"4cbfacf0-e07c-11ed-9b50-5bad0f6899d0",  
          "wapiTrackingNumber":"WH0000000025",
          "number":"712838612", 
          "externalNumber":"982782587RR"
        },
      "success":false,
      "errorMessage": "Order is not found by incoming data" // Can be string or array
    }
  ]
}
// a response if you request current status ("requestType":"current status")
{
"success":true,
"errorMessage": null,
"orders":
  [
    {
      "order":
        {
          "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",     // Uuid of the order in your system 
          "uuid":"4cbfacf0-e07c-11ed-9b50-5bad0f6899d0",   // Uuid of the order in the WAPI system
          "wapiTrackingNumber":"WH0000000024",             // Wapi tracking number of the order 
          "number":"712838612",                            // Number of the order in your system
          "externalNumber":"982782587RR"                   // External order number from a marketplace or something like that
        },
      "lastUpdateDate":"2023-04-25T10:54:12",
      "success":true,
      "errorMessage": null,
      "courierName": "SDA",                                // Name of the courier service where the parcel was registered
      "status":"In transit",                               // Current status of the order
      "courierSite": "https://www.sda.it",                 // Site of the courier service where the parcel was registered
      "claimExists":true,                                  // True if order claim exists
      "trackingNumbers":                                   // If the order is multi-parcel, there will be several tracking numbers
// In this example we use a multi-parcel case - when one order has two or more tracking numbers. If you have single-parcel order (only one tracking number), there will be one element of an array
        [        
          {
            "status": "In transit",                        // Current status for a tracking number
            "troubleStatus": "MovedToPickupPoint",         // If current status is a trouble status and its type
            "pickupPointLocation": "Branch Markische Str.172 42881 Wuppertul",  // Pickup point location, If trouble status is MovedToPickupPoint (available only for DHL)
            "statusDate": "2023-04-20T23:41:00",
            "offset": "+01:00",
            "additionalInfo": "[20.04.2022 20:43:00] Status: 'InTransit'; Comments: 'DESTINATARIO ASSENTE -CONTATTA CALL CENTER'",        
            "trackingNumber": "383148H047484",             // First registered tracking number
            "currentTrackingNumber": "0000025007612M",     // Can be empty. If the first tracking number has changed, here will be a current tracking number
            "trackingLink": "[https://www.sda.it/wps/portal/Servizi_online/dettaglio-spedizione?locale=it&tracing.letteraVettura=0000025007612M"](https://www.sda.it/wps/portal/Servizi_online/dettaglio-spedizione?locale=it&tracing.letteraVettura=0000025007612M%22)
          },    
          {
            "status": "In transit", 
            "troubleStatus": "",                           // If current status is a trouble status
            "statusDate": "2023-01-04T23:41:00",
            "offset": "+01:00",
            "additionalInfo": "[04.05.2022 20:43:00] Status: 'InTransit'; Comments: 'Disponibile per il ritiro presso il Centro Operativo SDA'",        
            "trackingNumber": "383148H047485",
            "currentTrackingNumber": "",
            "trackingLink": "[https://www.sda.it/wps/portal/Servizi_online/dettaglio-spedizione?locale=it&tracing.letteraVettura=383148H047485"](https://www.sda.it/wps/portal/Servizi_online/dettaglio-spedizione?locale=it&tracing.letteraVettura=383148H047485%22)
          }    
        ]
    }
  ]
}


How to create or update a packing list

POST /CreatePackingList

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

// 1st example - if "packingListType" = "pallets"
// If "packingListType" = "boxes" then root tag must be "boxes" (you don't need to fill in "pallets" tag)
// If "packingListType" = "products" then root tag must be "products" (you don't need to fill in "pallets" tag and "boxes" tag)
{  
  "packingListType": "pallets",                            // Required,   (Type: String[pallets, boxes, products]), Type of the packing list
  "comment": "some comment",                               // Optional,   (Type: String),          Comment for packing list
  "date": "2023-05-08T22:03:38",                           // Required,   (Type: Date),            Date of the packing list
  "number": "00000000125",                                 // Required,   (Type: String),          Document number in your system
  "id": "567657685878",                                    // Required,   (Type: String, Integer), Document ID in your system
  "pallets": [
    {
      "name": "name 1",                                    // Required,   (Type: String),          Pallet name
      "trackingNumber": "tracking number 1",               // Optional,   (Type: String),          Pallet tracking number
      "quantity": 1,                                       // Required,   (Type: Integer),         Pallet quantity
      "length": 120,                                       // Optional,   (Type: Float),           Pallet length in cm
      "height": 100,                                       // Optional,   (Type: Float),           Pallet height in cm
      "width": 80,                                         // Optional,   (Type: Float),           Pallet width in cm
      "volume": 0.96,                                      // Optional,   (Type: Float),           Pallet volume in m3
      "weight": 500,                                       // Optional,   (Type: Float),           Pallet weight in kg
      "comment": "Pallet comment",                         // Optional,   (Type: String),          Some comment to this pallet 
      "boxes": [
        {
          "name": "name 1",                                // Required,   (Type: String),          Box name
          "trackingNumber": "tracking number 1",           // Optional,   (Type: String),          Box tracking number
          "quantity": 4,                                   // Required,   (Type: Integer),         Box quantity
          "length": 50,                                    // Optional,   (Type: Float),           Box length in cm
          "height": 20,                                    // Optional,   (Type: Float),           Box height in cm
          "width": 100,                                    // Optional,   (Type: Float),           Box width in cm
          "volume": 0.04,                                  // Optional,   (Type: Float),           Box volume in cm
          "weight": 500,                                   // Optional,   (Type: Float),           Box weight in kg
          "type": "mixed",                                 // Optional,   (Type: String),          Box type (for example, mixed or homogeneous)
          "comment": "Box comment",                        // Optional,   (Type: String),          Some comment to this box 
          "products": [
            {
              "order": 
                {
                  "id": 93327,                             // Order uuid in your system
                  "uuid": "55ee6cf2-1b04-4a98-82ea-cb737 ",// Uuid of the order in the WAPI system 
                  "wapiTrackingNumber": "WH************",  // Wapi tracking number of the order
                  "number": "DE4206",                      // Number of the order in your system 
                  "externalNumber": 4246185                // External order number from a marketplace or something like that
                                                           // At least one of the above fields (order's identifier) is required
                },
                "trackingNumber": "tracking number 1",     // Optional,   (Type: String),           Product tracking number
                "quantity": 1,                             // Optional,   (Type: Integer),          Product quantity
                "comment": "Product comment",              // Optional,   (Type: String),           Some comment to this product 
                "product": 
                  {
                    "barcode": "barcode 1",                // Optional,   (Type: String),           Barcode of the product 
                    "name": "name 1",                      // Optional,   (Type: String),           Name of the product 
                    "uuid": "80ea6ff0-a0b1-4e7a-8571-36b6",// Optional,   (Type: String),           Uuid of the product in WAPI
                    "sku": "sku 1",                        // Optional,   (Type: String),           Product SKU code
                    "id": 117382                           // Optional,   (Type: String),           Product ID in your system
                                                           // At least one of the above fields (product's identifier) is required
                  }
            },
            {
              "order": 
                {
                  "id": 113508,
                  "uuid": "c3d69347-4b25-404a-8310-164414402efd",
                  "wapiTrackingNumber": "WH************",
                  "number": "DE3915",
                  "externalNumber": 2467346
                },
                "trackingNumber": "tracking number 2",
                "quantity": 1,
                "comment": "Product comment",
                "product": 
                  {
                    "barcode": "barcode 2",
                    "name": "name 2",
                    "uuid": "b2fc40b7-4347-4ea8-b832-5a0a4c5e949e",
                    "sku": "sku 2",
                    "id": 253507
                  }
            }
          ]
        },
        {
          "name": "name 2",
          "trackingNumber": "tracking number 2",
          "quantity": 4,
          "length": 50,
          "height": 20,
          "width": 100,
          "volume": 0.04,
          "type": "mixed",
          "comment": "Box comment",
          "products": [
            {
              "order": 
                {
                  "id": 247968,
                  "uuid": "628cd288-10de-4feb-88b6-8ba9573dbba9",
                  "wapiTrackingNumber": "WH************",
                  "number": "DE4688",
                  "externalNumber": 8022400
                },
              "trackingNumber": "tracking number 1",
              "quantity": 1,
              "comment": "Product comment",
              "product": 
                {
                  "barcode": "barcode 1",
                  "name": "name 1",
                  "uuid": "135fb78f-bb8a-4216-952d-fadea6ec2dbe",
                  "sku": "sku 1",
                  "id": 168486
                }
            },
            {
              "order": 
                {
                  "id": 179143,
                  "uuid": "d4c7faf5-4db7-404c-91b0-90c031840469",                
                  "wapiTrackingNumber": "WH************",
                  "number": "DE4544",
                  "externalNumber": 4902100
                },
              "trackingNumber": "tracking number 2",
              "quantity": 1,
              "comment": "Product comment",
              "product": 
                {
                  "barcode": "barcode 2",
                  "name": "name 2",
                  "uuid": "83c44620-efba-48fe-90fe-ef0aeca8c874",
                  "sku": "sku 2",
                  "id": 125361
                }
            }
          ]
        }
      ]
    },
    {
      "name": "name 2",
      "trackingNumber": "tracking number 2",
      "quantity": 1,
      "length": 120,
      "height": 100,
      "width": 80,
      "volume": 0.96,
      "weight": 500,
      "comment": "Pallet comment",
      "boxes": [
        {
          "name": "name 1",
          "trackingNumber": "tracking number 1",
          "quantity": 4,
          "length": 50,
          "height": 20,
          "width": 100,
          "volume": 0.04,
          "type": "mixed",
          "comment": "Box comment",
          "products": [
            {
              "order": 
                {
                  "id": 156081,
                  "uuid": "9406c17d-4009-4086-a770-e01b07d902ce",
                  "wapiTrackingNumber": "WH************",
                  "number": "DE5936",
                  "externalNumber": 1395811
                },
              "trackingNumber": "tracking number 1",
              "quantity": 1,
              "comment": "Product comment",
              "product": 
                {
                  "barcode": "barcode 1",
                  "name": "name 1",
                  "uuid": "b53df8d6-0d65-4dec-a63d-45f9b1a695de",
                  "sku": "sku 1",
                  "id": 280499
                }
            },
            {
              "order": 
                 {
                  "id": 70596,
                  "uuid": "94b25130-b1e0-48ae-8724-2415b3f0e177",
                  "wapiTrackingNumber": "WH************",
                  "number": "DE4544",
                  "externalNumber": 5729255
                },
              "trackingNumber": "tracking number 2",
              "quantity": 1,
              "comment": "Product comment",
              "product": 
                {
                  "barcode": "barcode 2",
                  "name": "name 2",
                  "uuid": "bc7dc5f3-d209-40cf-8646-1f2788f90a27",
                  "sku": "sku 2",
                  "id": 276073
                }
            }
          ]
        },
        {
          "name": "name 2",
          "trackingNumber": "tracking number 2",
          "quantity": 4,
          "length": 50,
          "height": 20,
          "width": 100,
          "volume": 0.04,
          "type": "mixed",
          "comment": "Box comment",
          "products": [
            {
              "order": 
                {
                  "id": 73518,
                  "uuid": "a6e366d9-1567-41a7-a2f4-ab86b17abc06",
                  "wapiTrackingNumber": "WH************",
                  "number": "DE5880",
                  "externalNumber": 3459036
                },
              "trackingNumber": "tracking number 1",
              "quantity": 1,
              "comment": "Product comment",
              "product": 
                {
                  "barcode": "barcode 1",
                  "name": "name 1",
                  "uuid": "fe5968ca-61d1-47b9-90fc-5256eca431fc",
                  "sku": "sku 1",
                  "id": 207371
                }
            },
            {
              "order": 
                {
                  "id": 178355,
                  "uuid": "3d9892a0-46fc-4997-a11c-cee24f0a2c90",
                  "wapiTrackingNumber": "WH************",
                  "number": "DE5777",
                  "externalNumber": 4567583
                },
              "trackingNumber": "tracking number 2",
              "quantity": 1,
              "comment": "Product comment",
              "product": 
                {
                  "barcode": "barcode 2",
                  "name": "name 2",
                  "uuid": "681c502d-b3f8-4816-8ed1-5268a1296911",
                  "sku": "sku 2",
                  "id": 111541
                }
            }
          ]
        }
      ]
    }
  ]
}

Response:

// a response when the packing was successfully created or updated
{
  "success":true,
  "errorMessage":null,
  "uuid":"681c502d-b3f8-4816-8ed1"                         // uuid of created packing list
}
// a response when the packing list wasn't created
{
  "success":false,
  "errorMessage": "Packing list wasn't created because the incoming data is incorrect",// Can be string or array
  "uuid":null
}

How to recreate label for an order

POST /RecreateLabel

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

{
"order":
  {  
    "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",           // Order uuid in your system
    "uuid":"4cbfacf0-e07c-11ed-9b50-5bad0f6899d0",         // Uuid of the order in the WAPI system
    "wapiTrackingNumber":"WH0000000024",                   // Wapi tracking number of the order
    "number":"712838612",                                  // Number of the order in your system
    "externalNumber":"982782587RR"                         // External order number from a marketplace or something like that
                                                           // At least one of the above fields (order's identifier) is required
  }
}

Response:

// a response when the label was successfully recreated
{
  "success":true,
  "errorMessage":null
}
// a response when the label can't be recreated
{
  "success":false,
  "errorMessage":"Order has already been shipped"          // Can be string or array
}

How to reload order from a marketplace

`POST /ReloadOrder

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

{
"order":
  {  
    "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",           // Order uuid in your system
    "uuid":"4cbfacf0-e07c-11ed-9b50-5bad0f6899d0",         // Uuid of the order in the WAPI system
    "wapiTrackingNumber":"WH0000000024",                   // Wapi tracking number of the order
    "number":"712838612",                                  // Number of the order in your system
    "externalNumber":"982782587RR"                         // External order number from a marketplace 
                                                           // At least one of the above fields (order's identifier) is required
  }
}

Response:

// a response when the order was successfully reloaded
{
  "success":true,
  "errorMessage":null
}
// a response when the order can't be reloaded
{
  "success":false,
  "errorMessage":"Order can't be reloaded"                 // Can be string or array
}

How to send a comment to courier

`POST /SendCommentToCourierService

Currently this option works like this:

  • some of the warehouses/courier services allow to pass the instruction by API; your comment will be passed directly to warehouse/courier service by API
  • some of the warehouses/courier services are ready to receive instructions by email; your comment will be passed directly to warehouse/courier service email
  • if the warehouse/courier service doesn't allow to get instructions by API or by email, your comment will be sent to our logistics team (and the team pass your comment to the warehouse).

Note: some courier service provide personal account where a seller can manage parcels. Usually personal accounts are created for big sellers with a large number of orders. In this case for such clients and such courier service the function of passing instructions to Wapi system is forbidden.

In the table below you can see available methods and who will receive your instruction:

WH + CS Processing way Available options
GRWH1 + ACS/BIZCourier/CityCourier/Elta GR/Green Courier/Pack-man courier/One Courier/BoxNow By email to Wapi logistics team Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
CYWH1 + ACS By email to Wapi logistics team Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
ITWH2 + PostAT/GLS/BRT By email to Wapi logistics team Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
ITWH5 + GLS To Warehouse by API Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
ITWH6 + SDA To Warehouse by API Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
ESWH3 + CEX To Warehouse by API Redelivery to the same address;Redelivery to another address;Storage at courier agency
ESWH3 + Nacex By email to Wapi logistics team Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
ESWH3 + SEUR By email to Wapi logistics team Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
ESWH3 + CTT By email to Wapi logistics team Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
ESWH3 + SEUR By email to Wapi logistics team Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
ESWH4 Forbidden Forbidden
BGWH2 + FanCourier/Ekont/Packeta/Speedy/GLS By email to the warehouse Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
DEWH4 + UPS By email to the warehouse Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
DEWH4 + DHL Forbidden Forbidden
PLWH1 + Packeta By email to the courier service Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
PLWH1 + DPD PL By email to the courier service Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
PLWH1 + Inpost By email to the courier service Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
DEWH7 + GLS Forbidden Forbidden
DEWH7 + PostAT Forbidden Forbidden
DEWH7 + DHL Forbidden Forbidden
USWH1 + UPS US By email to the warehouse Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
SKWH2 + Packeta By email to the courier service Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
SKWH2 + DPD By email to the courier service Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
SKWH2 + GLS By email to the courier service Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender
USWH1 + UPS By email to the warehouse Redelivery to the same address;Redelivery to another address;Storage at courier agency;Delivery back to the sender

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

{
"order":
  {  
    "id":"2c6991de-87e8-42e9-bfc9-992be1cc7e95",           // Order uuid in your system
    "uuid":"4cbfacf0-e07c-11ed-9b50-5bad0f6899d0",         // Uuid of the order in the WAPI system
    "wapiTrackingNumber":"WH0000000024",                   // Wapi tracking number of the order 
    "number":"712838612",                                  // Number of the order in your system
    "externalNumber":"982782587RR"                         // External order number from a marketplace 
                                                           // At least one of the above fields (order's identifier) is required
    "trackingNumber":"24568345678"                         // Required, (Type: String), Courier service tracking number
  },
"comment": "",                                             // Optional, (Type: String),  Comment to a courier
"action": "",                                              // Required, (Type: Enum["Redelivery to the same address", "Delivery back to the sender", "Storage at courier agency", "Redelivery to another address"]), 
"receiver":                                                // Required if action = "Redelivery to another address"
  {  
    "fullName":"John Lennon",                              // Required,  (Type: String), Full name of the customer
    "phone":"123456789",                                   // Required,  (Type: String), Customer's phone number
    "email":"[email protected]",                               // Optional,  (Type: String), Customer's email address
    "address":"Via Francesco II di Borbone, 14",           // Required,  (Type: String), Street, building, apartment, etc
    "city":"Arco, TN",                                     // Required,  (Type: String), Name of the city. For Italy a province must be specified after the city name
    "country":"IT",                                        // Required,  (Type: String), Code of a country in Alpha-2 code
    "zipCode":"38062"                                      // Required,  (Type: String), Customer's zipcode
  },
"deliveryDate":                                            // Required if action = "Redelivery to the same address"
  {
    "date": "",                                            // (Type: Date)
    "hourFrom": "",                                        // (Type: Time)
    "hourTo": ""                                           // (Type: Time)
  }
}

Response:

// a response when the comment was successfully sent
{
  "success":true,
  "errorMessage":null
}
// a response when the comment can't be sent
{
  "success":false,
  "errorMessage":"The comment can't be sent"               // Can be string or array
}

How to get products from WAPI database

GET/POST /GetProductsList

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

{
}

Response:

// a successful response 
{
  "success": true,
  "errorMessage": null,
  "products": [
    {
      "fullName": "Full name 1",
      "name": "Name 1",
      "status": "Approved",
      "uuid": "143f6b97-8048-11ec-b4a7-000d3adb828d",        // Product Uuid in WAPI
      "sku": "SKU 1",                                      
      "id": 1                                                // Product ID in your system
    },
    {
      "fullName": "Full name 2",
      "name": "Name 1",
      "status": "Draft",
      "uuid": "143f6ca8-8048-11ec-b4a7-000d3adb8289",
      "sku": "SKU 2",
      "id": 2
    }
  ]
}
// a response when the product list can't be downloaded 
{
  "success":false,
  "errorMessage":"There is no registered products"         // Can be string or array
}

How to create or update product in WAPI

POST /CreateProducts

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

[
  {
    "id":"336445",                                             // Required, (Type:String, Integer),           ID of the product in your system
    "description":"some text",                                 // Required, (Type:String),                    Description of the product, only numbers, Latin alphabet and symbols: -+_.,:;!?*'"%&#()[]
    "fullDescription":"some text",                             // Required, (Type:String),                    Extra information about the product, only numbers, Latin alphabet and symbols: -+_.,:;!?*'"%&#()[]
    "sku":"DERM-62",                                           // Required, (Type:String),                    Product SKU
    "skuAdditional":"Face care cream",                         // Optional, (Type:String),                    Additional product SKU
    "skuExternal":"DERM-62 krem do twarzy",                    // Optional, (Type:String),                    Additional product SKU, for example, from marketplace
    "additionalService":true,                                  // Optional, (Type:Boolean - By default:false),If the product is an additional service
    "typeOfStorageShelf":"shelf",                              // Required, (Type:Enum ["pallet", "shelf"]),  Storage type
    "packingBox":"Bubble wrap"                                 // Optional, (Type:Enum ["Bubble wrap", "Carton boxes", "Plastic bag", "Other"] - By default: null), Packaging of the product itself - how it looks now.
    "extraPackingMaterial":"Carton box",                       // Optional, (Type:Enum ["Bubble envelope", "Carton box", "Other"] - By default: null), Wishes on packaging, if any. WAPI standard packaging is something simple and cheap, for example, a postal package. If you need to "strengthen" the packaging in some way or choose a package of a specific size or material, you should select it here. If a desired option isn't in the list, please choose "Other" and contact your manager.
    "whoProvideExtraPacking":"WAPI"                            // Optional, (Type:Enum ["WAPI", "client"] - By default: "WAPI"), According to         "extraPackingMaterial" field who will provide extra packing. Required if "extraPackingMaterial" field is specified.
    "expiringTerm":"some text",                                // Optional, (Type:String),                    Expiration date of the product
    "specialTemperatureControl":"-5 +12",                      // Optional, (Type:String - By default: null), Temperature conditions
    "liquid":true,                                             // Required, (Type:Boolean),                   If the product is liquid
    "fragile":true,                                            // Required, (Type:Boolean),                   If the product is fragile 
    "glass":true,                                              // Required, (Type:Boolean),                   If the product is glass 
    "hazmat":true,                                             // Required, (Type:Boolean),                   If the product is hazmat
    "specialDeliveryOrStorageRequirements":"no",               // Optional, (Type:String - By default: null), Special delivery or storage requests in free form
    "purchaseValue":100,                                       // Required, (Type:Float),                     Product price
    "insurance":true,                                          // Optional, (Type:Boolean - By default: false), If the product has insurance
    "countryOfOrigin":"IT",                                    // Required, (Type: String),                   Code of a country in Alpha-2 code
    "hsCode":"5678899",                                        // Required, (Type:Integer),                   Short for Harmonized Commodity Description and Coding System. Required for customs invoices.
    "comment":"some text",                                     // Optional, (Type:String),                    Some comment
    "pictures": [                                              // Optional,                                   Picture of the product
      {
        "pictureName":"Image_1",
        "bynaryDataOfImage":"bynaryDataOfImage",
        "url":"url"
      },
      {
        "pictureName":"Image_2",
        "bynaryDataOfImage":"bynaryDataOfImage",
        "url":"url"
      },
    ],
    "barcodes":
      [
        "2553464",
        "86779"
      ],
    "aliases":
      [
        "2553464",
        "86779"
      ],
    "unitOfMeasure":
      {
        "length":10,                                           // Required, (Type: Float),   Length,mm of the product
        "width":20,                                            // Required, (Type: Float),   Width,mm of the product
        "height":30,                                           // Required, (Type: Float),   Height,mm of the product
        "weightGross":1,1,                                     // Required, (Type: Float),   Weight,kg of one item with primary package
      },
    "boxUnitOfMeasure":
      {
        "qtyOfUnitsPerMasterCarton":20,                        // Required, (Type: Integer), 
        "length":420,                                          // Required, (Type: Float),   Length,mm of master carton
        "width":315,                                           // Required, (Type: Float),   Width,mm of master carton
        "height":540,                                          // Required, (Type: Float),   Height,mm of master carton
        "weightGross":5,                                       // Required, (Type: Integer), Weight,kg of master carton
      },
  },
  {
    ...,
    ...,
    ...
  }
]

Response:

// a successful response 
{
  "products": [
    {
      "success": true,
      "errorMessage": null,
      "action": "Updated",  // Can be "created", "updated" or "cancelled"
      "uuid": "c977930d-f307-11ed-af77-04421a1aac94",
      "product":   
        {
          // JSON data of your product
        }
  }
  ],
  "errorMessage": null,
  "success": true
}
// unsuccessful response
{
  "success":false,
  "errorMessage":"Incorrect data"                            // Can be string or array
  "products": 
    [
    ]
}

How to get a list of pickup points from WAPI

`GET /GetPickupPointsList

Available courier services to get pick-up points via API and perform deliveries to pick-up points is listed below.

Courier service Delivery to pick-up points Pickup points list by API
ACS yes no
Allegro yes no
BIZCourier no no
BoxNow yes yes
BRT no no
Cargus no no
CityCourier no no
Colis Prive no no
CorreosExpress no no
Croatia Post no no
CTT no no
DHL no no
DPD yes yes
DPD PL yes no
Ekont yes yes
Elta GR yes no
Evri no no
FanCourier yes yes
GLS yes yes
Green Courier no no
Hermes no no
InPost yes no
MRW no no
Nacex yes yes
One Courier no no
Pack-man courier no no
Packeta yes yes
PostAT no no
PPL no no
Sameday no no
SDA yes yes
SEUR no no
Slovenian Post no no
Speedy yes yes
UPS no no
Warenpost no no

Headers:

content-type: application/json
token: <a guid, provided specially for you>

Body:

{
    "courierService" : "Ekont"		// Name of a courier service
}

Response:

[
  {
    "ZipCode": "8800",
    "name": "Сливен Аксаков",
    "description": "8801",
    "addressenglish": " Sliven ul. General Dragomirov №10",
    "address": " Сливен ул. Генерал Драгомиров №10 К-с Париж вътрешна страна",
    "cityenglish": "Sliven",
    "city": "Сливен",
    "longitude": "26.325332762", // longitude and latitude are available for the following CS: BoxNow, DPD, Ekont, Nacex, Packeta (from SKWH2), Speedy
    "latitude": "42.666715391",
    "country": "BG",
    "id": "100"
  },
  {
    "ZipCode": "7000",
    "name": "Русе",
    "description": "7029",
    "addressenglish": " Ruse kv. Pristanishte Iztok bul. Tutrakan №44Б",
    "address": " Русе кв. Пристанище Изток бул. Тутракан №44Б",
    "cityenglish": "Ruse",
    "city": "Русе",
    "longitude": "26.009383107",
    "latitude": "43.871852535",
    "country": "BG",
    "id": "1000"
  }
]