General Information

LOOK4Optics provides a central hub for B2B electronic data exchange between eye-care professionals, suppliers and service providers in the consumer optics industry.

For the core business documents like catalogs, orders, shipping notifications etc., we use the SPECTARIS industry association formats. Please see the SPECTARIS formats documentation for more details.

Environments

Testing

Please use this environment for development and testing. E.g. orders created in this environment will not be fulfilled by suppliers (although order responses, shipping notes etc. might be sent by some suppliers to provide a full simulation experience). Also, updates to our API platform will be released to this environment first, and suppliers can use it as a staging platform for new catalogs and EDI integration.

The API testing environment is connected to the testing environments of the LOOK4Optics Portal and LOOK4 ID.

Base URL:https://api-test.look4optics.com

Production

The API production environment is connected to the production environment of the LOOK4Optics Portal and LOOK4 ID.

Base URL:https://api.look4optics.com

OpenAPI and Swagger UI

Swagger UI allows to interact with this API without having an implementation in place. It’s automatically generated from our OpenAPI (formerly known as Swagger) 3.0 specification, with the visual documentation making it easy for back-end implementation and client-side consumption.

To perform operations that require authentication, click the “Authorize” button first. You will be redirected to the LOOK4 ID v2 login form and asked for permission for the Swagger UI client. Please note that you can use Swagger UI only with a LOOK4 Optics user account; you cannot test e.g. custom federation scenarios using the interactive Swagger UI.

Please note that our current for generating the OpenAPI specification only covers the JSON encoded requests and responses. Therefore, it’s currently not possible to use XML requests and responses in the interactive Swagger UI.

Swagger UI URL for our test environment:

Authentication

Most endpoints require authentication based on OAuth (“bearer”) tokens via our LOOK4 ID single-sign-on service. Please see the LOOK4 ID v2 documentation for more details on the concept and how to get access tokens.

To make an authenticated request, add a HTTP header to your request like this:

Authorization: Bearer <your current access token>

OAuth Scopes

See the LOOK4 ID documentation for how to request scopes and a list of standard OAuth/OIDC scopes available in addition to the scopes described here.

Scopes relevant for actions performed on behalf of eye care professionals:

  • l4o.catalogs.read
  • l4o.clientreports.readwrite (for documents sent from customers to suppliers like SalesReport or InventoryReport documents)
  • l4o.invoices.read
  • l4o.orders.create
  • l4o.orders.read
  • l4o.orders.read.sameclient (limiting access to order-related data to orders submitted by the same client)
  • l4o.supplierreg.read
  • l4o.supplierreg.readwrite
  • l4o.supplierreports.read (for documents sent from suppliers to customers)

Additional scopes relevant for actions performed on behalf of suppliers:

  • l4o.clientreports.read (for documents sent from customers to suppliers like SalesReport or InventoryReport documents)
  • l4o.content.read
  • l4o.content.readwrite
  • l4o.customers.read
  • l4o.customers.readwrite
  • l4o.orders.readwrite
  • l4o.supplierreports.readwrite (for documents sent from suppliers to customers)
  • l4o.invoices.readwrite

HTTP Compression

Activating compression in your HTTP client library can significantly speed up interactions with our API.

XML and JSON responses will be compressed to 5-10% of their original size if your client is configured to accept gzip or deflate encoding.

Error Handling

See Error Handling for how the Problem Details standard is used to provide additional information for rejected requests.