NAV
php bash

Quick Start

Welcome to the FitnessKPI Integration API Reference!
The intelligent dashboard for sports centers that provide your ERP software with the last technology in order to improve your business decisions.

Getting Started

To get started and receive API credentials please contact us from our web site or send an email to: comercial@fitness-kpi.com.
We will provide yor with the credencials and help you in the process.

URLs

Base URL: https://api.fitness-kpi.com/

We provide two APIs. Both APIs require the same data, the only difference is the way information is update. You can combine both.

Bulk API
Description: This API is designed for a quick integration. It only implements POST operations. You don't need to track or listen to any change in you ERP, because it override the current data contained in the session time range with the new data.

Standard API
Description: This API implements POST, GET, PUT and DELETE operations for each endpoint. It allow you to update or delete one or several specific registers.

Authentication

For the authentication you need to send the Authorization header with the value:

Fitnesskpi {token}

Bulk API

Each api token allow you to POST data to one or more clients that we previously allowed. The API process works with a session token that expires in 1hour. You are not allowed to get more than one session token for each api token and club at the same time.

In the first POST Init you will receive the parameter sid that will be required in the following API requests. Each POST is a step. You must follow each step in a strict order to be able to complete all the POSTs. However, you can repeat a previous step if you need it. To clean the session you must call the cancel method.

The steps are the following:

  1. POST Init > you'll get the session id sid. https://api.fitness-kpi.com/api/integration/bulk/v0/init
  2. POST Quotas. https://api.fitness-kpi.com/api/integration/bulk/v0/quotas
  3. POST Members. https://api.fitness-kpi.com/api/integration/bulk/v0/members
  4. POST Employees. https://api.fitness-kpi.com/api/integration/bulk/v0/employees
  5. POST Members Ups and Downs. https://api.fitness-kpi.com/api/integration/bulk/v0/memberslog
  6. POST Accesses. https://api.fitness-kpi.com/api/integration/bulk/v0/accesses
  7. POST Incomes. https://api.fitness-kpi.com/api/integration/bulk/v0/incomes
  8. POST Members Payments. https://api.fitness-kpi.com/api/integration/bulk/v0/memberpayments

All requests and responses use JSON format.

Init Session

This endpoit creates the session (sid) at our platform and starts the workflow. Only one session id per node_id is allowed.

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/bulk/v0/init", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],

    'json' => [
     "node_id"=>18,"start_date"=>"2018-01-01","end_date"=>"2018-12-31",
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/init" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"node_id":18,"start_date":"\"2018-01-01\"","end_date":"\"2018-12-31\""}'

HTTP Request

POST api/integration/bulk/v0/init

Body Parameters

Parameter Type Status Description
node_id integer required The client unique identification for your request.
start_date date required The date of the most recent data that you want to dump.
end_date date required The date of the oldest data that you want to dump.

Cancel Session


Requires authentication This endpoit cancel close the session.

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/bulk/v0/cancel", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/cancel?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}"

HTTP Request

POST api/integration/bulk/v0/cancel

Query Parameters

Parameter Status Description
sid required Session id.

Quotas


Requires authentication This endpoit override all quotas with the new data.

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/bulk/v0/quotas", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["quota_id"=>8, "quota_name"=>"qui"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/quotas?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"quota_id\"":8,"\"quota_name\"":"qui"}]}'

HTTP Request

POST api/integration/bulk/v0/quotas

Body Parameters

Parameter Type Status Description
data[]["quota_id"] integer required Quota unique identifier.
data[]["quota_name"] string required Quota name.

Query Parameters

Parameter Status Description
sid required Session id.

Members


Requires authentication This endpoit override all members with the new data.

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/bulk/v0/members", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["member_id"=>14, "gender"=>"Male", "cp"=>"55242", "birthdate"=>"1985-04-03", "payer"=>]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/members?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":14,"\"gender\"":"Male","\"cp\"":"55242","\"birthdate\"":"1985-04-03","\"payer\"":false}]}'

HTTP Request

POST api/integration/bulk/v0/members

Body Parameters

Parameter Type Status Description
data[]["member_id"] integer required Member unique identifier.
data[]["gender"] string optional Male or Female.
data[]["cp"] string optional Member Postal Code.
data[]["birthdate"] date optional Member Birthdate.
data[]["payer"] boolean required True when the member is paying his quota or other member's quota.

Query Parameters

Parameter Status Description
sid required Session id.

Employees


Requires authentication This endpoit override all employees with the new data.

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/bulk/v0/employees", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["employee_id"=>20, "name"=>"eveniet", "lastname"=>"officia", "email"=>"email@mail.com"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/employees?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"employee_id\"":20,"\"name\"":"eveniet","\"lastname\"":"officia","\"email\"":"email@mail.com"}]}'

HTTP Request

POST api/integration/bulk/v0/employees

Body Parameters

Parameter Type Status Description
data[]["employee_id"] integer required Employee unique identifier.
data[]["name"] string required Male or Female.
data[]["lastname"] string required Member Lastname.
data[]["email"] string optional Member Birthdate.

Query Parameters

Parameter Status Description
sid required Session id.

Ups and Downs


Requires authentication This endpoit override all member's registers which start_date is between the session start_date and end_date

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/bulk/v0/memberslog", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["memberlog_id"=>14, "quota_id"=>9, "member_id"=>4, "employee_id"=>16, "start_date"=>"2018-04-03", "end_date"=>"2018-09-03", "count_up"=>1, "count_down"=>1, "cancel_reason"=>"I do not loke to workout", "goal"=>"I want to be fit"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/memberslog?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberlog_id\"":14,"\"quota_id\"":9,"\"member_id\"":4,"\"employee_id\"":16,"\"start_date\"":"2018-04-03","\"end_date\"":"2018-09-03","\"count_up\"":true,"\"count_down\"":true,"\"cancel_reason\"":"I do not loke to workout","\"goal\"":"I want to be fit"}]}'

HTTP Request

POST api/integration/bulk/v0/memberslog

Body Parameters

Parameter Type Status Description
data[]["memberlog_id"] integer required Memberlog unique identifier.
data[]["quota_id"] integer required Quota unique identifier.
data[]["member_id"] integer required Member unique identifier.
data[]["employee_id"] integer required Employee unique identifier.
data[]["start_date"] date required The first day that the client has access to the sport center with the current quota.
data[]["end_date"] date optional The last day that the client has access to the sport center with the current quota.
data[]["count_up"] boolean required True if this up is not because a change of quota.
data[]["count_down"] boolean optional True if this down is not because a change of quota. Required if end_date is set.
data[]["cancel_reason"] string optional The client's reason to cancel de quota..
data[]["goal"] string optional The purpose of the client.

Query Parameters

Parameter Status Description
sid required Session id.

Accesses


Requires authentication This endpoit override all member's accesses which enter_date is between the session start_date and end_date

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/bulk/v0/accesses", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["access_id"=>15, "member_id"=>8, "enter_date"=>"2018-04-03 20:00:23", "exit_date"=>"2018-04-03 21:05:32", "door_id"=>1, "door_name"=>1]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/accesses?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"access_id\"":15,"\"member_id\"":8,"\"enter_date\"":"2018-04-03 20:00:23","\"exit_date\"":"2018-04-03 21:05:32","\"door_id\"":1,"\"door_name\"":true}]}'

HTTP Request

POST api/integration/bulk/v0/accesses

Body Parameters

Parameter Type Status Description
data[]["access_id"] integer required access unique identifier.
data[]["member_id"] integer required Member unique identifier.
data[]["enter_date"] datetime required Male or Female.
data[]["exit_date"] datetime optional Member Postal Code.
data[]["door_id"] integer optional Member Birthdate.
data[]["door_name"] boolean optional Quota name.

Query Parameters

Parameter Status Description
sid required Session id.

Incomes


