I’m using a soap client, below are my parameters
$order = array();
$order['request']['UpdateAction'] = 'Update';
$order['request']['JobNumber'] = 59939;
$order['request']['TType'] = 'StandardOrder'; //no spaces
$order['request']['OrderOrigination'] = 'Email';
$order['request']['Status'] = 'Open';
$order['request']['OrderApprovalStatus'] = 'Approved';
$order['request']['OrderName'] = '123456789'; //this will be the id of the order from vm
// Customer Address Information
$order['request']['OrderedBy']['UpdateAction'] = 'Update';
$order['request']['OrderedBy']['FirstName'] = 'Trudy';
$order['request']['OrderedBy']['LastName'] = 'Wilson';
$order['request']['OrderedBy']['Addresses']['UpdateAction'] = 'Update';
$order['request']['OrderedBy']['Addresses']['StreetAddress1'] = '1233 Somewhere Drive';
$order['request']['OrderedBy']['Addresses']['StreetAddress2'] = 'Apt 23b';
$order['request']['OrderedBy']['Addresses']['City'] = 'San Diego';
$order['request']['OrderedBy']['Addresses']['State'] = 'CA';
$order['request']['OrderedBy']['Addresses']['ZipCode'] = 92504;
$order['request']['OrderedBy']['Addresses']['Country'] = 'United States';
// Phones
$order['request']['OrderedBy']['Phones']['Number'] = '5555555555';
// Customer Ship To Information
// Check to see if it's different than the billing
$order['request']['ShipTo']['UpdateAction'] = 'Update';
$order['request']['ShipTo']['FirstName'] = 'Trudy';
$order['request']['ShipTo']['LastName'] = 'Wilson';
$order['request']['ShipTo']['Addresses']['UpdateAction'] = 'Update';
$order['request']['ShipTo']['Addresses']['StreetAddress1'] = '1233 Somewhere Drive';
$order['request']['ShipTo']['Addresses']['StreetAddress2'] = 'Apt 23b';
$order['request']['ShipTo']['Addresses']['City'] = 'San Diego';
$order['request']['ShipTo']['Addresses']['State'] = 'CA';
$order['request']['ShipTo']['Addresses']['ZipCode'] = 92504;
$order['request']['ShipTo']['Addresses']['Country'] = 'United States';
// Phones
$order['request']['ShipTo']['Phones']['Number'] = '5555555555';
// Shipping Specifications
//$order['request']['ShippingSpec']['Carrier'] = 'FedEx';
//$order['request']['ShippingSpec']['serviceLevel'] = 'Ground';
// take into account every item purchased
// use the SKU and attribute to be the StockNumber (maximum of 24 characters)
$order['request']['Items']['OrderRequestItem']['UpdateAction'] = 'Update';
$order['request']['Items']['OrderRequestItem']['StockNumber'] = 'TESTITEM1';
$order['request']['Items']['OrderRequestItem']['Quantity'] = '2';
I’m continuing to get the following error
Error: SOAP-ERROR: Encoding: object hasn’t ‘JobNumber’ property
Array ( [request] => Array ( [UpdateAction] => Update [JobNumber] => 59939 [TType] => StandardOrder [OrderOrigination] => Email [Status] => Open [OrderApprovalStatus] => Approved [OrderName] => 123456789 [OrderedBy] => Array ( [UpdateAction] => Update [FirstName] => Bryan [LastName] => Anderson [Addresses] => Array ( [UpdateAction] => Update [StreetAddress1] => 1233 Somewhere Drive [StreetAddress2] => Apt 23b [City] => Medford [State] => OR [ZipCode] => 97504 [Country] => United States ) [Phones] => Array ( [Number] => 5555555555 ) ) [ShipTo] => Array ( [UpdateAction] => Update [FirstName] => Bryan [LastName] => Anderson [Addresses] => Array ( [UpdateAction] => Update [StreetAddress1] => 1233 Somewhere Drive [StreetAddress2] => Apt 23b [City] => Medford [State] => OR [ZipCode] => 97504 [Country] => United States ) [Phones] => Array ( [Number] => 5555555555 ) ) [Items] => Array ( [OrderRequestItem] => Array ( [UpdateAction] => Update [StockNumber] => TESTITEM1 [Quantity] => 2 ) ) ) [userName] => ******[password] => ******)
‘JobNumber’ is part of the request parameter and it’s the second one in the array…I’ve tried everything I can think of and I can’t figure it out. Every other one of my calls work, but this is the only one that passes arrays within arrays. Any help would be much appreciated