Introduction

The Orbit4 API is a public-facing API intended to be used by Orbit4 partners to enable their customers to use the Orbit4 platform while ensuring seamless data synchronization with their respective systems.

This API is structured according to key RESTful principles, selectively incorporating guidelines from the JSON API Specification. We accept request data for POST and PUT methods in two formats: application/x-www-form-urlencoded and application/json. Every response from the API, including error notifications, is formatted in JSON.

When errors occur, they are signaled through a specific HTTP status code accompanied by an error object in the response. This object contains a distinctive error code as a string and a user-friendly message, designed to be easily understood by end users.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by navigating to the API Tokens section within your profile menu and then clicking on Generate API Token.

Assets

The following set of endpoints are engineered for efficient management of your clubs' asset registers on the Orbit4 platform. They simplify the process of creating, updating, and even deleting assets that are no longer needed within your gym operator accounts. The main purpose of these operations is facilitating the synchronization of your system's assets with Orbit4.

Search for assets.

GET
https://api.orbit4.org
/v1/assets
requires authentication

This endpoint allows you to search for assets within the specified gym operator account. You can filter the results by club specifying the user_id and other optional parameters.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

Query Parameters

user_id
integer
required

The ID of the gym operator the assets belong to.

Example:
2
search
string

Search for assets by qr_code, brand, range, or product name.

qr_code
string

Filter assets by qr code.

sort
string

Results can be sorted by the following fields:

  • id
  • qr_code
  • installation_date
  • manufacturing_date
  • warranty_end_date
  • created_at

The default sorting order is ascending, but the direction can be reversed by prefixing a dash (-) like so: ?sort=-id

metadata[metadata_key]
string

Filter results by metadata. Replace metadata_key with the key of the metadata you want to filter by.

page
integer

The page number of results to be returned.

per_page
integer

The number of results to be returned for each page of results.

Response Fields

Example request:
curl --request GET \
    --get "https://api.orbit4.org/v1/assets?user_id=2" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 53
                                                         
{
    "data": [
        {
            "id": 1,
            "brand": "Hammer Strength",
            "range": "Plateloaded Iso-Lateral",
            "product": "Seated Leg Press",
            "product_id": 5,
            "qr_code": "O4-314",
            "serial_number": "MSN-609",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£7,821.75",
            "fitness_product": 1,
            "has_odometer": 0,
            "residual_price": "£735.14",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 2,
            "brand": "Life Fitness",
            "range": "Signature",
            "product": "Chest Press",
            "product_id": 2,
            "qr_code": "O4-167",
            "serial_number": "MSN-895",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£1,017.85",
            "fitness_product": 1,
            "has_odometer": 0,
            "residual_price": "£469.55",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 3,
            "brand": "Hammer Strength",
            "range": "Plateloaded Iso-Lateral",
            "product": "Seated Leg Press",
            "product_id": 5,
            "qr_code": "O4-940",
            "serial_number": "MSN-779",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£8,055.31",
            "fitness_product": 0,
            "has_odometer": 1,
            "residual_price": "£735.14",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 4,
            "brand": "Technogym",
            "range": "Excite JOG 700 LED",
            "product": "Treadmill",
            "product_id": 4,
            "qr_code": "O4-165",
            "serial_number": "MSN-127",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£9,362.92",
            "fitness_product": 1,
            "has_odometer": 1,
            "residual_price": "£674.12",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 5,
            "brand": "Technogym",
            "range": "Excite JOG 700 LED",
            "product": "Treadmill",
            "product_id": 4,
            "qr_code": "O4-270",
            "serial_number": "MSN-671",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£4,621.17",
            "fitness_product": 0,
            "has_odometer": 0,
            "residual_price": "£674.12",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 6,
            "brand": "Hammer Strength",
            "range": "Plateloaded Iso-Lateral",
            "product": "Seated Leg Press",
            "product_id": 5,
            "qr_code": "O4-215",
            "serial_number": "MSN-066",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£5,008.53",
            "fitness_product": 0,
            "has_odometer": 1,
            "residual_price": "£735.14",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 7,
            "brand": "Life Fitness",
            "range": "Signature",
            "product": "Chest Press",
            "product_id": 2,
            "qr_code": "O4-189",
            "serial_number": "MSN-740",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£2,021.76",
            "fitness_product": 1,
            "has_odometer": 1,
            "residual_price": "£469.55",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 8,
            "brand": "Life Fitness",
            "range": "IC7 Spin Bike",
            "product": "Studio Bike",
            "product_id": 1,
            "qr_code": "O4-904",
            "serial_number": "MSN-469",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£1,734.32",
            "fitness_product": 1,
            "has_odometer": 1,
            "residual_price": "£564.04",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 9,
            "brand": "Technogym",
            "range": "Excite JOG 700 LED",
            "product": "Treadmill",
            "product_id": 4,
            "qr_code": "O4-659",
            "serial_number": "MSN-536",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£2,736.91",
            "fitness_product": 0,
            "has_odometer": 1,
            "residual_price": "£674.12",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 10,
            "brand": "Technogym",
            "range": "Excite JOG 700 LED",
            "product": "Treadmill",
            "product_id": 4,
            "qr_code": "O4-815",
            "serial_number": "MSN-248",
            "installation_date": "18/07/2021",
            "manufacturing_date": "18/07/2020",
            "warranty_end_date": "18/07/2026",
            "current_spend": "£0",
            "max_spend": "£1,124.20",
            "fitness_product": 0,
            "has_odometer": 1,
            "residual_price": "£674.12",
            "image": null,
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        }
    ],
    "links": {
        "first": "https://api.orbit4.org/v1/assets?page=1",
        "last": "https://api.orbit4.org/v1/assets?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://api.orbit4.org/v1/assets?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https://api.orbit4.org/v1/assets",
        "per_page": 25,
        "to": 10,
        "total": 10
    }
}

