Request
Field Name | Data Type | Description |
AuthHeader | SC.AuthHeader | Header object with details needed to authenticate the request |
ServiceOptions | Service Options | Different Settings that can be set in regards to shipping in SellerCloud |
request | OrdersUpdateShippingForOrderRequest | Request with all the details related to shipping this package |
Sample vb.net code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
Dim scService As New SC.SCServiceSoapClient Dim authHeader As New SC.AuthHeader authHeader.ApplicationName = "SimplifiedTrackingService" authHeader.ApplicationVersion = "ONE" authHeader.UserName = "" //USERNAME GOES HERE authHeader.Password = "" //PASSWORD GOES HERE Dim req As New SC.OrdersUpdateShippingForOrderRequest With req If tbOrderID.Text "" Then .OrderID = CInt(tbOrderID.Text) ElseIf tbPONumber.Text "" Then .PONumber = CInt(tbPONumber.Text) ElseIf tbOrderSOurceOrderID.Text "" Then .OrderSourceOrderID = tbOrderSOurceOrderID.Text Dim ordersource As SimplifiedTrackingService.SC.OrderSource = Nothing Select Case tbOrderSource.Text Case "website", "shopify", "site" ordersource = SC.OrderSource.Website Case "amazon" ordersource = SC.OrderSource.Amazon Case "ebay" ordersource = SC.OrderSource.eBayOrder Case "newegg" ordersource = SC.OrderSource.NewEggdotcom Case "walmart" ordersource = SC.OrderSource.Walmart Case "wayfair" ordersource = SC.OrderSource.Wayfair Case Else ordersource = SC.OrderSource.Website End Select Else Throw New Exception("The is no identifier for this order to submit to SellerCloud API") End If .CarrierName = tbCarrier.Text .ShipMethod = tbMethod.Text If tbCarrierFee.Text "" Then .ShippingCost = CDec(tbCarrierFee.Text) End If .TrackingNumber = tbTrackingNumber.Text If tbCurrency.Text "" Then Dim currency As New SC.CurrencyCodeType Select Case tbCurrency.Text Case "USA", "US", "USD" currency = SC.CurrencyCodeType.USD Case "AUD", "AU" currency = SC.CurrencyCodeType.AUD Case Else currency = SC.CurrencyCodeType.USD End Select .CurrencyCode = currency End If If tbShipDate.Text "" Then .ShipDate = CDate(tbShipDate.Text) //SHOULD BE FORMATED AS ISO DATETIME: (Sample DateTime from XML in ISO Format: 2016-08-09T13:21:38.2702685-04:00) Else .ShipDate = Now End If If tbShipFromWarehouse.Text "" Then .WarehouseName = tbShipFromWarehouse.Text End With Dim serviceO As New SC.ServiceOptions With serviceO .AllowAnyProductShippingMethods = True .AlwaysRecalculateWeight = True .AnyAttr = "" .BulkDeleteShadows = False .BulkResetOffsetQty = True .BulkWipeRelationships = False .CalculateWeightIgnoreZeroWeightProducts = True .CreateNewProducts = False .DebugInfo = "" .DoNotDownloadImageData = True .DoNotGetClientUser = False .DontIncludePORMAImages = True .DontNeedCompanyProfile = False .FetchUserDefinedColumnsForProducts = False .IncludeClientUserAddressBook = False .PaymentNotNeeded = True .SaveOrderPackageDimensions = True .SkipBundleItemQtyUpdating = False .SkipCWAShippingRules = False .SplitItems = False .UseCache = False End With Dim result As New SC.Orders_UpdateShippingForOrderResponse Dim res As Boolean = False Try result = SC.SCServiceSoap.Orders_UpdateShippingForOrder(request) If scService.Orders_UpdateShippingForOrder(authHeader, serviceO, req) Then lblResponse.Text = "Order has been updated." End If Catch ex As Exception lblResponse.Text = "ERROR: " & vbCrLf & ex.Message |
Attachments: