IMPORTANT NOTE: Creating a project that interacts with the API is solely the responsibility of the Author. The API is an open source and as such, may change without notice. The API, by its nature, directly modifies data contained with your Storefront, as such it is advisable that API development is tested against a non-production/pre-production storefront.
Catfish API is a robust and open source RESTful API that allows 3rd party or internal processes to interact with your Storefront.
Some common scenarios of API Use are as follows:
- Creating single sign on (SSO) solution from a third party website
- Allowing orders from an external system to be reflected in Catfish
- Allowing orders from Catfish to be reflected back to an external system
- Lights out ordering of materials
- Utilizing MegaEdit outside of the Catfish user web site.
Follow this link http://api.islcatfish.com/docs for the technical references on the different endpoints, classes and methods that can be used.
Sample Project and Code
We've built a demo site to show you some basics on how the API might be used. The demo shows the scenario of reading from a storefront and displaying that information in an external site. It also allows the user to load the editor, add to the basket, ...
You can find that site here: http://api.islcatfish.com/
In addition, if you have familiarity with .NET you can download the source for that site here: https://www.dropbox.com/s/b4iirp7tp31l3h4/CatfishDemoStore.zip?dl=0
To start with making a simple read only connection to printlocation to retrieve your storefronts printlocations is great place to make sure you have the simplest things correct. Like URL and the authentication key.
Creating Authentication Tokens
NOTE: YOU MUST REQUEST THIS FROM SUPPORT! LEAVING Instructions for future
These are specific to your storefront. There are not platform level API calls
Click Add New, give it proper name, select print location (which can be anything because Print Location is for Catfish Sync calls), and leave trans log unchecked.
Create a test from Postman: Get Print Locations
GET /[yourstorefront]/services/api/printlocation HTTP/1.1
Authorization: Basic [KEY FROM your STOREFRONT] (would be in the red block in the screen shot)
Postman-Token: [from postman]