Bongo API
Back to Bongous.com
United Kingdom / English
Back to Documentation

ConnectOrderTrackingUpdate

public static ConnectOrderTrackingUpdate ( Object ConnectOrderTrackingUpdateRequest )
    Return: Object ConnectOrderTrackingUpdateResponse

Update and or Add Tracking Numbers to any item of a submitted order.

Section
Bongo Connect
Parameters
Object ConnectOrderTrackingUpdateRequest Required Input object required by the function Length
String partnerKey Required

Required Key to access the functions of Connect API

45
String language Required

Defines the language in which the return error will be shown. Supported Languages.

2
String orderNumber Required

Order number

100
Array trackList (Object TrackingList ) Required

Collection of TrackingList objects

Return
Object ConnectOrderTrackingUpdateResponse

Object returned by the function

Integer error

Numerical code error message.

String errorMessage

Text string describing the error message.

String errorMessageDetail

List of Insertion Errors

Examples (3)

download example code

[1] ConnectOrderTrackingUpdate1.PHP

<?php$client = new SoapClient("https://api.bongous.com/services/v4?wsdl");$request = (object)array(    'partnerKey' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',    'language' => 'en',    'orderNumber' => '12345',    'trackList' => null);$trackingList[]=(object) array(    'productID' => '1234',    'trackingNumber' => '3243252342',    'carrier' => 1);$trackingList[]=(object) array(    'productID' => 'ABC',    'trackingNumber' => 'AAAA',    'carrier' => 2);$request->trackList = $trackingList;$response = $client->ConnectOrderTrackingUpdate($request);?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <title>PHP Page</title>    </head>    <body>        <h1>ConnectOrderTrackingUpdate</h1>        <br /><strong>error:</strong> <?php echo $response->error ?>        <br /><strong>errorMessage:</strong> <?php echo $response->errorMessage ?>        <br /><strong>errorMessageDetail:</strong> <?php echo $response->errorMessageDetail ?>    </body></html>

[2] ConnectOrderTrackingUpdate2.Java

<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd"><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <title>JSP Page</title>    </head>    <body>        <h1>ConnectOrder</h1>        <%            ws.BongoServiceV4Service service = new ws.BongoServiceV4Service_Impl();            ws.BongoServiceV4Port port = service.getBongoServiceV4Port();            ws.TrackingList trackingList = new ws.TrackingList();            trackingList.setCarrier(1);            trackingList.setTrackingNumber("654654");            trackingList.setProductID("e132165");            ws.TrackingList[] trackList = new ws.TrackingList[1];            trackList[0] = trackingList;            ws.ConnectOrderTrackingUpdateRequest cRequest = new ws.ConnectOrderTrackingUpdateRequest();            cRequest.setPartnerKey("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");            cRequest.setLanguage("es");            cRequest.setOrderNumber("65465465");            cRequest.setTrackList(trackList);            ws.ConnectOrderTrackingUpdateResponse cResponse = port.connectOrderTrackingUpdate(cRequest);            out.println("<br /><strong>Error:</strong> " + cResponse.getError());            out.println("<br /><strong>ErrorMessage:</strong> " + cResponse.getErrorMessage());            out.println("<br /><strong>ErrorMessageDetail:</strong> " + cResponse.getErrorMessageDetail());        %>    </body></html>

[3] ConnectOrderTrackingUpdate3.VBNET

Imports System.DataImports com.bongous.apiPartial Class _Default    Inherits System.Web.UI.Page    Protected Sub AddItems_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddItems.Click        Dim strCadena As String        Try            strCadena = Me.ValidarItem()            If Not String.IsNullOrEmpty(strCadena) Then                Me.lblresult.Text = "Error de Validacion :"                Me.lblresult.ForeColor = Drawing.Color.Red                Me.lblresult.Text = strCadena                Me.lblresult.ForeColor = Drawing.Color.Red            Else                Me.lblresult.Text = "error items"                If Not Me.AgregarItem Then                    Me.lblresult.Text = "Result :"                    Me.lblresult.ForeColor = Drawing.Color.Green                    Me.lblresult.Text = "- error add item"                    Me.lblresult.ForeColor = Drawing.Color.Green                Else                    Me.lblresult.Text = String.Empty                    Me.lblresult.Text = String.Empty                End If            End If        Catch ex As Exception            Me.lblresult.Text = "Error de Aplicacion :"            Me.lblresult.ForeColor = Drawing.Color.Blue            Me.lblresult.Text = ex.Message            Me.lblresult.ForeColor = Drawing.Color.Blue        End Try    End Sub    Private Function AgregarItem() As Boolean        Dim dtItems As DataTable        Dim drItem As DataRow        Try            dtItems = CType(Session("items"), DataTable)            drItem = dtItems.NewRow            drItem.Item("ProductId") = Me.productid.Text.Trim            drItem.Item("carrier") = Me.carrier.Text.Trim            drItem.Item("trackingNumber") = Me.trackingNumber.Text.Trim            dtItems.Rows.Add(drItem)            dtItems.AcceptChanges()            Me.productid.Text = String.Empty            Me.carrier.Text = String.Empty            Me.trackingNumber.Text = String.Empty            Me.gvItems.DataSource = dtItems            Me.gvItems.DataBind()            Return True        Catch ex As Exception            Throw        End Try    End Function    Private Function ValidarItem() As String        Dim intValue As Integer        Dim strResultado As String        Try            strResultado = String.Empty            'validation product id            If String.IsNullOrEmpty(Me.productid.Text.Trim) Then                strResultado &= "Please type <b>Product ID</b><br/>"            End If            'validation  carrier            If String.IsNullOrEmpty(Me.carrier.Text.Trim) Then                strResultado &= "Please type <b>carrier</b><br/>"            Else                Try                    intValue = Integer.Parse(Me.carrier.Text.Trim)                Catch ex As Exception                    strResultado &= "carrier Product<b>is Incorrect</b><br/>"                End Try            End If            'validation pricingAdjustmentPercentage            If String.IsNullOrEmpty(Me.trackingNumber.Text.Trim) Then                strResultado &= "Please type <b>trackingNumber</b><br/>"            End If            Return strResultado        Catch ex As Exception            Throw        End Try    End Function    Public Function getItem() As OrderInformation()        Dim dtItems As DataTable        Dim lstItems() As OrderInformation        Try            dtItems = CType(Session("items"), DataTable)            With dtItems                ReDim lstItems(.Rows.Count - 1)                For intContador As Integer = 0 To .Rows.Count - 1                    lstItems(intContador) = New OrderInformation                    lstItems(intContador).productID = .Rows(intContador).Item("ProductId").ToString                    lstItems(intContador).carrier = Integer.Parse(.Rows(intContador).Item("carrier").ToString)                    lstItems(intContador).trackingNumber = .Rows(intContador).Item("trackingNumber").ToString                Next            End With            Return lstItems        Catch ex As Exception            Throw        Finally            lstItems = Nothing            dtItems = Nothing        End Try    End Function    Private Function validateform() As String        Dim caderror As String        Try            caderror = String.Empty            If CType(Session("items"), DataTable) Is Nothing Then                caderror &= "Please type <b>Items</b> for ConnectLandedCostCalculator<br />"            Else                If CType(Session("items"), DataTable).Rows.Count = 0 Then                    caderror &= "- please type <b>Items</b> for  ConnectLandedCostCalculator<br />"                End If            End If            Return caderror        Catch ex As Exception            Throw        End Try    End Function    Protected Sub Process_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Process.Click        Dim objBongoApi As New BongoServiceV4Service        Dim objinput As New ConnectOrderTrackingUpdateRequest        Dim objresult As New ConnectOrderTrackingUpdateResponse        Try            objinput.partnerKey = Me.partnerkey.Text            objinput.orderNumber = Me.orderNumber.Text            objinput.language = Me.language.Text            objresult = objBongoApi.ConnectOrderTrackingUpdate(objinput)            Me.lblresult.Text = "error: " & objresult.error & "<br/>" & _                           "errorMessage: " & objresult.errorMessage & "<br/>" & _                           "trackingLink: " & objresult.errorMessageDetail & "<br/>"        Catch ex As Exception            Me.lblresult.Text = ex.ToString         End Try    End Sub    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load        Dim dtItems As DataTable        Try            If Not Page.IsPostBack Then                dtItems = New DataTable                dtItems.Columns.Add(New DataColumn("ProductId", Type.GetType("System.String")))                dtItems.Columns.Add(New DataColumn("carrier", Type.GetType("System.String")))                dtItems.Columns.Add(New DataColumn("trackingNumber", Type.GetType("System.String")))                Session("items") = dtItems                Me.gvItems.DataSource = dtItems                Me.gvItems.DataBind()            End If        Catch ex As Exception        Finally            dtItems = Nothing        End Try    End SubEnd Class