Requires authentication This endpoit override all incomes which income_date is between the session start_date and end_date

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/bulk/v0/incomes", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["income_id"=>5, "amount"=>8, "vat"=>21, "quota_id"=>13, "type"=>"Enrollments", "income_date"=>"Main door"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/incomes?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"income_id\"":5,"\"amount\"":8,"\"vat\"":21,"\"quota_id\"":13,"\"type\"":"Enrollments","\"income_date\"":"Main door"}]}'

HTTP Request

POST api/integration/bulk/v0/incomes

Body Parameters

Parameter Type Status Description
data[]["income_id"] integer required Income unique identifier.
data[]["amount"] integer required The amount without vat.
data[]["vat"] integer required Vat percentage.
data[]["quota_id"] integer optional Associated quota.
data[]["type"] string optional Income type. You can set this value to whatever you need.
data[]["income_date"] date required The income date.

Query Parameters

Parameter Status Description
sid required Session id.

Payments


Requires authentication This endpoit override all member's payments which issue_date is between the session start_date and end_date

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/bulk/v0/memberpayments", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["memberpayment_id"=>12, "member_id"=>15, "quota_id"=>10, "issue_date"=>"2018-04-01 21:05:32", "due_date"=>"2018-05-01 21:05:32", "payment_date"=>"2018-04-03 22:15:18"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/memberpayments?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberpayment_id\"":12,"\"member_id\"":15,"\"quota_id\"":10,"\"issue_date\"":"2018-04-01 21:05:32","\"due_date\"":"2018-05-01 21:05:32","\"payment_date\"":"2018-04-03 22:15:18"}]}'

HTTP Request

POST api/integration/bulk/v0/memberpayments

Body Parameters

Parameter Type Status Description
data[]["memberpayment_id"] integer required Payment unique identifier.
data[]["member_id"] integer required Member unique identifier.
data[]["quota_id"] integer optional Associated quota.
data[]["issue_date"] date required Ticket issue date.
data[]["due_date"] date required Ticket due date.
data[]["payment_date"] date optional Ticket payment date.

Query Parameters

Parameter Status Description
sid required Session id.

Standard API

Init Session

This endpoit creates the session (sid) at our platform and starts the workflow. Only one session id per node_id is allowed.

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/init", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],

    'json' => [
     "node_id"=>9,
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/init" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"node_id":9}'

HTTP Request

POST api/integration/standard/v0/init

Body Parameters

Parameter Type Status Description
node_id integer required The client unique identification for your request.

Cancel Session


Requires authentication This endpoit cancel close the session.

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/cancel", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
        ],
    'query' => [
            "sid" => "corporis",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/cancel?sid=corporis" \
    -H "Authorization: Fitnesskpi {token}"

HTTP Request

POST api/integration/standard/v0/cancel

Query Parameters

Parameter Status Description
sid required Session id.

Insert Quotas


Requires authentication Insert one or many quotas

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/quotas", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["quota_id"=>7, "quota_name"=>"explicabo"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/quotas?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"quota_id\"":7,"\"quota_name\"":"explicabo"}]}'

HTTP Request

POST api/integration/standard/v0/quotas

Body Parameters

Parameter Type Status Description
data[]["quota_id"] integer required Quota unique identifier.
data[]["quota_name"] string required Quota name.

Query Parameters

Parameter Status Description
sid required Session id.

Update Quotas


Requires authentication Update one or many quotas

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->put("https://api.fitness-kpi.com/api/integration/standard/v0/quotas", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["quota_id"=>14, "quota_name"=>"excepturi"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/quotas?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"quota_id\"":14,"\"quota_name\"":"excepturi"}]}'

HTTP Request

PUT api/integration/standard/v0/quotas

Body Parameters

Parameter Type Status Description
data[]["quota_id"] integer required Quota unique identifier.
data[]["quota_name"] string required Quota name.

Query Parameters

Parameter Status Description
sid required Session id.

Delete Quotas


Requires authentication Delete one or many quotas

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->delete("https://api.fitness-kpi.com/api/integration/standard/v0/quotas", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["quota_id"=>2]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/quotas?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"quota_id\"":2}]}'

