NAV
bash php

Info

Welcome to the generated API reference. Get Postman Collection

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:

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

All requests and responses use JSON format.

The maximun number of register per query in all the endpoints is limited to 100000. If you need to insert more than 100000 registers in one endpoint you must chunk the data in slices with less than 100000 registers and repeat the call to the endpoint.

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:

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":1,"start_date":"2019-01-01","end_date":"2019-04-01"}'

$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"=>1,"start_date"=>"2019-01-01","end_date"=>"2019-04-01"
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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.

Close Session


Requires authentication This endpoit close the session.

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/cancel?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}"

$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));

HTTP Request

POST api/integration/bulk/v0/cancel

Query Parameters

Parameter Status Description
sid required Session id.

Quotas

This endpoit override all quotas with the new data of the current session.


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/quotas?sid=exercitationem" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"quota_id\"":1,"\"quota_name\"":"Morning"}]}'

$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" => "exercitationem",
        ],

    'json' => [
                "data" =>[
["quota_id"=>1,"quota_name"=>"Morning"]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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

This endpoit override all members with the new data of the current session.


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/members?sid=architecto" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":1,"\"gender\"":"Male","\"cp\"":"18006","\"birthdate\"":"1985-04-03","\"name\"":"John","\"lastname\"":"Smith","\"email\"":"mail@mail.com","\"payer\"":true}]}'

$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" => "architecto",
        ],

    'json' => [
                "data" =>[
["member_id"=>1,"gender"=>"Male","cp"=>18006,"birthdate"=>"1985-04-03","name"=>"John","lastname"=>"Smith","email"=>"mail@mail.com","payer"=> true]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 optional Male or Female.
data[]["cp"] string optional optional Member Postal Code.
data[]["birthdate"] date optional optional Member Birthdate.
data[]["name"] string optional optional Member Name.
data[]["lastname"] string optional optional Member Last Name.
data[]["email"] string optional optional Member Email.
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

This endpoit override all employees with the new data of the current session.


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/employees?sid=qui" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"employee_id\"":1,"\"name\"":"John","\"lastname\"":"Smith","\"email\"":"mail@mail.com","\"active\"":true}]}'

$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" => "qui",
        ],

    'json' => [
                "data" =>[
["employee_id"=>1,"name"=>"John","lastname"=>"Smith","email"=>"mail@mail.com","active"=> true]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 Employee Name.
data[]["lastname"] string required Employee Last Name.
data[]["email"] string optional optional Employee Email.
data[]["active"] boolean required Employee status.

Query Parameters

Parameter Status Description
sid required Session id.

Memberslog

This endpoit insert memberslog's registers. The field start_date must be between the session start_date and end_date


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/memberslog?sid=soluta" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberlog_id\"":1,"\"quota_id\"":1,"\"member_id\"":1,"\"employee_id\"":1,"\"start_date\"":"2019-01-01 00:00:00.","\"end_date\"":"2019-01-01 00:00:00.","\"count_up\"":true,"\"count_down\"":true,"\"cancel_reason\"":"No time.","\"goal\"":"Definition."}]}'

$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" => "soluta",
        ],

    'json' => [
                "data" =>[
["memberlog_id"=>1,"quota_id"=>1,"member_id"=>1,"employee_id"=>1,"start_date"=>"2019-01-01 00:00:00.","end_date"=>"2019-01-01 00:00:00.","count_up"=> true,"count_down"=> true,"cancel_reason"=>"No time.","goal"=>"Definition."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 optional optional Quota identifier.
data[]["member_id"] integer required Member identifier.
data[]["employee_id"] integer optional optional Employee 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 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 optional True if this down is not because a change of quota. Required if end_date is set.
data[]["cancel_reason"] string optional optional The client's reason to cancel de quota.
data[]["goal"] string optional optional The purpose of the client.

Query Parameters

Parameter Status Description
sid required Session id.

Accesses

This endpoit insert accesses's registers. The field enter_date must be between the session start_date and end_date.


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/accesses?sid=et" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"access_id\"":1,"\"member_id\"":1,"\"enter_date\"":"2019-01-01 00:00:00.","\"exit_date\"":"2019-01-01 00:00:00.","\"door_id\"":1,"\"door_name\"":"Reception."}]}'

