Omniva Developer site (1.0.0)

Download OpenAPI specification:Download

This is the OMX (Omniva Message Exchange) API to demonstrate how integrations with Omniva work.

Introduction

This document describes the structure and rules about parcel delivery data exchange format (JSON).

The topics covered are:

  • Sender/receiver information of the deliveries – requirements for the contact data and the destination;
  • Address card and barcodes – the JSON SOAP channel returns proper barcode and address cards;
  • Status and events data of deliveries.

The primary contact person for discussing the subjects treated in this document is the Omniva Account manager,
who, if necessary, will involve IT application and/or project management experts in the discussion.

Customer's system will perform HTTP/SOAP request to web service.

JSON data files are created with a universal structure. Requirements about the attributes are described in this document as well.
Example calls are given on Omniva homepage here: Omniva API Examples.

Customer Shipment Registration Types

Customer can choose between two shipment registration types:

  • Business to customer (B2C): This is used for fully automatic data exchange. No manual work or confirming is needed or possible in the
    business customer e-service. Parcel data, statuses, and parcel labels can be requested via web service.
    Currently, no manifest printing is possible - it should be generated by the Customer's system.

  • Customer to customer (C2C): The structure is the same as BusinessToClientMsgRequest. The only difference is that the Customer will
    never be subject to billing. The transportation fee is always paid by the receiver. This is required to be used with parcel label printing.
    The label (PDF) can be sent via email or into the Customer's system for download.
    If the parcel is returned for some reason, the same data will be used, and the transportation fee will be collected from the Sender.

Authentication

The web service works through SSL using HTTP protocols. The means of authentication is HTTP BASIC AUTHENTICATION.
Username and password with the web service URL will be provided by your Account Manager.

Developer Specific Identification

To identify platforms that offer integration solutions for other customers, a header attribute is used:

  • Header: X-Integration-Agent-Id
  • Value: Developer_XXXXXX_YYYYYY where Developer is a fixed value, XXXXXX is provided by Omniva, and YYYYYY can be used
    by the developer to distinguish different versions of their solution.

The header attribute should be used in all requests.

Track and Trace

getTrackingInfo

Get tracking info

query Parameters
required
object (ShipmentTrackingChangesRequest)

Shipment Tracking changes for Customer request

customerCode
string
page
integer >= 0
Default: 0

Zero-based page index (0..N)

size
integer >= 1
Default: 20

The size of the page to be returned

sort
Array of strings

Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Responses

Response samples

Content type
application/json
{
  • "size": 0,
  • "content": [
    ],
  • "number": 0,
  • "sort": [
    ],
  • "numberOfElements": 0,
  • "pageable": {
    },
  • "first": true,
  • "last": true,
  • "empty": true
}

getTrackingInfoByBarCode

Get tracking info by barcode

path Parameters
barCode
required
string

Responses

Response samples

Content type
application/json
{
  • "shipmentBarcode": "string",
  • "events": [
    ]
}

getTrackingInfoByBarCode2

Get tracking info by barcode 2

path Parameters
barCode
required
string

Responses

Response samples

Content type
application/json
{
  • "shipmentBarcode": "string",
  • "events": [
    ]
}

Shipment Management

updateShipment

update receiver address along address contact details

Request Body schema: application/json
required
customerCode
required
string [ 0 .. 20 ] characters

Customer Axa code.

barcode
required
string [ 5 .. 35 ] characters

Barcode to identify the shipment requiring update

needsRelabel
required
boolean

Set to true if relabelling needed on omniva side for address update - currently disabled

deliveryChannel
required
string (DeliveryChannelEnum)
Enum: "ANY" "CLIENT_HUB" "COURIER" "PARCEL_MACHINE" "PICK_UP_POINT" "POST_BOX" "POST_OFFICE"

PICK_UP_POINT - 'Not used', POST_BOX - 'Only allowed for mainService=LETTER', CLIENT_HUB - 'Only allowed for specific partners/cases. Please contact Omniva support in case of interest, ANY - 'Not used' DeliveryChannel is mandatory if mainService=PARCEL and delivery country is EE, LT, LV'or mainService=LETTER and delivery country is EE

shipmentComment
string
required
object (ReceiverAddresseeDto)

Responses

Request samples

Content type
application/json
{
  • "customerCode": "string",
  • "barcode": "string",
  • "needsRelabel": true,
  • "deliveryChannel": "ANY",
  • "shipmentComment": "string",
  • "receiverAddressee": {
    }
}

Response samples

Content type
application/json
{
  • "resultCode": "string",
  • "messageCode": "string",
  • "message": "string",
  • "provider": "string",
  • "barcode": "string"
}

omnivaReturn