HTTP Request

DELETE api/integration/standard/v0/quotas

Body Parameters

Parameter Type Status Description
data[]["quota_id"] integer required Quota unique identifier.

Query Parameters

Parameter Status Description
sid required Session id.

Insert Members


Requires authentication Insert one or many members

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/members", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["member_id"=>8, "gender"=>"Male", "cp"=>"55242", "birthdate"=>"1985-04-03", "payer"=>]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/members?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":8,"\"gender\"":"Male","\"cp\"":"55242","\"birthdate\"":"1985-04-03","\"payer\"":false}]}'

HTTP Request

POST api/integration/standard/v0/members

Body Parameters

Parameter Type Status Description
data[]["member_id"] integer required Member unique identifier.
data[]["gender"] string optional Male or Female.
data[]["cp"] string optional Member Postal Code.
data[]["birthdate"] date optional Member Birthdate.
data[]["payer"] boolean required True when the member is paying his quota or other member's quota.

Query Parameters

Parameter Status Description
sid required Session id.

Update Members


Requires authentication Update one or many members

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->put("https://api.fitness-kpi.com/api/integration/standard/v0/members", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["member_id"=>7, "gender"=>"Male", "cp"=>"55242", "birthdate"=>"1985-04-03", "payer"=>]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/members?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":7,"\"gender\"":"Male","\"cp\"":"55242","\"birthdate\"":"1985-04-03","\"payer\"":false}]}'

HTTP Request

PUT api/integration/standard/v0/members

Body Parameters

Parameter Type Status Description
data[]["member_id"] integer required Member unique identifier.
data[]["gender"] string optional Male or Female.
data[]["cp"] string optional Member Postal Code.
data[]["birthdate"] date optional Member Birthdate.
data[]["payer"] boolean required True when the member is paying his quota or other member's quota.

Query Parameters

Parameter Status Description
sid required Session id.

Delete Members


Requires authentication Delete one or many members

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->delete("https://api.fitness-kpi.com/api/integration/standard/v0/members", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["member_id"=>13]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/members?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":13}]}'

HTTP Request

DELETE api/integration/standard/v0/members

Body Parameters

Parameter Type Status Description
data[]["member_id"] integer required Member unique identifier.

Query Parameters

Parameter Status Description
sid required Session id.

Insert Employees


Requires authentication Insert one or many employees

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/employees", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["employee_id"=>12, "name"=>"ut", "lastname"=>"itaque", "email"=>"email@mail.com"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/employees?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"employee_id\"":12,"\"name\"":"ut","\"lastname\"":"itaque","\"email\"":"email@mail.com"}]}'

HTTP Request

POST api/integration/standard/v0/employees

Body Parameters

Parameter Type Status Description
data[]["employee_id"] integer required Employee unique identifier.
data[]["name"] string required Employee Name.
data[]["lastname"] string required Employee Lastname.
data[]["email"] string optional Member Birthdate.

Query Parameters

Parameter Status Description
sid required Session id.

Update Employees


Requires authentication Update one or many employees

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->put("https://api.fitness-kpi.com/api/integration/standard/v0/employees", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["employee_id"=>8, "name"=>"voluptas", "lastname"=>"sit", "email"=>"email@mail.com"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/employees?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"employee_id\"":8,"\"name\"":"voluptas","\"lastname\"":"sit","\"email\"":"email@mail.com"}]}'

HTTP Request

PUT api/integration/standard/v0/employees

Body Parameters

Parameter Type Status Description
data[]["employee_id"] integer required Employee unique identifier.
data[]["name"] string required Employee Name.
data[]["lastname"] string required Employee Lastname.
data[]["email"] string optional Member Birthdate.

Query Parameters

Parameter Status Description
sid required Session id.

Delete Employees


Requires authentication Delete one or many employees

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->delete("https://api.fitness-kpi.com/api/integration/standard/v0/employees", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["employee_id"=>12]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/employees?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"employee_id\"":12}]}'

HTTP Request

DELETE api/integration/standard/v0/employees

Body Parameters

