About the Magento 1 category

Add topics about this connector package here.
Always check the ‘How to use the Alumio connector packages’ topic.

Extra information

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

1.1 Steps

  1. In the Alumio Dashboard, go to Clients → HTTP Clients. Create a new HTTP Client and select the Magento 1 Client as the prototype of the HTTP Client.
  2. Fill in the Base URL and API key.
  3. You can optionally enable the logging of the request to get the log of the authentication.
  4. Click on “Grant access to Magento 1” to get the Key.
  5. Save the HTTP Client after the key has been provided.

2. Subscribing to Entities from Magento 1

2.1 Steps

  1. Go to Connections → Incoming, create a new incoming configuration and select the Magento 1 Subscriber as the subscriber.
  2. Select the entity you want to subscribe to from Magento 1.
  3. Add any request parameters needed to subscribe to the entity (optional).
  4. You can optionally add a transformer to manipulate the request parameters into something you need.
  5. Select the Magento 1 HTTP Client to use.
  6. 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.

Entity

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.

Request Parameters

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.

  • “Path” is the path parameter of the url. For example the {id}.
  • “Query” is a defined set of parameters attached to the end of a url.
    Example: www.url.com?type=true&start=0

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.

Input Transformer

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.

HTTP Client

This is the HTTP Client configuration you will use to access Magento 1.

3. Publishing Entity to Magento 1

3.1 Steps

  1. Go to Connections → Outgoing, create a new outgoing configuration, and select Magento 1 Publisher as the publisher.
  2. Select the method that you want the publisher to use with the data.
  3. Choose the Magento 1 entity to which you would like to publish the data.
  4. 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 originates from the data (from routes, from transformers in outgoing configurations), though you can also add or modify the payload using the Request Transformer.

Method

Currently, we support POST, PUT, and DELETE methods for submitting data to Magento 1.

Entity

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.

Here’s an example of a payload in the publisher:

image

  • “Path” is the path parameter of the url. For example the {id}.
  • “Query” is defined set of parameters attached to the end of a url.
    Example: www.url.com?type=true&start=0
  • “Payload” is the data contained within a request.

Alumio will send an API request to Magento 1 with URL /customers

HTTP Client

This refers to the HTTP Client configuration you will use to access Magento 1.