$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" => "et",
        ],

    'json' => [
                "data" =>[
["access_id"=>1,"member_id"=>1,"enter_date"=>"2019-01-01 00:00:00.","exit_date"=>"2019-01-01 00:00:00.","door_id"=>1,"door_name"=>"Reception."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 identifier.
data[]["enter_date"] date required The hour that the client enter to the sport center.
data[]["exit_date"] date optional optional The hour that the client exit to the sport center.
data[]["door_id"] integer optional optional Door identifier.
data[]["door_name"] string optional optional Door name.

Query Parameters

Parameter Status Description
sid required Session id.

Incomes

This endpoit insert incomes's registers. The field income_date must be between the session start_date and end_date


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/incomes?sid=facere" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"income_id\"":1,"\"amount\"":32,"\"vat\"":9,"\"quota_id\"":1,"\"type\"":"Enrollments.","\"income_date\"":"2019-01-01 00:00:00."}]}'

$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" => "facere",
        ],

    'json' => [
                "data" =>[
["income_id"=>1,"amount"=>32,"vat"=>9,"quota_id"=>1,"type"=>"Enrollments.","income_date"=>"2019-01-01 00:00:00."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 Income amount.
data[]["vat"] integer required Income vat. Example 21.
data[]["quota_id"] integer optional optional Quota identifier.
data[]["type"] string required Income type.
data[]["income_date"] date required Income date.

Query Parameters

Parameter Status Description
sid required Session id.

Memberpayments

This endpoit insert memberpayment's registers. The field issue_date must be between the session start_date and end_date


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/bulk/v0/memberpayments?sid=ut" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberpayment_id\"":1,"\"quota_id\"":1,"\"member_id\"":1,"\"due_date\"":"2019-01-15 00:00:00.","\"issue_date\"":"2019-01-01 00:00:00.","\"payment_date\"":"2019-01-02 00:00:00."}]}'

$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" => "ut",
        ],

    'json' => [
                "data" =>[
["memberpayment_id"=>1,"quota_id"=>1,"member_id"=>1,"due_date"=>"2019-01-15 00:00:00.","issue_date"=>"2019-01-01 00:00:00.","payment_date"=>"2019-01-02 00:00:00."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/integration/bulk/v0/memberpayments

Body Parameters

Parameter Type Status Description
data[]["memberpayment_id"] integer required Memberpayment unique identifier.
data[]["quota_id"] integer optional optional Quota unique identifier.
data[]["member_id"] integer required Member unique identifier.
data[]["due_date"] date required The payment due date.
data[]["issue_date"] date required The payment issue date.
data[]["payment_date"] date optional optional The date on which the payment was completed.

Query Parameters

Parameter Status Description
sid required Session id.

Standard API

This API provide POST, GET, PUT and DELETE methods for each endpoint. All requests and responses use JSON format.

Init

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


Requires authentication

Example request:

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":1}'

$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"=>1
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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.

Close Session


Requires authentication This endpoit close the session.

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/cancel?sid=HGF73KA983ND910ASLFD7EKQWEG63" \
    -H "Authorization: Fitnesskpi {token}"

$client = new \GuzzleHttp\Client();
$response = $client->post("https://api.fitness-kpi.com/api/integration/standard/v0/cancel", [
    'headers' => [
            "Authorization" => "Fitnesskpi {token}",
        ],
    'query' => [
            "sid" => "HGF73KA983ND910ASLFD7EKQWEG63",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/integration/standard/v0/cancel

Query Parameters

Parameter Status Description
sid required Session id.

Quotas - POST

Insert one or many quotas's records


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/quotas?sid=dolor" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"quota_id\"":1,"\"quota_name\"":"Morning"}]}'

$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" => "dolor",
        ],

    'json' => [
                "data" =>[
["quota_id"=>1,"quota_name"=>"Morning"]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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.

Quotas - PUT

Update one or many quotas's records


Requires authentication

Example request:

curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/quotas?sid=quidem" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"quota_id\"":1,"\"quota_name\"":"Morning"}]}'

$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" => "quidem",
        ],

    'json' => [
                "data" =>[
["quota_id"=>1,"quota_name"=>"Morning"]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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.

Quotas - DELETE

Delete one or many quotas's records


Requires authentication

Example request:

curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/quotas" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"quota_id\"":1}]}'

