NAV Navbar
shell
  • Introduction
  • Authentication
  • Pagination and sorting
  • Create/Update Response
  • Addresses
  • Articles
  • Users
  • Customers
  • Locations
  • Installations
  • Installation Types
  • Thing Types
  • Trigger Events
  • HTTP Response Codes
  • Introduction

    API Endpoint

    https://api.foxtag.io/api/v1/public
    

    The Foxtag API provides access to the data of your organizations Foxtag account. It's main purpose is to connect Foxtag to any kind of running software on the customers side.

    This REST-API uses resource-oriented URLs, and HTTP response codes to indicate API errors. JSON is returned by all API responses and data send by you is required to be JSON as well.

    Authentication

    Example request with authorization:

    curl "https://api.foxtag.io/api/v1/public/users"
      -H "Authorization: Bearer token=süpersecret"
    

    Make sure to replace süpersecret with your API key.

    Foxtag uses API keys to allow access to the API.

    You will be able to manage your API keys in your account settings, soon. Meanwhile, please contact support@foxtag.de and we will create an API key for you.

    We expect the API key to be included in all API requests to the server in a header that looks like the following:

    Authorization: Bearer token=süpersecret

    Pagination and sorting

    Pagination

    Example meta info of a paginated response

    {
      "meta": {
        "current_page": 1,
        "total_pages": 3,
        "total_count": 1063
      }
    }
    

    Requests that respond with a list of records are paginated having 500 records maximum per page.

    You find your current page and the number of total pages in the meta section of the response.

    If you don't specify a page, you automatically get page 1, simply add a page query parameter to your request to get other pages.

    GET /users?page=3

    Attributes Type  
    current_page int Current page
    total_pages int Total available pages
    total_count int Total records

    Sort order

    Lists of records are ordered by updated_at (last update of record), with the latest updated record at the end of the list.

    Create/Update Response

    Example Response with one error

    {
      "status": "with_errors",
      "errors_count": 1,
      "results": [
        {
          "id": null,
          "success": false,
          "message": "Customer no. is taken"
        },
            {
                "id": "4071d49e-bb5b-4647-85cd-2635fca6b00b",
                "success": true,
                "message": null
            }
      ]
    }
    

    Most endpoints allow to create or update multiple records by sending a list of objects within a POST request.

    Attributes Type  
    status string success or with_errors
    errors_count int Error count if with errors
    results json Result per record
    results > id uuid Id of a single record if available
    results > success boolean Record has been saved
    results > message string Error message if not successful or null

    Successful requests

    Example Response with 2 successful updates (HTTP 200)

    {
        "status": "success",
        "errors_count": 0,
        "results": [
            {
                "id": "88e08d4b-b410-4afb-be50-6b980926ed70",
                "success": true,
                "message": null
            },
            {
                "id": "428d87f7-99a4-40b5-b337-7775b958c022",
                "success": true,
                "message": null
            }
        ]
    }
    

    If successful, the response returns a list of ids of the newly inserted or updated records.

    Requests without errors have the status field set to success and errors_count = 0.

    Requests with errors

    Example Response with one error (HTTP 200)

    {
      "status": "with_errors",
      "errors_count": 1,
      "results": [
        {
          "id": null,
          "success": false,
          "message": "Customer no. is taken"
        },
        {
          "id": "4071d49e-bb5b-4647-85cd-2635fca6b00b",
          "success": true,
          "message": null
        }
      ]
    }
    

    If some or all records cannot be saved, the response returns a mixed list of ids of the newly inserted or updated records.

    Requests with errors have the status field set to with_errors and errors_count > 0.

    Too many records

    Example response 'too many elements' (HTTP 422)

    {
        "message": "Too many elements in a single request"
    }
    

    To avoid long running requests, creating or updating records is limited to 100 objects per request. If you send more objects in a single request, the API responds with HTTP 422 and the message "Too many elements in a single request".

    Addresses

    Address objects are often nested into other objects that you retrieve, e.g. locations or customers.

    The address object

    Example Address

    {
      "line1": "Danziger Str. 36",
      "line2": "",
      "zip": "20099",
      "city": "Hamburg",
      "country": "DE"
    }
    
    Attributes Type  
    line1 string  First address line, e.g. street and number
    line2 string  Additional address line
    zip string Zip code
    city string City
    country string Uppercase country ISO code: 'DE' for germany

    Articles

    German term used in our web UI: 'Artikel'

    The article object

    Example Response

    {
      "id": "eca552b9-834c-4b8d-afd0-75a2ab3c9c28",
      "number": "A-1000",
      "name": "Dichtungsring, 16mm",
      "group": "Dichtungen",
      "unit": "Stk.",
      "position": 1,
      "updated_at": "2018-04-13T14:49:07.543Z"
    }
    
    Attributes Type  
    id uuid Article id generated by foxtag
    number string Your unique article number
    name string Name of article
    group string optional
    Article group
    unit string Unit to show next to the given amount of articles
    position integer optional
    Number used to globally sort articles on a report. This number does not need to be unique
    updated_at timestamp Last update timestamp of object

    List all articles

    curl "https://api.foxtag.io/api/v1/public/articles"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns an installation types collection structured like this:

    {
      "articles": [
        {
          "id": "eca552b9-834c-4b8d-afd0-75a2ab3c9c28",
          "number": "A-1000",
          "name": "Dichtungsring, 16mm",
          "group": "Dichtungen",
          "unit": "Stk.",
          "position": 1,
          "updated_at": "2018-04-13T14:49:07.543Z"
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 1,
        "total_count": 1
      }
    }
    

    This endpoint retrieves all thing types.

    HTTP Request

    GET /articles

    Retrieve a specific article

    curl "https://api.foxtag.io/api/v1/public/articles/eca552b9-834c-4b8d-afd0-75a2ab3c9c28"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns a single thing type structured like this:

    {
      "article": {
        "id": "eca552b9-834c-4b8d-afd0-75a2ab3c9c28",
        "number": "A-1000",
        "name": "Dichtungsring, 16mm",
        "group": "Dichtungen",
        "unit": "Stk.",
        "position": 1,
        "updated_at": "2018-04-13T14:49:07.543Z"
      }
    }
    

    This endpoint retrieves a specific thing type.

    HTTP Request with UUID

    GET /articles/:id

    Parameter Description
    id The UUID of the thing type to retrieve

    HTTP Request with article number filter

    GET /articles/?number=number

    Query parameter Description
    number The unique number of the article to retrieve

    Create or update articles

    Example request to insert/update customers

    curl "https://api.foxtag.io/api/v1/public/articles"
      -H "Content-Type: application/json"
      -H "Authorization: Bearer token=süpersecret"
      -X POST
      -d '(see json payload below)'
    

    Example JSON payload to insert/update customers

    {
      "articles":[
        {
          "number": "D-101",
          "name": "Dichtungsring, 16mm",
          "group": "Dichtungen",
          "unit": "Stk."
            },
        {
          "number": "D-102",
          "name": "Dichtungsring, 22mm",
          "group": "Dichtungen",
          "unit": "Stk."
            }
        ]
    }
    

    You can create or update multiple articles with a single request by posting a list of article objects.

    HTTP Request

    POST /articles

    Attributes Type  
    id uuid (optional)
    creates a new record if id is not given
    creates new record if given and id is not existing
    updates a record if given and id is already existing
    number string Article number, must be unique
    name string Article name
    group string (optional)
    Article group name
    Group is created if not existing
    unit string Unit to show next to amount in article lines

    HTTP Responses

    API responds with a list of ids and/or error messages. Refer to Create/Update Response for details.

    Users

    The user object

    Example Response

    {
      "id": "e5ff453e-694a-4d67-a4f1-7d3eda135e96",             
      "email": "peter.parker@example.com",
      "firstname": "Peter",
      "lastname": "Parker",
      "roles": [
        "admin"
      ],
      "updated_at": "2018-02-28T14:05:20.706Z"
    }
    
    Attributes Type  
    id uuid User id generated by foxtag
    email string Email address, unique
    firstname string optional
    First name of user
    lastname string optional
    Last name of user
    roles array Users roles, can be any combination of admin, manage, execute
    updated_at timestamp Last update timestamp of object

    List all users

    curl "https://api.foxtag.io/api/v1/public/users"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns a users collection structured like this:

    {
      "users": [
        {
          "id": "e5ff453e-694a-4d67-a4f1-7d3eda135e96",             
          "email": "peter.parker@example.com",
          "firstname": "Peter",
          "lastname": "Parker",
          "roles": [
            "admin"
          ],
          "updated_at": "2018-02-28T14:05:20.706Z"
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 1,
        "total_count": 1
      }
    }
    

    This endpoint retrieves all users.

    HTTP Request

    GET /users

    Deleted users

    We keep the names of deleted users, to show it alongside historic records of that user (e.g. "Note have been taken by Peter Parker"). The email address of a deleted user is set to dummy address and the roles array is empty.

    Retrieve a specific user

    curl "https://api.foxtag.io/api/v1/public/users/e5ff453e-694a-4d67-a4f1-7d3eda135e96"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns a single user structured like this:

    {
      "user": {
        "id": "e5ff453e-694a-4d67-a4f1-7d3eda135e96",             
        "email": "peter.parker@example.com",
        "firstname": "Peter",
        "lastname": "Parker",
        "roles": [
          "admin"
        ],
        "updated_at": "2018-02-28T14:05:20.706Z"
      }
    }
    

    This endpoint retrieves a specific user.

    HTTP Request

    GET /users/:id

    URL Parameters

    Parameter Description
    id The UUID of the user to retrieve

    Customers

    German term used in our web UI: 'Kunden'

    The customer object

    Example Response

    {
      "id": "d412502b-3888-4bbb-8726-09ba5998fb89",
      "customer_no": "C-1000",
      "name": "My Customer Corp.",
      "updated_at": "2018-03-23T09:25:08.547Z",
      "address": {
        "line1": "Meine Str. 55",
        "line2": "",
        "zip": "22767",
        "city": "Hamburg",
        "country": "DE"
      }
    }
    
    Attributes Type  
    id uuid Customer id, generated by foxtag
    customer_no string Customer number, must be unique
    name string Name of customer
    address json Customer's address (see Address)
    updated_at timestamp Last update timestamp of object

    List all customers

    curl "https://api.foxtag.io/api/v1/public/customers"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns a customers collection structured like this:

    {
      "customers": [
        {
          "id": "d412502b-3888-4bbb-8726-09ba5998fb89",
          "customer_no": "C-1000",
          "name": "My Customer Corp.",
          "updated_at": "2018-03-23T09:25:08.547Z",
          "address": {
            "line1": "Meine Str. 55",
            "line2": "",
            "zip": "22767",
            "city": "Hamburg",
            "country": "DE"
          }
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 1,
        "total_count": 1
      }
    }
    

    This endpoint retrieves all customers. The response is paginated if more than 500 records exist (see Pagination for details).

    HTTP Request

    GET /customers

    Retrieve a specific customer

    HTTP Request with UUID

    GET /customers/<id>

    URL parameter Description
    id The UUID of the customer to retrieve

    HTTP Request with customer number filter

    GET /customers/?customer_no=<customer number>

    Query parameter Description
    customer_no The unique customer number of the customer to retrieve

    Create or update customers

    Example request to insert/update customers

    curl "https://api.foxtag.io/api/v1/public/customers"
      -H "Content-Type: application/json"
      -H "Authorization: Bearer token=süpersecret"
      -X POST
      -d '(see json payload below)'
    

    Example JSON payload to insert/update customers

    {
        "customers": [
            {
                "customer_no": "C-1",
                "name": "First Customer Corp.",
                "address_attributes": {
                    "line1": "Meine Str. 5",
                    "zip": "20222",
                    "city": "Hamburg",
                    "country": "DE"
                }
            },
                    {
                "customer_no": "C-2",
                "name": "Second Customer Corp.",
                "address_attributes": {
                    "line1": "Meine Str. 5",
                    "zip": "20222",
                    "city": "Hamburg",
                    "country": "DE"
                }
            }
        ]
    }
    

    You can create or update multiple customers with a single request by posting a list of customer objects.

    HTTP Request

    POST /customers

    Attributes Type  
    id uuid (optional)
    creates a new record if id is not given
    creates new record if given and id is not existing
    updates a record if given and id is already existing
    customer_no string Customer number, must be unique
    name string Name of customer
    address_attributes json Customer's address (see Address)

    HTTP Responses

    API responds with a list of ids and/or error messages. Refer to Create/Update Response for details.

    Delete a single customer

    Example request to delete a customer

    curl "https://api.foxtag.io/api/v1/public/customers/49199fe8-a5ea-4065-8acb-8c9bd2199586"
      -H "Authorization: Bearer token=süpersecret"
      -X DELETE
    

    HTTP Request

    DELETE /customers/<id>

    URL parameter Description
    id The UUID of the customer to delete

    Locations

    German term used in our web UI: 'Objekte'

    The location object

    Example Response

    {
      "id": "556dfe02-c287-4634-98e9-b9cc13d69e28",
      "number": "L-1",
      "name": "Test",
      "active_name": "Test",
      "customer_id": null,
      "shares_customer_address": false,
      "updated_at": "2018-02-28T14:07:23.923Z",
      "active_address": {
        "line1": "Danziger Str. 36",
        "line2": "",
        "zip": "20099",
        "city": "Hamburg",
        "country": "DE"
      }
    }
    
    Attributes Type  
    id uuid Location id, generated by foxtag
    number string optional
    Location number
    name string optional
    Location name
    active_name string Locations name if present or customers name as a fallback
    customer_id uuid optional
    Id of related customer
    shares_customer_address boolean true if address of customer is also address of location
    active_address json Locations address or customers address depending on shares_customer_address (see Address)
    updated_at timestamp Last update timestamp of object

    List all locations

    curl "https://api.foxtag.io/api/v1/public/locations"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns a locations collection structured like this:

    {
      "locations": [
        {
          "id": "d412502b-3888-4bbb-8726-09ba5998fb89",
          "customer_no": "C-1000",
          "name": "My Customer Corp.",
          "updated_at": "2018-03-23T09:25:08.547Z",
          "address": {
            "line1": "Meine Str. 55",
            "line2": "",
            "zip": "22767",
            "city": "Hamburg",
            "country": "DE"
          }
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 1,
        "total_count": 1
      }
    }
    

    This endpoint retrieves all locations. The response is paginated if more than 500 records exist (see Pagination for details).

    HTTP Request

    GET /locations

    Retrieve a specific location

    HTTP Request with UUID

    GET /locations/<id>

    URL parameter Description
    id The UUID of the customer to retrieve

    HTTP Request with location number filter

    GET /locations/?number=number

    Query parameter Description
    number The number of the location to retrieve

    Create or update locations

    Example request to insert/update locations

    curl "https://api.foxtag.io/api/v1/public/locations"
      -H "Content-Type: application/json"
      -H "Authorization: Bearer token=süpersecret"
      -X POST
      -d '(see json payload below)'
    

    Example JSON payload to insert/update locations

    {
      "locations":[
        {
          "number": "L1",
          "customer_id": "00cf60e1-990d-40b2-9301-fd2538e978fb",
          "shares_customer_address": true
        },
        {
          "name": "Test Location",
          "number": "L1",
          "customer_id": null,
          "shares_customer_address": false,
          "address_attributes": {
            "line1": "Danziger Str. 36",
            "line2": "",
            "zip": "20099",
            "city": "Hamburg",
            "country": "DE"
          }
        }
      ]
    }
    
    

    You can create or update multiple locations with a single request by posting a list of location objects.

    HTTP Request

    POST /locations

    Attributes Type  
    id uuid (optional)
    creates a new record if id is not given
    creates new record if given and id is not existing
    updates a record if given and id is already existing
    number string (optional)
    Location number
    name string (optional)
    Location name
    customer_id uuid (optional)
    Related customer
    shares_customer_address boolean true if address of customer is also address of location
    address_attributes json (optional)
    Locations's address (see Address)

    HTTP Responses

    API responds with a list of ids and/or error messages. Refer to Create/Update Response for details.

    Installations

    German term used in our web UI: 'Anlagen'

    The installation object

    Example Response

    {
      "id": "aa24f45b-61af-4d8c-a674-21c3fef3a2c3",
      "number": "A-1",
      "name": "",
      "location_id": "556dfe02-c287-4634-98e9-b9cc13d69e28",
      "installation_type_id": "06fc0d5d-5fd1-4766-8893-ed597ff36f0b",
      "installation_type_name": "Test",
      "updated_at": "2018-03-13T15:25:52.039Z"
    }
    
    Attributes Type  
    id uuid Installation id, generated by foxtag
    number string optional
    Installation number
    name string optional
    Name of installation
    location_id uuid Id of location
    installation_type_id uuid Id of installation_type
    installation_type_name string Name of installation_type for your convenience
    updated_at timestamp Last update timestamp of object

    List all installations

    curl "https://api.foxtag.io/api/v1/public/installations"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns a collection of installations structured like this:

    {
      "installations": [
        {
          "id": "aa24f45b-61af-4d8c-a674-21c3fef3a2c3",
          "number": "A-1",
          "name": "",
          "location_id": "556dfe02-c287-4634-98e9-b9cc13d69e28",
          "installation_type_id": "06fc0d5d-5fd1-4766-8893-ed597ff36f0b",
          "installation_type_name": "Test",
          "updated_at": "2018-03-13T15:25:52.039Z"
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 1,
        "total_count": 1
      }
    }
    

    This endpoint retrieves all installations. The response is paginated if more than 500 records exist (see Pagination for details).

    HTTP Request

    GET /installations

    Retrieve a specific installation

    HTTP Request with UUID

    GET /installations/<id>

    URL parameter Description
    id The UUID of the installation to retrieve

    HTTP Request with installation number filter

    GET /installations/?number=<number>

    Query parameter Description
    number The installation number of the installation to retrieve

    Create or update installations

    Example request to insert/update installations

    curl "https://api.foxtag.io/api/v1/public/installations"
      -H "Content-Type: application/json"
      -H "Authorization: Bearer token=süpersecret"
      -X POST
      -d '(see json payload below)'
    

    Example JSON payload to insert a new installation

    {
        "installations":[
            {
                "installation_type_id": "42561e18-79ed-4af7-9b5a-ef7d29c47d13",
                "location_id": "95ae51f5-d5e2-45b4-991a-2c15ba20913d",
                "number": "A-15"
          }
        ]
    }
    

    You can create or update multiple installation with a single request by posting a list of installation objects.

    HTTP Request

    POST /installations

    Attributes Type  
    id uuid (optional)
    creates a new record if id is not given
    creates new record if given and id is not existing
    updates a record if given and id is already existing
    number string (optional)
    Installation number
    location_id uuid Id of the related location
    installation_type_id uuid Id of the related installation_type
    Note: You cannot change the installation_type of an existing installation! Do not send this field alongside update requests.

    HTTP Responses

    API responds with a list of ids and/or error messages. Refer to Create/Update Response for details.

    { "installations":[ { "installation_type_id": "42561e18-79ed-4af7-9b5a-ef7d29c47d13", "location_id": "95ae51f5-d5e2-45b4-991a-2c15ba20913d", "number": "A-15" } ] }

    Installation Types

    German term used in our web UI: 'Wartungsanwendungen'

    The installation type object

    Example Response

    {
      "id": "06fc0d5d-5fd1-4766-8893-ed597ff36f0b",
      "name": "Brandmeldeanlage",
      "updated_at": "2018-03-21T13:58:34.868Z"
    }
    
    Attributes Type  
    id uuid Installation type id generated by foxtag
    name string Name of installation type
    updated_at timestamp Last update timestamp of object

    List all installation types

    curl "https://api.foxtag.io/api/v1/public/installation_types"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns an installation types collection structured like this:

    {
      "installation_types": [
        {
          "id": "06fc0d5d-5fd1-4766-8893-ed597ff36f0b",
          "name": "Brandmeldeanlage",
          "updated_at": "2018-03-21T13:58:34.868Z"
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 1,
        "total_count": 1
      }
    }
    

    This endpoint retrieves all installation types.

    HTTP Request

    GET /installation_types

    Retrieve a specific installation type

    curl "https://api.foxtag.io/api/v1/public/installation_types/06fc0d5d-5fd1-4766-8893-ed597ff36f0b"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns a single installation type structured like this:

    {
      "installation_type": {
        "id": "06fc0d5d-5fd1-4766-8893-ed597ff36f0b",
        "name": "Brandmeldeanlage",
        "updated_at": "2018-03-21T13:58:34.868Z"
      }
    }
    

    This endpoint retrieves a specific installation type.

    HTTP Request

    GET /installation_types/:id

    URL Parameters

    Parameter Description
    id The UUID of the installation type to retrieve

    Thing Types

    German term used in our web UI: 'Typen'

    The thing type object

    Example Response

    {
      "id": "5508db44-3b57-4be3-b69c-7ceadf627fb0",
      "installation_type_id": "06fc0d5d-5fd1-4766-8893-ed597ff36f0b",
      "name": "Schaumlöscher",
      "manufacturer": "Neuruppin",
      "model": "S 6 eco",
      "category": "thing",
      "updated_at": "2018-03-02T12:56:36.737Z"
    }
    
    Attributes Type  
    id uuid Thing type id generated by foxtag
    installation_type_id uuid Installation type reference
    name string Name of thing type
    manufacturer string optional
    Manufacturer name
    model string optional
    Model
    category string One of 'central_unit', 'thing' or 'sub_thing'
    updated_at timestamp Last update timestamp of object

    List all thing types

    curl "https://api.foxtag.io/api/v1/public/installation_types"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns an installation types collection structured like this:

    {
      "thing_types": [
        {
          "id": "5508db44-3b57-4be3-b69c-7ceadf627fb0",
          "installation_type_id": "06fc0d5d-5fd1-4766-8893-ed597ff36f0b",
          "name": "Schaumlöscher",
          "manufacturer": "Neuruppin",
          "model": "S 6 eco",
          "category": "thing",
          "updated_at": "2018-03-02T12:56:36.737Z"
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 1,
        "total_count": 1
      }
    }
    

    This endpoint retrieves all thing types.

    HTTP Request

    GET /thing_types

    Retrieve a specific thing type

    curl "https://api.foxtag.io/api/v1/public/thing_types/5508db44-3b57-4be3-b69c-7ceadf627fb0"
      -H "Authorization: Bearer token=süpersecret"
    

    The above command returns a single thing type structured like this:

    {
      "thing_type": {
        "id": "5508db44-3b57-4be3-b69c-7ceadf627fb0",
        "installation_type_id": "06fc0d5d-5fd1-4766-8893-ed597ff36f0b",
        "name": "Schaumlöscher",
        "manufacturer": "Neuruppin",
        "model": "S 6 eco",
        "category": "thing",
        "updated_at": "2018-03-02T12:56:36.737Z"
      }
    }
    

    This endpoint retrieves a specific thing type.

    HTTP Request

    GET /thing_types/:id

    URL Parameters

    Parameter Description
    id The UUID of the thing type to retrieve

    Trigger Events

    Trigger events are sent to the technicians apps of a running job

    Send trigger event

    Example request to create a trigger event

    curl "https://api.foxtag.io/api/v1/public/trigger_events"
      -H "Content-Type: application/json"
      -H "Authorization: Bearer token=süpersecret"
      -X POST
      -d '(see json payload below)'
    

    Example JSON payload to create a trigger event

    {
        "event":
        {
          "installation_number": "A2",
          "thing_number": 1,
          "group_number": 5,
          "eventtype": "triggered",
          "eventdate": "2018-08-21T09:34:23.377Z"
        }
    }
    

    Example response

    {
        "status": "success",
        "event": {
            "id": "d011d838-9e76-4b5e-9cda-a14c4ff5b7fb"
        }
    }
    

    Trigger events have to be sent one event per request

    HTTP Request

    POST /trigger_events

    Attributes Type  
    installation_number string Installation number
    thing_number integer Number of affected thing
    group_number integer optional
    Group number of thing
    thing_serial_number string optional
    You can use serial number as alternative to thing_number/group_number
    eventtype string For now only 'triggered' event type is supported
    eventdate timestamp Last update timestamp of object

    HTTP Responses

    API responds with the id of the created event record or an error message

    HTTP Response Codes

    The Foxtag API uses the following response codes:

    Code Meaning
    200 OK
    Error Code Meaning
    401 Unauthorized -- Your API key is wrong.
    403 Forbidden -- Access to a specific resource is not allowed to you.
    404 Not Found -- The specified resource could not be found.
    422 Unprocessable Entity -- Something is wrong with the payload you sent
    429 Too Many Requests -- You're requesting too much data! Slow down!
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.