This shows you the differences between two versions of the page.
— |
developer:soap-1.6:methods:getsynclogcurrentposition [2012/08/04 11:31] (current) tem created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <embed ..:contents/> | ||
+ | |||
+ | ====== getSyncLogCurrentPosition ====== | ||
+ | |||
+ | Retrieve the current position of the data synchronization log. | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | The system keeps a log of every change made to various objects (such as Product, Customers, etc). Each change is tagged with a sequential log position (starting at 1 and counting up). This method returns the last position in the log for the given ObjectName. This is useful if you have just retrieved all products from the server and are now ready to start doing incremental syncing. (See the [[.:getSyncLog]] method for more information on incremental syncing). | ||
+ | |||
+ | Leave ObjectName blank to retrieve the last position for all objects. | ||
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
+ | integer **getSyncLogCurrentPosition** ( [[..:objects:ueSecurityToken]], ObjectName) | ||
+ | |||
+ | ===== Arguments ===== | ||
+ | |||
+ | ^Type ^Name ^Description ^ | ||
+ | |[[..:objects:ueSecurityToken]] |Token |Merchant security token: used to identify merchant and retrieve the custom fields.| | ||
+ | |string |ObjectName |Type of object: Product, Customer, etc.| | ||
+ | |||
+ | ===== Return Value ===== | ||
+ | |||
+ | |integer |Returns the current sync position for ObjectName | | ||
+ | |||
+ | ===== Exceptions ===== | ||
+ | |||
+ | The following exceptions (errors) are applicable to this method. | ||
+ | |||
+ | ^Code ^Message ^Advice ^ | ||
+ | |41004 |Unknown object |The specified ObjectName was not recognized. ObjectName must either be left blank (for all objects) or must correspond to a valid object (ie Product, Customer, etc). | | ||
+ | |||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | |||
+ | ==== PHP ==== | ||
+ | |||
+ | For directions on how to set up the WSDL link, create "$token" and "$client", go to [[..:howto:php|PHP Soap How-to]]. | ||
+ | |||
+ | <code php> | ||
+ | <?php | ||
+ | |||
+ | |||
+ | ?> | ||
+ | </code> | ||
+ | |||
+ | ==== VB ==== | ||
+ | |||
+ | <code vb> | ||
+ | Dim ObjectName As String | ||
+ | ObjectName = "Product" | ||
+ | |||
+ | Dim log As String | ||
+ | log = client.getSyncLogCurrentPosition(token, ObjectName) | ||
+ | MsgBox(log) | ||
+ | </code> | ||
+ | |||
+ | ==== .NET C# ==== | ||
+ | <code c> | ||
+ | string ObjectName = "Product"; | ||
+ | string response; | ||
+ | |||
+ | try | ||
+ | { | ||
+ | response = client.getSyncLogCurrentPosition(token, ObjectName); | ||
+ | MessageBox.Show(string.Concat(response)); | ||
+ | |||
+ | } | ||
+ | catch (Exception err) | ||
+ | { | ||
+ | MessageBox.Show(err.Message); | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ==== XML ==== | ||
+ | Request: | ||
+ | <code xml> | ||
+ | |||
+ | </code> | ||
+ | |||
+ | |||
+ | ===== Change History ===== | ||
+ | |||
+ | ^Version ^Change ^ | ||
+ | |[[developer:soap-1.3:methods:getsynclogcurrentposition|1.3]] | Method added in this release | | ||