$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",
        ],

    'json' => [
                "data" =>[
["quota_id"=>1]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

DELETE api/integration/standard/v0/quotas

Body Parameters

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

Members - POST

Insert one or many members's records


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/members?sid=sunt" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":1,"\"gender\"":"Male","\"cp\"":"18006","\"birthdate\"":"1985-04-03","\"name\"":"John","\"lastname\"":"Smith","\"email\"":"mail@mail.com","\"payer\"":true}]}'

$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" => "sunt",
        ],

    'json' => [
                "data" =>[
["member_id"=>1,"gender"=>"Male","cp"=>18006,"birthdate"=>"1985-04-03","name"=>"John","lastname"=>"Smith","email"=>"mail@mail.com","payer"=> true]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 optional Male or Female.
data[]["cp"] string optional optional Member Postal Code.
data[]["birthdate"] date optional optional Member Birthdate.
data[]["name"] string optional optional Member Name.
data[]["lastname"] string optional optional Member Last Name.
data[]["email"] string optional optional Member Email.
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.

Members - PUT

Update one or many members's records


Requires authentication

Example request:

curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/members?sid=porro" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":1,"\"gender\"":"Male","\"cp\"":"18006","\"birthdate\"":"1985-04-03","\"name\"":"John","\"lastname\"":"Smith","\"email\"":"mail@mail.com","\"payer\"":true}]}'

$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" => "porro",
        ],

    'json' => [
                "data" =>[
["member_id"=>1,"gender"=>"Male","cp"=>18006,"birthdate"=>"1985-04-03","name"=>"John","lastname"=>"Smith","email"=>"mail@mail.com","payer"=> true]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 optional Male or Female.
data[]["cp"] string optional optional Member Postal Code.
data[]["birthdate"] date optional optional Member Birthdate.
data[]["name"] string optional optional Member Name.
data[]["lastname"] string optional optional Member Last Name.
data[]["email"] string optional optional Member Email.
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.

Members - DELETE

Delete one or many members's records


Requires authentication

Example request:

curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/members?sid=laudantium" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"member_id\"":1}]}'

$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" => "laudantium",
        ],

    'json' => [
                "data" =>[
["member_id"=>1]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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.

Employees - POST

Insert one or many employee's records


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/employees?sid=quisquam" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"employee_id\"":1,"\"name\"":"John","\"lastname\"":"Smith","\"email\"":"mail@mail.com","\"active\"":true}]}'

$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" => "quisquam",
        ],

    'json' => [
                "data" =>[
["employee_id"=>1,"name"=>"John","lastname"=>"Smith","email"=>"mail@mail.com","active"=> true]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 Last Name.
data[]["email"] string optional optional Employee Email.
data[]["active"] boolean required Employee status.

Query Parameters

Parameter Status Description
sid required Session id.

Employees - PUT

Update one or many employee's records


Requires authentication

Example request:

curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/employees?sid=accusantium" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"employee_id\"":1,"\"name\"":"John","\"lastname\"":"Smith","\"email\"":"mail@mail.com","\"active\"":true}]}'