Fetch asset details.

GET
https://api.orbit4.org
/v1/assets/{asset}
requires authentication

This endpoint allows you to retrieve details of a specific asset by their ID.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

URL Parameters

asset
string
required

The ID of the asset.

Example:
2

Response Fields

Example request:
curl --request GET \
    --get "https://api.orbit4.org/v1/assets/2" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 52
                                                         
{
    "data": {
        "id": 2,
        "brand": "Life Fitness",
        "range": "Signature",
        "product": "Chest Press",
        "product_id": 2,
        "qr_code": "O4-167",
        "serial_number": "MSN-895",
        "installation_date": "18/07/2021",
        "manufacturing_date": "18/07/2020",
        "warranty_end_date": "18/07/2026",
        "current_spend": "£0",
        "max_spend": "£1,017.85",
        "fitness_product": 1,
        "has_odometer": 0,
        "residual_price": "£469.55",
        "image": null,
        "metadata": [],
        "created_at": "2024-07-18T15:51:55+01:00"
    }
}

Create new asset.

POST
https://api.orbit4.org
/v1/assets
requires authentication

This endpoint allows you to add a new asset to the gym operator account. The user_id must be specified when adding a new asset.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.orbit4.org/v1/assets" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json" \
    --data "{
    \"user_id\": 2,
    \"qr_code\": \"O4-123456\",
    \"serial_number\": \"123456\",
    \"installation_date\": \"2024-07-18\",
    \"manufacturing_date\": \"2024-07-18\",
    \"warranty_end_date\": \"2024-07-18\",
    \"brand\": \"Life Fitness\",
    \"range\": \"Signature Series\",
    \"product\": \"Chest Press\",
    \"product_id\": 1,
    \"metadata\": \"{\\\"integration_id\\\":\\\"ABC123\\\"}\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 51
                                                         
{
    "data": {
        "id": 16,
        "brand": "Life Fitness",
        "range": "IC7 Spin Bike",
        "product": "Studio Bike",
        "product_id": 1,
        "qr_code": "O4-123456",
        "serial_number": "123456",
        "installation_date": "18/07/2024",
        "manufacturing_date": "18/07/2024",
        "warranty_end_date": "18/07/2024",
        "current_spend": "£0",
        "max_spend": "£0",
        "fitness_product": null,
        "has_odometer": null,
        "residual_price": "£297.83",
        "image": null,
        "metadata": {
            "integration_id": "ABC123"
        },
        "created_at": "2024-07-18T15:51:55+01:00"
    }
}

Update asset.

PUT
https://api.orbit4.org
/v1/assets/{asset}
requires authentication

This endpoint allows you to update details of a specific asset by their ID. Only the fields that need to be updated should be provided.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

URL Parameters

asset
string
required

The ID of the asset.

Example:
2

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.orbit4.org/v1/assets/2" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json" \
    --data "{
    \"qr_code\": \"O4-123456\",
    \"serial_number\": \"123456\",
    \"installation_date\": \"2024-07-18\",
    \"manufacturing_date\": \"2024-07-18\",
    \"warranty_end_date\": \"2024-07-18\",
    \"brand\": \"Life Fitness\",
    \"range\": \"Signature Series\",
    \"product\": \"Chest Press\",
    \"product_id\": 1,
    \"metadata\": \"{\\\"integration_id\\\":\\\"ABC123\\\"}\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 50
                                                         
