Operations on Catalogs¶
Catalog Infos (Suppliers and Catalogs Listing)¶
Returns a list of suppliers and their electronic product catalogs, and some meta data for catalogs and their audience and content, like language, countries, and article types.
A version number and the timestamp of the last change allow clients to check whether new catalog updates are available.
Includes ready-to-use download links for catalogs and barcode lists.
Request¶
Syntax¶
GET /v2/catalogs Accept: <application/xml or application/json> Authorization: Bearer <your current access token>
Response¶
Response Elements¶
Suppliers:
supplierID: | Unique identifier for the supplier. |
---|---|
name: | Supplier company name. |
look4opticsUrl: | Link to the supplier’s profile page in the LOOK4 Optics portal. |
Catalogs:
catalogID: | Catalog identifier. Globally unique in combination with supplierID . |
---|---|
CatalogName: | Catalog display name. |
catalogLanguage: | |
ISO 639-1 two-letter language code, representing the language of the catalog, e.g. en or de . |
|
versionID: | Version number in the Look4 Optics - version administration (e.g. 4). |
versionTimestamp: | |
Date and time of when the current catalog version was uploaded. | |
validCountries: | List of the countries to which this catalog applies.
Countries are represented ISO 3166-1 two-letter country codes, e.g. UK or DE . |
validStartDate: | Date since when the catalog is valid. |
validEndDate: | Date until when the catalog is valid. |
Authentication¶
Anonymous requests are allowed, but some request parameters and response details are only available for authenticated requests. These are marked as “Only for authenticated requests” in our interactive OpenAPI/Swagger documentation.
Example¶
Request¶
GET /v2/catalogs Accept: application/xml
Response¶
<CatalogInfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Supplier supplierID="DE813058544" name1="Wöhlk-Contact-Linsen GmbH" look4opticsUrl="http://test.look4optics.de/Firma/Index.aspx?companyID=26"> <CatalogInfo catalogID="catalog_de_de.xml" catalogName="Wöhlk DE" catalogLanguage="de" contentType="application/vnd.spectaris.catalog+xml; version=1.13" versionID="1198" versionTimestamp="2018-12-07T11:20:49.33" _downloadCatalogUrl="/v2/catalogs/DE813058544/catalog_de_de.xml" _downloadBarcodeListUrl="/v2/catalogs/DE813058544/catalog_de_de.xml/barcodelist"> <ValidCountries> <ValidCountry>DE</ValidCountry> <ValidCountry>LU</ValidCountry> </ValidCountries> <ArticleTypes> <ArticleType>contactlenses</ArticleType> <ArticleType>care</ArticleType> <ArticleType>advertisingMedium</ArticleType> <ArticleType>accessory</ArticleType> </ArticleTypes> </CatalogInfo> </Supplier> <Supplier supplierID="DE813122224" name1="CooperVision GmbH" look4opticsUrl="http://test.look4optics.de/Firma/Index.aspx?companyID=51"> <CatalogInfo catalogID="catalog.xml" catalogName="CooperVision DE" catalogLanguage="de" contentType="application/vnd.spectaris.catalog+xml; version=1.13" versionID="838" versionTimestamp="2019-03-14T10:50:29.593" _downloadCatalogUrl="/v2/catalogs/DE813122224/catalog.xml" _downloadBarcodeListUrl="/v2/catalogs/DE813122224/catalog.xml/barcodelist"> <ValidCountries> <ValidCountry>DE</ValidCountry> <ValidCountry>AT</ValidCountry> </ValidCountries> <ArticleTypes> <ArticleType>contactlenses</ArticleType> <ArticleType>accessory</ArticleType> <ArticleType>care</ArticleType> </ArticleTypes> </CatalogInfo> <CatalogInfo catalogID="catalog_ch.xml" catalogName="CooperVision CH" catalogLanguage="de" contentType="application/vnd.spectaris.catalog+xml; version=1.13" versionID="110" versionTimestamp="2019-02-01T08:38:25.903" _downloadCatalogUrl="/v2/catalogs/DE813122224/catalog_ch.xml" _downloadBarcodeListUrl="/v2/catalogs/DE813122224/catalog_ch.xml/barcodelist"> <ValidCountries> <ValidCountry>CH</ValidCountry> </ValidCountries> <ArticleTypes> <ArticleType>care</ArticleType> <ArticleType>contactlenses</ArticleType> <ArticleType>accessory</ArticleType> </ArticleTypes> </CatalogInfo> </Supplier> </CatalogInfos>
OpenAPI Interactive Documentation¶
For more details and interactive examples, and a documentation and examples of JSON formatted responses, please refer to our interactive OpenAPI/Swagger documentation for /v2/catalogs. Please note that this tool currently cannot correctly show the optional XML representation of the response.
Catalog Download¶
Returns the requested product catalog.
Currently, LOOK4 Optics is distributing only catalogs in the SPECTARIS catalog format.
Request¶
Please note that you can extract the read-to-use download URL
from the Catalog Information response (_downloadCatalogUrl
).
Syntax¶
GET /v2/catalogs/<supplierID>/<catalogID>?clientGroupID=<optional client group ID 1> Accept: application/vnd.spectaris.catalog+xml Authorization: Bearer <your current access token>
Parameters¶
supplierID (mandatory): | |
---|---|
supplierID as provided by the catalog information response. |
|
catalogID (mandatory): | |
catalogID as provided by the catalog information response. |
|
clientGroupID (optional): | |
Optional filter to exclude all articles from the downloaded catalog that are not assigned to the specified client group. If you append this URL argument multiple times, filter values will be ORed. |
Response¶
The content type of the response will be
application/vnd.spectaris.catalog+xml; version=<schema version>
.
A Content-Disposition
header of type attachment
, including a meaningful file name, will be provided,
for better usability in interactive download scenarios.
For the response body, please refer to the SPECTARIS catalog format documentation.
Authentication¶
Anonymous requests and requests by users without a customer registration for the supplier will be answered with a “public” or “standard” catalog, i.e. it will contain only articles available to everyone (customer group “0”), and no prices.
Authenticated requests will be answered with an individual catalog, including prices, all standard articles, and articles available only to the user’s customer groups, including private label articles.
OpenAPI Interactive Documentation¶
For more details and interactive examples, please refer to our interactive OpenAPI/Swagger documentation for /v2/catalogs/{supplierID}/{catalogID}.
Barcode List Download¶
For some SPECTARIS catalogs, especially for contact lenses, suppliers provide an additional XML document called “barcode list”.
These lists map GTIN/EAN/UPC codes to article IDs and configurations. Please refer to the SPECTARIS BarcodeList document type documentation for more details on the structure of this document type.
Please note that catalogs for frames and sunglasses usually contain GTIN/EAN/UPC codes as article features within the catalog.
The barcode list download URL can be extracted from the Catalog Information response, if a barcode list is available.
Request¶
Please note that you can extract the read-to-use download URL
from the Catalog Information response (_downloadBarcodeListUrl
)
if a barcode list exists for the catalog.
Syntax¶
GET /v2/catalogs/<supplierID>/<catalogID>/barcodelist?clientGroupID=<optional client group ID 1> Accept: application/vnd.spectaris.barcodelist+xml Authorization: Bearer <your current access token>
Parameters¶
supplierID (mandatory): | |
---|---|
supplierID as provided by the catalog information response. |
|
catalogID (mandatory): | |
catalogID as provided by the catalog information response. |
|
clientGroupID (optional): | |
Optional filter to exclude all articles/configurations from the downloaded barcode list that are not assigned to the specified client group. If you append this URL argument multiple times, filter values will be ORed. |
Response¶
The content type of the response will be
application/vnd.spectaris.barcodelist+xml; version=<schema version>
.
A Content-Disposition
header of type attachment
, including a meaningful file name, will be provided,
for better usability in interactive download scenarios.
For the response body, please refer to the SPECTARIS BarcodeList documentation.
Authentication¶
Anonymous requests and requests by users without a customer registration for the supplier will be answered with a “public” or “standard” list, i.e. it will contain only articles available to everyone (customer group “0”).
Authenticated requests will be answered with an individual list: all standard articles in addition to articles available only to the user’s customer groups, including private label articles.
OpenAPI Interactive Documentation¶
For more details and interactive examples, please refer to our interactive OpenAPI/Swagger documentation for /v2/catalogs/{supplierID}/{catalogID}.