Put topics about this connector package here.
Always check the ‘How to use the Alumio connector packages’ topic.
System documentation: Introduction to the Magento 1.x REST API
Connector package documentation
Table of Contents
1. Setting up HTTP Client Magento 1
- 1.1 Steps
2. Subscribing to entities from Magento 1
- 2.1 Steps
- 2.2 General concept
3. Publishing entity to Magento 1
- 3.1 Steps
- 3.2 General concept
1. Setting up HTTP Client Magento 1
- In Alumio Dashboard, go to Clients → HTTP Clients. Create a new HTTP Client and select Magento 1 Client as the prototype of the HTTP Client.
- Fill in the Base URL and API key.
- You can optionally enable logging of request to get the log of the authentication.
- Click on Grant access to Magento 1 to get the Key.
- Save the HTTP Client after the key has been provided.
2. Subscribing to Entities from Magento 1
- Go to Connections → Incoming, create a new incoming configuration and select the Magento 1 Subscriber as the subscriber.
- Select the entity you want to subscribe to from Magento 1.
- Add any request parameters needed to subscribe to the entity (optional).
- You can optionally add a transformer to manipulate the request parameters into something you need.
- Select the Magento 1 HTTP Client to use.
- You could also enable pagination to allow Alumio to fetch paginated entities.
2.2 General Concept
We follow the Magento 1 API documentation on building this connector, so you can easily use the connector based on the official Magento 1 API Reference.
This is the entity you want to subscribe to from Magento 1. Please refer to the entities in Management APIs from the Magento 1 API Reference page.
These are the additional parameters you can provide with the API request, to get the needed entities based on the Magento 1 API reference.
Please look at the example below on how to fill the Request Parameters field when subscribing to Get Customer by customer_id entity. We can see in the documentation that there are some parameter values in path URL such as customer_id.
We only set values below on the request parameter below.
We structured the path to include the customer_Id. This will be sent to Magento 1 as /customers/1
Note: we convert all paths to snake_case for uniformity.
Any transformers set here will be executed after the Request Parameters are loaded. You can add any transformer to provide and manipulate the request parameters into anything you need, either as path parameters and/or as query parameters of an entity.
This is the HTTP Client configuration you will use to access Magento 1.
3. Publishing Entity to Magento 1
- Go to Connections → Outgoing, create a new outgoing configuration, and select Magento 1 Publisher as the publisher.
- Select the method that you want the publisher to use with the data.
- Choose the Magento 1 entity to which you would like to publish the data.
- Select the HTTP Client to use.
3.2 General Concept
Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration), though you can also add or modify payload using the Request Transformer.
Currently, we support POST, PUT, and DELETE methods for submitting data to Magento 1.
We support publishing to most Magento 1 endpoints. Please refer to the Magento 1 API Reference page. Based on the documentation, some endpoints may need one or more path parameters.
For example, using the Create Customer endpoint.
You can put the payload you want to send to Magento 1 into the payload property in the data.
And below is an example of a payload in the publisher:
Alumio will send an API request to Magento 1 with URL /customers
The HTTP Client configuration you will use to access Magento 1.