$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" => "accusantium",
        ],

    'json' => [
                "data" =>[
["employee_id"=>1,"name"=>"John","lastname"=>"Smith","email"=>"mail@mail.com","active"=> true]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 Last Name.
data[]["email"] string optional optional Employee Email.
data[]["active"] boolean required Employee status.

Query Parameters

Parameter Status Description
sid required Session id.

Employees - DELETE

Delete one or many employee's records


Requires authentication

Example request:

curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/employees?sid=minus" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"employee_id\"":1}]}'

$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" => "minus",
        ],

    'json' => [
                "data" =>[
["employee_id"=>1]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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.

Ups and Downs - POST

Insert one or many ups and downs records


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/memberslog?sid=dolor" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberlog_id\"":1,"\"quota_id\"":1,"\"member_id\"":1,"\"employee_id\"":1,"\"start_date\"":"2019-01-01 00:00:00.","\"end_date\"":"2019-01-01 00:00:00.","\"count_up\"":true,"\"count_down\"":true,"\"cancel_reason\"":"No time.","\"goal\"":"Definition."}]}'

$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" => "dolor",
        ],

    'json' => [
                "data" =>[
["memberlog_id"=>1,"quota_id"=>1,"member_id"=>1,"employee_id"=>1,"start_date"=>"2019-01-01 00:00:00.","end_date"=>"2019-01-01 00:00:00.","count_up"=> true,"count_down"=> true,"cancel_reason"=>"No time.","goal"=>"Definition."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/integration/standard/v0/memberslog

Body Parameters

Parameter Type Status Description
data[]["memberlog_id"] integer required Memberlog unique identifier.
data[]["quota_id"] integer optional optional Quota identifier.
data[]["member_id"] integer required Member identifier.
data[]["employee_id"] integer optional optional Employee 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 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 optional True if this down is not because a change of quota. Required if end_date is set.
data[]["cancel_reason"] string optional optional The client's reason to cancel de quota.
data[]["goal"] string optional optional The purpose of the client.

Query Parameters

Parameter Status Description
sid required Session id.

Ups and Downs - PUT

Update one or many ups and downs records


Requires authentication

Example request:

curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/memberslog?sid=adipisci" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberlog_id\"":1,"\"quota_id\"":1,"\"member_id\"":1,"\"employee_id\"":1,"\"start_date\"":"2019-01-01 00:00:00.","\"end_date\"":"2019-01-01 00:00:00.","\"count_up\"":true,"\"count_down\"":true,"\"cancel_reason\"":"No time.","\"goal\"":"Definition."}]}'

$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" => "adipisci",
        ],

    'json' => [
                "data" =>[
["memberlog_id"=>1,"quota_id"=>1,"member_id"=>1,"employee_id"=>1,"start_date"=>"2019-01-01 00:00:00.","end_date"=>"2019-01-01 00:00:00.","count_up"=> true,"count_down"=> true,"cancel_reason"=>"No time.","goal"=>"Definition."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT api/integration/standard/v0/memberslog

Body Parameters

Parameter Type Status Description
data[]["memberlog_id"] integer required Memberlog unique identifier.
data[]["quota_id"] integer optional optional Quota identifier.
data[]["member_id"] integer required Member identifier.
data[]["employee_id"] integer optional optional Employee 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 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 optional True if this down is not because a change of quota. Required if end_date is set.
data[]["cancel_reason"] string optional optional The client's reason to cancel de quota.
data[]["goal"] string optional optional The purpose of the client.

Query Parameters

Parameter Status Description
sid required Session id.

Ups and Downs - DELETE

Delete one or many ups and downs records


Requires authentication

Example request:

curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/memberslog?sid=ea" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberlog_id\"":1}]}'

$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" => "ea",
        ],

    'json' => [
                "data" =>[
["memberlog_id"=>1]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

DELETE api/integration/standard/v0/memberslog

Body Parameters

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

Query Parameters

Parameter Status Description
sid required Session id.

Accesses - POST

Insert one or many access records


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/accesses?sid=distinctio" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"access_id\"":1,"\"member_id\"":1,"\"enter_date\"":"2019-01-01 00:00:00.","\"exit_date\"":"2019-01-01 00:00:00.","\"door_id\"":1,"\"door_name\"":"Reception."}]}'

