Integration Docs
Knowledge BaseSelf-hosting
  • Overview
  • Beam
    • Quick Start
    • Web Server Daemon
    • Connect to a Somewear Device
    • Inbound Payloads
  • TAK
    • Direct Server Connection
    • Plugin to Plugin
  • Client SDKs
    • Android
    • iOS
  • Webhooks
    • Quick Start
  • REST API
    • Send Package
Powered by GitBook
On this page
  1. REST API

Send Package

Push data from your system to personnel and assets in the field.

POST /api/package

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Basic <username>:<password>

x-api-key

<api-key>

Body

Message
{
    "sourceUserId": "1",
    "workspaceId": "1",
    "targetUserId": "1",
    "message": {
        "content": "Hello space!",
        "phone": "+15555555555",
        "email": "somewear@example.com",
        "timestamp": "2023-07-17T22:45:06Z"
    }
}
Location
{
    "sourceUserId": "1",
    "workspaceId": "1",
    "location": {
        "latitude": "37.781001",
        "longitude": "-122.393456",
        "timestamp": "2023-07-17T22:45:06Z"
    }
}
Waypoint
{
    "sourceUserId": "1",
    "workspaceId": "1",
    "waypoint": {
        "latitude": "37.819466",
        "longitude": "-122.478628",
        "timestamp": "2023-07-17T22:45:06Z",
        "name": "Golden Gate Bridge"
    }
}
Data
{
    "sourceUserId": "1",
    "workspaceId": "1",
    "data": {
        "payload": "SGVsbG8gc3BhY2UgZnJvbSBhIG5vbi1Tb21ld2VhciBkYXRhIGZvcm1hdA=="
    }
}

Response

200: Success, empty body

401: Unauthorized - You need to fix your credentials.

403: Forbidden - You do not have permissions to call this endpoint or send data to the target.

429: Too Many Requests - You're too noisy. See Retry-After response header for your backoff time in seconds.

Last updated 1 year ago