Catalog Web services¶
Two Web services for downloading of electronic product catalogs exist in Look4 Optics:
while getCatalogInfo
returns a list of all available catalogs, they can be
downloaded with the Web service getSubCatalog
.
Update request: getCatalogInfos¶
The function getCatalogInfos
returns an XML document with all current catalogs and
its revision number. This Webservice can be used with or without a ticket. To display
all available catalogs this Web service requires no parameter or authentication.
If a ticket is specified only the catalogs will be displayed for which the user is yet
registered.
As of release 1.1, additional parameters are returned to meet the requirements for
international use.
The Webservice returns the following standard information¶
CatalogName: | Description of the catalog (e.g. Johnson & Johnson UK). |
---|---|
CatalogID: | Describes the catalog variant. At German catalogs=catalog.xml, at foreign catalogs the ISO country code will be added (e.g. catalog_uk.xml). This parameter is required for the download query. |
ResourceKey: | Old parameter that is transitional still listed /e.g. catalog.xml). Replaced by CatalogID. |
RevisionNumber: | Version number in the Look4 Optics - version administration (e.g. 4). |
RevisionComment: | |
Comment on the version (e.g. First productive version). | |
RevisionDateTime: | |
Date of publication of the version (e.g. 2014-05-04T11:25:24.673). | |
CatalogLanguage: | |
Language of the catalog (e.g. en). | |
ValidCountries: | List of the countries to which this catalog applies (e.g. <ValidCountry>UK</ValidCountry>). |
ValidStartDate: | Date since when the catalog is valid (e.g. 05.04.2012). |
ValidEndDate: | Date until when the catalog is valid (e.g. 31.12.2019). |
ClientID: | Customer no. with which the catalog has been registered (only returned when placed with ticket). The main customer number is displayed in the Company line. |
SubscriptionStatus: | |
Subscription status (only returned when placed with ticket). | |
ProductGroups: | All product groups included in the catalog will be listed here. |
Parameter (optional):
validCountry: | If this optional parameter is set, only catalogs available for the specific country are returned. |
---|---|
productGroups: | If this optional parameter is set, only catalogs containing the specified product groups are returned. |
webServices: | If this optional parameter is set, all Webservices provided by the supplier are returned with the corresponding URLs (e.g. ordering, order tracking, ASN). |
Request without ticket (all available catalogs are displayed)¶
Productive URL: | https://www.look4optics.de/CatalogService/getCatalogInfos.ashx
|
---|---|
Test URL: | http://test.look4optics.de/CatalogService/getCatalogInfos.ashx
|
Type: | HTTP-Service |
Example¶
GET http://www.look4optics.de//catalogservice/getcataloginfos.ashx?webServices&productgroups=frames;sunglasses& validCountry=DE
Response¶
<CatalogInfos> <Company companyID="8079" supplierID="DE812671943" name1="BoDe Design Vertriebs GmbH & Co. KG" name2="" clientID="987654" look4opticsUrl="http://www.look4optics.de/Firma/Index.aspx?companyID=8079"> <CatalogInfo> <CatalogName>BoDe Design Vertriebs GmbH & Co. KG</CatalogName> <CatalogID>catalog_de_de.xml</CatalogID> <ResourceKey>catalog_de_de.xml</ResourceKey> <RevisionNumber>18</RevisionNumber> <RevisionComment>Katalog20180302</RevisionComment> <RevisionDateTime>2018-03-02T10:52:23.25</RevisionDateTime> <CatalogLanguage>de</CatalogLanguage> <CatalogFormat>SPECTARIS</CatalogFormat> <CatalogFormatVersion>1_13</CatalogFormatVersion> <ValidCountries><ValidCountry>DE</ValidCountry></ValidCountries> <ValidStartDate>30.10.2017</ValidStartDate> <ClientID>987654</ClientID> <SubscriptionStatus>Subscribed</SubscriptionStatus> <ProductGroups><ProductGroup>sunglasses</ProductGroup> <ProductGroup>frames</ProductGroup></ProductGroups> </CatalogInfo> <WebServices> <WebService webServiceType="PlaceOrder" webServiceName="PlaceOrder" webServiceURL="http://www.look4optics.de/OrderService/PlaceOrder.ashx" webServicePriority="1" /> <WebService webServiceType="OrderResponse" webServiceName="GetOrderStatus" webServiceURL="http://www.look4optics.de/OrderService/GetOrderStatus.ashx" webServicePriority="1" /> <WebService webServiceType="OrderConfig" webServiceName="OrderConfigurator" webServiceURL="http://www.look4optics.de/OrderService/ArticleConfigurator.aspx" webServicePriority="1" /> <WebService webServiceType="ASN" webServiceName="getAsn" webServiceURL="http://www.look4optics.de/OrderService/getAsn.aspx" webServicePriority="1" /> </WebServices> </Company> <!-- ... --> </CatalogInfos>
Request with ticket (only the catalogs are displayed for which the user is registered)¶
Produktiv-URL: | https://www.look4optics.de/catalogservice/getcataloginfos.ashx?ticket=efe1cc4c-820e-4756-ade2-2aa46385eb6f
|
---|---|
Test-URL: | http://test.look4optics.de/CatalogService/getCatalogInfos.ashx?ticket=efe1cc4c-820e-4756-ade2-2aa46385eb6f
|
Typ: | HTTP-Service |
Example¶
GET https://www.look4optics.de/catalogservice/getcataloginfos.ashx?ticket=efe1cc4c-820e-4756-ade2-2aa46385eb6f
Download request: getSubCatalog¶
The Web service getSubCatalog
generates for a specific user a sub catalog. This
catalog contains only those articles that are available for the user. For each article a start
and end date can be set that has to be taken into account when importing. For authentication
of the user a valid ticket has to be passed. This can be created via the Web services of the
Look4 ID service, for example using the function SilentLogin
. For more
information see the documentation of the Look4 ID service.
Alternatively the ticket can be omitted. If this parameter is missing, only items with the customer group ‘0’ are generated in the sub-catalog, i.e. the standard catalog. In addition, the purchase price is also set to ‘0’ for all articles. Currently, this option is only available for German catalogs.
There are some companies (such as Alcon, MGP&E, CooperVision, Wöhlk) with ‘White Label’-articles that are sold by the opticians under the custom names (Private Labels). In the master catalog therefore is a generic term. The client-specific article name will however automatically be entered when downloading the sub catalog. Special feature of downloading the sub catalog via the Look4 Optics Web service is that always the standard articles are included in the catalog regardless of whether the standard articles customer group is assigned to the respective customer or not.
Request¶
Productive URL: | https://www.look4optics.de/CatalogService/getSubCatalog.ashx
|
---|---|
Test URL: | http://test.look4optics.de/CatalogService/getSubCatalog.ashx
|
Parameter (all fields are mandatory):
ticket: | Current ticket of the user who wants to download a catalog, generated by the Look4 ID Service |
---|---|
companyID: | Database ID of the company from which you want to download the catalog
(XPath in getCatalogInfo: /CatalogInfos/Company[@databaseID] ) |
catalogResourceKey: | |
Key for the identification of the catalog resource
(XPath in getCatalogInfo: /CatalogInfos/Company/CatalogInfo/ResourceKey ) |
|
revision: | Revision number of the catalog, also allows the download of older revisions.
(XPath in getCatalogInfo: /CatalogInfos/Company/CatalogInfo/RevisionNumber ) |
Parameter (optional):
clientGroupID: | If this optional parameter is set, only the client groups defined in the parameter clientGroupID are displayed in the catalog |
---|
Example request¶
GET https://www.look4optics.de/CatalogService/getSubCatalog.ashx?ticket=333a3b25-a53c-4338-bac7-47a12b5956cb&companyID=1& catalogResourceKey=catalog.xml&revision=2&clientGroupID=20
Response¶
If all passed parameters are correct a product catalog is directly returned as an XML file. Otherwise a status code >= 400 is returned. The body of the response will contain the error message.
Status code | Mime Type | Body | Comment |
---|---|---|---|
200 | text/xml | Catalog as XML | Catalog can be downloaded successfully |
400 | text/plain | Error | Request error, for example: missing or incorrect CGI parameters |
401 | text/plain | Error | Authorization failure, for example: expired ticket, missing customer link |
403 | text/plain | Error | Other errors, such as catalog revision not released, user inactive in shop service |