On this page:
3.1 Print Shipment Request (Creation of an order)
Requires Authentication
A valid access Key must be provided in access_key request header.
POST labels/printshipment
This interface allows you to create a shipment from OmniParcel
Please note; if you would like the API response to send the label directly to your printer, you will need to have the OmniParcel Print Agent installed on the PC where the printer is located. To download the OmniParcel Print Agent visit our Print Agent Installation Guide.
3.2 Parameters Required
Parameter | Mandatory | Type | Description |
---|---|---|---|
Origin | N | Multiple fields | |
Destination | Y | Multiple fields | |
DeliveryInstructions | N | String(120 Characters) | For special instructions for delivery to appear on label Not all carriers display the delivery instructions on the label |
SendTrackingEmail | N | Boolean (true/false) | Should a track and trace email be required to be sent Track & trace email customisation is managed directly in OmniParcel.com |
Packages | Y | Multiple fields | |
Commodities | Y | Multiple fields | |
DangerousGoods | C | Multiple fields | Refer to Commodity Information, DangerousGoods, and DangerousGoodsItem If shipping dangerous goods to New Zealand: DangerousGoods, DangerousGoodsItems must be populated, and isDG must be true |
issignaturerequired | N | Boolean (true/false) | If “true”, Signature on Delivery is required. If “false”, no signature on delivery is required |
DeliveryReference | Y | String (1000 characters) | Shipment reference number (commonly used for the online order number/customer reference) |
Reference2 | N | String (500 characters) | Additional Shipment Reference |
Reference3 | N | String (500 characters) | Additional Shipment Reference |
PrintToPrinter | N | Boolean (true/false) | If “true” system will send job to installed Print Agent. Required the OmniParcel print agent to be installed |
Outputs | Y | Requested label size and format. Response will be provided in JSON string array. Refer to Output Information | |
Carrier | N | String(50 Characters) | Where multiple carrier options are available, a carrier can be pre-nominated. E.g “Omni Parcel”. |
Service | C | String (max length defined by available services) | Where multiple service options are available, a service must be pre-nominated. Eg. “eCommerce Standard Tracked“ “eCommerce Express Tracked“ “Domestic Express“ “Domestic Standard“ “Domestic Large Parcel” |
ShipType | N | String (10 characters) | Use “INBOUND” for returns, Not required for normal outbound shipments (Used by OmniReturns only) |
DutiesAndTaxesByReceiver | Y* | Boolean (true/false) | True = DDU (Duties and Taxes will need to be paid by recipient) False = DDP (Duties and Taxes will need to be paid by the sender) This field is mandatory for international shipments, but optional for domestic deliveries. |
ProductCategory | N | String (50 characters) | Parent category, e.g. stationary, fashion, beauty products, shoes etc |
SendLabel | N | String (1 Character) | “Y” Or “N” – if “Y” then email with the label attached will be sent to end customer (used by OmniReturns only) |
LabelBranding | N | Object (see “description) | public class CustomBranding
public string LogoFilename { get; set; } NOTE: Only for some carriers depending on carrier requirements. When requested, the logo is printed on the label |
IncludeLineDetails | N | Boolean (true/false) | If “True” OmniParcel will return all relevant tracking numbers in the “Items” tag under “Consignments” If “False” OmniParcel will return the consignment number only See sample request below for more information NOTE: If you require the ability to scan barcodes on your end, this parameter must be included. In the “Items” response, the “barcode” parameter is the field that matches the barcode on the label. |
InvoiceData | N | String (no max limit) | For passing the commercial invoice to OmniParcel |
CODValue | N | Decimal (18,4) | COD Value (Cash on delivery amount). Only used for some carriers |
CostCentreId | N | String | Cost Centre id # if known |
CostCentreName | N | String | Name of Cost Centre or code if known |
TaxCollected | C | Boolean (true/false) | Required by some carriers and when shipping to some countries |
AmountCollected | C | Decimal (18,2) | The tax amount that has been collected. Required by some carriers and when shipping to some countries. Please note that this is on consignment level, not commodity level |
TaxIDs | C | Multiple fields |
3.3 Example Request
Endpoints
Live: https://api.omniparcel.com/labels/printshipment
Staging/Test: https://staging.omniparcel.com/labels/printshipment
Request
Header
access_key: [access_key_for_site_account] Content-Type: application/json; charset=utf-8
Body
{ "DeliveryReference": "", "Reference2": "", "Reference3": "", "Origin": { "Id": 0, "Name": "OriginName", "Address": { "BuildingName": "", "StreetAddress": "285 Main Street", "Suburb": "GLENWOOD", "City": "NSW", "PostCode": "2768", "CountryCode": "AU" }, "ContactPerson": "Origin person name", "PhoneNumber": "02 9111 01101", "Email": "originemail@test.com" }, "Destination": { "Id": 0, "Name": "DestinationName", "Address": { "BuildingName": "VIC", "StreetAddress": "285 Coward Street", "Suburb": "TESBURY", "City": "QLD", "PostCode": "3260", "CountryCode": "AU" }, "ContactPerson": "JOHN SMITH", "PhoneNumber": "02 9111 1111", "Email": "destinationemail@test.com", "DeliveryInstructions": "LEAVE AT FRONT DOOR", "RecipientTaxId": "123456", "SendTrackingEmail": "true" }, "Commodities": [ { "Description": "Food Bar", "Units": "1", "UnitValue": 50, "UnitKg": 0.6, "Currency": "USD", "Country": "AU" }, { "Description": "Food Bar", "Units": "1", "UnitValue": 50, "UnitKg": 0.6, "Currency": "USD", "Country": "AU" } ], "Packages": [ { "Height": 1, "Length": 1, "Width": 1, "Kg": 5, "Name": "PARCEL", "Type": "Box", "OverLabelBarcode": "TEST0301201902" } ], "issignaturerequired": false, "DutiesAndTaxesByReceiver": false, "PrintToPrinter": true, "IncludeLineDetails": true, "Carrier":"Omni Parcel", "Service":"eCommerce Express Tracked", "CostCentreName": "mysite.com", "CodValue": 10.00, "TaxCollected": true, "AmountCollected": 10.00, "TaxIds": [ { "IdType": "XIEORINumber", "IdNumber": "0121212112" }, { "IdType": "IOSSNUMBER", "IdNumber": "0121212112" }, { "IdType": "GBEORINUMBER", "IdNumber": "0121212112" }, { "IdType": "VOECNUMBER", "IdNumber": "0121212112" }, { "IdType": "VATNUMBER", "IdNumber": "0121212112" }, { "IdType": "VENDORID", "IdNumber": "0121212113" }, { "IdType": "NZIRDNUMBER", "IdNumber": "0121212115" }, { "IdType": "SWISS VAT", "IdNumber": "CHE-123.456.789" }, { "IdType": "OVRNUMBER", "IdNumber": "0121212112" }, { "IdType": "EUEORINumber", "IdNumber": "0121212112" }, { "IdType": "EUVATNumber", "IdNumber": "0121212112" }, { "IdType": "LVGRegistrationNumber", "IdNumber": "0121212112" } ], "Outputs": [ "LABEL_PDF_100X150" ] }
Response
{ "CarrierId":567, "CarrierName":"MyChildData", "IsFreightForward":false, "IsOvernight":false, "IsSaturdayDelivery":false, "IsRural":false, "HasTrackPaks":false, "Message":"Connote created and print queued.", "Errors":[ ], "SiteId":1153896, "Consignments":[ { "Connote":"6994008906", "TrackingUrl":"http://track.omniparcel.com/1153896-6994008906", "Cost":6.0000, "CarrierType":33, "IsSaturdayDelivery":false, "IsRural":false, "IsOvernight":false, "HasTrackPaks":false, "ConsignmentId":5473553, "OutputFiles":{ "LABEL_PDF_100X150":[ "JVBERi0xLjQKJdP0zOEKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlKEQ6MjAxNzAyMTMwOTA0MTkrMDU...." ] }, "Items": [ { "PartNo": 1, "TrackingNo": "699400890601", "Barcode": "019931265099999891699400890601", "InternalBarcode": "019931265099999891699400890601", "Charge": 6.54, "Charge_FAF": 0.0, "Charge_Rural": 0.0, "Charge_SatDel": 0.0, "Charge_Insurance": 0.0, "IsTrackPack": false, "BarcodeText": "699400890601", "TrackingBarcode": "019931265099999891699400890601", "TrackingBarcode2": "019931265099999891699400890601" } ] } ], "DestinationPort":"SYD", "Downloads":[ ], "CommodityChanges": [ { "OriginalDescription": "OriginalDS1", "SuitableDescription": "SuitableDS1 - OriginalDS1", "OriginalHSCode": null, "SuitableHsCode": "1234567890" }, { "OriginalDescription": "OriginalDS2", "SuitableDescription": "SuitableDS2 - OriginalDS2", "OriginalHSCode": null, "SuitableHsCode": "1234567890" } ], "CarrierType":33, "AlertPath":null, "Notifications":[ ], "InvoiceResponse":"No Invoice found", "LogoPath":"http://cdn.omniparcel.com/images/aramex_logo_h50.png" }
3.4 Response Data Definition
Parameter | Description |
---|---|
CarrierId | Internal OmniParcel identification number for the carrier |
CarrierName | Carrier Name |
Message | Notification message for shipment create request |
Errors | Validation errors if fields are incomplete or incorrect For more information on error messages see OmniParcel API errors |
SiteId | Your account site Id |
Consignments | The create shipment, output shipments |
IsFreightForward | If pickup is originating from an address other than the site address |
IsOvernight | If delivery has been flagged for Saturday delivery |
DestinationPort | |
IsRural | If delivery has been identified as a rural area delivery |
HasTrackPaks | |
CommodityChanges |
3.5 Error Response Parameters
Parameter | Type |
---|---|
Property | String |
Message | String |
3.6 Consignment Response Parameters
Parameter | Type | Description |
---|---|---|
Connote | String | Unique consignment number |
TrackingUrl | String | Tracking url |
Cost | Decimal ( 2dp) | Cost of Shipment |
CarrierType | Integer | Internal Carrier Type |
IsSaturdayDelivery | Boolean | If delivery has been flagged for Saturday delivery |
IsRural | Boolean | If delivery has been identified as a rural area delivery |
IsOvernight | Boolean | |
HasTrackPaks | Boolean | |
Items |