About the Square category

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

Extra information

Connector package documentation:
System documentation:

Setting up HTTP Client Square

Steps

  1. In Alumio Dashboard, go to Clients > HTTP Clients. Create a new HTTP Client and select Square HTTP Client as the prototype of the HTTP Client.
  2. Fill in the Base URI, and Authentication Type
  3. If you Picked Token, Fill in the Token.
  4. If you Picked the Oauth2 Code, Fill in the Client ID, Client Secret, Code and Scopes (optional).

Subscribing to Entities from Square

Steps

  1. Go to Connections → Incoming and create a new incoming configuration and select Square Subscriber as the subscriber.
  2. Select the entity you want to subscribe from Square.
  3. Add any request parameters needed to subscribe to the entity (optional).
  4. You can optionally add a transformer to transform the request parameters into something you need.
  5. Select the Square HTTP Client to use.

General Concept

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

Entity
It’s the entity you want to subscribe from Square. Please refer to the entities in Management APIs from Square API Reference page.

Request Parameters
These are the parameters you can provide to get the needed entity based on Square API Reference. Please look at the example below on how to fill Request Parameters field when subscribing Single Request entity

That’s why we need to define group_id property inside path property in the Request Parameters field. The properties inside query parameters will be parsed as query parameters. Here is the final URL that will be called when using such Request Parameters field.

/v2/customers/groups/6X2498EPBWFMZW7RQJW4ZFZZAA

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 or prototype you will use to access Square.

Publishing Entity to Square

Steps

  1. Go to Connections → Outgoing, create a new outgoing configuration and select Square Publisher as the publisher.
  2. Select the action that you want the publisher to do with the data.
  3. Select the Square entity you want the data to be published to.
  4. Select the HTTP Client to use.

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 Create (HTTP POST method), Update (HTTP PUT method), and Delete (HTTP DELETE method).

Entity
We support publishing to most Square endpoints but not with publishing binary files at the moment. Please refer to the entities in Management APIs from Square API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For endpoints that require object as the request payload, please look at the example below. For example, we want to Delete Customer Group. Please select “Delete” as the action and “Delete Customer Group” as the entity of the publisher.

You can put the payload you want to send to Square into payload property in the data.

Alumio will send an API request to Square with URL /v2/customers/groups/6X2498EPBWFMZW7RQJW4ZFZZAA

HTTP Client
It’s the HTTP Client configuration or prototype you will use to access Square.

Extra Note

Payload in Incoming

For Incoming that is using POST Method.

Ex: Search Vendors
in the docs they give example on payload like this.

Take a look at the Data given.
this will give an error, where the query is unknown.

Instead remove the Query like this.

{
  "filter": {
    "status": [
        "ACTIVE"
      ]
    },
    "sort": {
      "field": "CREATED_AT",
      "order": "ASC"
    }
  }

Or in Alumio like this

{
  "path": [],
  "query": [],
  "payload": {
    "filter": {
      "status": [
        "ACTIVE"
      ]
    },
    "sort": {
      "field": "CREATED_AT",
      "order": "ASC"
    }
  }
}