Parameter Type Status Description
data[]["employee_id"] integer required Employee unique identifier.

Query Parameters

Parameter Status Description
sid required Session id.

Insert Ups and Downs


Requires authentication Insert one or many member's registers

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/memberslog", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["memberlog_id"=>11, "quota_id"=>6, "member_id"=>6, "employee_id"=>19, "start_date"=>"2018-04-03", "end_date"=>"2018-09-03", "count_up"=>1, "count_down"=>1, "cancel_reason"=>"I do not loke to workout", "goal"=>"I want to be fit"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/memberslog?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberlog_id\"":11,"\"quota_id\"":6,"\"member_id\"":6,"\"employee_id\"":19,"\"start_date\"":"2018-04-03","\"end_date\"":"2018-09-03","\"count_up\"":true,"\"count_down\"":true,"\"cancel_reason\"":"I do not loke to workout","\"goal\"":"I want to be fit"}]}'

HTTP Request

POST api/integration/standard/v0/memberslog

Body Parameters

Parameter Type Status Description
data[]["memberlog_id"] integer required Member unique identifier.
data[]["quota_id"] integer required Quota unique identifier.
data[]["member_id"] integer required Member unique identifier.
data[]["employee_id"] integer required Employee unique identifier.
data[]["start_date"] date required The first day that the client has access to the sport center with the current quota.
data[]["end_date"] date optional The last day that the client has access to the sport center with the current quota.
data[]["count_up"] boolean required True if this up is not because a change of quota.
data[]["count_down"] boolean optional True if this down is not because a change of quota. Required if end_date is set.
data[]["cancel_reason"] string optional The client's reason to cancel de quota..
data[]["goal"] string optional The purpose of the client.

Query Parameters

Parameter Status Description
sid required Session id.

Update Ups and Downs


Requires authentication Update one or many member's registers

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->put("https://api.fitness-kpi.com/api/integration/standard/v0/memberslog", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["memberlog_id"=>17, "quota_id"=>3, "member_id"=>3, "employee_id"=>3, "start_date"=>"2018-04-03", "end_date"=>"2018-09-03", "count_up"=>1, "count_down"=>1, "cancel_reason"=>"I do not loke to workout", "goal"=>"I want to be fit"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/memberslog?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberlog_id\"":17,"\"quota_id\"":3,"\"member_id\"":3,"\"employee_id\"":3,"\"start_date\"":"2018-04-03","\"end_date\"":"2018-09-03","\"count_up\"":true,"\"count_down\"":true,"\"cancel_reason\"":"I do not loke to workout","\"goal\"":"I want to be fit"}]}'

HTTP Request

PUT api/integration/standard/v0/memberslog

Body Parameters

Parameter Type Status Description
data[]["memberlog_id"] integer required Member unique identifier.
data[]["quota_id"] integer required Quota unique identifier.
data[]["member_id"] integer required Member unique identifier.
data[]["employee_id"] integer required Employee unique identifier.
data[]["start_date"] date required The first day that the client has access to the sport center with the current quota.
data[]["end_date"] date optional The last day that the client has access to the sport center with the current quota.
data[]["count_up"] boolean required True if this up is not because a change of quota.
data[]["count_down"] boolean optional True if this down is not because a change of quota. Required if end_date is set.
data[]["cancel_reason"] string optional The client's reason to cancel de quota..
data[]["goal"] string optional The purpose of the client.

Query Parameters

Parameter Status Description
sid required Session id.

Delete Ups and Downs


Requires authentication Delete one or many member's registers

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->delete("https://api.fitness-kpi.com/api/integration/standard/v0/memberslog", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["memberlog_id"=>13]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/memberslog?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberlog_id\"":13}]}'

HTTP Request

DELETE api/integration/standard/v0/memberslog

Body Parameters

Parameter Type Status Description
data[]["memberlog_id"] integer required Member unique identifier.

Query Parameters

Parameter Status Description
sid required Session id.

Insert Accesses