{
    "data": {
        "id": 2,
        "brand": "Life Fitness",
        "range": "IC7 Spin Bike",
        "product": "Studio Bike",
        "product_id": 1,
        "qr_code": "O4-123456",
        "serial_number": "123456",
        "installation_date": "18/07/2024",
        "manufacturing_date": "18/07/2024",
        "warranty_end_date": "18/07/2024",
        "current_spend": "£0",
        "max_spend": "£1,017.85",
        "fitness_product": 1,
        "has_odometer": 0,
        "residual_price": "£297.83",
        "image": null,
        "metadata": {
            "integration_id": "ABC123"
        },
        "created_at": "2024-07-18T15:51:55+01:00"
    }
}

Delete asset.

DELETE
https://api.orbit4.org
/v1/assets/{asset}
requires authentication

This endpoint allows you to delete a specific asset from your account by their ID.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

URL Parameters

asset
string
required

The ID of the asset.

Example:
2
Example request:
curl --request DELETE \
    "https://api.orbit4.org/v1/assets/2" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 49
                                                         
[Empty response]

Contracts

The following set of endpoints are designed to facilitate the management of your service contracts between your gym operators and service providers on the Orbit4 platform. They simplify the process of searching and creating contracts.

Search for contracts.

GET
https://api.orbit4.org
/v1/contracts
requires authentication

This endpoint allows you to search for contracts within the specified user account. You can filter the results by gym operator, service provider or a specific asset.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

Query Parameters

gym_operator_id
integer

The ID of the gym operator the service contract belong to.

Example:
2
service_provider_id
integer

The ID of the service provider the service contract belong to.

Example:
4
asset_id
integer

The ID of asset to filter contracts by.

Example:
1
active
boolean

Filter results by active/expired contracts.

Example:
1
sort
string

Results can be sorted by the following fields:

  • id
  • start_date
  • created_at

The default sorting order is ascending, but the direction can be reversed by prefixing a dash (-) like so: ?sort=-id

metadata[metadata_key]
string

Filter results by metadata. Replace metadata_key with the key of the metadata you want to filter by.

page
integer

The page number of results to be returned.

per_page
integer

The number of results to be returned for each page of results.

Response Fields

Example request:
curl --request GET \
    --get "https://api.orbit4.org/v1/contracts?gym_operator_id=2&service_provider_id=4&asset_id=1&active=1" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 48
                                                         
{
    "data": [
        {
            "id": 1,
            "number": "WSGE123",
            "type": "",
            "gym_operator": {
                "id": 2,
                "first_name": "Kurt",
                "last_name": "Hayes",
                "email": "[email protected]",
                "role": "gym_operator",
                "company_name": "PulseForge Fitness",
                "address": "776 Antonette Ways Suite 295",
                "address_2": null,
                "address_3": null,
                "city": "Port Dakota",
                "country": "UK",
                "postcode": "60694-8782",
                "language": "en",
                "email_verified_at": "2024-07-18T15:51:53+01:00",
                "metadata": [],
                "created_at": "2024-07-18T15:51:53+01:00"
            },
            "service_provider": {
                "id": 4,
                "first_name": "Brice",
                "last_name": "Hansen",
                "email": "[email protected]",
                "role": "service_provider",
                "company_name": "The Gym Fixers",
                "address": "26672 Lilliana Ferry",
                "address_2": null,
                "address_3": null,
                "city": "New Desmond",
                "country": "UK",
                "postcode": "57650",
                "language": "en",
                "email_verified_at": "2024-07-18T15:51:54+01:00",
                "metadata": [],
                "created_at": "2024-07-18T15:51:54+01:00"
            },
            "active": true,
            "start_date": "2024-07-17",
            "end_date": "2025-07-17",
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        }
    ],
    "links": {
        "first": "https://api.orbit4.org/v1/contracts?page=1",
        "last": "https://api.orbit4.org/v1/contracts?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://api.orbit4.org/v1/contracts?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https://api.orbit4.org/v1/contracts",
        "per_page": 25,
        "to": 1,
        "total": 1
    }
}

Create new contract.

POST
https://api.orbit4.org
/v1/contracts
requires authentication

This endpoint allows you to create a new contract between a gym operator and a service provider.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.orbit4.org/v1/contracts" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json" \
    --data "{
    \"gym_operator_id\": 2,
    \"service_provider_id\": 3,
    \"start_date\": \"2024-07-18\",
    \"type\": \"Full Annual\",
    \"assets\": [
        1
    ],
    \"metadata\": \"{\\\"integration_id\\\":\\\"ABC123\\\"}\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 47
                                                         
