SOAP API Documentation
WSDL (Web Service definition)
Below you will find examples of invoking different Price2Spy methods, and processing their results:
PHP examples
Java examples
Python examples
C# examples
Prerequisites
- Client ID – <Your Client ID>
- Client Secret – <Your client secret>
SOAP Request Headers for HMAC Authentication
Every SOAP request if using HMAC must include the following headers in the < soapenv:Header > element:-
- Authorization: Contains HMAC authentication information.
- X-P2S-Date: Represents the date and time the request was made, in UNIX Epoch format. The time must be within 15 minutes of the current Coordinated Universal Time (GMT).
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header>
<Authorization>HmacSHA256 {Client_ID}:{Signature}</Authorization>
<X-P2S-Date>{Epoch_Timestamp}</X-P2S-Date>
</soapenv:Header>
<soapenv:Body>
<!-- SOAP body content -->
</soapenv:Body>
</soapenv:Envelope>
Generating the HMAC Signature
- Construct the String-To-Sign:
- Concatenate the clientId, a newline character (delimiter), and the X-P2S-Date value.
- Example: {Client_ID}\n{Epoch_Timestamp}
- Hashing and Encoding:
- Hash the String-To-Sign using the HMAC-SHA256 algorithm with your Client Secret as the key.
- Encode the resultant hash as a Base64 string to form the Signature.
- Construct the Authorization Header:
- Format: HmacSHA256 {Client_ID}:{Signature}
HMAC Related Errors for SOAP
<failstring>Authorization header with HmacSHA256 scheme not provided</failstring>
Provide a valid Authorization SOAP header.
<failstring>Hmac signature mismatch</failstring>
The client-generated hash value and the server generated hash value do not match.
<failstring>Hmac invalid timestamp header</failstring>
Timestamp SOAP header not provided in the correct format.
<failstring>Hmac missing timestamp header</failstring>
Timestamp SOAP header not provided in the request.
getCurrentPricingData
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | Search | complex | Y | See above for seachProductType parameters | |
Response | productswithUrls | complex | List of productWithUrlsType elements returned by search | ||
Possible Faults | generalError | General error detected. Refer to error details |
Note: If you are using search with date attributes (dateChangeFrom, dateChangeTo), search result will contain only measurement records in given timeframe.
ProductWithUrlsType contains list of Product elements, and subelements url (list of products matching the search, including all its URLs (URLs containing last and penultimate price checks), and approved Automatch URLs.
1. Example SOAP request / response (get current pricing for all products matching search criteria (there has to be at least one search criterion supplied)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getCurrentPricingDataRequest>
<sear:search categoryId="439" />
<sear:apiKey>34343 </sear:apiKey>
</sear:getCurrentPricingDataRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getCurrentPricingDataResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:products>
<ns3:product>
<ns3:productId>16678</ns3:productId>
<ns3:productName>HP Envy 114 E-All-in-one Wireless Thermal Printer</ns3:productName>
<ns3:checkFrequencyType>DAYS</ns3:checkFrequencyType>
<ns3:checkFrequencyInterval>1</ns3:checkFrequencyInterval>
<ns3:active>true</ns3:active>
<ns3:showInReports>true</ns3:showInReports>
<ns3:sku/>
<ns3:internalId/>
<ns3:categoryName>Printer</ns3:categoryName>
<ns3:categoryId>439</ns3:categoryId>
<ns3:brandName>HP</ns3:brandName>
<ns3:brandId>1085</ns3:brandId>
<ns3:metadata1Name>Metadata1Name</ns3:metadata1Name>
<ns3:metadata1Id>4396</ns3:metadata1Id>
<ns3:metadata2Name>Metadata2Name</ns3:metadata2Name>
<ns3:metadata2Id>4397</ns3:metadata2Id>
<ns3:metadata3Name>Metadata3Name</ns3:metadata3Name>
<ns3:metadata3Id>4398</ns3:metadata3Id>
<ns3:minPrice>
<ns3:amount>220.58</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:minPrice>
<ns3:maxPrice>
<ns3:amount>272.00</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:maxPrice>
<ns3:lastChecked>2012-09-20T08:21:08.993+02:00</ns3:lastChecked>
<ns3:nextChecked>2012-09-21T08:18:22.997+02:00</ns3:nextChecked>
<ns3:lastChange>2012-09-20T08:21:08.997+02:00</ns3:lastChange>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:20:05+01:00</ns3:dateModified>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
<ns3:urls>
<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:productName>HP Envy 114 E-all-in-one Printer - D411C (Black)</ns3:productName>
<ns3:siteHumanName>Amazon.com</ns3:siteHumanName>
<ns3:siteCountryISOCode>US</ns3:siteHumanName>
<ns3:showInReports>true</ns3:showInReports>
<ns3:active>true</ns3:active>
<ns3:counterFailed>0</ns3:counterFailed>
<ns3:lastError/>
<ns3:screenshotUrl>https://screenshots.price2spy.com/379/53982227-a5g8-420c-a12d-e415333a0ed8.png</ns3:screenshotUrl>
<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: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:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:url>
<ns3:url>
<ns3:urlId>45835</ns3:urlId>
<ns3:url>http://www.xyz.com.au/products/HP-Envy-114-E%252dAll%252din%252done-Wireless-Thermal-Printer.html</ns3:url>
<ns3:productName>HP-Envy-114-E-All-in-one-Wireless-ThermalPrinter</ns3:productName>
<ns3:siteHumanName>Discount Digital Photographics</ns3:siteHumanName>
<ns3:siteCountryISOCode>AU</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:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:url>
</ns3:urls>
</ns3:product>
</ns3:products>
</ns3:getCurrentPricingDataResponse>
</soap:Body>
</soap:Envelope>
getProducts
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request search element | searchProducts | complex | Y | See below for searchProductType parameters | |
Response | List of product elements | complex | List of productType elements returned by search | ||
Possible Faults | generalError | General error detected. Refer to error details |
SearchProducts contains one or more of the following elements (if more elements are present, they will form logical ‘AND’ condition). Therefore, if you need to specify just one attribute in the search, you need to omit all other attributes
- 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)
Note: If you are using search with date attributes (dateChangeFrom, dateChangeTo), search result will contain only measurement records in given timeframe.
ProductType complex element contains the following elements
- productId – long (Product’s ID in Price2Spy)
- productName – string
- checkFrequencyType = DAYS | HOURS
- checkFrequencyInterval – int
- active – boolean
- showInReports – boolean
- sku – string
- internalId – string
- categoryName – string
- categoryId – int (categoryID in Price2Spy, if defined)
- brandName – string
- brandId – int (brandID in Price2Spy, if defined)
- supplierName – string
- supplierId – int (supplierID in Price2Spy, if defined)
- Metadata1Name – string
- Metadata1Id – int (Metadata1Id in Price2Spy, if defined)
- Metadata2Name – string
- Metadata2Id – int (Metadata2Id in Price2Spy, if defined)
- Metadata3Name – string
- Metadata3Id – int (Metadata3Id in Price2Spy, if defined)
- minPrice – price (complex type) – minimal price of given product on all URLs
- maxPrice – price (complex type) – maximal price of given product on all URLs
- lastChecked – datetime (timestamp of last price check performed by Price2Spy)
- nextChecked – datetime (timestamp of next price check to be performed by Price2Spy)
- lastChange– datetime (timestamp of last price change detected by Price2Spy)
- targetPrice – decimal (usually represents MAP price for this product)
- purchasePrice – decimal (usually represents purchase price for this product)
- dateAdded – datetime (timestamp when the product was added to Price2Spy)
- dateModified – datetime (timestamp when the product was modified in Price2Spy)
- addedById – int (ID of user that added the product into Price2Spy)
- modifedById – int (ID of user that modified the product in Price2Spy)
PriceType complex element contains the following elements
- productId – long (Product’s ID in Price2Spy)
- productName – string
1. Example SOAP request / response (search all products, list of all products on your account returned)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getProductsRequest>
<sear:search/>
<sear:apiKey>ddd75f</sear:apiKey>
</sear:getProductsRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getProductsResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:product>
<ns3:productId>1473</ns3:productId>
<ns3:productName>Canon 600D body only</ns3:productName>
<ns3:checkFrequencyType>DAYS</ns3:checkFrequencyType>
<ns3:checkFrequencyInterval>1</ns3:checkFrequencyInterval>
<ns3:active>true</ns3:active>
<ns3:showInReports>true</ns3:showInReports>
<ns3:minPrice>
<ns3:amount>425.00</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:minPrice>
<ns3:maxPrice>
<ns3:amount>499.00</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:maxPrice>
<ns3:lastChecked>2012-09-20T10:16:49.217+02:00</ns3:lastChecked>
<ns3:nextChecked>2012-09-21T10:10:00+02:00</ns3:nextChecked>
<ns3:lastChange>2012-09-20T10:16:49.220+02:00</ns3:lastChange>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:20:05+01:00</ns3:dateModified>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:product>
<ns3:product>
...
...
</ns3:product>
</ns3:getProductsResponse>
</soap:Body>
</soap:Envelope>
2. Example SOAP request / response (search for a single product, based on its ID)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getProductsRequest>
<sear:search productId="75296"/>
<sear:apiKey>ddd759c9054a80a45f089f</sear:apiKey>
</sear:getProductsRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getProductsResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:product>
<ns3:productId>75296</ns3:productId>
<ns3:productName>Nikon D600 Digital Camera with 24-85mm f/3.5-4.5G ED VR Lens</ns3:productName>
<ns3:checkFrequencyType>DAYS</ns3:checkFrequencyType>
<ns3:checkFrequencyInterval>1</ns3:checkFrequencyInterval>
<ns3:active>true</ns3:active>
<ns3:showInReports>true</ns3:showInReports>
<ns3:sku/>
<ns3:internalId/>
<ns3:minPrice>
<ns3:amount>2484.24</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:minPrice>
<ns3:maxPrice>
<ns3:amount>2868.84</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:maxPrice>
<ns3:lastChecked>2012-09-20T04:50:06.400+02:00</ns3:lastChecked>
<ns3:nextChecked>2012-09-20T21:04:27.727+02:00</ns3:nextChecked>
<ns3:lastChange>2012-09-20T04:50:05.617+02:00</ns3:lastChange>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:20:05+01:00</ns3:dateModified>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:product>
</ns3:getProductsResponse>
</soap:Body>
</soap:Envelope>
3. Example SOAP request / response (search for all products from given category)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getProductsRequest>
<sear:search categoryName="Printer"/>
<<sear:apiKey>ddd759c9054a80a45f20e1f786c8b96ab54e089f</sear:apiKey>
</sear:getProductsRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getProductsResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:product>
<ns3:productId>16678</ns3:productId>
<ns3:productName>HP Envy 114 E-All-in-one Wireless Thermal Printer</ns3:productName>
<ns3:checkFrequencyType>DAYS</ns3:checkFrequencyType>
<ns3:checkFrequencyInterval>1</ns3:checkFrequencyInterval>
<ns3:active>true</ns3:active>
<ns3:showInReports>true</ns3:showInReports>
<ns3:sku/>
<ns3:internalId/>
<ns3:categoryName>Printer</ns3:categoryName>
<ns3:categoryId>439</ns3:categoryId>
<ns3:brandName>HP</ns3:brandName>
<ns3:brandId>1085</ns3:brandId>
<ns3:minPrice>
<ns3:amount>220.58</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:minPrice>
<ns3:maxPrice>
<ns3:amount>272.00</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:maxPrice>
<ns3:lastChecked>2012-09-20T08:21:08.993+02:00</ns3:lastChecked>
<ns3:nextChecked>2012-09-21T08:18:22.997+02:00</ns3:nextChecked>
<ns3:lastChange>2012-09-20T08:21:08.997+02:00</ns3:lastChange>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:20:05+01:00</ns3:dateModified>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:product>
</ns3:getProductsResponse>
</soap:Body>
</soap:Envelope>
insertProduct
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: insert element | productName | String | Y | Must be unique | |
checkFrequencyType | DAYS | HOURS | N | DAYS | HOURS and available with Premium accounts | |
checkFrequencyInterval | Int | N | 1 | If checkFrequencyType = HOURS, checkFrequencyInterval has to be > 2 | |
Active | boolean | N | True | If False product’s price will not be checked | |
Sku | String | N | SKU from your application | ||
internalId | String | N | ID from your application (should be used as primary key from your DB) | ||
targetPrice | decimal< | N | To be used if Price2Spy should monitor MAP (minimal advertised price) violations | ||
purchasePrice | decimal | N | To be used if Price2Spy should monitor purchase price | ||
categoryName | String | N | Product category from your DB | ||
brandName | string | N | Product brand from your DB | ||
supplierName | string | N | Product supplier from your DB | ||
metadata1Name | string | N | Product metadata 1 from your DB | ||
metadata2Name | string | N | Product metadata 2 from your DB | ||
metadata3Name | string | N | Product metadata 3 from your DB | ||
customField1 | string | N | Product custom field 1 from your DB | ||
customField2 | string | N | Product custom field 2 from your DB | ||
customField3 | string | N | Product custom field 3 from your DB | ||
customField4 | string | N | Product custom field 4 from your DB | ||
customField5 | string | N | Product custom field 5 from your DB | ||
customField6 | string | N | Product custom field 6 from your DB | ||
customField7 | string | N | Product custom field 7 from your DB | ||
customField8 | string | N | Product custom field 8 from your DB | ||
customField9 | string | N | Product custom field 9 from your DB | ||
customField10 | string | N | Product custom field 10 from your DB | ||
comment1 | string | N | Product comment 1 from your DB | ||
comment2 | string | N | Product comment 2 from your DB | ||
Response | insertProductResponse element | int | Y | If insert was successful, this will contain Price2Spy productID (which needs to be stored in your product DB as well). | |
Possible Faults | productNameNotUnique | If Product with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
Note: Allowed combinations of checkFrequencyType | checkFrequencyInterval are
- DAYS | 1, 2, 3, 5, 7, 14, 30
- HOURS | 3, 4, 6, 8, 12
1. Example SOAP request / response (product successfully inserted)
Request
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:insertProductRequest>
<mod:insert productName="My 1st product" checkFrequencyType="DAYS" checkFrequencyInterval="1" active="True" sku="SKU-001" internalId="53867" targetPrice=""" purchasePrice="" categoryName="Cameras" brandName="Nikon" supplierName=""/>
<mod:apiKey>3843737adf8272</mod:apiKey>
</mod:insertProductRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<insertProductResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">130661</insertProductResponse>
</soap:Body>
</soap:Envelope>
updateProduct
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: update element | productName | String | Y | Must be unique | |
checkFrequencyType | DAYS | HOURS | N | DAYS | HOURS and available with Premium accounts | |
checkFrequencyInterval | Int | N | 1 | If checkFrequencyType = HOURS, checkFrequencyInterval has to be > 2 | |
Active | boolean | N | True | If False product’s price will not be checked | |
Sku | String | N | SKU from your application | ||
internalId | String | N | ID from your application (should be used as primary key from your DB) | ||
targetPrice | decimal< | N | To be used if Price2Spy should monitor MAP (minimal advertised price) violations | ||
purchasePrice | decimal | N | To be used if Price2Spy should monitor purchase price | ||
categoryName | String | N | Product category from your DB | ||
brandName | string | N | Product brand from your DB | ||
supplierName | string | N | Product supplier from your DB | ||
metadata1Name | string | N | Product metadata 1 from your DB | ||
metadata2Name | string | N | Product metadata 2 from your DB | ||
metadata3Name | string | N | Product metadata 3 from your DB | ||
customField1 | string | N | Product custom field 1 from your DB | ||
customField2 | string | N | Product custom field 2 from your DB | ||
customField3 | string | N | Product custom field 3 from your DB | ||
customField4 | string | N | Product custom field 4 from your DB | ||
customField5 | string | N | Product custom field 5 from your DB | ||
customField6 | string | N | Product custom field 6 from your DB | ||
customField7 | string | N | Product custom field 7 from your DB | ||
customField8 | string | N | Product custom field 8 from your DB | ||
customField9 | string | N | Product custom field 9 from your DB | ||
customField10 | string | N | Product custom field 10 from your DB | ||
comment1 | string | N | Product comment 1 from your DB | ||
comment2 | string | N | Product comment 2 from your DB | ||
Response | updateProductResponse element | int | Y | (void) – the presence of this element indicates that updateProduct() was successfully carried out (otherwise a fault would be raised) | |
Possible Faults | invalidId | If productId supplied was not found in Price2Spy | |||
productNameNotUnique | If Product with same name already exists in Price2Spy | ||||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
Important: if an attribute is missing from updateProductRequest operation, this attribute’s value in Price2Spy account will remain unchanged
1. Example SOAP request / response (successful product update, with just 1 product attribute set to new value)
Request
- productName
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateProductRequest>
<mod:update productId="130661" productName="Corrected product name" />
<mod:apiKey>ddd756ab54e089f</mod:apiKey>
</mod:updateProductRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
2. Example SOAP request / response (successful product update, with 5 attributes set to empty values)
Request
- sku
- internalID
- targetPrice
- purchasePrice
- supplierName
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateProductRequest>
<mod:update productId="130661" productName="Corrected product name" checkFrequencyType="DAYS" checkFrequencyInterval="2" active="true" sku="" internalId="" targetPrice="0" purchasePrice="0" categoryName="Cameras" brandName="Nikon" supplierName=""/>
<mod:apiKey>ddd756ab54e089f</mod:apiKey>
</mod:updateProductRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
3. Example SOAP request / response (successful product update – targetPrice and purchasePrice have been set to 0)
Request
- purchasePrice
- targetPrice
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateProductRequest>
<mod:update productId="130661" targetPrice="0.00" purchasePrice="0.00" categoryName="Cameras" brandName="Nikon" supplierName=""/>
<mod:apiKey>ddd756ab54e089f</mod:apiKey>
</mod:updateProductRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
deleteProduct
Element | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request deleteProductRequest element | productId | long | Y | This must match productID in Price2Spy (returned after insertProduct()) | |
Response | deleteProductResponse | (void) – the presence of this element indicates that deleteProduct() was successfully carried out (otherwise a fault would be raised) | |||
Possible Faults | invalidId | If productId supplied was not found in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
Note: deleteProduct() will also delete all underlying URLs and their price history
Example SOAP request / response (product successfully deleted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:deleteProductRequest>
<mod:productId>130661</mod:productId>
<mod:apiKey>ddd759c9054a80a45f20e196ab54e089f</mod:apiKey>
</mod:deleteProductRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
getURLs
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Requestsearch 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 element
- 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 searched for (in SQL terminology, this would be represented by operator =)
- Id – int
- idMode – string (ID | SKU | INTERNAL_ID | NAME | ANY– specifies which product field will be used for search)
- ID = product with this Price2Spy’s ID will be returned
- SKU = products with matching SKU will be returned
- INTERNAL_ID = products with matching INTERNAL_ID will be returned
- NAME = products with matching NAME will be returned
- ANY = products where either SKU, INTERNAL_ID or NAME match will be returned
UrlType complex element contains the following elements
- urlId – long (URL’s ID in Price2Spy)
- url – string
- productName – string (product name from the measured URL, as found on the website)
- siteHumanName – string – site’s name
- siteCountryISOCode – string – ISO code of site’s country
- showInReports – Boolean
- active – Boolean
- counterFailed – int
- lastError – string (if present, shows the last error Price2Spy report for a failed price check
- lastChecked – datetime (timestamp of the last price checked performed by Price2Spy)
- lastMeasurement – measurement (complex type representing last successful price check)
- secondToLastMeasurement – measurement (complex type representing penultimate successful price check)
- image1Url – string (URL of the 1st image of the URL)
- image2Url – string (URL of the 2nd image of the URL)
- image3Url – string (URL of the 3rd image of the URL)
- note1 – string (1st URL note)
- note2 – string (2st URL note)
- note3 – string (3st URL note)
- dateAdded – datetime (timestamp when the URL was added to Price2Spy)
- dateModified – datetime (timestamp when the URL was modified in Price2Spy)
- addedById – int (ID of user that added the URL into Price2Spy)
- modifedById – int (ID of user that modified the URL in Price2Spy)
MeasurementType complex element contains the following elements
- dateChecked – datetime (timestamp of the price check)
- price – price (complex type PriceType)
- available – boolean (was the product available on the site)
- shippingCost – decimal (returned only if monitored on user’s account)
- shippingTime – string (returned only if monitored on user’s account)
- shippingDetails – string (returned only if monitored on user’s account)
- stockStatus – string (returned only if monitored on user’s account)
- seller – string (returned only if monitored on user’s account)
- shelfPrice – price (returned only if monitored on user’s account)
- isOnPromotion – boolean (returned only if monitored on user’s account)
- promotionText – string (returned only if monitored on user’s account)
- screenshotUrl – string (if screenshot was taken)
- customField1 – string (returned only if monitored on user’s account)
- customField2 – string (returned only if monitored on user’s account)
- customField3 – string (returned only if monitored on user’s account)
- customField4 – string (returned only if monitored on user’s account)
- customField5 – string (returned only if monitored on user’s account)
- customField6 – string (returned only if monitored on user’s account)
- customField7 – string (returned only if monitored on user’s account)
- customField8 – string (returned only if monitored on user’s account)
- customField9 – string (returned only if monitored on user’s account)
- customField10 – string (returned only if monitored on user’s account)
1. 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:productName>HP Envy 114 E-all-in-one Printer - D411C (Black)</ns3:productName>
<ns3:siteHumanName>Amazon.com</ns3:siteHumanName>
<ns3:siteCountryISOCode>US</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:screenshotUrl>https://screenshots.price2spy.com/379/53982227-a5g8-420c-a12de415333a0ed8.png</ns3:screenshotUrl>
<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:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</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:productName>HP-Envy-114-E-All-in-one-Wireless-ThermalPrinter</ns3:productName>
<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:screenshotUrl>https://screenshots.price2spy.com/379/53982227-a5g8-420c-a12de415333a0ed8.png</ns3:screenshotUrl>
<ns3:shippingCost>3.50</ns3:shippingCost>
<ns3:shippingTime>3-4 working days</ns3:shippingTime>
</ns3:lastMeasurement>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:url>
</ns3:getUrlsResponse>
</soap:Body>
</soap:Envelope>
insertURL
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Requestinsert element | productId | int | Y | ProductID from Price2Spy (as returned by insertProduct()) | |
url | string | Y | URL of the product you want to monitor | ||
Active | boolean | N | true | If False url’s price will not be checked | |
showInReports | boolean | N | true | If False url will not be shown in reports | |
note1 | string | N | Note regarding this URL | ||
note2 | string | N | Note regarding this URL | ||
note3 | string | N | Note regarding this URL | ||
Response | insertURLResponse element | int | Y | If insert was successful, this will contain Price2Spy urlID (which needs to be stored in your DB as well). | |
Possible Faults | maxUrlsForPriceplanExceeded | Exceeded max URLs on your Price2Spy account | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
Note: if you’re inserting URL for a site which has not been handled in Price2Spy before, a generalError (‘site not supported’, or ‘site already suggested’) will be raised. It will take Price2Spy team approx. 1 working day to handle this site. After that insertUrl can be reattempted, and it should succeed. The above procedure is necessary only when adding the very first URL from a new website. If insertUrl keeps failing, please contact support@price2spy.com
1. Example SOAP request / response (URL successfully inserted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:insertUrlRequest>
<mod:insert productId="130661" url="http://www.amazon.com/1234" active="true" showInReports="true"/>
<mod:apiKey>ddd759c9054a80a</mod:apiKey>
</mod:insertUrlRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<insertUrlResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">241251</insertUrlResponse>
</soap:Body>
</soap:Envelope>
updateURL
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request update element | urlId | long | Y | UrlID from Price2Spy (as returned by insertUrl()) | |
url | string | Y | URL of the product you want to monitor | ||
counterFailed | int | N | 0 | Represents successive failed attempts to capture this URLs price | |
active | boolean | N | true | If False url’s price will not be checked | |
showInReports | boolean | N | true | If False url will not be shown in reports | |
note1 | string | N | Note regarding this URL | ||
note2 | string | N | Note regarding this URL | ||
note3 | string | N | Note regarding this URL | ||
Response | insertURLResponse | int | Y | If insert was successful, this will contain Price2Spy urlID (which needs to be stored in your DB as well). | |
Possible Faults | dataValidationError | An error detected with your data. Refer to error details | |||
generalError | General error detected. Refer to error details |
Note: when updating URL, you will not be allowed to change its site. If you need to achieve this, you need to do deleteUrl() (the old one), followed by insertUrl() (new one)
Important: if an attribute is missing from updateUrlRequest operation, this attribute’s value in Price2Spy account will remain unchanged
1. Example SOAP request / response (URL successfully updated)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateUrlRequest>
<mod:update urlId="241251" url="http://www.amazon.com" counterFailed="0" active="true" showInReports="true"/> />
<mod:apiKey>ddd759c9054a8</mod:apiKey>
</mod:updateUrlRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
2. Example SOAP request / response (URL was not updated – tried to change the site)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateUrlRequest>
<mod:update urlId="241251" url="http://www.buy.com" counterFailed="0" active="true"showInReports="true"/>/>
<mod:apiKey>ddd759c9054a8</mod:apiKey>
</mod:updateUrlRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
<soap:Fault/>
</soap:Envelope>
3. Example SOAP request / response (successful product update – targetPrice and purchasePrice have been set to 0)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateUrlRequest>
<mod:update urlId="241251" url="http://www.amazon.com" active="true" showInReports="true"/>
<mod:apiKey>ddd759c9054a8</mod:apiKey>
</mod:updateUrlRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
deleteURL
Element | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | urlId | long | Y | This must match urlID in Price2Spy (returned after insertProduct()) | |
Response | deleteURLResponse | (void) – the presence of this element indicates that deleteUrl() was successfully carried out (otherwise a fault would be raised) | |||
Possible Faults | invalidId | If urlId supplied was not found in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
Note: deleteUrl() will also delete it’s price history
Example SOAP request / response (product successfully deleted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:deleteUrlRequest>
<mod:urlId>241251</mod:urlId>
<mod:apiKey>474574357</mod:apiKey>
</mod:deleteUrlRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
getBrands
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | getBrandsRequest | complex | Y | See below for parameters | |
Response | brand | complex | List of BrandType elements | ||
Possible Faults | generalError | General error detected. Refer to error details |
BrandType complex element contains the following elements:
- id – int (brand’s ID in Price2Spy)
- name – String
- active – boolean
- emailRecipient – String (list of emails where price alert notifications are sent, if ‘Split emails by brand’ option is selected in settings)
- dateAdded – datetime (timestamp when the brand was added to Price2Spy)
- dateModified – datetime (timestamp when the brand was modified in Price2Spy)
- addedById – int (ID of user that added the brand into Price2Spy)
- modifedById – int (ID of user that modified the brand in Price2Spy)
1. Example SOAP request / response (get all brands)
Request
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getBrandsRequest>
<sear:apiKey>88a63363e59afa66266ee8aa69a7aacd6b29c29f</sear:apiKey>
</sear:getBrandsRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getBrandsResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:brand>
<ns3:id>435</ns3:id>
<ns3:name>brand name one</ns3:name>
<ns3:active>true</ns3:active>
<ns3:emailRecipient>one@domain.com; two@domain.com</ns3:emailRecipient>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:brand>
<ns3:brand>
<ns3:id>4142</ns3:id>
<ns3:name>brand name two</ns3:name>
<ns3:active>true</ns3:active>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:brand>
</ns3:getBrandsResponse>
</soap:Body>
</soap:Envelope>
insertBrand
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: insert element | Name | String | Y | Must be unique | |
Active | boolean | Y | If False Brand won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Brands within Price2Spy. Please fill in 0 if all Brands will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Brand (if more recipients, use ; as separator) | ||
Response | insertBrandResponse element | int | Y | If insert was successful, this will contain Price2Spy brandID (which needs to be stored in your product DB as well). | |
Possible Faults | brandNameNotUnique | If Brand with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Brand successfully inserted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:insertBrandRequest>
<mod:insert name="MyBrand" active="true" priority="0" emailRecipient="xyz1@email.com;xyz2@email.com"/>
<mod:apiKey>12345678abc</mod:apiKey>
</mod:insertBrandRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body>
<mod:insertBrandResponse>5189</mod:insertBrandResponse>
</soap:Body>
</soap:Envelope>
updateBrand
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: update element | brandId | Int | Y | ID of the brand to be updated | |
Name | String | Y | Must be unique | ||
Active | boolean | Y | If False Brand won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Brands within Price2Spy. Please fill in 0 if all Brands will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Brand (if more recipients, use ; as separator) | ||
Response | updateBrandResponse element | If insert was successful, the response element will be empty – otherwise a Fault will be thrown | |||
Possible Faults | brandNameNotUnique | If Brand with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Brand successfully updated)
Request
- Name
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateBrandRequest>
<mod:update brandId="5789" name="My new Brand Name"/>
<mod:apiKey>1234</mod:apiKey>
</mod:updateBrandRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body/>
</soap:Envelope>
deleteBrand
Element | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request deleteBrandRequest element | brandId | int | Y | This must match brandID in Price2Spy (returned after insertBrand()) | |
Response | deleteBrandResponse | (void) – the presence of this element indicates that deleteBrand() was successfully carried out (otherwise a fault would be raised) | |||
Possible Faults | invalidId | If brandId supplied was not found in Price2Spy | |||
brandNotdeletable | Brand can be deleted only if it has no products associated with it | ||||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (brand successfully deleted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:deleteBrandRequest>
<mod:brandtId>5891</mod:productId>
<mod:apiKey>ddd759c9054a80a45f20e196ab54e089f</mod:apiKey>
</mod:deleteBrandtRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
getCategories
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | getCategoriesRequest | complex | Y | See below for parameters | |
Response | category | complex | List of CategoryType elements | ||
Possible Faults | generalError | General error detected. Refer to error details |
CategoryType complex element contains the following elements:
- id – int (category’s ID in Price2Spy)
- name – String
- active – boolean
- emailRecipient – String (list of emails where price alert notifications are sent, if ‘Split emails by category’ option is selected in settings)
- dateAdded – datetime (timestamp when the category was added to Price2Spy)
- dateModified – datetime (timestamp when the category was modified in Price2Spy)
- addedById – int (ID of user that added the category into Price2Spy)
- modifedById – int (ID of user that modified the category in Price2Spy)
1. Example SOAP request / response (get all categories)
Request
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getCategoriesRequest>
<sear:apiKey>88a63363e59afa66266ee8aa69a7aacd6b29c29f</sear:apiKey>
</sear:getCategoriesRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getCategoriesResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:category>
<ns3:id>848</ns3:id>
<ns3:name>category one</ns3:name>
<ns3:active>true</ns3:active>
<ns3:emailRecipient>one@domain.com; two@domain.com</ns3:emailRecipient>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:category>
<ns3:category>
<ns3:id>86</ns3:id>
<ns3:name>category two</ns3:name>
<ns3:active>true</ns3:active>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:category>
</ns3:getCategoriesResponse>
</soap:Body>
</soap:Envelope>
insertCategory
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: insert element | Name | String | Y | Must be unique | |
Active | boolean | Y | If False Category won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Categories within Price2Spy. Please fill in 0 if all Categories will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Category (if more recipients, use ; as separator) | ||
Response | insertCategoryResponse element | int | Y | If insert was successful, this will contain Price2Spy categoryID (which needs to be stored in your product DB as well). | |
Possible Faults | categoryNameNotUnique | If Category with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Category successfully inserted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:insertCategoryRequest>
<mod:insert name="MyCategory" active="true" priority="0" emailRecipient="xyz1@email.com;xyz2@email.com"/>
<mod:apiKey>12345678abc</mod:apiKey>
</mod:insertCategoryRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body>
<mod:insertCategoryResponse>5189</mod:insertCategoryResponse>
</soap:Body>
</soap:Envelope>
updateCategory
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: update element | categoryId | Int | Y | ID of the category to be updated | |
Name | String | Y | Must be unique | ||
Active | boolean | Y | If False Category won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Categorie within Price2Spy. Please fill in 0 if all Categories will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Category (if more recipients, use ; as separator) | ||
Response | updateCategoryResponse element | If insert was successful, the response element will be empty – otherwise a Fault will be thrown | |||
Possible Faults | categoryNameNotUnique | If Category with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Category successfully updated)
Request
- Name
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateCategoryRequest>
<mod:update categoryId="5789" name="My new Category Name"/>
<mod:apiKey>1234</mod:apiKey>
</mod:updateCategoryRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body/>
</soap:Envelope>
deleteCategory
Element | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request deleteCategoryRequest element | categoryId | int | Y | This must match categoryID in Price2Spy (returned after insertCategory()) | |
Response | deleteCategoryResponse | (void) – the presence of this element indicates that deleteCategory() was successfully carried out (otherwise a fault would be raised) | |||
Possible Faults | invalidId | If categoryId supplied was not found in Price2Spy | |||
categoryNotdeletable | Category can be deleted only if it has no products associated with it | ||||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (category successfully deleted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:deleteCategoryRequest>
<mod:categorytId>5891</mod:productId>
<mod:apiKey>ddd759c9054a80a45f20e196ab54e089f</mod:apiKey>
</mod:deleteCategorytRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
getSuppliers
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | getSuppliersRequest | complex | Y | See below for parameters | |
Response | supplier | complex | List of SupplierType elements | ||
Possible Faults | generalError | General error detected. Refer to error details |
SupplierType complex element contains the following elements:
- id – int (supplier’s ID in Price2Spy)
- name – String
- active – boolean
- emailRecipient – String (list of emails where price alert notifications are sent, if ‘Split emails by supplier’ option is selected in settings)
- dateAdded – datetime (timestamp when the supplier was added to Price2Spy)
- dateModified – datetime (timestamp when the supplier was modified in Price2Spy)
- addedById – int (ID of user that added the supplier into Price2Spy)
- modifedById – int (ID of user that modified the supplier in Price2Spy)
1. Example SOAP request / response (get all suppliers)
Request
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getSuppliersRequest>
<sear:apiKey>88a63363e59afa66266ee8aa69a7aacd6b29c29f</sear:apiKey>
</sear:getSuppliersRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getSuppliersResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:supplier>
<ns3:id>39</ns3:id>
<ns3:name>supplier one</ns3:name>
<ns3:active>true</ns3:active>
<ns3:emailRecipient>one@domain.com; two@domain.com</ns3:emailRecipient>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:supplier>
<ns3:supplier>
<ns3:id>4142</ns3:id>
<ns3:name>supplier two</ns3:name>
<ns3:active>true</ns3:active>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:supplier>
</ns3:getSuppliersResponse>
</soap:Body>
</soap:Envelope>
insertSupplier
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: insert element | Name | String | Y | Must be unique | |
Active | boolean | Y | If False Supplier won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Suppliers within Price2Spy. Please fill in 0 if all Suppliers will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Supplier (if more recipients, use ; as separator) | ||
Response | insertSupplierResponse element | int | Y | If insert was successful, this will contain Price2Spy supplierID (which needs to be stored in your product DB as well). | |
Possible Faults | supplierNameNotUnique | If Supplier with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Supplier successfully inserted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:insertSupplierRequest>
<mod:insert name="MySupplier" active="true" priority="0" emailRecipient="xyz1@email.com;xyz2@email.com"/>
<mod:apiKey>12345678abc</mod:apiKey>
</mod:insertSupplierRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body>
<mod:insertSupplierResponse>5189</mod:insertSupplierResponse>
</soap:Body>
</soap:Envelope>
updateSupplier
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: update element | supplierId | Int | Y | ID of the supplier to be updated | |
Name | String | Y | Must be unique | ||
Active | boolean | Y | If False Supplier won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Suppliers within Price2Spy. Please fill in 0 if all Suppliers will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Supplier (if more recipients, use ; as separator) | ||
Response | updateSupplierResponse element | If insert was successful, the response element will be empty – otherwise a Fault will be thrown | |||
Possible Faults | supplierNameNotUnique | If Supplier with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Supplier successfully updated)
Request
- Name
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateSupplierRequest>
<mod:update supplierId="5789" name="My new Supplier Name"/>
<mod:apiKey>1234</mod:apiKey>
</mod:updateSupplierRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body/>
</soap:Envelope>
deleteSupplier
Element | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request deleteSupplierRequest element | supplierId | int | Y | This must match supplierID in Price2Spy (returned after insertSupplier()) | |
Response | deleteSupplierResponse | (void) – the presence of this element indicates that deleteSupplier() was successfully carried out (otherwise a fault would be raised) | |||
Possible Faults | invalidId | If supplierId supplied was not found in Price2Spy | |||
supplierNotdeletable | Supplier can be deleted only if it has no products associated with it | ||||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (supplier successfully deleted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:deleteSupplierRequest>
<mod:suppliertId>5891</mod:productId>
<mod:apiKey>ddd759c9054a80a45f20e196ab54e089f</mod:apiKey>
</mod:deleteSuppliertRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
getMetadata1
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | getMetadata1Request | complex | Y | See below for parameters | |
Response | metadata1 | complex | List of Metadata1Type elements | ||
Possible Faults | generalError | General error detected. Refer to error details |
Metadata1Type complex element contains the following elements:
- id – int (metadata1 ID in Price2Spy)
- name – String
- active – boolean
- emailRecipient – String (list of emails where price alert notifications are sent, if ‘Split emails by metadata1’ option is selected in settings)
- dateAdded – datetime (timestamp when the metadata1 was added to Price2Spy)
- dateModified – datetime (timestamp when the metadata1 was modified in Price2Spy)
- addedById – int (ID of user that added the metadata1 into Price2Spy)
- modifedById – int (ID of user that modified the metadata1 in Price2Spy)
1. Example SOAP request / response (get all metadata1)
Request
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getMetadata1Request>
<sear:apiKey>88a63363e59afa66266ee8aa69a7aacd6b29c29f</sear:apiKey>
</sear:getMetadata1Request>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getMetadata1Response xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:metadata1>
<ns3:id>39</ns3:id>
<ns3:name>metadata1 name one</ns3:name>
<ns3:active>true</ns3:active>
<ns3:emailRecipient>one@domain.com; two@domain.com</ns3:emailRecipient>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:metadata1>
<ns3:metadata1>
<ns3:id>4142</ns3:id>
<ns3:name>metadata1 name two</ns3:name>
<ns3:active>true</ns3:active>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:metadata1>
</ns3:getMetadata1Response>
</soap:Body>
</soap:Envelope>
insertMetadata1
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: insert element | Name | String | Y | Must be unique | |
Active | boolean | Y | If False Metadata1 won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Metadata1 within Price2Spy. Please fill in 0 if all Metadata1 will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Metadata1 (if more recipients, use ; as separator) | ||
Response | insertMetadata1Response element | int | Y | If insert was successful, this will contain Price2Spy metadata1ID (which needs to be stored in your product DB as well). | |
Possible Faults | metadata1NameNotUnique | If Metadata1 with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Metadata1 successfully inserted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:insertMetadata1Request>
<mod:insert name="MyMetadata1" active="true" priority="0" emailRecipient="xyz1@email.com;xyz2@email.com"/>
<mod:apiKey>12345678abc</mod:apiKey>
</mod:insertMetadata1Request>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body>
<mod:insertMetadata1Response>5189</mod:insertMetadata1Response>
</soap:Body>
</soap:Envelope>
updateMetadata1
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: update element | metadata1Id | Int | Y | ID of the metadata1 to be updated | |
Name | String | Y | Must be unique | ||
Active | boolean | Y | If False Metadata1 won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Metadata1 within Price2Spy. Please fill in 0 if all Metadata1 will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Metadata1 (if more recipients, use ; as separator) | ||
Response | updateMetadata1Response element | If insert was successful, the response element will be empty – otherwise a Fault will be thrown | |||
Possible Faults | metadata1NameNotUnique | If Metadata1 with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Metadata1 successfully updated)
Request
- Name
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateMetadata1Request>
<mod:update metadata1Id="5789" name="My new Metadata1 Name"/>
<mod:apiKey>1234</mod:apiKey>
</mod:updateMetadata1Request>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body/>
</soap:Envelope>
deleteMetadata1
Element | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request deleteMetadata1Request element | metadata1Id | int | Y | This must match metadata1ID in Price2Spy (returned after insertMetadata1()) | |
Response | deleteMetadata1Response | (void) – the presence of this element indicates that deleteMetadata1() was successfully carried out (otherwise a fault would be raised) | |||
Possible Faults | invalidId | If metadata1Id supplied was not found in Price2Spy | |||
metadata1Notdeletable | Metadata1 can be deleted only if it has no products associated with it | ||||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (metadata1 successfully deleted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:deleteMetadata1Request>
<mod:metadata1tId>5891</mod:productId>
<mod:apiKey>ddd759c9054a80a45f20e196ab54e089f</mod:apiKey>
</mod:deleteMetadata1tRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
getMetadata2
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | getMetadata2Request | complex | Y | See below for parameters | |
Response | metadata2 | complex | List of Metadata2Type elements | ||
Possible Faults | generalError | General error detected. Refer to error details |
Metadata2Type complex element contains the following elements:
- id – int (metadata2 ID in Price2Spy)
- name – String
- active – boolean
- emailRecipient – String (list of emails where price alert notifications are sent, if ‘Split emails by metadata2’ option is selected in settings)
- dateAdded – datetime (timestamp when the metadata2 was added to Price2Spy)
- dateModified – datetime (timestamp when the metadata2 was modified in Price2Spy)
- addedById – int (ID of user that added the metadata2 into Price2Spy)
- modifedById – int (ID of user that modified the metadata2 in Price2Spy)
1. Example SOAP request / response (get all metadata2)
Request
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getMetadata2Request>
<sear:apiKey>88a63363e59afa66266ee8aa69a7aacd6b29c29f</sear:apiKey>
</sear:getMetadata2Request>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getMetadata2Response xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:metadata2>
<ns3:id>39</ns3:id>
<ns3:name>metadata2 name one</ns3:name>
<ns3:active>true</ns3:active>
<ns3:emailRecipient>one@domain.com; two@domain.com</ns3:emailRecipient>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:metadata2>
<ns3:metadata2>
<ns3:id>4142</ns3:id>
<ns3:name>metadata2 name two</ns3:name>
<ns3:active>true</ns3:active>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:metadata2>
</ns3:getMetadata2Response>
</soap:Body>
</soap:Envelope>
insertMetadata2
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: insert element | Name | String | Y | Must be unique | |
Active | boolean | Y | If False Metadata2 won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Metadata2 within Price2Spy. Please fill in 0 if all Metadata2 will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Metadata2 (if more recipients, use ; as separator) | ||
Response | insertMetadata2Response element | int | Y | If insert was successful, this will contain Price2Spy metadata2ID (which needs to be stored in your product DB as well). | |
Possible Faults | metadata2NameNotUnique | If Metadata2 with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Metadata2 successfully inserted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:insertMetadata2Request>
<mod:insert name="MyMetadata2" active="true" priority="0" emailRecipient="xyz1@email.com;xyz2@email.com"/>
<mod:apiKey>12345678abc</mod:apiKey>
</mod:insertMetadata2Request>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body>
<mod:insertMetadata2Response>5189</mod:insertMetadata2Response>
</soap:Body>
</soap:Envelope>
updateMetadata2
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: update element | metadata2Id | Int | Y | ID of the metadata2 to be updated | |
Name | String | Y | Must be unique | ||
Active | boolean | Y | If False Metadata2 won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Metadata2 within Price2Spy. Please fill in 0 if all Metadata2 will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Metadata2 (if more recipients, use ; as separator) | ||
Response | updateMetadata2Response element | If insert was successful, the response element will be empty – otherwise a Fault will be thrown | |||
Possible Faults | metadata2NameNotUnique | If Metadata2 with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Metadata2 successfully updated)
Request
- Name
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateMetadata2Request>
<mod:update metadata2Id="5789" name="My new Metadata2 Name"/>
<mod:apiKey>1234</mod:apiKey>
</mod:updateMetadata2Request>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body/>
</soap:Envelope>
deleteMetadata2
Element | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request deleteMetadata2Request element | metadata2Id | int | Y | This must match metadata2ID in Price2Spy (returned after insertMetadata2()) | |
Response | deleteMetadata2Response | (void) – the presence of this element indicates that deleteMetadata2() was successfully carried out (otherwise a fault would be raised) | |||
Possible Faults | invalidId | If metadata2Id supplied was not found in Price2Spy | |||
metadata2Notdeletable | Metadata2 can be deleted only if it has no products associated with it | ||||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (metadata2 successfully deleted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:deleteMetadata2Request>
<mod:metadata2tId>5891</mod:productId>
<mod:apiKey>ddd759c9054a80a45f20e196ab54e089f</mod:apiKey>
</mod:deleteMetadata2tRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
getMetadata3
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request | getMetadata3Request | complex | Y | See below for parameters | |
Response | metadata3 | complex | List of Metadata3Type elements | ||
Possible Faults | generalError | General error detected. Refer to error details |
Metadata3Type complex element contains the following elements:
- id – int (metadata3 ID in Price2Spy)
- name – String
- active – boolean
- emailRecipient – String (list of emails where price alert notifications are sent, if ‘Split emails by metadata3’ option is selected in settings)
- dateAdded – datetime (timestamp when the metadata3 was added to Price2Spy)
- dateModified – datetime (timestamp when the metadata3 was modified in Price2Spy)
- addedById – int (ID of user that added the metadata3 into Price2Spy)
- modifedById – int (ID of user that modified the metadata3 in Price2Spy)
1. Example SOAP request / response (get all metadata3)
Request
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getMetadata3Request>
<sear:apiKey>88a63363e59afa66266ee8aa69a7aacd6b29c29f</sear:apiKey>
</sear:getMetadata3Request>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getMetadata3Response xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:metadata3>
<ns3:id>39</ns3:id>
<ns3:name>metadata3 name one</ns3:name>
<ns3:active>true</ns3:active>
<ns3:emailRecipient>one@domain.com; two@domain.com</ns3:emailRecipient>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:metadata3>
<ns3:metadata3>
<ns3:id>4142</ns3:id>
<ns3:name>metadata3 name two</ns3:name>
<ns3:active>true</ns3:active>
<ns3:dateAdded>2019-02-14T09:52:38+01:00</ns3:dateAdded>
<ns3:dateModified>2019-02-14T10:02:54+01:00</ns3:dateAdded>
<ns3:addedById>1234</ns3:addedById>
<ns3:modifiedById>1234</ns3:modifiedById>
</ns3:metadata3>
</ns3:getMetadata3Response>
</soap:Body>
</soap:Envelope>
insertMetadata3
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: insert element | Name | String | Y | Must be unique | |
Active | boolean | Y | If False Metadata3 won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Metadata3 within Price2Spy. Please fill in 0 if all Metadata3 will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Metadata3 (if more recipients, use ; as separator) | ||
Response | insertMetadata3Response element | int | Y | If insert was successful, this will contain Price2Spy metadata3ID (which needs to be stored in your product DB as well). | |
Possible Faults | metadata3NameNotUnique | If Metadata3 with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Metadata3 successfully inserted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:insertMetadata3Request>
<mod:insert name="MyMetadata3" active="true" priority="0" emailRecipient="xyz1@email.com;xyz2@email.com"/>
<mod:apiKey>12345678abc</mod:apiKey>
</mod:insertMetadata3Request>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body>
<mod:insertMetadata3Response>5189</mod:insertMetadata3Response>
</soap:Body>
</soap:Envelope>
updateMetadata3
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request: update element | metadata3Id | Int | Y | ID of the metadata3 to be updated | |
Name | String | Y | Must be unique | ||
Active | boolean | Y | If False Metadata3 won’t be offered in Price2Spy filters | ||
Priority | Int | Y | Defines the display order of Metadata3 within Price2Spy. Please fill in 0 if all Metadata3 will have same priority (display order will be alphabetical in that case) | ||
emailRecipient | String | N | List of price change alert recipients for given Metadata3 (if more recipients, use ; as separator) | ||
Response | updateMetadata3Response element | If insert was successful, the response element will be empty – otherwise a Fault will be thrown | |||
Possible Faults | metadata3NameNotUnique | If Metadata3 with same name already exists in Price2Spy | |||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (Metadata3 successfully updated)
Request
- Name
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:updateMetadata3Request>
<mod:update metadata3Id="5789" name="My new Metadata3 Name"/>
<mod:apiKey>1234</mod:apiKey>
</mod:updateMetadata3Request>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soap:Body/>
</soap:Envelope>
deleteMetadata3
Element | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Request deleteMetadata3Request element | metadata3Id | int | Y | This must match metadata3ID in Price2Spy (returned after insertMetadata3()) | |
Response | deleteMetadata3Response | (void) – the presence of this element indicates that deleteMetadata3() was successfully carried out (otherwise a fault would be raised) | |||
Possible Faults | invalidId | If metadata3Id supplied was not found in Price2Spy | |||
metadata3Notdeletable | Metadata3 can be deleted only if it has no products associated with it | ||||
dataValidationError | An error detected with your data. Refer to error details | ||||
generalError | General error detected. Refer to error details |
1. Example SOAP request / response (metadata3 successfully deleted)
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mod="http://www.price2spy.com/api/modify">
<soapenv:Header/>
<soapenv:Body>
<mod:deleteMetadata3Request>
<mod:metadata3tId>5891</mod:productId>
<mod:apiKey>ddd759c9054a80a45f20e196ab54e089f</mod:apiKey>
</mod:deleteMetadata3tRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body/>
</soap:Envelope>
getMeasurements
Attribute | Type | Req | Default | Notes | |
---|---|---|---|---|---|
Requestsearch element | urlId | long | Y | urlId from Price2Spy | |
dateCheckedFrom | datetime | N | Get measurements which occurred only after this date | ||
dateCheckedTo | datetime | N | Get measurements which occurred only before this date | ||
Response | List of measurement elements | complex | List of measurementType elements | ||
Possible Faults | generalError | General error detected. Refer to error details |
This operation returns all price checks (measurements) for given urlId.
See above for measurementType definition
1. Example SOAP request / response (search for all price checks for given URL)
Request
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.price2spy.com/api/search">
<soapenv:Header/>
<soapenv:Body>
<sear:getMeasurementsRequest>
<sear:search urlId="45836"/>
<sear:apiKey>ddd759c9054a80a45fb54e089f</sear:apiKey>
</sear:getMeasurementsRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:getMeasurementsResponse xmlns="http://www.price2spy.com/api/modify" xmlns:ns2="http://www.price2spy.com/api/fault" xmlns:ns3="http://www.price2spy.com/api/search">
<ns3:measurement>
<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:measurement>
<ns3:measurement>
<ns3:dateChecked>2012-09-19T18:20:00.390+02:00</ns3:dateChecked>
<ns3:price>
<ns3:amount>208.53</ns3:amount>
<ns3:currency>AUD</ns3:currency>
</ns3:price>
<ns3:available>true</ns3:available>
<ns3:screenshotUrl>https://screenshots.price2spy.com/379/53982227-a5g8-420c-a12de415333a0ed8.png</ns3:screenshotUrl>
</ns3:measurement>
...
...
</ns3:getMeasurementsResponse>
</soap:Body>
</soap:Envelope>
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:
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
- 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>
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>
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)
3. Example SOAP request / response (search for all URLs
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>
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>
rejectAutomatchUrl
This operation will disapprove AutoMatched URL (in other words, it will be marked as a 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>
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>