Megaventory API v2017a

<back to all web services

ShippingInformationUpdate

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

HTTP + SOAP12

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

POST /soap12 HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>

<ShippingInformationUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Megaventory.APIEndpoints.Operations">
  <APIKEY>String</APIKEY>
  <DocumentId>0</DocumentId>
  <ShippingInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/Megaventory.Models.DTOs.MvShippingProviderDTOs">
    <d2p1:ProviderInfo>
      <d2p1:ProviderId>0</d2p1:ProviderId>
      <d2p1:ServiceId>String</d2p1:ServiceId>
      <d2p1:PackageId>String</d2p1:PackageId>
    </d2p1:ProviderInfo>
    <d2p1:CostInfo>
      <d2p1:ShippingCost>0</d2p1:ShippingCost>
      <d2p1:OtherCosts>0</d2p1:OtherCosts>
      <d2p1:TotalCost>0</d2p1:TotalCost>
    </d2p1:CostInfo>
    <d2p1:WeightInfo>
      <d2p1:Weight>0</d2p1:Weight>
      <d2p1:WeightUnitId>0</d2p1:WeightUnitId>
    </d2p1:WeightInfo>
    <d2p1:ShipmentDimensionsInfo>
      <d2p1:ShipmentDimensionsLength>0</d2p1:ShipmentDimensionsLength>
      <d2p1:ShipmentDimensionsWidth>0</d2p1:ShipmentDimensionsWidth>
      <d2p1:ShipmentDimensionsHeight>0</d2p1:ShipmentDimensionsHeight>
      <d2p1:ShipmentDimensionsUnit>String</d2p1:ShipmentDimensionsUnit>
    </d2p1:ShipmentDimensionsInfo>
    <d2p1:ShipDateInfo>
      <d2p1:ShipDate>String</d2p1:ShipDate>
    </d2p1:ShipDateInfo>
    <d2p1:GenericAftersalesProServicesInfo>
      <d2p1:COD>false</d2p1:COD>
      <d2p1:GTEEC>false</d2p1:GTEEC>
      <d2p1:Protocol>false</d2p1:Protocol>
      <d2p1:Reception>false</d2p1:Reception>
      <d2p1:Insurance>false</d2p1:Insurance>
      <d2p1:ChequeCod>false</d2p1:ChequeCod>
      <d2p1:SpecialRate>false</d2p1:SpecialRate>
      <d2p1:VipDelivery>false</d2p1:VipDelivery>
      <d2p1:SenderCharge>false</d2p1:SenderCharge>
      <d2p1:PackageReturn>false</d2p1:PackageReturn>
      <d2p1:CodTotalInCents>0</d2p1:CodTotalInCents>
      <d2p1:ReturnDocument>false</d2p1:ReturnDocument>
      <d2p1:MorningDelivery>false</d2p1:MorningDelivery>
      <d2p1:SameDayIntracity>false</d2p1:SameDayIntracity>
      <d2p1:SaturdayDelivery>false</d2p1:SaturdayDelivery>
      <d2p1:SeaFreightCyprus>false</d2p1:SeaFreightCyprus>
      <d2p1:RefrigeratedGoods>false</d2p1:RefrigeratedGoods>
      <d2p1:LessThanTwoKilograms>false</d2p1:LessThanTwoKilograms>
      <d2p1:LessThanFourKilograms>false</d2p1:LessThanFourKilograms>
      <d2p1:SubmissionOfTenderDocuments>false</d2p1:SubmissionOfTenderDocuments>
      <d2p1:NextDayAirTransportToIslands>false</d2p1:NextDayAirTransportToIslands>
      <d2p1:ContainsDocumentsOnlyAndIsLessThanTwoKilograms>false</d2p1:ContainsDocumentsOnlyAndIsLessThanTwoKilograms>
    </d2p1:GenericAftersalesProServicesInfo>
    <d2p1:LockerId>0</d2p1:LockerId>
    <d2p1:TrackingId>String</d2p1:TrackingId>
  </ShippingInfo>
