Working with external APIs
Mechanic is an event-driven platform. This means that all data used by Mechanic needs to arrive in the form of an event. (The only exception here is Shopify itself: see Interacting with Shopify).
To create events using third-party data, use one of these techniques:
- Use the HTTP action to request the data you require, subscribing to mechanic/actions/perform to actually use the downloaded data.
- Use Couchdrop's Shared Links feature with an external FTP server or other cloud storage provider, to make any file available via a secret URL. Then, use the HTTP action to request that data.
- Use inbound email to deliver your data to Mechanic, either in the message body or as an attachment. See Receiving email.
- Use the HTTP action, using standard HTTP requests, with options for authenticating with custom headers.
- Use a cache endpoint to save your data to an unguessable URL, where an external service may download it.