About the TradeByte category

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

Extra information

System documentation: TB.One REST API Reference

Connector package documentation

​​Table of Contents

  • 1. Setting up HTTP Client Tradebyte
    • 1.1 Steps
  • 2. Subscribing to entities from Tradebyte
    • 2.1 Steps
    • 2.2 General concept
  • 3. Publishing entity to Tradebyte
    • 3.1 Steps
    • 3.2 General concept

1. Setting up HTTP Client Tradebyte

1.1 Steps

  1. Follow the instructions on Generate REST API credentials in TB.One – TB.IO by Tradebyte.com page to get the REST API credentials.
  2. In Alumio Dashboard, go to Clients → HTTP Clients. Create a new HTTP Client and select Tradebyte HTTP Client as the prototype of the HTTP Client.
  3. Fill in the Base URI, Merchant ID, Username and Password of the credential you set on Tradebyte.
  4. You can optionally enable logging of request to get the log of the authentication.
  5. Save the HTTP Client.

2. Subscribing to Entities from Tradebyte

2.1 Steps

  1. Go to Connections → Incoming and create a new incoming configuration and select Tradebyte Subscriber as the subscriber.
  2. Select the entity you want to subscribe to from Tradebyte.
  3. Add any request parameters needed to subscribe to the entity (optional, but path and query properties should exist, you can leave them as empty objects).
  4. You can optionally add a transformer to transform the request parameters into something you need.
  5. Select the Tradebyte HTTP Client to use.

2.2 General Concept

We follow the Tradebyte documentation on building this connector, so you can easily use the connector based on the Tradebyte API Reference.

Entity

It’s the entity you want to subscribe from the Tradebyte. Please refer to the entities in the Tradebyte API Reference page.

Request Parameters

It’s the parameters you can provide to get the needed entity based on the Tradebyte API Reference. Please look at the example below on how to fill Request Parameters field when subscribing Single order entity.

image

It means that we want to subscribe to an order with ID 1234567, and we want to use tborder transfer format. We can see in the documentation that a single order entity requires orderId as a path parameter to define which order we want to fetch.

That’s why we need to define the orderId property inside path property in the Request Parameters field. The properties inside query parameters (in this example is mode) will be parsed as query parameters.
The final URL that will be called is /orders/1234567?mode=tborder

Input Transformer

Any transformer’s set here will be executed after the Request Parameters loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of an entity.

HTTP Client

It’s the HTTP Client configuration you will use to access Tradebyte.

3. Publishing Entity to Tradebyte

3.1 Steps

  1. Go to Connections → Outgoing, create a new outgoing configuration and select Tradebyte Publisher as the publisher.
  2. Select the action that you want the publisher to do with the data.
  3. 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).

Action

Currently we support these actions:

  • Send TB.Cat product-catalogue
  • Send an order
  • Mark order as processed
  • Send messages about order-status changes
  • Mark message as exported
  • Mark message as processed
  • Send information on article stock

Please refer to the Tradebyte API Reference page. Based on the documentation, some actions may need one or more path parameters.

For actions that don’t require payload on the request body, please look at this example. For example, we want to mark a message as processed. Please select “Mark message as processed” as the action of the publisher.

The documentation says that we need messageId as path parameters. In that case, you need to provide messageId property inside the path property in the data, either as an output from Routes or output from Transformers in Outgoing Configuration. Here is an example of the required data.

image

Alumio will send an API request to Tradebyte with URL /messages/5678/processed?channel=1234 and the body will be empty.

For actions that require us to put payload into the request (TB.One REST API Reference), you can just put the data into payload property like below example.

image

Alumio will send an API request to Tradebyte with URL /articles/stock with below request body.

image

HTTP Client

It’s the HTTP Client configuration you will use to access Tradebyte.