Request Body schema: application/json
required
customerCode
string
required
Array of objects (ReturnShipmentDto)

Responses

Request samples

Content type
application/json
{
  • "customerCode": "string",
  • "returnShipments": [
    ]
}

Response samples

Content type
application/json
{
  • "resultCode": "string",
  • "provider": "string",
  • "savedShipments": [
    ],
  • "failedShipments": [
    ]
}

saveClientToClientShipments

In case attribute does not have a value, attribute should not exist in the message. If the attribute exists the value will be checked against validation rules.

Request Body schema: application/json
required
customerCode
string

PARTNER_CODE (AXA Code) of the Customer, agreed upon previously.

fileId
string

When the file is created, an unique identifier must be assigned to it. Partner generates itself.

required
Array of objects (C2cShipmentDto)

shipment list

Responses

Request samples

Content type
application/json
{
  • "customerCode": "string",
  • "fileId": "string",
  • "shipments": [
    ]
}

Response samples

Content type
application/json
{
  • "resultCode": "string",
  • "provider": "string",
  • "savedShipments": [
    ],
  • "failedShipments": [
    ]
}

saveBusinessToClientShipments

In case attribute does not have a value, attribute should not exist in the message. If the attribute exists the value will be checked against validation rules.

Request Body schema: application/json
required
customerCode
string

PARTNER_CODE (AXA Code) of the Customer, agreed upon previously.

fileId
string

When the file is created, an unique identifier must be assigned to it. Partner generates itself.

required
Array of objects (OnloadShipmentDto)

shipment list

Responses

Request samples

Content type
application/json
{
  • "customerCode": "string",
  • "fileId": "string",
  • "shipments": [
    ]
}

Response samples

Content type
application/json
{
  • "resultCode": "string",
  • "provider": "string",
  • "savedShipments": [
    ],
  • "failedShipments": [
    ]
}

Labels

getAddressCards

Labels can be requested either to customer e-mail or in base64. Labels will be returned in PDF format. Labels can be requested only for parcels created by the same customer that makes request.

Request Body schema: application/json
required
customerCode
required
string

Customer Axa code

required
Array of objects (BarcodeValueDto)

Package barcodes

sendAddressCardTo
required
string (AddressCardTo)
Enum: "EMAIL" "RESPONSE"

'EMAIL' - labels are returned to e-mail address. 'RESPONSE' - labels are returned in API response

cardReceiverEmail
string

Mandatory if sendAddressCardTo =EMAIL

Responses

Request samples

Content type
application/json
{
  • "customerCode": "string",
  • "barcodes": [
    ],
  • "sendAddressCardTo": "EMAIL",
  • "cardReceiverEmail": "string"
}

Response samples

Content type
application/json
{
  • "failedAddressCards": [
    ],
  • "successAddressCards": [
    ]
}

Courier Pickups

createCourierPickupOrder

Request Body schema: application/json
required
customerCode
required
string [ 0 .. 20 ] characters

Customer Axa code.

contactPersonName
required
string [ 0 .. 50 ] characters

Contact person/company name

contactPhone
required
string

Contact phone number, with area code

required
object (AddressDto)
pickupComment
string [ 0 .. 120 ] characters

Free text to give short instructions for courier

startTime
required
string <date-time>

All times are in UTC

endTime
required
string <date-time>

All times are in UTC

isTwoManPickup
boolean

Default value is false

isHeavyPackage
boolean

FALSE (default) or TRUE (If any of the packages are >30kg ).

packageCount
integer <int32>

Number of packages

palletCount
integer <int32>

Number of pallets

Array of objects (OrderShipmentDto) [ 0 .. 20 ] items

Shipments associated with the order

Responses

Request samples

Content type
application/json
{
  • "customerCode": "string",
  • "contactPersonName": "string",
  • "contactPhone": "372543210",
  • "pickupAddress": {
    },
  • "pickupComment": "string",
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "isTwoManPickup": true,
  • "isHeavyPackage": true,
  • "packageCount": 0,
  • "palletCount": 0,
  • "shipments": [
    ]
}

Response samples

Content type
application/json
{
  • "courierOrderNumber": "string",
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z"
}

cancelCourierPickupOrder

Request Body schema: application/json
required
customerCode
required
string [ 0 .. 20 ] characters

PARTNER_CODE (AXA Code) of the Customer, agreed upon previously

courierOrderNumber
required
string

Courier order number to be cancelled

Responses

Request samples

Content type
application/json
{
  • "customerCode": "string",
  • "courierOrderNumber": "string"
}

Response samples

Content type
application/json
{
  • "courierOrderNumber": "string",
  • "resultCode": "string",
  • "errorDetailsCode": "COURIER_ORDER_NOT_FOUND"
}