{
    "data": {
        "id": 2,
        "number": "WSGE1",
        "type": "Full Annual",
        "gym_operator": {
            "id": 2,
            "first_name": "Kurt",
            "last_name": "Hayes",
            "email": "[email protected]",
            "role": "gym_operator",
            "company_name": "PulseForge Fitness",
            "address": "776 Antonette Ways Suite 295",
            "address_2": null,
            "address_3": null,
            "city": "Port Dakota",
            "country": "UK",
            "postcode": "60694-8782",
            "language": "en",
            "email_verified_at": "2024-07-18T15:51:53+01:00",
            "metadata": [],
            "created_at": "2024-07-18T15:51:53+01:00"
        },
        "service_provider": {
            "id": 3,
            "first_name": "Michael",
            "last_name": "Macejkovic",
            "email": "[email protected]",
            "role": "gym_operator",
            "company_name": "PulseForge Fitness",
            "address": "882 Hudson Walk Apt. 562",
            "address_2": null,
            "address_3": null,
            "city": "East Janelleshire",
            "country": "UK",
            "postcode": "35079-4065",
            "language": "en",
            "email_verified_at": "2024-07-18T15:51:53+01:00",
            "metadata": [],
            "created_at": "2024-07-18T15:51:53+01:00"
        },
        "active": true,
        "start_date": "2024-07-18",
        "end_date": "2025-07-18",
        "metadata": {
            "integration_id": "ABC123"
        },
        "created_at": "2024-07-18T15:51:56+01:00"
    }
}

Fetch contract details.

GET
https://api.orbit4.org
/v1/contracts/{contract}
requires authentication

This endpoint allows you to retrieve details of a specific contract by their ID.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

URL Parameters

contract
string
required

The ID of the contract.

Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.orbit4.org/v1/contracts/1" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 46
                                                         
