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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

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

{"APIKEY":"String","DocumentId":0,"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}}
HTTP/1.1 200 OK
Content-Type: application/json
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},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String"}]}}