Automatch SOAP API documentation
Introduction-%-Introduction
Retrieving Price2Spy AutoMatch data-%-getAutomatchUrls
Retrieving Price2Spy AutoMatch data-%-getMultipleAutomatchUrls
Retrieving Price2Spy AutoMatch data-%-getUrls
Managing Price2Spy AutoMatch data-%-promoteAutomatchUrl
Managing Price2Spy AutoMatch data-%-rejectAutomatchUrl
Managing Price2Spy AutoMatch data-%-demoteAutomatchUrl
Introduction-%-Introduction
In addition to manual product matching (either performed by our clients, or by our data entry team), Price2Spy has another automated way of product matching – Automatch.
Automatch is a continual automated product matching process that can be performed at specified intervals (daily, weekly, monthly), depending on your needs.
Price2Spy Automatch API SOAP document describes details of Price2Spy API operations – implemented in SOAP.
Before you read this document, please make sure you have read and understood:
Retrieving Price2Spy AutoMatch data-%-getAutomatchUrls
getAutomatchUrls
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request search element | getAutomatchUrlsRequest | complex | Y | See below for search parameters | |
Response | AutomatchUrls | complex | List of automatchUrlType elements returned by search | ||
Possible Faults | generalError | General error detected. Refer to error details |
Search contains the following elements
- id – int
- idMode – string (ID | SKU | INTERNAL_ID – specifies which product field will be used for search)
AutomatchUrlType complex element contains the following elements
- automatchUrlId – int (AutomatchURL’s ID in Price2Spy)
- url – string (the URL of the Automatched product on competitor site)
- matchAccuracy – int (the accuracy of the matched URL, as determined by Price2Spy’s algorythms)
- dateChecked – dateTime (timestamp of the moment Automatched URL was detected)
- approved – Boolean – possible values are
- TRUE – Automatched URL has been approved as correct match (either automatically, or manually)
- FALSE – Automatched URL has been disapproved (identified as wrong match)
- The absence of this element means that Automatched URL has not been approved / disapproved yet
- dateApproved – dateTime (timestamp of the moment Automatched URL was approved / disapproved. Absence of this element means that Automatched URL has not been approved / disapproved yet)
- automatchUrlFields – optional list of automatchUrlField elements (see below)
AutomatchUrlFieldType complex element contains the following elements
- name – string (name of the property of the Automatched URL (for example: price))
- value – string (value of the property of the Automatched URL (for example: 137.00))
1. Example SOAP request / response (search for all Automatched URLs for given product)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getAutomatchUrlsRequest>
<sear:search id="16678" idMode="ID"/>
<sear:apiKey>f20e1f786c8b96ab54e089f</sear:apiKey>
</sear: getAutomatchUrlsRequest >
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getAutomatchUrlsResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:automatchUrl>
<ns3:automatchUrlId>6245836</ns3:urlId>
<ns3:url>http://www.amazon.com/HP-Envy-E-all---onePrinter/dp/B005PYCLXA/ref=sr_1_1?ie=UTF8&qid=1336458175&sr=8-1</ns3:url>
<ns3:matchAccuracy >99</ns3:matchAccuracy >
<ns3:dateChecked>2014-01-20T08:21:08.993+02:00</ns3:dateChecked>
<ns3:approved>FALSE</ns3:approved>
<ns3:dateApproved>2014-01-23T09:11:08.993+02:00</ns3: dateApproved >
<ns3:automatchUrlFields>
<ns3:automatchUrlField>
<ns3:name>name</ ns3:name>
<ns3:value>Olympus DX430 5.3 Megapixel</ ns3:value>
</ns3:automatchUrlField>
<ns3:automatchUrlField>
<ns3:name>price</ ns3:name>
<ns3:value>63</ ns3:value>
</ns3:automatchUrlField>
</ns3:automatchUrlFields>
</ns3:automatchUrl>
<ns3:automatchUrl>
<ns3:automatchUrlId>6245837</ns3:urlId>
<ns3:url>http://www.amazon.com/HP-Envy-E-all---onePrinter/dp/B005PYCLbb/ref=sr_1_1?ie=UTF8&qid=1336458175&sr=8-1</ns3:url>
<ns3:matchAccuracy>100</ns3:matchAccuracy >
<ns3:dateChecked>2014-01-20T08:21:09.993+02:00</ns3:dateChecked>
<ns3:approved>TRUE</ns3:approved>
<ns3:dateApproved>2014-01-23T09:15:08.993+02:00</ns3: dateApproved >
<ns3:automatchUrlFields>
<ns3:automatchUrlField>
<ns3:name>name</ ns3:name>
<ns3:value>Olympus DX434 5.3 Megapixel</ ns3:value>
</ns3:automatchUrlField>
<ns3:automatchUrlField>
<ns3:name>price</ ns3:name>
<ns3:value>59.50</ ns3:value>
</ns3:automatchUrlField>
</ns3:automatchUrlFields>
</ns3:automatchUrl>
</ns3:getAutomatchUrlsResponse>
</soap:Body>
</soap:Envelope>
Retrieving Price2Spy AutoMatch data-%-getMultipleAutomatchUrls
getMultipleAutomatchUrls
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request search element | getMultipleAutomatchUrlsRequest | complex | Y | See below for seachProductType parameters | |
Response | AutomatchUrls | complex | List of automatchUrlType elements returned by search | ||
Possible Faults | generalError | General error detected. Refer to error details |
Search contains the following elements
- searchMode – LIKE | EQUAL (if omitted, the default is LIKE)
- LIKE will return all products which contain searched value as a substring (in SQL terminology, this would be represented by operator LIKE)
- EQUAL will return only products with exact attribute value that has been searched (in SQL terminology, this would be represented by operator =)
- productId – long
- productName – string
- url – string
- sku – string
- internalId – string
- categoryName – string
- categoryId – int
- brandName – string
- brandId – int
- supplierName – string
- supplierId – int
- Metadata1Id – int
- Metadata1Name – string
- Metadata2Id – int
- Metadata2Name – string
- Metadata3Id – int
- Metadata3Name – string
- dateChangeFrom – datetime (refers to timestamp of the last price / availability change detected for this product)
- dateChangeTo – datetime (refers to timestamp of the last price / availability change detected for this product)
2. Example SOAP request / response (search for all Automatched URLs for given product)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getMultipleAutomatchUrlsRequest>
<sear:search searchMode="ID" productId="123456"/>
<sear:apiKey> f20e1f786c8b96ab54e089f </sear:apiKey>
</sear:getMultipleAutomatchUrlsRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<ns3:soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getMultipleAutomatchUrlsResponse xmlns="http://www.price2spy.com/api/search" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/modify">
<ns3:automatchUrl>
<ns3:automatchUrlId>157512625</ns3:automatchUrlId>
<ns3:url>https://www.bitiba.de/shop/hunde/kausnacks/8in1/dental/467098</ns3:url>
<ns3:matchAccuracy>100</ns3:matchAccuracy>
<ns3:dateChecked>2019-06-10T13:21:44+02:00</ns3:dateChecked>
<ns3:approved>true</ns3:approved>
<ns3:dateApproved>2019-06-11T13:21:44+02:00</ns3:dateApproved>
<ns3:dateAdded>2019-06-10T13:21:44+02:00</ns3:dateAdded>
<ns3:dateModified>2019-06-10T13:21:44+02:00</ns3:dateModified>
<ns3:addedById>5532</ns3:addedById>
<ns3:modifiedById>5523</ns3:modifiedById>
</ns3:automatchUrl>
<ns3:automatchUrl>
<ns3:automatchUrlId>178490235</ns3:automatchUrlId>
<ns3:url>https://www.bitiba.de/shop/hunde/hundefutter_trocken/happy_dog_supreme/sensible/48533</ns3:url>
<ns3:matchAccuracy>100</ns3:matchAccuracy>
<ns3:dateChecked>2019-06-06T17:00:57+02:00</ns3:dateChecked>
<ns3:approved>true</ns3:approved>
<ns3:dateApproved>2019-06-07T17:00:57+02:00</ns3:dateApproved>
<ns3:dateAdded>2019-06-06T17:00:57+02:00</ns3:dateAdded>
<ns3:dateModified>2019-06-06T17:00:57+02:00</ns3:dateModified>
<ns3:addedById>5532</ns3:addedById>
<ns3:modifiedById>5523</ns3:modifiedById>
</ns3:automatchUrl>
<ns3:automatchUrl>
<ns3:automatchUrlId>18174386</ns3:automatchUrlId>
<ns3:url>https://www.bitiba.de/shop/hunde/hundefutter_trocken/happy_dog_supreme/fit_well/96517</ns3:url>
<ns3:matchAccuracy>99</ns3:matchAccuracy>
<ns3:dateChecked>2019-06-05T10:49:25+02:00</ns3:dateChecked>
<ns3:approved>true</ns3:approved>
<ns3:dateApproved>2019-06-07T12:47:16+02:00</ns3:dateApproved>
<ns3:automatchUrlFields>
<ns3:automatchUrlField>
<ns3:name>price</ns3:name>
<ns3:value>82.99</ns3:value>
</ns3:automatchUrlField>
<ns3:automatchUrlField>
<ns3:name>name</ns3:name>
<ns3:value>Happy Dog Supreme Fit & Well Adult Sport</ns3:value>
</ns3:automatchUrlField>
</ns3:automatchUrlFields>
<ns3:dateAdded>2019-06-05T10:49:25+02:00</ns3:dateAdded>
<ns3:dateModified>2019-06-07T12:47:16+02:00</ns3:dateModified>
<ns3:addedById>5532</ns3:addedById>
<ns3:modifiedById>5523</ns3:modifiedById>
</ns3:automatchUrl>
</ns3:getMultipleAutomatchUrlsResponse>
</soap:Body>
</soap:Envelope>
Retrieving Price2Spy AutoMatch data-%-getUrls
getUrls
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request search element | getUrlsRequest | complex | Y | See below for search parameters | |
Response | Urls | complex | List of UrlType elements returned by search | ||
Possible Faults | generalError | General error detected. Refer to error details |
Search contains the following elements
- id – int
- idMode – string (ID | SKU | INTERNAL_ID – specifies which product field will be used for search)
UrlType complex element contains the following elements
- … (see Price2Spy Reference Guide for the full definition, here we’ll list only the AutoMatch-related fields).
- automatchUrl – automatchUrlType complex type (see above. This element exists only if this URL originates from an Automatched URL)
3. Example SOAP request / response (search for all URLs for given product)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getUrlsRequest>
<sear:search id="16678" idMode="ID"/>
<sear:apiKey>f20e1f786c8b96ab54e089f</sear:apiKey>
</sear: getUrlsRequest >
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getUrlsResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:url>
<ns3:urlId>45836</ns3:urlId>
<ns3:url>http://www.amazon.com/HP-Envy-E-all---onePrinter/dp/B005PYCLXA/ref=sr_1_1?ie=UTF8&qid=1336458175&sr=8-1</ns3:url>
<ns3:siteHumanName>Amazon.com</ns3:siteHumanName>
<ns3:showInReports>true</ns3:showInReports>
<ns3:active>true</ns3:active>
<ns3:counterFailed>0</ns3:counterFailed>
<ns3:lastError/>
<ns3:lastChecked>2012-09-20T08:21:08.993+02:00</ns3:lastChecked>
<ns3:lastMeasurement>
<ns3:dateChecked>2012-09-20T08:21:08.997+02:00</ns3:dateChecked>
<ns3:price>
<ns3:amount>220.58</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:price>
<ns3:available>true</ns3:available>
<ns3:shippingCost>3.50</ns3:shippingCost>
<ns3:shippingTime>3-4 working days</ns3:shippingTime>
</ns3:lastMeasurement>
<ns3:image1Url> https://www.amazon.com/images/I/61K%2B0mlsGXL._AC_SL1300_.jpg</ns3:image1Url>
<ns3:note1>This is a note regarding the above URL from Amazon</ns3:note1>
</ns3:url>
<ns3:url>
<ns3:urlId>45835</ns3:urlId>
<ns3:url>http://www.xyz.com.au/products/HP-Envy-114-E%252dAll%252din%252doneWireless-Thermal-Printer.html</ns3:url>
<ns3:siteHumanName>Discount Digital Photographics</ns3:siteHumanName>
<ns3:showInReports>true</ns3:showInReports>
<ns3:active>true</ns3:active>
<ns3:counterFailed>9</ns3:counterFailed>
<ns3:lastError>Products price format is changed.</ns3:lastError>
<ns3:lastChecked>2012-09-20T08:21:08.990+02:00</ns3:lastChecked>
<ns3:lastMeasurement>
<ns3:dateChecked>2012-06-22T08:21:13.780+02:00</ns3:dateChecked>
<ns3:price>
<ns3:amount>272.00</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:price>
<ns3:available>true</ns3:available>
</ns3:lastMeasurement>
<ns3:automatchUrl>
<ns3:automatchUrlId>6245837</ns3:urlId>
<ns3:url> http://www.xyz.com.au/products/HP-Envy-114-E%252dAll%252din%252doneWireless-Thermal-Printer.html</ns3:url>
<ns3:matchAccuracy>100</ns3:matchAccuracy >
<ns3:dateChecked>2014-01-20T08:21:09.993+02:00</ns3:dateChecked>
<ns3:approved>TRUE</ns3:approved>
<ns3:dateApproved>2014-01-23T09:15:08.993+02:00</ns3: dateApproved >
<ns3:automatchUrlFields>
<ns3:automatchUrlField>
<ns3:name>name</ ns3:name>
<ns3:value>Olympus DX434 5.3 Megapixel</ ns3:value>
</ns3:automatchUrlField>
<ns3:automatchUrlField>
<ns3:name>price</ ns3:name>
<ns3:value>59.50</ ns3:value>
</ns3:automatchUrlField>
</ns3:automatchUrlFields>
</ns3:automatchUrl>
</ns3:url>
</ns3:getUrlsResponse>
</soap:Body>
</soap:Envelope>
Managing Price2Spy AutoMatch data-%-promoteAutomatchUrl
promoteAutomatchUrl
This operation will approve AutoMatched URL, and promote it to an URL. If given site does not support multiple URLs for same product, it will also disapprove all other URLs with the AutoMatch origin for the same product.Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | promoteAutomatchUrlRequest element | int | Y | Price2Spy ID of the AutoMatchURL that we want to promote | |
Response | promoteAutomatchUrlResponse element | int | Y | If promotion was successful, this will contain Price2Spy URLID (which needs to be stored in your product DB as well). | |
Possible Faults | invalidId | If there is no AutoMatchURL with such ID in your Price2Spy account | |||
automatchUrlAlreadyPromoted | This AutoMatchURL has already been promoted | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (AutoMatch URL successfully promoted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:promoteAutomatchUrlRequest>
<mod:automatchUrlId>6245837</mod:automatchUrlId>
<mod:apiKey>3843737adf8272</mod:apiKey>
</mod: promoteAutomatchUrlRequest >
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<promoteAutomatchUrlResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">1130668
</promoteAutomatchUrlResponse>
</soap:Body>
</soap:Envelope>
Managing Price2Spy AutoMatch data-%-rejectAutomatchUrl
rejectAutomatchUrl
This operation will disapprove AutoMatched URL (in other words, it will be marked as wrong match).Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | rejectAutomatchUrlRequest element | int | Y | Price2Spy ID of the AutoMatchURL that we want to reject | |
Response | rejectAutomatchUrlResponse element | int | Y | The existence of this element in response means that rejection was successful. | |
Possible Faults | invalidId | If there is no AutoMatchURL with such ID in your Price2Spy account | |||
automatchUrlAlreadyPromoted | This AutoMatchURL has already been promoted, so it cannot be rejected (instead, demoteAutomatchUrl should be performed) | ||||
generalError | General error detected. Refer to error details |
2. Example SOAP request / response (AutoMatch URL successfully rejected)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:rejectAutomatchUrlRequest>
<mod:automatchUrlId>6245830</mod:automatchUrlId>
<mod:apiKey>3843737adf8272</mod:apiKey>
</mod: rejectProductRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<rejectAutomatchUrlResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3=“http://www.price2spy.com/api/search“ />
</soap:Body>
</soap:Envelope>
Managing Price2Spy AutoMatch data-%-demoteAutomatchUrl
demoteAutomatchUrl
This operation will disapprove AutoMatched URL which was previously approved (in other words, it will be marked as wrong match) URL that was earlier created (as a result of promoteAutomatchUrl), and all it’s measurement records will be deleted.Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | demoteAutomatchUrlRequest element | int | Y | Price2Spy URL ID of the AutoMatchURL that we want to demote | |
Response | demoteAutomatchUrlResponse element | int | Y | The existence of this element in response means that demotion was successful. | |
Possible Faults | invalidId | If there is no AutoMatchURL with such ID in your Price2Spy account | |||
notAutomatchUrl | This URL has not been created as a result of AutoMatch URL being promoted (therefore, demote operation cannot be performed) | ||||
generalError | General error detected. Refer to error details |
3. Example SOAP request / response (AutoMatch URL successfully demoted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:demoteAutomatchUrlRequest>
<mod:urlId>123456</mod:automatchUrlId>
<mod:apiKey>3843737adf8272</mod:apiKey>
</mod: demoteAutomatchUrlRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<demoteAutomatchUrlResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3=“http://www.price2spy.com/api/search“ />
</soap:Body>
</soap:Envelope>