</ShippingInformationUpdate>

    </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>

<ShippingInformationUpdateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Megaventory.APIEndpoints.Operations">
  <ShippingInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/Megaventory.Models.DTOs.MvShippingProviderDTOs">
    <d2p1:ProviderInfo>
      <d2p1:ProviderId>0</d2p1:ProviderId>
      <d2p1:ServiceId>String</d2p1:ServiceId>
      <d2p1:PackageId>String</d2p1:PackageId>
    </d2p1:ProviderInfo>
    <d2p1:CostInfo>
      <d2p1:ShippingCost>0</d2p1:ShippingCost>
      <d2p1:OtherCosts>0</d2p1:OtherCosts>
      <d2p1:TotalCost>0</d2p1:TotalCost>
    </d2p1:CostInfo>
    <d2p1:WeightInfo>
      <d2p1:Weight>0</d2p1:Weight>
      <d2p1:WeightUnitId>0</d2p1:WeightUnitId>
    </d2p1:WeightInfo>
    <d2p1:ShipmentDimensionsInfo>
      <d2p1:ShipmentDimensionsLength>0</d2p1:ShipmentDimensionsLength>
      <d2p1:ShipmentDimensionsWidth>0</d2p1:ShipmentDimensionsWidth>
      <d2p1:ShipmentDimensionsHeight>0</d2p1:ShipmentDimensionsHeight>
      <d2p1:ShipmentDimensionsUnit>String</d2p1:ShipmentDimensionsUnit>
    </d2p1:ShipmentDimensionsInfo>
    <d2p1:ShipDateInfo>
      <d2p1:ShipDate>String</d2p1:ShipDate>
    </d2p1:ShipDateInfo>
    <d2p1:GenericAftersalesProServicesInfo>
      <d2p1:COD>false</d2p1:COD>
      <d2p1:GTEEC>false</d2p1:GTEEC>
      <d2p1:Protocol>false</d2p1:Protocol>
      <d2p1:Reception>false</d2p1:Reception>
      <d2p1:Insurance>false</d2p1:Insurance>
      <d2p1:ChequeCod>false</d2p1:ChequeCod>
      <d2p1:SpecialRate>false</d2p1:SpecialRate>
      <d2p1:VipDelivery>false</d2p1:VipDelivery>
      <d2p1:SenderCharge>false</d2p1:SenderCharge>
      <d2p1:PackageReturn>false</d2p1:PackageReturn>
      <d2p1:CodTotalInCents>0</d2p1:CodTotalInCents>
      <d2p1:ReturnDocument>false</d2p1:ReturnDocument>
      <d2p1:MorningDelivery>false</d2p1:MorningDelivery>
      <d2p1:SameDayIntracity>false</d2p1:SameDayIntracity>
      <d2p1:SaturdayDelivery>false</d2p1:SaturdayDelivery>
      <d2p1:SeaFreightCyprus>false</d2p1:SeaFreightCyprus>
      <d2p1:RefrigeratedGoods>false</d2p1:RefrigeratedGoods>
      <d2p1:LessThanTwoKilograms>false</d2p1:LessThanTwoKilograms>
      <d2p1:LessThanFourKilograms>false</d2p1:LessThanFourKilograms>
      <d2p1:SubmissionOfTenderDocuments>false</d2p1:SubmissionOfTenderDocuments>
      <d2p1:NextDayAirTransportToIslands>false</d2p1:NextDayAirTransportToIslands>
      <d2p1:ContainsDocumentsOnlyAndIsLessThanTwoKilograms>false</d2p1:ContainsDocumentsOnlyAndIsLessThanTwoKilograms>
    </d2p1:GenericAftersalesProServicesInfo>
    <d2p1:LockerId>0</d2p1:LockerId>
    <d2p1:TrackingId>String</d2p1:TrackingId>
  </ShippingInfo>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
      </d2p1:ResponseError>
    </d2p1:Errors>
  </ResponseStatus>
</ShippingInformationUpdateResponse>

    </soap12:Body>
</soap12:Envelope>