{
    "data": {
        "id": 1,
        "number": "WSGE123",
        "type": "",
        "gym_operator": {
            "id": 2,
            "first_name": "Kurt",
            "last_name": "Hayes",
            "email": "[email protected]",
            "role": "gym_operator",
            "company_name": "PulseForge Fitness",
            "address": "776 Antonette Ways Suite 295",
            "address_2": null,
            "address_3": null,
            "city": "Port Dakota",
            "country": "UK",
            "postcode": "60694-8782",
            "language": "en",
            "email_verified_at": "2024-07-18T15:51:53+01:00",
            "metadata": [],
            "created_at": "2024-07-18T15:51:53+01:00"
        },
        "service_provider": {
            "id": 4,
            "first_name": "Brice",
            "last_name": "Hansen",
            "email": "[email protected]",
            "role": "service_provider",
            "company_name": "The Gym Fixers",
            "address": "26672 Lilliana Ferry",
            "address_2": null,
            "address_3": null,
            "city": "New Desmond",
            "country": "UK",
            "postcode": "57650",
            "language": "en",
            "email_verified_at": "2024-07-18T15:51:54+01:00",
            "metadata": [],
            "created_at": "2024-07-18T15:51:54+01:00"
        },
        "active": true,
        "start_date": "2024-07-17",
        "end_date": "2025-07-17",
        "assets": [
            {
                "id": 1,
                "brand": "Hammer Strength",
                "range": "Plateloaded Iso-Lateral",
                "product": "Seated Leg Press",
                "product_id": 5,
                "qr_code": "O4-314",
                "serial_number": "MSN-609",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£7,821.75",
                "fitness_product": 1,
                "has_odometer": 0,
                "residual_price": "£735.14",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            {
                "id": 2,
                "brand": "Life Fitness",
                "range": "Signature",
                "product": "Chest Press",
                "product_id": 2,
                "qr_code": "O4-167",
                "serial_number": "MSN-895",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£1,017.85",
                "fitness_product": 1,
                "has_odometer": 0,
                "residual_price": "£469.55",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            {
                "id": 3,
                "brand": "Hammer Strength",
                "range": "Plateloaded Iso-Lateral",
                "product": "Seated Leg Press",
                "product_id": 5,
                "qr_code": "O4-940",
                "serial_number": "MSN-779",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£8,055.31",
                "fitness_product": 0,
                "has_odometer": 1,
                "residual_price": "£735.14",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            {
                "id": 4,
                "brand": "Technogym",
                "range": "Excite JOG 700 LED",
                "product": "Treadmill",
                "product_id": 4,
                "qr_code": "O4-165",
                "serial_number": "MSN-127",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£9,362.92",
                "fitness_product": 1,
                "has_odometer": 1,
                "residual_price": "£674.12",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            {
                "id": 5,
                "brand": "Technogym",
                "range": "Excite JOG 700 LED",
                "product": "Treadmill",
                "product_id": 4,
                "qr_code": "O4-270",
                "serial_number": "MSN-671",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£4,621.17",
                "fitness_product": 0,
                "has_odometer": 0,
                "residual_price": "£674.12",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            {
                "id": 6,
                "brand": "Hammer Strength",
                "range": "Plateloaded Iso-Lateral",
                "product": "Seated Leg Press",
                "product_id": 5,
                "qr_code": "O4-215",
                "serial_number": "MSN-066",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£5,008.53",
                "fitness_product": 0,
                "has_odometer": 1,
                "residual_price": "£735.14",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            {
                "id": 7,
                "brand": "Life Fitness",
                "range": "Signature",
                "product": "Chest Press",
                "product_id": 2,
                "qr_code": "O4-189",
                "serial_number": "MSN-740",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£2,021.76",
                "fitness_product": 1,
                "has_odometer": 1,
                "residual_price": "£469.55",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            {
                "id": 8,
                "brand": "Life Fitness",
                "range": "IC7 Spin Bike",
                "product": "Studio Bike",
                "product_id": 1,
                "qr_code": "O4-904",
                "serial_number": "MSN-469",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£1,734.32",
                "fitness_product": 1,
                "has_odometer": 1,
                "residual_price": "£564.04",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            {
                "id": 9,
                "brand": "Technogym",
                "range": "Excite JOG 700 LED",
                "product": "Treadmill",
                "product_id": 4,
                "qr_code": "O4-659",
                "serial_number": "MSN-536",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£2,736.91",
                "fitness_product": 0,
                "has_odometer": 1,
                "residual_price": "£674.12",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            {
                "id": 10,
                "brand": "Technogym",
                "range": "Excite JOG 700 LED",
                "product": "Treadmill",
                "product_id": 4,
                "qr_code": "O4-815",
                "serial_number": "MSN-248",
                "installation_date": "18/07/2021",
                "manufacturing_date": "18/07/2020",
                "warranty_end_date": "18/07/2026",
                "current_spend": "£0",
                "max_spend": "£1,124.20",
                "fitness_product": 0,
                "has_odometer": 1,
                "residual_price": "£674.12",
                "image": null,
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            }
        ],
        "metadata": [],
        "created_at": "2024-07-18T15:51:55+01:00"
    }
}

Media

The following set of endpoints are designed to facilitate the management of media files within the different resources.

Upload media.

POST
https://api.orbit4.org
/v1/media
requires authentication

This endpoint allows you to upload media files to the specified resource. Some media types are single-use, meaning that only one media file can be uploaded for that type on that resource. If a media file already exists for the specified type, it will be replaced with the new one.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
multipart/form-data

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.orbit4.org/v1/media" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --form "type=image"\
    --form "resource_id=1"\
    --form "resource_type=ticket"\
    --form "file=@/tmp/phpopsYj8" 
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 40
                                                         
{
    "data": {
        "id": 3,
        "url": "https://cdn.orbit4.org/uploads/9349566992c0c737099.91106463.jpg",
        "type": "image",
        "extra_properties": null,
        "created_at": "2024-07-18T15:51:56+01:00"
    }
}

Update media extra properties.

PUT
https://api.orbit4.org
/v1/media/{media}
requires authentication

This endpoint allows you to upload media metadata to the specified resource.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json

URL Parameters

media
string
required

The ID of the media file.

Example:
2

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.orbit4.org/v1/media/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"extra_properties\": \"{\\\"approved\\\":true}\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 39
                                                         
{
    "data": {
        "id": 2,
        "url": "https://cdn.orbit4.org/uploads/quote.pdf",
        "type": "quote",
        "extra_properties": {
            "approved": true
        },
        "created_at": "2024-07-18T15:51:55+01:00"
    }
}

Notes

The following set of endpoints are designed to facilitate the management of ticket notes. accounts.

Create ticket note.

POST
https://api.orbit4.org
/v1/notes
requires authentication

This endpoint allows you to create a new note for the specified ticket.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.orbit4.org/v1/notes" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json" \
    --data "{
    \"user_id\": 2,
    \"ticket_id\": 1,
    \"note\": \"Can you please provide more details about the issue?\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 41
                                                         
{
    "data": {
        "id": 10,
        "user": {
            "id": 2,
            "first_name": "Kurt",
            "last_name": "Hayes",
            "email": "[email protected]",
            "role": "gym_operator",
            "company_name": "PulseForge Fitness",
            "address": "776 Antonette Ways Suite 295",
            "address_2": null,
            "address_3": null,
            "city": "Port Dakota",
            "country": "UK",
            "postcode": "60694-8782",
            "language": "en",
            "email_verified_at": "2024-07-18T15:51:53+01:00",
            "metadata": [],
            "created_at": "2024-07-18T15:51:53+01:00"
        },
        "note": "Can you please provide more details about the issue?",
        "is_system": false,
        "created_at": "2024-07-18T15:51:56+01:00"
    }
}

Tickets

The following set of endpoints are designed to facilitate the management of tickets within your different user accounts. They allow you to search for tickets, fetch specific ticket details, create new tickets, update ticket details, and even change tickets' status. The main purpose of these operations is facilitating the synchronization of your system's tickets with Orbit4.

Search for tickets.

GET
https://api.orbit4.org
/v1/tickets
requires authentication

This endpoint allows you to search for tickets based on specified criteria. The search results will include all tickets that match the criteria.

Headers

Authorization
Example:
Bearer client-admin-test-token
Content-Type
Example:
application/json

Query Parameters

user_id
integer

The ID of the user for whom the tickets are being fetched.

Example:
2
search
string

Search for tickets by ticket_number or description.

type
string

Filter tickets by their type.

Must be one of:
  • standard
  • ad-hoc
  • internal
  • service
status
string

Filter tickets by their status.

Must be one of:
  • open
  • parts_required
  • engineer_deployed
  • closed
sort
string

Results can be sorted by the following fields:

  • id
  • ticket_number
  • status
  • created_at

The default sorting order is ascending, but the direction can be reversed by prefixing a dash (-) like so: ?sort=-id

metadata[metadata_key]
string

Filter results by metadata. Replace metadata_key with the key of the metadata you want to filter by.

page
integer

The page number of results to be returned.

per_page
integer

The number of results to be returned for each page of results.

Response Fields

Example request:
curl --request GET \
    --get "https://api.orbit4.org/v1/tickets?user_id=2" \
    --header "Authorization: Bearer client-admin-test-token" \
    --header "Content-Type: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 45
                                                         
{
    "data": [
        {
            "id": 1,
            "number": "WSGE123-001",
            "type": "standard",
            "description": null,
            "priority": "Faulty",
            "status": "open",
            "engineer_arrived_at": null,
            "engineer_deployed_at": null,
            "closed_at": null,
            "service_provider": {
                "id": 4,
                "first_name": "Brice",
                "last_name": "Hansen",
                "email": "[email protected]",
                "role": "service_provider",
                "company_name": "The Gym Fixers",
                "address": "26672 Lilliana Ferry",
                "address_2": null,
                "address_3": null,
                "city": "New Desmond",
                "country": "UK",
                "postcode": "57650",
                "language": "en",
                "email_verified_at": "2024-07-18T15:51:54+01:00",
                "metadata": [],
                "created_at": "2024-07-18T15:51:54+01:00"
            },
            "gym_operator": {
                "id": 2,
                "first_name": "Kurt",
                "last_name": "Hayes",
                "email": "[email protected]",
                "role": "gym_operator",
                "company_name": "PulseForge Fitness",
                "address": "776 Antonette Ways Suite 295",
                "address_2": null,
                "address_3": null,
                "city": "Port Dakota",
                "country": "UK",
                "postcode": "60694-8782",
                "language": "en",
                "email_verified_at": "2024-07-18T15:51:53+01:00",
                "metadata": [],
                "created_at": "2024-07-18T15:51:53+01:00"
            },
            "ticket_admin": null,
            "engineer": null,
            "caretaker": null,
            "asset": null,
            "contract": {
                "id": 1,
                "number": "WSGE123",
                "type": "",
                "gym_operator": {
                    "id": 2,
                    "first_name": "Kurt",
                    "last_name": "Hayes",
                    "email": "[email protected]",
                    "role": "gym_operator",
                    "company_name": "PulseForge Fitness",
                    "address": "776 Antonette Ways Suite 295",
                    "address_2": null,
                    "address_3": null,
                    "city": "Port Dakota",
                    "country": "UK",
                    "postcode": "60694-8782",
                    "language": "en",
                    "email_verified_at": "2024-07-18T15:51:53+01:00",
                    "metadata": [],
                    "created_at": "2024-07-18T15:51:53+01:00"
                },
                "service_provider": {
                    "id": 4,
                    "first_name": "Brice",
                    "last_name": "Hansen",
                    "email": "[email protected]",
                    "role": "service_provider",
                    "company_name": "The Gym Fixers",
                    "address": "26672 Lilliana Ferry",
                    "address_2": null,
                    "address_3": null,
                    "city": "New Desmond",
                    "country": "UK",
                    "postcode": "57650",
                    "language": "en",
                    "email_verified_at": "2024-07-18T15:51:54+01:00",
                    "metadata": [],
                    "created_at": "2024-07-18T15:51:54+01:00"
                },
                "active": true,
                "start_date": "2024-07-17",
                "end_date": "2025-07-17",
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            "images": [],
            "notes": [
                {
                    "id": 1,
                    "user": {
                        "id": 2,
                        "first_name": "Kurt",
                        "last_name": "Hayes",
                        "email": "[email protected]",
                        "role": "gym_operator",
                        "company_name": "PulseForge Fitness",
                        "address": "776 Antonette Ways Suite 295",
                        "address_2": null,
                        "address_3": null,
                        "city": "Port Dakota",
                        "country": "UK",
                        "postcode": "60694-8782",
                        "language": "en",
                        "email_verified_at": "2024-07-18T15:51:53+01:00",
                        "metadata": [],
                        "created_at": "2024-07-18T15:51:53+01:00"
                    },
                    "note": "Ticket Raised",
                    "is_system": true,
                    "created_at": "2024-07-18T15:51:55+01:00"
                }
            ],
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 2,
            "number": "WSGE123-002",
            "type": "standard",
            "description": null,
            "priority": "Faulty",
            "status": "open",
            "engineer_arrived_at": null,
            "engineer_deployed_at": null,
            "closed_at": null,
            "service_provider": {
                "id": 4,
                "first_name": "Brice",
                "last_name": "Hansen",
                "email": "[email protected]",
                "role": "service_provider",
                "company_name": "The Gym Fixers",
                "address": "26672 Lilliana Ferry",
                "address_2": null,
                "address_3": null,
                "city": "New Desmond",
                "country": "UK",
                "postcode": "57650",
                "language": "en",
                "email_verified_at": "2024-07-18T15:51:54+01:00",
                "metadata": [],
                "created_at": "2024-07-18T15:51:54+01:00"
            },
            "gym_operator": {
                "id": 2,
                "first_name": "Kurt",
                "last_name": "Hayes",
                "email": "[email protected]",
                "role": "gym_operator",
                "company_name": "PulseForge Fitness",
                "address": "776 Antonette Ways Suite 295",
                "address_2": null,
                "address_3": null,
                "city": "Port Dakota",
                "country": "UK",
                "postcode": "60694-8782",
                "language": "en",
                "email_verified_at": "2024-07-18T15:51:53+01:00",
                "metadata": [],
                "created_at": "2024-07-18T15:51:53+01:00"
            },
            "ticket_admin": null,
            "engineer": null,
            "caretaker": null,
            "asset": null,
            "contract": {
                "id": 1,
                "number": "WSGE123",
                "type": "",
                "gym_operator": {
                    "id": 2,
                    "first_name": "Kurt",
                    "last_name": "Hayes",
                    "email": "[email protected]",
                    "role": "gym_operator",
                    "company_name": "PulseForge Fitness",
                    "address": "776 Antonette Ways Suite 295",
                    "address_2": null,
                    "address_3": null,
                    "city": "Port Dakota",
                    "country": "UK",
                    "postcode": "60694-8782",
                    "language": "en",
                    "email_verified_at": "2024-07-18T15:51:53+01:00",
                    "metadata": [],
                    "created_at": "2024-07-18T15:51:53+01:00"
                },
                "service_provider": {
                    "id": 4,
                    "first_name": "Brice",
                    "last_name": "Hansen",
                    "email": "[email protected]",
                    "role": "service_provider",
                    "company_name": "The Gym Fixers",
                    "address": "26672 Lilliana Ferry",
                    "address_2": null,
                    "address_3": null,
                    "city": "New Desmond",
                    "country": "UK",
                    "postcode": "57650",
                    "language": "en",
                    "email_verified_at": "2024-07-18T15:51:54+01:00",
                    "metadata": [],
                    "created_at": "2024-07-18T15:51:54+01:00"
                },
                "active": true,
                "start_date": "2024-07-17",
                "end_date": "2025-07-17",
                "metadata": [],
                "created_at": "2024-07-18T15:51:55+01:00"
            },
            "images": [
                {
                    "id": 1,
                    "url": "https://cdn.orbit4.org/uploads/image.jpg",
                    "type": "image",
                    "extra_properties": null,
                    "created_at": "2024-07-18T15:51:55+01:00"
                }
            ],
            "notes": [
                {
                    "id": 2,
                    "user": {
                        "id": 2,
                        "first_name": "Kurt",
                        "last_name": "Hayes",
                        "email": "[email protected]",
                        "role": "gym_operator",
                        "company_name": "PulseForge Fitness",
                        "address": "776 Antonette Ways Suite 295",
                        "address_2": null,
                        "address_3": null,
                        "city": "Port Dakota",
                        "country": "UK",
                        "postcode": "60694-8782",
                        "language": "en",
                        "email_verified_at": "2024-07-18T15:51:53+01:00",
                        "metadata": [],
                        "created_at": "2024-07-18T15:51:53+01:00"
                    },
                    "note": "Ticket Raised",
                    "is_system": true,
                    "created_at": "2024-07-18T15:51:55+01:00"
                },
                {
                    "id": 8,
                    "user": {
                        "id": 2,
                        "first_name": "Kurt",
                        "last_name": "Hayes",
                        "email": "[email protected]",
                        "role": "gym_operator",
                        "company_name": "PulseForge Fitness",
                        "address": "776 Antonette Ways Suite 295",
                        "address_2": null,
                        "address_3": null,
                        "city": "Port Dakota",
                        "country": "UK",
                        "postcode": "60694-8782",
                        "language": "en",
                        "email_verified_at": "2024-07-18T15:51:53+01:00",
                        "metadata": [],
                        "created_at": "2024-07-18T15:51:53+01:00"
                    },
                    "note": "Hey, this machine is now totally out of use. Can you come today?",
                    "is_system": false,
                    "created_at": "2024-07-18T15:51:55+01:00"
                },
                {
                    "id": 9,
                    "user": {
                        "id": 4,
                        "first_name": "Brice",
                        "last_name": "Hansen",
                        "email": "[email protected]",
                        "role": "service_provider",
                        "company_name": "The Gym Fixers",
                        "address": "26672 Lilliana Ferry",
                        "address_2": null,
                        "address_3": null,
                        "city": "New Desmond",
                        "country": "UK",
                        "postcode": "57650",
                        "language": "en",
                        "email_verified_at": "2024-07-18T15:51:54+01:00",
                        "metadata": [],
                        "created_at": "2024-07-18T15:51:54+01:00"
                    },
                    "note": "Sure, no problem, I'll deploy one of my technicians out to you now.",
                    "is_system": false,
                    "created_at": "2024-07-18T15:51:55+01:00"
                }
            ],
            "metadata": [],
            "created_at": "2024-07-18T15:51:55+01:00"
        },
        {
            "id": 3,
            "number": "WSGE123-003",
            "type": "standard",
            "description": null,
            "priority": "Faulty",
            "status": "open",
            "engineer_arrived_at": null,
            "engineer_deployed_at": null,
            "closed_at": null,
            "service_provider": {
                "id": 4,
                "first_name": "Brice",
                "last_name": "Hansen",
                "email": "[email protected]",
                "role": "service_provider",
                "company_name": "The Gym Fixers",
                "address": "26672 Lilliana Ferry",
                "address_2": null,
                "address_3": null,
                "city": "New Desmond",
                "country": "UK",
                "postcode": "57650",
                "language": "en",
                "email_verified_at": "2024-07-18T15:51:54+01:00",
                "metadata": [],
                "created_at": "2024-07-18T15:51:54+01:00"
            },
            "gym_operator": {
                "id": 2,
                "first_name": "Kurt",
                "last_name": "Hayes",
                "email": "[email protected]",
                "role": "gym_operator",
                "company_name": "PulseForge Fitness",
                "address": "776 Antonette Ways Suite 295",
                "address_2": null,
                "address_3": null,
                "city": "Port Dakota",
                "country": "UK",
                "postcode": "60694-8782",
                "language": "en",
                "email_verified_at": "2024-07-18T15:51:53+01:00",
                "metadata": [],
                "created_at": "2024-07-18T15:51:53+01:00"
            },
            "ticket_admin": null,
            "engineer": null,
            "caretaker": null,
            "asset": null,
            "contract": {
                "id": 1,
                "number": "WSGE123",
                "type": "",
                "gym_operator": {
                    "id": 2,
                    "first_name": "Kurt",
                    "last_name": "Hayes",
                    "email": "[email protected]",
                    "role": "gym_operator",
                    "company_name": "PulseForge Fitness",
                    "address": "776 Antonette Ways Suite 295",
                    "address_2": null,
                    "address_3": null,
                    "city": "Port Dakota",
                    "country": "UK",
                    "postcode": "60694-8782",
                    "language": "en",
                    "email_verified_at": "2024-07-18T15:51:53+01:00",
                    "metadata": [],
                    "created_at": "2024-07-18T15:51:53+01:00"
                },
                "service_provider": {
                    "id": 4,
                    "first_name": "Brice",
                    "last_name": "Hansen",
                    "email": "[email protected]",
                    "role": "service_provider",
                    "company_name": "The Gym Fixers",
                    "address": "26672 Lilliana Ferry",
                    "address_2": null,
                    "address_3": null,
                    "city": "New Desmond",
                    "country": "UK",
                    "postcode": "57650",
                    "language": "en",
                    "email_verified_at": "2024-07-18T15:51:54+01:00",
                    "metadata": [],
                    "created_at": "2024-07-18T15:51:54+01:00"
                },
                &q