Requires authentication Insert one or many accesses

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/accesses", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["member_id"=>2, "enter_date"=>"2018-04-03 20:00:23", "exit_date"=>"2018-04-03 21:05:32", "door_id"=>1, "door_name"=>1]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/accesses?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":2,"\"enter_date\"":"2018-04-03 20:00:23","\"exit_date\"":"2018-04-03 21:05:32","\"door_id\"":1,"\"door_name\"":true}]}'

HTTP Request

POST api/integration/standard/v0/accesses

Body Parameters

Parameter Type Status Description
data[]["member_id"] integer required Member unique identifier.
data[]["enter_date"] datetime required Male or Female.
data[]["exit_date"] datetime optional Member Postal Code.
data[]["door_id"] integer optional Member Birthdate.
data[]["door_name"] boolean optional Quota name.

Query Parameters

Parameter Status Description
sid required Session id.

Update Accesses


Requires authentication Update one or many accesses

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->put("https://api.fitness-kpi.com/api/integration/standard/v0/accesses", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["access_id"=>12, "enter_date"=>"2018-04-03 20:00:23", "exit_date"=>"2018-04-03 21:05:32", "door_id"=>1, "door_name"=>1]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/accesses?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"access_id\"":12,"\"enter_date\"":"2018-04-03 20:00:23","\"exit_date\"":"2018-04-03 21:05:32","\"door_id\"":1,"\"door_name\"":true}]}'

HTTP Request

PUT api/integration/standard/v0/accesses

Body Parameters

Parameter Type Status Description
data[]["access_id"] integer required Member unique identifier.
data[]["enter_date"] datetime required Male or Female.
data[]["exit_date"] datetime optional Member Postal Code.
data[]["door_id"] integer optional Member Birthdate.
data[]["door_name"] boolean optional Quota name.

Query Parameters

Parameter Status Description
sid required Session id.

Delete Accesses


Requires authentication Delete one or many accesses

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->delete("https://api.fitness-kpi.com/api/integration/standard/v0/accesses", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["member_id"=>17, "enter_date"=>"2018-04-03 20:00:23", "exit_date"=>"2018-04-03 21:05:32", "door_id"=>1, "door_name"=>1]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/accesses?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":17,"\"enter_date\"":"2018-04-03 20:00:23","\"exit_date\"":"2018-04-03 21:05:32","\"door_id\"":1,"\"door_name\"":true}]}'

HTTP Request

DELETE api/integration/standard/v0/accesses

Body Parameters

Parameter Type Status Description
data[]["member_id"] integer required Member unique identifier.
data[]["enter_date"] datetime required Male or Female.
data[]["exit_date"] datetime optional Member Postal Code.
data[]["door_id"] integer optional Member Birthdate.
data[]["door_name"] boolean optional Quota name.

Query Parameters

Parameter Status Description
sid required Session id.

Insert Incomes


Requires authentication This one or manu incomes

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/incomes", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["income_id"=>7, "amount"=>17, "vat"=>21, "quota_id"=>20, "type"=>"Enrollments", "income_date"=>"Main door"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/incomes?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"income_id\"":7,"\"amount\"":17,"\"vat\"":21,"\"quota_id\"":20,"\"type\"":"Enrollments","\"income_date\"":"Main door"}]}'

HTTP Request

POST api/integration/standard/v0/incomes

Body Parameters

Parameter Type Status Description
data[]["income_id"] integer required Income unique identifier.
data[]["amount"] integer required The amount without vat.
data[]["vat"] integer required Vat percentage.
data[]["quota_id"] integer optional Associated quota.
data[]["type"] string optional Income type. You can set this value to whatever you need.
data[]["income_date"] date required The income date.

Query Parameters

Parameter Status Description
sid required Session id.

Update Incomes


Requires authentication Update one or many incomes

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->put("https://api.fitness-kpi.com/api/integration/standard/v0/incomes", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["income_id"=>6, "amount"=>2, "vat"=>21, "quota_id"=>19, "type"=>"Enrollments", "income_date"=>"Main door"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/incomes?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"income_id\"":6,"\"amount\"":2,"\"vat\"":21,"\"quota_id\"":19,"\"type\"":"Enrollments","\"income_date\"":"Main door"}]}'