$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" => "distinctio",
        ],

    'json' => [
                "data" =>[
["access_id"=>1,"member_id"=>1,"enter_date"=>"2019-01-01 00:00:00.","exit_date"=>"2019-01-01 00:00:00.","door_id"=>1,"door_name"=>"Reception."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/integration/standard/v0/accesses

Body Parameters

Parameter Type Status Description
data[]["access_id"] integer required Access unique identifier.
data[]["member_id"] integer required Member identifier.
data[]["enter_date"] date required The hour that the client enter to the sport center.
data[]["exit_date"] date optional optional The hour that the client exit to the sport center.
data[]["door_id"] integer optional optional Door identifier.
data[]["door_name"] string optional optional Door name.

Query Parameters

Parameter Status Description
sid required Session id.

Accesses - PUT

Update one or many access records


Requires authentication

Example request:

curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/accesses?sid=in" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"access_id\"":1,"\"member_id\"":1,"\"enter_date\"":"2019-01-01 00:00:00.","\"exit_date\"":"2019-01-01 00:00:00.","\"door_id\"":1,"\"door_name\"":"Reception."}]}'

$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" => "in",
        ],

    'json' => [
                "data" =>[
["access_id"=>1,"member_id"=>1,"enter_date"=>"2019-01-01 00:00:00.","exit_date"=>"2019-01-01 00:00:00.","door_id"=>1,"door_name"=>"Reception."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT api/integration/standard/v0/accesses

Body Parameters

Parameter Type Status Description
data[]["access_id"] integer required Access unique identifier.
data[]["member_id"] integer required Member identifier.
data[]["enter_date"] date required The hour that the client enter to the sport center.
data[]["exit_date"] date optional optional The hour that the client exit to the sport center.
data[]["door_id"] integer optional optional Door identifier.
data[]["door_name"] string optional optional Door name.

Query Parameters

Parameter Status Description
sid required Session id.

Accesses - DELETE

Delete one or many access records


Requires authentication

Example request:

curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/accesses?sid=dignissimos" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"access_id\"":1}]}'

$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" => "dignissimos",
        ],

    'json' => [
                "data" =>[
["access_id"=>1]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

DELETE api/integration/standard/v0/accesses

Body Parameters

Parameter Type Status Description
data[]["access_id"] integer required Access unique identifier.

Query Parameters

Parameter Status Description
sid required Session id.

Incomes - POST

Insert one or many income's records


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/incomes?sid=inventore" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"income_id\"":1,"\"amount\"":32.65,"\"vat\"":20,"\"quota_id\"":1,"\"type\"":"Enrollments.","\"income_date\"":"2019-01-01 00:00:00."}]}'

$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" => "inventore",
        ],

    'json' => [
                "data" =>[
["income_id"=>1,"amount"=>32.65,"vat"=>20,"quota_id"=>1,"type"=>"Enrollments.","income_date"=>"2019-01-01 00:00:00."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/integration/standard/v0/incomes

Body Parameters

Parameter Type Status Description
data[]["income_id"] integer required Income unique identifier.
data[]["amount"] float required Income amount.
data[]["vat"] integer required Income vat. Example 21.
data[]["quota_id"] integer optional optional Quota identifier.
data[]["type"] string required Income type.
data[]["income_date"] date required Income date.

Query Parameters

Parameter Status Description
sid required Session id.

Incomes - PUT

Update one or many income's records


Requires authentication

Example request:

curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/incomes?sid=rerum" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"income_id\"":1,"\"amount\"":32.65,"\"vat\"":10,"\"quota_id\"":1,"\"type\"":"Enrollments.","\"income_date\"":"2019-01-01 00:00:00."}]}'

