Megaventory API v2017a

<back to all web services

ShippingInformationUpdate

The following routes are available for this service:
POST/ShippingInformation/ShippingInformationUpdateUpdates or creates Shipping Information of a Shipping Provider for a document.Uses your API Key, a valid DocumentId, and a ShippingInfo object to update the shipping information of the specified document. The response contains the updated ShippingInfo along with the ResponseStatus message.

Examples:



A.

Update shipping information for a document with DocumentId = 12345

Value:

{
   "DocumentId": 12345,
   "ShippingInfo": {
      "ProviderInfo": {
         "ProviderId": 2018,
         "ServiceId": "EXPRESS",
         "PackageId": "PKG001"
      },
      "CostInfo": {
         "ShippingCost": 6.00,
         "OtherCosts": 1.00,
         "TotalCost": 7.00
      },
      "WeightInfo": {
         "Weight": 1.5,
         "WeightUnitId": 1
      },
      "ShipmentDimensionsInfo": {
         "ShipmentDimensionsLength": 35.0,
         "ShipmentDimensionsWidth": 22.0,
         "ShipmentDimensionsHeight": 12.0,
         "ShipmentDimensionsUnit": "centimeter"
      },
      "ShipDateInfo": {
         "ShipDate": "2024-05-18"
      },
      "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-000999888777",
      "LockerId": 42
   }
}


Response:

{
   "ShippingInfo": {
      "ProviderInfo": {
         "ProviderId": 2018,
         "ServiceId": "EXPRESS",
         "PackageId": "PKG001"
      },
      "CostInfo": {
         "ShippingCost": 6.00,
         "OtherCosts": 1.00,
         "TotalCost": 7.00
      },
      "WeightInfo": {
         "Weight": 1.5,
         "WeightUnitId": 1
      },
      "ShipmentDimensionsInfo": {
         "ShipmentDimensionsLength": 35.0,
         "ShipmentDimensionsWidth": 22.0,
         "ShipmentDimensionsHeight": 12.0,
         "ShipmentDimensionsUnit": "centimeter"
      },
      "ShipDateInfo": {
         "ShipDate": "2024-05-18"
      },
      "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-000999888777",
      "LockerId": 42
   },
   "ResponseStatus": {
      "ErrorCode": "0",
      "Message": ""
   }
}


A valid DocumentId and a complete ShippingInfo object are required. If either is missing or invalid, the response will contain an appropriate error message.

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

HTTP + CSV

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

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

ProviderInfo,CostInfo,WeightInfo,ShipmentDimensionsInfo,ShipDateInfo,GenericAftersalesProServicesInfo,TrackingId,LockerId
"{ProviderId:0,ServiceId:String,PackageId:String}","{ShippingCost:0,OtherCosts:0,TotalCost:0}","{Weight:0,WeightUnitId:0}","{ShipmentDimensionsLength:0,ShipmentDimensionsWidth:0,ShipmentDimensionsHeight:0,ShipmentDimensionsUnit:String}",{ShipDate:String},"{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}",String,0

HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

ProviderInfo,CostInfo,WeightInfo,ShipmentDimensionsInfo,ShipDateInfo,GenericAftersalesProServicesInfo,TrackingId,LockerId
"{ProviderId:0,ServiceId:String,PackageId:String}","{ShippingCost:0,OtherCosts:0,TotalCost:0}","{Weight:0,WeightUnitId:0}","{ShipmentDimensionsLength:0,ShipmentDimensionsWidth:0,ShipmentDimensionsHeight:0,ShipmentDimensionsUnit:String}",{ShipDate:String},"{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}",String,0