HTTP Request

PUT api/integration/standard/v0/incomes

Body Parameters

Parameter Type Status Description
data[]["income_id"] integer required Income unique identifier.
data[]["amount"] integer required The amount without vat.
data[]["vat"] integer required Vat percentage.
data[]["quota_id"] integer optional Associated quota.
data[]["type"] string optional Income type. You can set this value to whatever you need.
data[]["income_date"] date required The income date.

Query Parameters

Parameter Status Description
sid required Session id.

Delete Incomes


Requires authentication Delete one or many incomes

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->delete("https://api.fitness-kpi.com/api/integration/standard/v0/incomes", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["income_id"=>5]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/incomes?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"income_id\"":5}]}'

HTTP Request

DELETE api/integration/standard/v0/incomes

Body Parameters

Parameter Type Status Description
data[]["income_id"] integer required Income unique identifier.

Query Parameters

Parameter Status Description
sid required Session id.

Insert Payments


Requires authentication Insert one or many payments

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/memberpayments", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["memberpayment_id"=>8, "member_id"=>16, "quota_id"=>10, "issue_date"=>"2018-04-01 21:05:32", "due_date"=>"2018-05-01 21:05:32", "payment_date"=>"2018-04-03 22:15:18"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/memberpayments?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberpayment_id\"":8,"\"member_id\"":16,"\"quota_id\"":10,"\"issue_date\"":"2018-04-01 21:05:32","\"due_date\"":"2018-05-01 21:05:32","\"payment_date\"":"2018-04-03 22:15:18"}]}'

HTTP Request

POST api/integration/standard/v0/memberpayments

Body Parameters

Parameter Type Status Description
data[]["memberpayment_id"] integer required Payment unique identifier.
data[]["member_id"] integer required Member unique identifier.
data[]["quota_id"] integer optional Associated quota.
data[]["issue_date"] date required Ticket issue date.
data[]["due_date"] date required Ticket due date.
data[]["payment_date"] date optional Ticket payment date.

Query Parameters

Parameter Status Description
sid required Session id.

Update Payments


Requires authentication Update one or many payments

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->put("https://api.fitness-kpi.com/api/integration/standard/v0/memberpayments", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["memberpayment_id"=>1, "member_id"=>14, "quota_id"=>19, "issue_date"=>"2018-04-01 21:05:32", "due_date"=>"2018-05-01 21:05:32", "payment_date"=>"2018-04-03 22:15:18"]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/memberpayments?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberpayment_id\"":1,"\"member_id\"":14,"\"quota_id\"":19,"\"issue_date\"":"2018-04-01 21:05:32","\"due_date\"":"2018-05-01 21:05:32","\"payment_date\"":"2018-04-03 22:15:18"}]}'

HTTP Request

PUT api/integration/standard/v0/memberpayments

Body Parameters

Parameter Type Status Description
data[]["memberpayment_id"] integer required Payment unique identifier.
data[]["member_id"] integer required Member unique identifier.
data[]["quota_id"] integer optional Associated quota.
data[]["issue_date"] date required Ticket issue date.
data[]["due_date"] date required Ticket due date.
data[]["payment_date"] date optional Ticket payment date.

Query Parameters

Parameter Status Description
sid required Session id.

Delete Payments


Requires authentication Delete one or many payments

Example request:


$client = new \GuzzleHttp\Client();
$response = $client->delete("https://api.fitness-kpi.com/api/integration/standard/v0/memberpayments", [

    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
            "Content-Type" => "application/json",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],

    'json' => [
     "data"=> [["memberpayment_id"=>8]],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/memberpayments?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberpayment_id\"":8}]}'

HTTP Request

DELETE api/integration/standard/v0/memberpayments

Body Parameters

Parameter Type Status Description
data[]["memberpayment_id"] integer required Payment unique identifier.

Query Parameters

Parameter Status Description
sid required Session id.