$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" => "rerum",
        ],

    'json' => [
                "data" =>[
["income_id"=>1,"amount"=>32.65,"vat"=>10,"quota_id"=>1,"type"=>"Enrollments.","income_date"=>"2019-01-01 00:00:00."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT api/integration/standard/v0/incomes

Body Parameters

Parameter Type Status Description
data[]["income_id"] integer required Income unique identifier.
data[]["amount"] float required Income amount.
data[]["vat"] integer required Income vat. Example 21.
data[]["quota_id"] integer optional optional Quota identifier.
data[]["type"] string required Income type.
data[]["income_date"] date required Income date.

Query Parameters

Parameter Status Description
sid required Session id.

Incomes - DELETE

Delete one or many income's records


Requires authentication

Example request:

curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/incomes?sid=et" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"income_id\"":1}]}'

$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" => "et",
        ],

    'json' => [
                "data" =>[
["income_id"=>1]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

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.

Memberpayments - POST

Insert one or many memberpayment's records


Requires authentication

Example request:

curl -X POST "https://api.fitness-kpi.com/api/integration/standard/v0/memberpayments?sid=ut" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberpayment_id\"":1,"\"quota_id\"":1,"\"member_id\"":1,"\"due_date\"":"2019-01-15 00:00:00.","\"issue_date\"":"2019-01-01 00:00:00.","\"payment_date\"":"2019-01-02 00:00:00."}]}'

$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" => "ut",
        ],

    'json' => [
                "data" =>[
["memberpayment_id"=>1,"quota_id"=>1,"member_id"=>1,"due_date"=>"2019-01-15 00:00:00.","issue_date"=>"2019-01-01 00:00:00.","payment_date"=>"2019-01-02 00:00:00."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/integration/standard/v0/memberpayments

Body Parameters

Parameter Type Status Description
data[]["memberpayment_id"] integer required Memberpayment unique identifier.
data[]["quota_id"] integer optional optional Quota identifier.
data[]["member_id"] integer required Member identifier.
data[]["due_date"] date required The date that the payment due.
data[]["issue_date"] date required The date that the payment issue.
data[]["payment_date"] date optional optional the date that the payment was executed.

Query Parameters

Parameter Status Description
sid required Session id.

Memberpayments - PUT

Update one or many memberpayment's records


Requires authentication

Example request:

curl -X PUT "https://api.fitness-kpi.com/api/integration/standard/v0/memberpayments?sid=et" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberpayment_id\"":1,"\"quota_id\"":1,"\"member_id\"":1,"\"due_date\"":"2019-01-15 00:00:00.","\"issue_date\"":"2019-01-01 00:00:00.","\"payment_date\"":"2019-01-02 00:00:00."}]}'

$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" => "et",
        ],

    'json' => [
                "data" =>[
["memberpayment_id"=>1,"quota_id"=>1,"member_id"=>1,"due_date"=>"2019-01-15 00:00:00.","issue_date"=>"2019-01-01 00:00:00.","payment_date"=>"2019-01-02 00:00:00."]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT api/integration/standard/v0/memberpayments

Body Parameters

Parameter Type Status Description
data[]["memberpayment_id"] integer required Memberpayment unique identifier.
data[]["quota_id"] integer optional optional Quota identifier.
data[]["member_id"] integer required Member identifier.
data[]["due_date"] date required The date that the payment due.
data[]["issue_date"] date required The date that the payment issue.
data[]["payment_date"] date optional optional the date that the payment was executed.

Query Parameters

Parameter Status Description
sid required Session id.

Memberpayments - DELETE

Delete one or many memberpayment's records


Requires authentication

Example request:

curl -X DELETE "https://api.fitness-kpi.com/api/integration/standard/v0/memberpayments?sid=nesciunt" \
    -H "Authorization: Fitnesskpi {token}" \
    -H "Content-Type: application/json" \
    -d '{"data":[{"\"memberpayment_id\"":1}]}'

$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" => "nesciunt",
        ],

    'json' => [
                "data" =>[
["memberpayment_id"=>1]
],
    ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

DELETE api/integration/standard/v0/memberpayments

Body Parameters

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

Query Parameters

Parameter Status Description
sid required Session id.