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

ConnectSkuStatus

public static ConnectSkuStatus ( Object ConnectSkuStatusRequest )
    Return: Object ConnectSkuStatusResponse

Return the product Status.

Section
Bongo Connect
Parameters
Object ConnectSkuStatusRequest 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
Array items (Object ProductsIdDat ) Required

List of Product ID's to retrieve the status of.

Return
Object ConnectSkuStatusResponse

Object function return

Integer error

Numerical code error message.

String errorMessage

Text string describing the error message.

Array items (Object SkuStatusDat )

Items of products with its state data.

Examples (3)

download example code

[1] ConnectSkuStatus1.PHP

<?php$client = new SoapClient("https://api.bongous.com/services/v4?wsdl");$request = (object) array(    'partnerKey' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // please your partner key   MV --  BD    'language' => 'en',    'items' => array(        array(            'productID' => '25510',        ),        array(            'productID' => '25508',        )    ));$response = $client->ConnectSkuStatus($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>ConnectSkuCost</h1>        <br /><strong>Error:</strong> <?php echo $response->error ?>        <br /><strong>ErrorMessage:</strong> <?php echo $response->errorMessage ?>        <br /><strong>Items:</strong> <?php echo print_r($response->items, true) ?>    </body></html>

[2] ConnectSkuStatus2.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 of Validacion :"                Me.lblresult.ForeColor = Drawing.Color.Red                Me.lblresult.Text = strCadena                Me.lblresult.ForeColor = Drawing.Color.Red            Else                Me.lblresult.Text = "error acas"                If Not Me.AgregarItem Then                    Me.lblresult.Text = "Resultado :"                    Me.lblresult.ForeColor = Drawing.Color.Green                    Me.lblresult.Text = "- No se pudo agregar el 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 of  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            dtItems.Rows.Add(drItem)            dtItems.AcceptChanges()            Me.productid.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 strResultado As String        Try            strResultado = String.Empty            If String.IsNullOrEmpty(Me.productid.Text.Trim) Then                strResultado &= "Please type <b>Product ID</b><br/>"            End If            Return strResultado        Catch ex As Exception            Throw        End Try    End Function    Public Function getItem() As ProductsIdDat()        Dim dtItems As DataTable        Dim lstItems() As ProductsIdDat        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 ProductsIdDat                    lstItems(intContador).productID = .Rows(intContador).Item("ProductId").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 Connect Sku Status<br />"            Else                If CType(Session("items"), DataTable).Rows.Count = 0 Then                    caderror &= "- please type <b>Items</b> for  Connect Sku Status<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 ConnectSkuStatusRequest        Dim objresult As New ConnectSkuStatusResponse        Dim X As Integer        Dim HTML As String        Try            objinput.partnerKey = Me.partnerkey.Text            objinput.language = Me.language.Text            objinput.items = Me.getItem            objresult = objBongoApi.ConnectSkuStatus(objinput)            HTML = ""            For X = 0 To objresult.items.Length - 1                HTML += " Item  " & X + 1 & "      ProductID=>" & objresult.items(X).productID & "    " & "   ProductStatus=>" & objresult.items(X).productStatus & "    " & "   ProductSKUHsCode=>" & objresult.items(X).skuHsCode & "<br/>"            Next            Me.lblresult.Text = "Error: " & objresult.error & "<br/>" & _                                "Message: " & objresult.errorMessage & "<br/>" & _                                "Items: " & "<br/> " & _                                HTML        Catch ex As Exception            Me.lblresult.Text = ex.Message        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")))                Session("items") = dtItems                Me.gvItems.DataSource = dtItems                Me.gvItems.DataBind()            End If        Catch ex As Exception        Finally            dtItems = Nothing        End Try    End SubEnd Class

[3] ConnectSkuStatus3.Java

<%--     Document   : ConnectProductInfo    Created on : Feb 8, 2011, 11:47:26 AM    Author     : user_3--%><%@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>ConnectProductInfo</h1>        <%            ws.BongoServiceV4Service service = new ws.BongoServiceV4Service_Impl();            ws.BongoServiceV4Port port = service.getBongoServiceV4Port();            ws.ProductsIdDat ProductsIdDat = new ws.ProductsIdDat();            ProductsIdDat.setProductID("1");            ws.ProductsIdDat[] items = new ws.ProductsIdDat[1];            items[0] = ProductsIdDat;            ws.ConnectSkuStatusRequest cRequest = new ws.ConnectSkuStatusRequest();            cRequest.setPartnerKey("09bcbdf8ca95261c7fd20324522b3030");            cRequest.setLanguage("es");            cRequest.setItems(items);            ws.ConnectSkuStatusResponse cResponse = port.connectSkuStatus(cRequest);            out.println("<br /><strong>Error:</strong> " + cResponse.getError());            out.println("<br /><strong>ErrorMessage:</strong> " + cResponse.getErrorMessage());            for (ws.SkuStatusDat skuStatus : cResponse.getItems()) {                out.println("<br /><br /><strong>ProductID:</strong> " + skuStatus.getProductID());                out.println("<br /><strong>ProductStatus:</strong> " + skuStatus.getProductStatus());                out.println("<br /><strong>SkuHsCode:</strong> " + skuStatus.getSkuHsCode());            }        %>    </body></html>