Megaventory API v2017a

<back to all web services

ShippingProviderUpdate

The following routes are available for this service:
POST/ShippingProvider/ShippingProviderUpdateInserts a shipping provider or updates a current shipping provider.Uses your API Key and applies a mvRecordAction value on an mvShippingProvider object. We can insert the mvShippingProvider object we specified using "Insert" as our mvRecordAction. We can update a current shipping provider using "Update", we can insert it if it doesn't already exist, update it if it does using "InsertOrUpdate" and we can insert new fields or update non-empty fields of the currency using "InsertOrUpdateNonEmptyFields". Optionally, you can use mvInsertUpdateDeleteSourceApplication when an external application ( eg Magento ) is the one that triggers the ShippingProviderUpdate call. ShippingProviderId cannot be updated.

Examples:



A.



Insert a new shipping provider to our list of providers.

Value:

 {
   "mvShippingProvider": {
      "ShippingProviderName": "The new and improved Courier",
      "ShippingProviderTrackingURL": "newimporovedurl.jp/new_url",
      "ShippingProviderComments": "new and improved courier comments"
   },
   "mvRecordAction": "Insert"
} 

Response:

{
   "mvShippingProvider": {
      "ShippingProviderId": 2019,
      "ShippingProviderName": "The new and improved Courier",
      "ShippingProviderTrackingURL": "newimporovedurl.jp/new_url",
      "ShippingProviderComments": "new and improved courier comments"
   },
   "ResponseStatus": {
      "ErrorCode": "0"
   },
   "entityID": 2019
}

B.

Update a shipping provider's name, comments and tracking URL.

Value:

 {
   "mvShippingProvider": {
      "ShippingProviderId": 4,
      "ShippingProviderName": "The num1 Courier",
      "ShippingProviderTrackingURL": "newurl.jp/new_url",
      "ShippingProviderComments": "new comments"
   },
   "mvRecordAction": "Update"
}  


Response:

{
   "mvShippingProvider": {
      "ShippingProviderId": 2019,
      "ShippingProviderName": "The num1 Courier",
      "ShippingProviderTrackingURL": "newurl.jp/new_url",
      "ShippingProviderComments": "new comments"
   },
   "ResponseStatus": {
      "ErrorCode": "0"
   },
   "entityID": 2019
}
 

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/ShippingProviderUpdate HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/csv
Content-Length: length

ShippingProviderId,ShippingProviderName,ShippingProviderTrackingURL,ShippingProviderComments,ShippingProviderServices,ShippingProviderPackages,ShippingProviderApplication
0,String,String,String,"[{Id:String,Name:String,IsEnabled:False}]","[{Id:String,Name:String,IsEnabled:False}]",Undefined

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

ShippingProviderId,ShippingProviderName,ShippingProviderTrackingURL,ShippingProviderComments,ShippingProviderServices,ShippingProviderPackages,ShippingProviderApplication
0,String,String,String,"[{Id:String,Name:String,IsEnabled:False}]","[{Id:String,Name:String,IsEnabled:False}]",Undefined