# Unified Endpoint

Route device data to Soracom Beam, Funnel, Funk, and Harvest through a consolidated endpoint.

Soracom Unified Endpoint is a consolidated ingress endpoint service that provides data redirection to Soracom Beam, Funnel, Funk, and Harvest Data through a single endpoint.

![Unified Endpoint overview](https://docs.soracom.io/_astro/overview.BwY2CI17_Ml79m.webp)

When integrating Beam, Funnel, Funk, or Harvest Data into your IoT application, your device must be configured to send data to one or more of the corresponding entry points, such as `beam.soracom.io`, `funnel.soracom.io`, `funk.soracom.io`, `harvest.soracom.io`, or another entry point depending on the protocol. While you can easily modify each service's configuration in the cloud, changing services requires reconfiguring your device to send data to a different service's entry points.

Unified Endpoint provides a single entry point that you configure on the Soracom platform to redirect data to the desired service. This allows you to define a single device configuration that uses Unified Endpoint's entry points, and then freely choose which Soracom service should receive the data, in order to quickly switch the data handling service as application requirements change or for debugging.

In addition, Unified Endpoint allows you to redirect your data to multiple services, lowering data usage by removing the need to send data multiple times from your device.

## Entry Points

Unified Endpoint supports the following device entry point configurations:

### Air for Cellular

| Entry Point | Address |
| - | - |
| **TCP** | `tcp://unified.soracom.io:23080` |
| **UDP** | `udp://unified.soracom.io:23080` |
| **HTTP** | `http://unified.soracom.io` (or port `8888`) |
| **SMS**\*1 | `901001` |
| **USSD**\*2 | `*901001*{data}#` |

1. Only available for plans that [support MO SMS](https://docs.soracom.io/en/services/air/messaging#compatibility).
2. Only available for plans that [support USSD](https://docs.soracom.io/en/services/air/messaging#compatibility).

> [!WARNING]
>
> In all cases, you can also substitute `unified.soracom.io` with `uni.soracom.io` in order to shorten the entry point configuration on your device.

### Air for Sigfox and Air for LoRaWAN

Data is captured automatically from the device. Configuring the device to send data to a specific entry point is not required.

### Soracom Inventory

Data is captured automatically from the device. Configuring the device to send data to a specific entry point is not required.

## Destination Services

Unified Endpoint supports redirecting data to the following Soracom services:

- [Soracom Beam](https://docs.soracom.io/en/services/beam)
- [Soracom Funnel](https://docs.soracom.io/en/services/funnel)
- [Soracom Funk](https://docs.soracom.io/en/services/funk)
- [Soracom Harvest](https://docs.soracom.io/en/services/harvest)

## Processing Order of Data Sent to Soracom Entry Points

Data sent to Soracom entry points such as Unified Endpoint and Beam is processed first by [Soracom Binary Format v1](https://docs.soracom.io/en/services/binary-format-v1), [Binary Parser](https://docs.soracom.io/en/services/binary-parser), and [Orbit](https://docs.soracom.io/en/services/orbit), before being handled by Beam, Funnel, Funk, and Harvest Data. Note that the configuration of each feature is done per entry point.

> [!NOTE]
>
> - Soracom Binary Format v1 can only be used when sending data via TCP.
> - Orbit is available only when sending data to Unified Endpoint. When sending data to entry points other than Unified Endpoint, such as Beam, Orbit cannot be used.
> - For content type details, refer to the following pages:\
>   [Soracom Funnel Configuration](https://docs.soracom.io/en/services/funnel/configuration)\
>   [Soracom Funk Configuration](https://docs.soracom.io/en/services/funk/configuration)

> [!WARNING]
>
> Timestamps are not assigned by Unified Endpoint but by the destination service, so they may vary.

## Redirection Behavior

Unified Endpoint will automatically redirect data received on its entry points to all Beam, Funnel, Funk, and Harvest Data configurations that are enabled for that group.

Examples:

- Funnel and Harvest Data are enabled for a group. When an Air for Cellular subscriber in the group sends data to `unified.soracom.io`, Unified Endpoint will redirect the data to both Funnel and Harvest Data.
- Beam and Harvest Data are enabled for a group. When a Sigfox or LoRa device in the group sends data, Unified Endpoint will redirect the data to both Beam and Harvest Data. (Beam configuration is not required for Sigfox and LoRa devices).
- Funnel and Harvest Data are enabled for a group. When an Air for Cellular subscriber in the group sends an SMS to `901001`, Unified Endpoint will redirect the message to both Funnel and Harvest Data.

## Response Format

As Soracom Beam, Funnel, Funk, and Harvest Data will return response messages to the device in various formats depending on entry point and forwarding destination protocol or service, Unified Endpoint allows you to control how each of those responses should be handled when sending a response to the device.

| Response Format | Description |
| - | - |
| **Auto** (default) | If data is redirected to only one service, the response from that service will be returned to the device as-is. If data is redirected to multiple services, a response will be returned in **Unified Response** format. |
| **Unified** | Always returns the response in **Unified Response** format. |
| **Soracom Beam** | Only returns Beam responses using Beam's entry point response format. Responses from Funnel, Funk, and Harvest Data are ignored. |
| **Soracom Funnel** | Only returns Funnel responses using Funnel's entry point response format. Responses from Beam, Funk, and Harvest Data are ignored. |
| **Soracom Funk** | Only returns Funk responses using Funk's entry point response format. Responses from Beam, Funnel, and Harvest Data are ignored. |
| **Soracom Harvest Data** | Only returns Harvest Data responses using Harvest Data's entry point response format. Responses from Beam, Funk, and Funnel are ignored. |
| **Custom** | Returns a custom user-defined response message on redirection success or failure. |

For more information on the Unified Response format and Custom response format, refer to the [Response Format](https://docs.soracom.io/en/services/unified-endpoint/response-format) documentation.

## Limitations

- When using Unified Endpoint with Soracom Beam:

  - The **HTTP** entry point is only compatible with HTTP POST requests. If your application utilizes other HTTP request types, use the Beam entry point address instead of the Unified Endpoint address.
  - The **Website** and **MQTT** entry points are not available. If your application utilizes either entry point, use the respective Beam entry point address instead of the Unified Endpoint address.
  - The **TCP → TCP/TCPS** entry point is not available. If your application utilizes this entry point, use the Beam entry point address instead of the Unified Endpoint address.
  - Unified Endpoint will return a response even if the **Skip status code** option is enabled for the **TCP → HTTP/HTTPS** or **UDP → HTTP/HTTPS** entry points. To limit the size of the response, you can configure a custom response format for Unified Endpoint.

- When sending data to Unified Endpoint using SMS, ensure that your device's SMS header option is disabled. If a header is included, the SMS User Data field will be processed as-is and will result in unwanted or malformed text content.

## Maintenance

During Soracom maintenance, HTTP/MQTT/TCP/UDP sessions may be disconnected at any time. Note that session disconnections due to maintenance will not be announced on the [Soracom Status Dashboard](https://status.soracom.io/?lang=en).
