UpdateItem

Description

This method is used to update an item/product to EBizCharge.

Syntax

UpdateItemResponse UpdateItem(SecurityToken securityToken, ItemDetails itemDetails, string itemInternalId, string itemId);

Arguments

TypeNameDescription
SecurityTokensecurityTokenMerchant security token: used to identify merchant and validate transaction. (required)
ItemDetailsitemDetailsItem details. (required)
stringitemInternalIdItem internal ID. (required)
stringitemIdItem ID. (required)

Return Value

TypeDescription
UpdateItemResponseReturns the update item response

Examples

function updateItem(){
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-777',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$itemDetails = array(
'ItemId' => 1,
'Name' => 'AC',
'SKU' => 'Tets-123',
'Description' => 'Test',
'UnitPrice' => 12,
'UnitCost' => '0',
'UnitOfMeasure' => '',
'Active' => 1,
'ItemType' => 1,
'QtyOnHand' => 12,
'UPC' => '',
'Taxable' => '0',
'TaxRate' => '0',
'ItemCategoryId' => '',
'TaxCategoryID' => '',
'ImageUrl' => '',
'ItemNotes' => '',
'GrossPrice' => 0,
'WarrantyDiscount' => 0,
'SalesDiscount' => 0
);
$updateItem = array(
'securityToken' => $securityToken,
'itemDetails' => $itemDetails,
'itemId' => 1,
'itemInternalId' => 12
);
$updateItemResponse = $client->UpdateItem($updateItem);
$updateItemResponseResult = $updateItemResponse->UpdateItemResult;
}
Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header />
   <soapenv:Body>
      <ebiz:UpdateItem>
         <ebiz:securityToken>
            <ebiz:SecurityId>********-55ee-434c-b126-f630f2486a2d</ebiz:SecurityId>
            <ebiz:UserId />
            <ebiz:Password />
         </ebiz:securityToken>
         <ebiz:itemDetails>
            <ebiz:ItemInternalId>********-a07c-48ad-bdc0-7e9533ff5477</ebiz:ItemInternalId>
            <ebiz:ItemId>P-0001</ebiz:ItemId>
            <ebiz:Name>desk</ebiz:Name>
            <ebiz:SKU />
            <ebiz:UPC />
            <ebiz:Description />
            <ebiz:UnitPrice>15</ebiz:UnitPrice>
            <ebiz:UnitCost>17</ebiz:UnitCost>
            <ebiz:UnitOfMeasure />
            <ebiz:Active>true</ebiz:Active>
            <ebiz:ItemType />
            <ebiz:QtyOnHand>1000</ebiz:QtyOnHand>
            <ebiz:Taxable>true</ebiz:Taxable>
            <ebiz:TaxRate>10</ebiz:TaxRate>
            <ebiz:SoftwareId>AX</ebiz:SoftwareId>
            <ebiz:ItemCategoryId />
            <ebiz:ItemNotes />
            <ebiz:DateTimeCreated />
            <ebiz:DateTimeModified />
            <ebiz:ItemUniqueId />
            <ebiz:ImageUrl />
            <ebiz:TaxCategoryID />
            <ebiz:ItemLastSyncDateTime />
            <ebiz:DivisionId />
            <ebiz:LocationId />
         </ebiz:itemDetails>
         <ebiz:itemInternalId>********-a07c-48ad-bdc0-7e9533ff5477</ebiz:itemInternalId>
         <ebiz:itemId>P-0001</ebiz:itemId>
      </ebiz:UpdateItem>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <UpdateItemResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <UpdateItemResult>
            <ItemInternalId>********-a07c-48ad-bdc0-7e9533ff5477</ItemInternalId>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error />
            <ErrorCode>0</ErrorCode>
         </UpdateItemResult>
      </UpdateItemResponse>
   </s:Body>
</s:Envelope>