Megaventory API v2017a

<back to all web services

ShippingInformationGet

The following routes are available for this service:
GET POST/ShippingInformation/ShippingInformationGetGets information of documents related shipping providers data.Uses your API Key and a valid DocumentId to retrieve the shipping information of the specified document. The response includes detailed ShippingInfo data and an optional LabelURL pointing to a PDF label file.

Examples:



A.

Retrieve shipping information for a document with DocumentId = 12345

Value:

{
    "DocumentId": 12345
}


Response:

{
    "ShippingInfo": {
        "ProviderInfo": {
            "ProviderId": 2018,
            "ServiceId": "EXPRESS",
            "PackageId": "PKG001"
        },
        "CostInfo": {
            "ShippingCost": 4.50,
            "OtherCosts": 0.50,
            "TotalCost": 5.00
        },
        "WeightInfo": {
            "Weight": 1.2,
            "WeightUnitId": 1
        },
        "ShipmentDimensionsInfo": {
            "ShipmentDimensionsLength": 30.0,
            "ShipmentDimensionsWidth": 20.0,
            "ShipmentDimensionsHeight": 10.0,
            "ShipmentDimensionsUnit": "centimeter"
        },
        "ShipDateInfo": {
            "ShipDate": "2024-05-17"
        },
        "GenericAftersalesProServicesInfo": {
            "COD": false,
            "GTEEC": false,
            "Protocol": false,
            "Reception": false,
            "Insurance": false,
            "ChequeCod": false,
            "SpecialRate": false,
            "VipDelivery": false,
            "SenderCharge": false,
            "PackageReturn": false,
            "ReturnDocument": false,
            "CodTotalInCents": 0,
            "MorningDelivery": false,
            "SameDayIntracity": false,
            "SaturdayDelivery": false,
            "SeaFreightCyprus": false,
            "RefrigeratedGoods": false,
            "LessThanTwoKilograms": false,
            "LessThanFourKilograms": false,
            "SubmissionOfTenderDocuments": false,
            "NextDayAirTransportToIslands": false,
            "ContainsDocumentsOnlyAndIsLessThanTwoKilograms": false
        },
        "TrackingId": "TRK-000123456789",
        "LockerId": 42
    },
    "LabelURL": "https://URLPATH/123456789_shipping-label.pdf",
    "ResponseStatus": {
        "ErrorCode": "0",
        "Message": ""
    }
}


A valid DocumentId is required. If an invalid DocumentId is provided, the response will contain an appropriate error message.

To override the Content-type in your clients HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsv/reply/ShippingInformationGet HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/jsv
Content-Length: length

{
	APIKEY: String,
	DocumentId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ShippingInfo: 
	{
		ProviderInfo: 
		{
			ProviderId: 0,
			ServiceId: String,
			PackageId: String
		},
		CostInfo: 
		{
			ShippingCost: 0,
			OtherCosts: 0,
			TotalCost: 0
		},
		WeightInfo: 
		{
			Weight: 0,
			WeightUnitId: 0
		},
		ShipmentDimensionsInfo: 
		{
			ShipmentDimensionsLength: 0,
			ShipmentDimensionsWidth: 0,
			ShipmentDimensionsHeight: 0,
			ShipmentDimensionsUnit: String
		},
		ShipDateInfo: 
		{
			ShipDate: String
		},
		GenericAftersalesProServicesInfo: 
		{
			COD: False,
			GTEEC: False,
			Protocol: False,
			Reception: False,
			Insurance: False,
			ChequeCod: False,
			SpecialRate: False,
			VipDelivery: False,
			SenderCharge: False,
			PackageReturn: False,
			ReturnDocument: False,
			CodTotalInCents: 0,
			MorningDelivery: False,
			SameDayIntracity: False,
			SaturdayDelivery: False,
			SeaFreightCyprus: False,
			RefrigeratedGoods: False,
			LessThanTwoKilograms: False,
			LessThanFourKilograms: False,
			SubmissionOfTenderDocuments: False,
			NextDayAirTransportToIslands: False,
			ContainsDocumentsOnlyAndIsLessThanTwoKilograms: False
		},
		TrackingId: String,
		LockerId: 0
	},
	LabelURL: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String
			}
		]
	}
}