Response Format

As Soracom Beam, Funnel, Funk, and Harvest 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 by setting the Unified Endpoint Format option.


Unified Format

When selecting the Unified response format, Unified Endpoint will combine the responses from all services and return it to the device.

When all redirection services return a successful response, the Unified Response format will look like this:

{
  statusCode: 200,
  body: {
    "result": "ok",
    "detail": {
      "beam": { statusCode: 200, body: "...." },
      "funnel": { statusCode: 204, body: "...." },
      "funk": { statusCode: 204, body: "...." },
      "harvest": { statusCode: 204, body: "...." }
    }
  }
}

When one or more of the redirection services returns a failure response, the Unified Response format will look like this:

{
  statusCode: 207,
  body: {
    "result": "ng",
    "detail": {
      "beam": { statusCode: 200, body: "...." },
      "funnel": { statusCode: 204, body: "...." },
      "funk": { statusCode: 204, body: "...." },
      "harvest": { statusCode: 400, body: "...." }
    }
  }
}

When setting the Auto (default) option, Unified Endpoint will return the response using Unified Response format when multiple redirection services are enabled. When only one redirection service is enabled, Unified Endpoint will return the response received from the service as-is.


Custom Format

Setting a Custom format allows you to define a specific response based on the responses received by Unified Endpoint.

When all redirection destinations return a success response, Unified Endpoint will return a response based on the Custom response on success configuration.

When one or more redirection destinations return a failure response, Unified Endpoint will return a response based on the Custom response on failure configuration.

The following parameters can be configured for each custom response format: