NAV
shell php

Introduction

Welcome to the SENZU API! In this documentation you can find all the uses of our API, how it works and what are the interactions with each modules. Feel free to look anywhere !

We have language bindings in Shell, Ruby, Python, JavaScript and PHP ! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

In the dark area to the left you can search any chapter or word that you want to look at. You can also see the different titles of all our documentation, this would help you to find what you are looking for.

Authentication

The Senzu API uses token to authenticate requests. There are two types of tokens : Application Token and User's Token.

If you want to logout from the API, you need to use the route:
http://api.senzu.app/logout?token={token}&id_api_app={id_app}&redirect_url={url} ?.

Application Token

The SENZU API uses API keys to authenticate requests.

To obtain a key you must sign up, and your SENZU account will be upgraded to log in on the SENZU API dashboard. On the dashboard you will be able to manage your account and your own key.

Your key is strictly personal and carry many privileges, DO NOT share it in public for any reason. And be sure to keep it secure !

User's Token

The User's Token is used to retrieve information about the User. Like his products, his applications or his Files. Those information can be retrieved only if you have Token that correspond to the User.

To get an User's Token you must pass through Senzu Auth it allows you to choose which roles you want to request. Once it's done the User must confirm to give you the right to use those roles in his account. Senzu Auth gives you an User's Token.

https://auth.senzu.app/login?id_api_app=2&roles=user_financial,user_addresses&redirect_url={url}

When you use this route, you're redirected to the url you put followed by a generated token, for example: https://url.com?token={generated_token}

Query Mandatory Description
id_api_app True Id of your Application.
roles True This is the roles that you want to ask to the User. Each one are separated by a coma and without space.
redirect_url False It will redirect to this URL when the roles will be validated.
cancel_url False It will redirect to this URL if the User click on the Cancel button.
expires_in False Set the amount of time before the token expires. If it's set to null then Token will never expires.

Permissions

In some requests, you will have to modify or set a level of "chmod" which represents the amount of rights that you give or have on any product, application, group... The following table is showing the different levels of rights that they refer.

Chmod Name Rights
0 Nothing Not even possible to see the product
1 Reader "See only" right. The readers can only see the product/group... but nothing more
2 User Manage his own role and the secondary application
3 Manager Modify basics for the product and primary/secondary application
4 Admin Have access to all roles above, can give role and modify the product parameters. Cannot modify the owner role
5 Owner All rights, which includes deleting the product and modify roles

For the applications it might be slightly different, the following table will, like the previous one, show the different levels with a quick explanation of each role.

Chmod Name Rights
0 Nothing Not even possible to see the application
1 Reader "See only" right. The rearders can only see the application but nothing more
2 User Can add, modify or delete their own plugins for an application
3 Manager Can access to all plugins and modify them for the application
4 Admin Have access to all roles above, can give roles and modify the application parameters. Cannot modify the owner role
5 Owner All rights, which includes deleting the application and modify roles

Roles

To use the API you will need roles. Each role gives you access to different request. You can see what role you need to have for each section thanks to this :

You can have a unlimited number of roles. Sometimes only some arguments needs a role and it will be specified in the description of the argument. Roles can be added or deleted if needed but each of those actions requires a request to SENZU. SENZU can refuse to give some roles if it goes against our user chart or purpose. You can find the complete list of roles below. If a role is not available you will need to make a request to Senzu to have it.

Role name Available Description
developer_manage_basic False Allows you to manage your Application (Domains, Platforms, Redirects, Roles).
developer_basic False Gives you information about your Application.
api_management False Gives you information about Token's Application and allows you to manage it.
basic True Gives you access to information about the user (firstname, lastname, username, gender, country, profile_picture, currency, roles).
manage_basic True Allows you to manage an User (firstname, lastname, username, gender, birthdate, language, country).
user_addresses True Gives you information about the User's addresses.
manage_user_addresses False Allows you to manage the User's addresses.
user_mail True Gives you access to User's email.
user_birthdate True Gives you access to User's birthdate.
user_phone True Gives you access to User's phone.
user_logs False Gives you access to User's logs.
user_financial False Gives you access to User's balance and User's orders. Allows you to create a Payment.
user_files False Grants access to every route about Files.
products False Gives you information about the Products and Records of the User.
manage_products False Allows you to manage Products and Records of the User.
mailboxes_post False Allows you to create mail for the User.
mailboxes_read False Allows you to read and receive mail of the User.
applications False Gives you information about the Applications of the User and its Plugins.
manage_applications False Allows you to manage the Applications and Plugins of the User.
plugstore False Gives you information about the available Plugstore.
wallets False Gives you information about the Wallet object.
manage_wallets False Allows you to manage the Wallet object.
maker False Grants access to the information about the Maker account and allows you to manage it. Can create Records and Items.
developer False Grants access to the information about the Developer account and allows you to manage it. Can create Plugstores.
providers False Grants access to the information about the Provider account and allows you to manage it.
reseller False Grants access to the information about the Reseller account and allows you to manage it.
signup False Allows you to use the procedure to create an account.
password False Allows you to use the procedures to reset or change the user's password.
email False Allows you to use the procedure to change an email address.
delete_account False Allows you to use the procedure to delete an account.

Filters

For some requets, lots of results will be displayed, with the filters you can show only some prefered results to find easily what you want with less requests. Each filters are for specific requests. Example :

Filters Use
limit Reduce the number of results. Default limit is 10, but you can change it. If you don't want any limit you can put it to null
index You start the search from a specific position
index=10:lt - Here you take all entities lesser than the tenth entity.
index=10:lte - Here you take all entities lesser or equal than the tenth entity.
index=10:gt - Here you take all entities greater than the tenth entity.
index=10:gte - Here you take all entities greater or equal than the tenth entity.
index_id You start the search from a specific id
index_id=20:lt - You'll get all entities with an id lesser than 20.
index_id=20:lte - You'll get all entities with an id lesser or equal than 20.
index_id=20:gt - You'll get all entities with an id greater than 20.
index_id=20:gte - You'll get all entities with an id greater or equal than 20.
status Filtering by status (mostly true or false)
sort_by Sort by any field of the entity
sort_by={field}:asc - To sort the specific field in ascending order
sort_by={field}:desc - To sort the specific field in descending order
start_date Filtering by the starting date
end_date Filtering by the ending date

Addresses

ENDPOINTS
GET List all user's adresses
GET Retrieve a single user adress
POST Create an User adress
POST Update an User adress
DELETE Delete an User adress

The address of the user. If you have the rights, you can create an other adress, update youre adress or delete an adress.

The address object


{
    "id": 8,
    "alias": "Home",
    "firstname": "Remy",
    "lastname": "Fassol",
    "street": "25 rue du champignon",
    "additional": "1st floor",
    "country_code": "fr",
    "city": "Lyon",
    "zipcode": "69007",
    "state": "Rhone-Alpes",
    "phone": "+33600000000",
    "phone_mobile": "+33700000000",
    "vat_number": "FR56490020864",
    "is_selected": null,
    "date_created": {
        "date": "2020-06-04 11:10:59.589952",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attribute Description
id Id of the specific Address.
alias Chosen name for the address.
firstname Firstname.
lastname Lastname.
street Street of the adress.
additional More information, like the floor or the intercom adress code.
phone Phone.
phone_mobile Mobile phone.
vat_number Vat number.
is_selected Set if the adress is selected or not.
date_created Date of creation.

List all User's Addresses

curl "https://api.senzu.app/user/addresses?token={token}"
-X GET
$senzu->get('/addresses', '[token]', 'V1');

The above command returns JSON structured like this:

{
    "0":
    {
        "id":2,
        "alias":"Home"
    },
    "1":
    {
        "id":3,
        "alias":"Work"
    },
    "2":
    {
        "id":4,
        "alias":"Family"
    }
}

GET https://api.senzu.app/user/addresses

Returns a list of all Users' Addresses.

Retrieve an User address

curl https://api.senzu.app/user/addresses/2?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 2,
    "user": {
        "id": 3,
        "username": "Develogg"
    },
    "alias": "Home",
    "firstname": "Remy",
    "lastname": "Fassol",
    "street": "25 Rue du Champignon",
    "additional": "1er étage",
    "country_code": "fr",
    "city": "Lyon",
    "zipcode": "69007",
    "state": "Rhone-alpes",
    "phone": "+33600000000",
    "phone_mobile": "+33700000000",
    "vat_number": "FR56490020864",
    "status": true,
    "is_selected": true,
    "date_created": {
        "date": "2019-04-25 00:00:00.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2019-06-24 00:00:00.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/user/addresses/<id>

Show all the informations for a specific Address.

Parameter Description
id Id of the specific Address.

Create an User Address

curl https://api.senzu.app/user/addresses?token={token} \
-X POST \
-d alias="Home 2" \
-d firstname="Pierre" \
-d lastname="Dupont" \
-d street="1 Cours Emile Zola" \
-d country_code="FR" \
-d city="Lyon" \
-d zipcode=69006 \
-d state="Rhone-Alpes" 

The above command returns JSON structured like this :

{
    "id": 12,
    "company": null,
    "alias": "Home 2",
    "firstname": "Pierre",
    "lastname": "Dupont",
    "street": "1 Cours Emile Zola",
    "additional": null,
    "country_code": "FR",
    "city": "Lyon",
    "zipcode": "69006",
    "state": "Rhone-Alpes",
    "phone": null,
    "phone_mobile": null,
    "vat_number": "FR56490020864",
    "is_selected": null,
    "date_created": {
        "date": "2019-10-24 16:11:27.830690",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/user/addresses

Creates an User Address object.

Arguments Mandatory Description
alias True This is the alias of the Address.
firstname True Firstname.
lastname True Lastname.
street True Street.
country_code True Iso code of the country(Length = 2).
city True City.
zipcode True Zip code of the city.
state True State.
id_company False Defines Id of the company that link to the Address.
additional False More information like the floor or the intercom access code.
phone False Phone.
phone_mobile False Mobile phone.
vat_number False Vat Number.
is_selected False Set if this address will be selected or not.

Update an User Address

curl https://api.senzu.app/user/addresses/12?token={token} \
-X POST \
-d street="50 Cours Emile Zola" \
-d city="Villeurbanne" \
-d zipcode=69100

The above command returns JSON structured like this :

{
    "id": 13,
    "company": null,
    "alias": "Home 2",
    "firstname": "Pierre",
    "lastname": "Dupont",
    "street": "50 Cours Emile Zola",
    "additional": null,
    "country_code": "FR",
    "city": "Villeurbanne",
    "zipcode": "69100",
    "state": "Rhone-Alpes",
    "phone": null,
    "phone_mobile": null,
    "vat_number": "FR56490020864",
    "is_selected": false,
    "date_created": {
        "date": "2019-10-24 17:24:54.939713",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/user/addresses/<id>

Modify the data of a specific User Address.

Parameter Description
id Id of the User Address you want to modify.
Arguments Description
alias This is the alias of the Address.
firstname Firstname.
lastname Lastname.
street Street.
country_code Iso code of the country(Length = 2).
city City.
zipcode Zip code of the city.
state State.
id_company Defines Id of the company that link to the Address.
additional More information like the floor or the intercom access code.
phone Phone.
phone_mobile Mobile phone.
vat_number Vat Number.
is_selected Set if this address will be selected or not.

When you make a modification of the address it creates a new Address. Be aware of the new Id.

Delete an User Address

curl https://api.senzu.app/user/addresses/13?token={token} \
-X DELETE

DELETE https://api.senzu.app/user/addresses/<id>

Delete a specific Address.

Parameter Description
id Id of the Address you want to delete.

Api Management

List all Developer's Application

curl https://api.senzu.app/developers/1/apps?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 10,
        "display_name": "MyFristApp",
        "id_image": null,
        "date_created": {
            "date": "2020-05-11 16:34:43.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id": 11,
        "display_name": "Senzu Test",
        "id_image": null,
        "date_created": {
            "date": "2020-05-13 10:56:38.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/developers/<id>/apps

Returns a list of Applications create by a specific Developer.

Parameter Description
id Id of the specific Developer.

Retrieve a Developer Application

curl https://api.senzu.app/apps/5?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 13,
    "id_developer": 10,
    "id_image": null,
    "id_api_app_category": null,
    "private_key": "7520e7cacd327dbe1e87fe1c3614e75c31786ee060c62bcaa45e3c307b5d58ba",
    "display_name": "My New App",
    "contact_email": null,
    "privacy_url": null,
    "tos_url": null,
    "gdpr_name": null,
    "gdpr_email": null,
    "gdpr_address_street": null,
    "gdpr_address_other": null,
    "gdpr_address_city": null,
    "gdpr_address_state": null,
    "gdpr_address_zipcode": null,
    "gdpr_address_country": null,
    "status": true,
    "is_published": false,
    "date_created": {
        "date": "2020-06-17 10:26:17.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/apps/<id>

Show all the information for a specific Developer Application.

Parameter Description
id Id of the specific Developer Application.

Create a Developer Application

curl https://api.senzu.app/developers/10/apps?token={token} \
-X POST \
-d display_name="My new App"

The above command returns JSON structured like this :

{
    "id": 20,
    "id_developer": 10,
    "id_image": null,
    "id_api_app_category": null,
    "private_key": "46b82f907bb1ba0b83e34ef1482ec3083cf6cddcbeb9cd07b5b0577e444e3190",
    "display_name": "My New App",
    "redirects": null,
    "platforms": null,
    "domains": null,
    "roles": [
        {
            "alias_role": "basic",
            "daily_quota": null
        },
        {
            "alias_role": "user_mail",
            "daily_quota": null
        }
    ],
    "contact_email": null,
    "privacy_url": null,
    "tos_url": null,
    "gdpr_name": null,
    "gdpr_email": null,
    "gdpr_address_street": null,
    "gdpr_address_other": null,
    "gdpr_address_city": null,
    "gdpr_address_state": null,
    "gdpr_address_zipcode": null,
    "gdpr_address_country": null,
    "is_published": false,
    "date_created": {
        "date": "2020-06-29 15:14:25.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/developers/<id>/apps

Creates a Developer Application object. When your application is created, a application token is created (the "private_key"). You need it to update your application, keep it somewhere safe !

Parameter Description
id Id of the specific Developer.
Arguments Mandatory Description
display_name True This is the name of the Developer Application.
roles False Sets the Roles use by the Developer Application. Json Format. You have an alias_role and a daily_quota.
redirects False Sets the Redirects of the Developer Application. Each redirect is separated by a coma.
domains False Sets the Domains of the Developer Application. Each domain is separated by a coma.
platforms False Sets the Platforms of the Developer Application. Must be JSON.
id_image False Sets the Id of the Image (Files) that you link to the Developer Application.
id_api_app_category False Sets the Id of the category.
contact_email False Defines the email to contact.
privacy_url False Privacy URL.
tos_url False Terms of Service URL.
gdpr_name False General Data Protection Regulation Name.
gdpr_email False General Data Protection Regulation Email.
gdpr_address_street False General Data Protection Regulation Street.
gdpr_address_other False General Data Protection Regulation Other.
gdpr_address_city False General Data Protection Regulation City.
gdpr_address_state False General Data Protection Regulation State.
gdpr_address_zipcode False General Data Protection Regulation Zip code.
gdpr_address_country False General Data Protection Regulation Country.

Update a Developer Application

curl https://api.senzu.app/apps/20?token={private_key} \
-X POST \
-d contact_email="contact@senzu.app"

The above command returns JSON structured like this :

{
    "id": 20,
    "id_developer": 10,
    "id_image": null,
    "id_api_app_category": null,
    "private_key": "46b82f907bb1ba0b83e34ef1482ec3083cf6cddcbeb9cd07b5b0577e444e3190",
    "display_name": "My New App",
    "redirects": null,
    "platforms": null,
    "domains": null,
    "roles": null,
    "contact_email": "contact@senzu.app",
    "privacy_url": null,
    "tos_url": null,
    "gdpr_name": null,
    "gdpr_email": null,
    "gdpr_address_street": null,
    "gdpr_address_other": null,
    "gdpr_address_city": null,
    "gdpr_address_state": null,
    "gdpr_address_zipcode": null,
    "gdpr_address_country": null,
    "is_published": false,
    "date_created": {
        "date": "2020-06-29 15:14:25.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-07-01 14:39:48.775944",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps/<id>

Modify the data of a specific Developer Application.

Parameter Description
id Id of the Developer Application.
Arguments Description
display_name This is the name of the Developer Application.
id_image Sets the Id of the Image (Files) that you link to the Developer Application.
id_api_app_category Sets the Id of the category.
contact_email Defines the email to contact.
privacy_url Privacy URL.
tos_url Terms of Service URL.
gdpr_name General Data Protection Regulation Name.
gdpr_email General Data Protection Regulation Email.
gdpr_address_street General Data Protection Regulation Street.
gdpr_address_other General Data Protection Regulation Other.
gdpr_address_city General Data Protection Regulation City.
gdpr_address_state General Data Protection Regulation State.
gdpr_address_zipcode General Data Protection Regulation Zip code.
gdpr_address_country General Data Protection Regulation Country.

Delete a developper application

curl https://api.senzu.app/apps/20?token={private_key} \
-X DELETE \

DELETE https://api.senzu.app/apps/<id>

Delete a specific developper application.

Parameter Description
id Id of the Developer Application.

List all Application Categories

curl https://api.senzu.app/apps/categories?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "error": {
        "code": 200,
        "message": "Success"
    },
    "0": {
        "id": 11,
        "id_icon": 1,
        "id_parent": null,
        "name": "Business and Pages",
        "language": "fr",
        "country_code": "FR",
        "status": true,
        "date_created": {
            "date": "2020-01-30 00:00:00.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    },
    "1": {
        "id": 12,
        "id_icon": 1,
        "id_parent": null,
        "name": "Community and Government",
        "language": "fr",
        "country_code": "FR",
        "status": true,
        "date_created": {
            "date": "2020-01-30 00:00:00.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    },
    "2": {
        "id": 13,
        "id_icon": 1,
        "id_parent": null,
        "name": "Education",
        "language": "fr",
        "country_code": "FR",
        "status": true,
        "date_created": {
            "date": "2020-01-30 00:00:00.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    }
}

GET https://api.senzu.app/apps/categories

Returns the list of all Categories for the Developer Applications.

List all calls from application

curl https://api.senzu.app/apps/13/calls?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 361984,
        "route": "/apps/10",
        "parameters": "",
        "method": "GET",
        "date_created": {
            "date": "2020-06-17 11:13:23.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id": 361986,
        "route": "/apps/10",
        "parameters": "",
        "method": "GET",
        "date_created": {
            "date": "2020-06-17 11:17:50.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "2": {
        "id": 361987,
        "route": "/apps/13",
        "parameters": "",
        "method": "GET",
        "date_created": {
            "date": "2020-06-17 11:21:50.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/apps/<ID>/calls

List all calls from an developper application.

Parameter Description
id Id of the Developer Application.

List all Domains

curl https://api.senzu.app/apps/1/domains?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 7,
        "id_api_app": 21,
        "url": "senzu.app",
        "status": true,
        "date_created": {
            "date": "2020-07-01 14:49:55.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    }
}

GET https://api.senzu.app/apps/<id>/domains

Returns the list of all Domains for a Developer Applications.

Parameter Description
id Id of the Developer Application.

Add a Domain to a Developer Application

curl https://api.senzu.app/apps/10/domains?token={token} \
-X POST \
-d url="senzu.app"

The above command returns JSON structured like this :

{
    "id": 7,
    "id_api_app": 21,
    "url": "senzu.app",
    "date_created": {
        "date": "2020-07-01 14:49:55.431289",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps/<id>/domains

Add a Domain to the Developer Application.

Parameter Description
id Id of the specific Developer Application.
Arguments Mandatory Description
url True Defines the URL of the Domain you want to add.

Update a Domain

curl https://api.senzu.app/apps-domains/7?token={token} \
-X POST \
-d url="senzu.org"

The above command returns JSON structured like this :

{
    "id": 7,
    "id_api_app": 21,
    "url": "senzu.org",
    "date_created": {
        "date": "2020-07-01 14:49:55.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-07-02 16:15:50.241622",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps-domains/<id>

Modify the data of a specific Domain.

Parameter Description
id Id of the Domain.
Arguments Description
ulr Defines the URL of the Domain.

Delete a Domain

curl https://api.senzu.app/apps-domains/7?token={token} \
-X DELETE

DELETE https://api.senzu.app/apps-domains/<id>

Delete a specific Domain.

Parameter Description
id Id of the Domain to delete.

List all Platforms

curl https://api.senzu.app/apps/1/platforms?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 1,
        "id_api_app": 21,
        "data": [
            "ubuntu"
        ],
        "date_created": {
            "date": "2020-07-01 15:04:00.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": {
            "date": "2020-07-01 15:40:54.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/apps/<id>/platforms

Returns the list of all Platforms for a Developer Applications.

Parameter Description
id Id of the Developer Application.

Add a Platform to a Developer Application

curl https://api.senzu.app/apps/21/platforms?token={token} \
-X POST \
-d data[0]="windows"

The above command returns JSON structured like this :

{
    "id": 1,
    "id_api_app": 21,
    "data": [
        "windows"
    ],
    "date_created": {
        "date": "2020-07-01 15:04:00.741045",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps/<id>/platforms

Add a Platform to the Developer Application.

Parameter Description
id Id of the specific Developer Application.
Arguments Mandatory Description
data True Defines the data of the Platform you want to add.

Update a Platform

curl https://api.senzu.app/apps-platforms/1?token={token} \
-X POST \
-d data[0]="ubuntu"

The above command returns JSON structured like this :

{
    "id": 1,
    "id_api_app": 21,
    "data": [
        "ubuntu"
    ],
    "date_created": {
        "date": "2020-07-01 15:04:00.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-07-01 15:36:40.450337",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps-platforms/<id>

Modify the data of a specific Platform.

Parameter Description
id Id of the Platform.
Arguments Description
ulr Defines the URL of the Platform.

Delete a Platform

curl https://api.senzu.app/apps-platforms/1?token={token} \
-X DELETE

DELETE https://api.senzu.app/apps-platforms/<id>

Delete a specific Platform.

Parameter Description
id Id of the Platform to delete.

List all Redirects

curl https://api.senzu.app/apps/1/redirects?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 3,
        "id_api_app": 21,
        "url": "senzu.app",
        "date_created": {
            "date": "2020-07-01 15:05:07.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    }
}

GET https://api.senzu.app/apps/<id>/redirects

Returns the list of all Redirects for a Developer Applications.

Parameter Description
id Id of the Developer Application.

Add a Redirect to a Developer Application

curl https://api.senzu.app/apps/21/redirects?token={token} \
-X POST \
-d url="senzu.app"

The above command returns JSON structured like this :

{
    "id": 4,
    "id_api_app": 21,
    "url": "senzu.app",
    "date_created": {
        "date": "2020-07-01 15:53:43.834635",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps/<id>/redirects

Add a Redirect to the Developer Application.

Parameter Description
id Id of the specific Developer Application.
Arguments Mandatory Description
url True Defines the URL of the Redirect you want to add.

Update a Redirect

curl https://api.senzu.app/apps-redirects/4?token={token} \
-X POST \
-d url="senzu.org"

The above command returns JSON structured like this :

{
    "id": 4,
    "id_api_app": 21,
    "url": "senzu.org",
    "date_created": {
        "date": "2020-07-01 15:53:43.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-07-01 15:54:31.763758",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps-redirects/<id>

Modify the data of a specific Redirect.

Parameter Description
id Id of the Redirect.
Arguments Description
ulr Defines the URL of the Redirect.

Delete a Redirect

curl https://api.senzu.app/apps-redirects/4?token={token} \
-X DELETE

DELETE https://api.senzu.app/apps-redirects/<id>

Delete a specific Redirect.

Parameter Description
id Id of the Redirect to delete.

List all Roles

curl https://api.senzu.app/apps/1/roles?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 78,
        "id_api_app": 13,
        "alias_role": "basic",
        "daily_quota": null,
        "status": true,
        "is_requested": false,
        "date_created": {
            "date": "2020-06-17 10:26:17.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    },
    "1": {
        "id": 79,
        "id_api_app": 13,
        "alias_role": "user_mail",
        "daily_quota": null,
        "status": true,
        "is_requested": false,
        "date_created": {
            "date": "2020-06-17 10:26:17.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    }
}

GET https://api.senzu.app/apps/<id>/roles

Returns the list of all Roles for a Developer Applications.

Parameter Description
id Id of the Developer Application.

Add a Role to a Developer Application (401)

curl https://api.senzu.app/apps/21/roles?token={token} \
-X POST \
-d alias_role=providers
-d daily_quota=100

The above command returns JSON structured like this :

{
    "id": 95,
    "id_api_app": 21,
    "alias_role": "providers",
    "daily_quota": null,
    "status": false,
    "is_requested": true,
    "date_created": {
        "date": "2020-07-01 15:58:40.429095",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps/<id>/roles

Add a Role to the Developer Application.

Parameter Description
id Id of the specific Developer Application.
Arguments Mandatory Description
alias_role True Defines the alias of the Role you want to add.
daily_quota False Sets a daily quota to use the Role.

Update a Role

curl https://api.senzu.app/apps-roles/95?token={token} \
-X POST \
-d daily_quota=100

The above command returns JSON structured like this :

{
    "id": 96,
    "id_api_app": 21,
    "alias_role": "providers",
    "daily_quota": 10,
    "status": true,
    "is_requested": true,
    "date_created": {
        "date": "2020-07-01 15:59:32.306742",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps-redirects/<id>

Modify the data of a specific Role. It will create a new Role Object and delete the old Role.

Parameter Description
id Id of the Redirect.
Arguments Description
daily_quota Defines the daily quota of the Role.

Delete a Role

curl https://api.senzu.app/apps-roles/96?token={token} \
-X DELETE

DELETE https://api.senzu.app/apps-roles/<id>

Delete a specific Role.

Parameter Description
id Id of the Role to delete.

List all Tokens of an User

curl https://api.senzu.app/sessions?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "token": "3594e12e77daf5202aea2a8e48d87fdc54ff9a3e62243a3d02442df704cbc53956cb01203a97c8f5dd3da6c1feb193e1356511cf2438f5a2d316ec33bbffb4f0",
        "id_api_app": 3
    },
    "1": {
        "token": "3594e12e77daf5202aea2a8e48d87fdc54ff9a3e62243a3d02442df704cbc53956cb01203a97c8f5dd3da6c1feb193e1356511cf2438f5a2d316ec33bbffb4f0",
        "id_api_app": 8
    },
    "2": {
        "token": "3594e12e77daf5202aea2a8e48d87fdc54ff9a3e62243a3d02442df704cbc53956cb01203a97c8f5dd3da6c1feb193e1356511cf2438f5a2d316ec33bbffb4f0",
        "id_api_app": 2
    },
    "3": {
        "token": "3594e12e77daf5202aea2a8e48d87fdc54ff9a3e62243a3d02442df704cbc53956cb01203a97c8f5dd3da6c1feb193e1356511cf2438f5a2d316ec33bbffb4f0",
        "id_api_app": 1
    }
}

GET https://api.senzu.app/sessions

Returns the list of all tokens of the User.

List all Tokens of a Developer Application

curl https://api.senzu.app/apps/1/sessions?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "token": [
        "028cb2da1f7e1d02e1e88432b1e7413d06454c1945dfa724c4224f064f8fbacba808c70e76ea50d6017c178a881aa2438ef47b4c6f89c5681549bf0a19689b61",
        "17dc0cd6d6e2c946c47d8880f7e34569f28c6546bc50c2f286ba8953cce16a26be9f985cc7e14b0e72c25c431d43d06d0d01705ed700eaf70ac66b02ea541349",
        "48b94789a471c4f0a7870bea1a135cef110fe89fe438ac51a1145a61a2f51a1d6b41adfd397b05e6b1ec847f1273d6b857e7561d0e182e6b9239e6c623140f2d",
        "54f6b9003dff5beed37e9500a66caf54088e81b9576ab6f98886f212dd4ec5679880a643f76fed037ce71e97980d226b5bb7a6b0678cf73d094cef5b080a9f5d",
        "86c2ceedb86122337adc304c2fe85cbfb3830bb9587422397da51e715c956ffbcf5965c8d446a2904ce98d438fb83adf581c2bcf676779d7b0329890e8c96711",
        "99daeba9facfea2b9d9e2a4a6cff6c1362377746b6601354ff6bc5748d16c8d199aeb4f65198165d421662f3058dd80f0d8f18d5c5a2188b423411dd7a4a701a",
        "aca21z6adaz",
        "b9c0c9a94cb04f32037dc7c839bc5ac99df937efba917d777c1f3d232d0bbada0b3f0fb0c578350cb6a0ee7b0fae4abe71d2bf30284c1d101f6f8664bd04ee4e",
        "c6db07ffe095a060d4eb421ee7ca6dc5a8ac5509f5a247928ba5ebc002cdecf61b329eb54b3e0e7425c54175d5e5ce0d433ee34a53f2724db7912c34c3fb17d2",
        "e1aea42679c87bab9f89fcc58056ab878c2f137c4b62574f023fe300edb3b83f7b05d0c68472c168b60fb596ab634cc2c0fce1e638cf996cf069a5ee6135b926",
        "f2c801ae4f8399e62efe81c7b84fbca6fc4c46368bf7ef47752def16014dc38e9f6be96d922ede146f513c73a8a6bb7fe835020a2f2a4c688663df676d49e238"
    ]
}

GET https://api.senzu.app/apps/<id>/sessions

Returns the list of tokens for the Developer Application.

Parameter Description
id Id of the Developer Application.

Revoke a token

curl https://api.senzu.app/sessions/<id_token>?token={token} \
-X DELETE

DELETE https://api.senzu.app/sessions/<id>

Delete a specific token.

Parameter Description
id Id of the token.

Retrieve a Session

curl https://api.senzu.app/sessions/aca21z6adaz?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "token": "3594e12e77daf5202aea2a8e48d87fdc54ff9a3e62243a3d02442df704cbc53956cb01203a97c8f5dd3da6c1feb193e1356511cf2438f5a2d316ec33bbffb4f0",
    "id_api_app": 3,
    "id_user": 274,
    "logs": [
        "ROLE_BASIC",
        "ROLE_USER_MAIL",
        "ROLE_DEVELOPER",
        "ROLE_DEVELOPER_BASIC",
        "ROLE_DEVELOPER_MANAGE_BASIC",
        "ROLE_USER_FILES",
        "ROLE_PLUGSTORE"
    ],
    "date_created": {
        "date": "2020-06-03 10:14:18.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_expired": {
        "date": "2020-07-04 10:14:18.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/sessions/<id>

Show all the information for a specific Session (Token).

Parameter Description
id Id of the specific Session.

Delete a Session

curl https://api.senzu.app/sessions/aca21z6adaz?token={token} \
-X DELETE

DELETE https://api.senzu.app/sessions/<id>

Delete a specific Session (Token).

Parameter Description
id Id of the Session to delete.

Applications

ENDPOINTS
GET List all applications
GET Retrieve an application
GET Retrieve an application's user
POST Create an application
POST Update an application
DELETE Delete an application
POST Create access to an application
POST Change application user chmod
DELETE Delete application user chmod
GET Accept a shared application

An Application allow you to add plugins to your product. Before adding plugins you need to create an Application that you attach to your product. Once it's done you can add as any plugins as you want on your Application. And it's possible to put it on many products as you want. You can create an application an application, update an application an app, and, of course, even delete an application an app.

The Application object

{
    "id": 556,
    "url_image": "https://urlofimage.png",
    "name": "Application",
    "alias_name": "App",
    "subtitle": null,
    "color": "blue",
    "background_color": "auto",
    "password": null,
    "is_locked": false,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-02 15:15:47.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-02 15:19:08.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Arguments Decription
id The id of your application
url_image The URL of your appplication image.
name The name of your application.
alias_name The showed name of our application. If null it takes the name
subtitle The subtitle of your application.
color The color of yours plugins. Available color : green, blue, red, purple, orange. Default value : green.
background_color It's the background color of your application. Available background color : light, dark and auto (Depends of the time of the day). Default value : light.
password The password to your application.
is_locked False if you dont have a password. If you have one then it's true.
is_enabled Tells if your application is enabled on your record.

List all Applications

curl "https://api.senzu.app/applications?token={your_token}&contains=Application&id_issuer=4" \
-X GET

The above command returns JSON structured like this:

{

    "0": {
        "id": 555,
        "name": "ApplicationTest",
        "alias_name": "Test",
        "is_enabled": true,
        "url_image": "https://files.senzu.app/274/388-1591367378-3ecd477e516d8be4f9c31ac9a15c51c8.png",
        "is_locked": false
    },
    "1": {
        "id": 556,
        "name": "Application",
        "alias_name": "App",
        "is_enabled": true,
        "url_image": "https://files.senzu.app/274/389-1591367378-b5bc59bdbfd8ed535aea07e63b253be1.png",
        "is_locked": false
    }
}

GET https://api.senzu.app/applications

Returns a list of Applications.

Filters Description
contains A filter that allow to find an Application with a specific name.
id_issuer This is the id of the user that give you access to the Application.
is_locked Can be "true" or "false" and returns a list of locked Applications or not.
chmod Returns a list of Applications where the specified chmod match.

Retrieve an Application

curl https://api.senzu.app/applications/556?token={your_token} \
-X GET

The above command returns JSON structured like this:

{
    "id": 556,
    "url_image": "https://files.senzu.app/274/389-1591367479-6c11dbc66b46943a65595931f4768237.png",
    "name": "Ryan Murati",
    "alias_name": "Compte pro",
    "subtitle": null,
    "color": "blue",
    "background_color": "auto",
    "password": null,
    "is_locked": false,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-02 15:15:47.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-02 15:19:08.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/applications/<id>

Show all the information for a specific application

Parameter Description
id Id of the specific Application

Retrieve Application Users'

curl https://api.senzu.app/applications/556/users?token={token} \
-X GET

The above command returns JSON structured like this:

[
    {
        "user": {
            "id": 4,
            "firstname": "Remy",
            "lastname": "Chelin",
            "email": "contact@senzu.app"
        },
        "chmod": 5,
        "is_enabled": true
    },
    {
        "user": {
            "id": 180,
            "firstname": null,
            "lastname": null,
            "email": "example@senzu.App"
        },
        "chmod": 5,
        "is_enabled": false
    }
]

GET https://api.senzu.app/applications/<id>/users

Show all the users and roles for a specific application. In Json, the second User don't return 'firstname' and 'lastname' because he hasn't yet accepted the role.

Parameter Description
id Id of the specific application

Create an Application

curl https://api.senzu.app/applications?token={token} \
-X POST \
-d name="Personal App" \
-d subtitle="My subtitle"

The above command returns JSON structured like this :

{
    "id": 28,
    "id_image": null,
    "name": "Personal App",
    "alias_name": "Personal App",
    "subtitle": "My subtitle",
    "color": "green",
    "background_color": "light",
    "password": null,
    "is_locked": false,
    "date_created": {
                "date": "2020-05-21 16:47:44.412761",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/applications

Create an Application object.

Arguments Mandatory Description
name True Defines the name of your application.
id_image False Defines the id of your appplication image.
subtitle False Defines the subtitle of your application.
color False Defines the color of yours plugins. Available color : green, blue, red, purple, orange. Default value : green.
background_color False Set the background color of your application. Available background color : light, dark and auto (Depends of the time of the day). Default value : light.
password False If you want to set a password to your application.
alias_name False This is the alias name of your application. If no one set it takes the name of your application.

Update an Application

curl https://api.senzu.app/applications/28?token={token} \
-X POST \
-d subtitle="My new subtitle"

The above command returns JSON structured like this :

{
    "id": 28,
    "image": null,
    "name": "Personal App",
    "alias_name": "Personal App",
    "display_slogan": "My new subtitle",
    "color": "green",
    "background_color": "light",
    "password": null,
    "is_locked": false,
    "date_created": {
                "date": "2020-05-21 16:47:44.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
                "date": "2020-05-21 16:48:55.296395",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/applications/<id>

Modify the data of a specific Application.

Parameter Description
id Id of the Application you want to modify.
Arguments Description
id_image Changes the Id of the application image.
name Changes the name of the application.
alias_name Changes the alias name of the application.
subtitle Changes the subtitle of the application.
color Allows you to set a new color to the application.
background_color Allows you to set a new background color to the application.
password Allows you to change the password of the application.
is_locked Gives you the right to locked or not the application.

Delete an Application

curl https://api.senzu.app/applications/7?token={token} \
-X DELETE

DELETE https://api.senzu.app/applications

Delete a specific Application.

Parameter Description
id Id of the Application you want to delete.

Create access to an Application

curl https://api.senzu.app/applications/556/users?token={token} \
-X POST \
-d chmod=1 \
-d email="contact@senzu.app"

The above command returns JSON structured like this :

{
    "id": 38,
    "application": {
        "id": 1,
        "name": "Social network"
    },
    "user": {
        "id": 4,
        "email": "contact@senzu.app"
    },
    "chmod": 1,
    "is_enabled": false,
    "date_created": {
                "date": "2020-05-21 16:41:56.725707",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/applications/<id>/users

Create access to an Application object.

Parameter Description
id Id of the specific Application.
Arguments Mandatory Description
chmod True Set the level of rights to an user for the Application.
email True Defines on which user you'll give rights.

To give right to an User you need to be Admin or Owner of the Application. If you want to give the Owner right you need to be Owner of the Application.

Change application user chmod

curl https://api.senzu.app/applications-users/580?token={token} \
-X POST \
-d chmod=4

The above command returns JSON structured like this :

{
    "id": 580,
    "application": {
        "id": 556,
        "name": "Ryan Senzu"
    },
    "user": {
        "id": 274,
        "email": "SenzuDev@Senzu.app"
    },
    "chmod": 4,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-02 15:15:47.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-22 16:15:14.702839",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/applications-users/<ID>

Update access to an application user object.

Parameter Description
id Id of the specific Application.
Arguments Description
chmod Set the level of rights to an user for the application.

You can change the right to an User only if you are Admin or Owner of the Application. The maximum right you can give is your right on the Application.

Delete application user chmod

curl https://api.senzu.app/applications-user/580?token={token} \
-X DELETE \

DELETE https://api.senzu.app/applications-user/<ID>

Delete chmod of an user of an application.

Parameter Description
ID Id of the user you want to remove the chmod.

List all access pending of an application

curl "https://api.senzu.app/applications/access-pending?token={token}" \
-X GET

The above command returns JSON structured like this:

{
    "error": {
        "code": 200,
        "message": "Success"
    },
    "0": {
        "id": 659,
        "application": {
            "id": "542",
            "alias_name": "Senzu",
            "image_url": "https://files.senzu.app/159/405-1592837779-7e68d7e42b69060726fe00f2c9c669fb.png"
        },
        "issuer": {
            "firstname": "Marc",
            "lastname": "Léger"
        },
        "chmod": 3,
        "date_created": {
            "date": "2020-06-22 16:47:06.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/applications/access-pending

Return a list of pending access requests

Accept/refuse a pending access request

curl "https://api.senzu.app/applications/access-pending/659?token={token}" \
-X POST

The above command returns JSON structured like this:

{
    "id": 659,
    "id_product": 542,
    "id_issuer": 159,
    "chmod": 3,
    "alias_name": "Senzu",
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-22 16:47:06.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-22 17:00:00.639722",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/applications/access-pending/<ID>

Parameter Description
ID ID of the pending request
Arguments Description
grant Defines if you accept the pending access request or not (can be true or false).

Accept a shared application

When someone share an application of product with you, you're notified with a mail, and you can accept the sharing by clicking the link. When you click the link, the route /agree-share-application is called with all the arguments needed to work.

Attached groups

ENDPOINTS
GET List all attached group
GET Retrieve an attached group
POST Create an attached group
POST Update an attached group
DELETE Delete an product group

The attached groups object

{
    "id": 18,
    "id_maker": 7,
    "attached": null,
    "reference": "Attached-Group1",
    "alias_name": "MyFirstGroup",
    "date_created": {
        "date": "2020-06-23 13:55:16.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}
Attributes Description
id ID of the attached group.
id_maker ID of the maker owning the group.
reference Reference of the attached groups.
alias_name The name of the group.

List all attached groups

curl https://api.senzu.app/makers/7/attached-groups?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 18,
        "reference": "Attached-Group1",
        "date_created": {
            "date": "2020-06-23 13:55:16.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id": 19,
        "reference": "Attached-Group2",
        "date_created": {
            "date": "2020-06-23 13:55:28.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/makers/<id_maker>/attached-groups

Returns a list of attached group.

Retrieve a specific attached group

curl https://api.senzu.app/attached-groups/18?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 18,
    "id_maker": 7,
    "attached": null,
    "reference": "Attached-Group1",
    "alias_name": "MyFirstGroup",
    "date_created": {
        "date": "2020-06-23 13:55:16.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/attached-groups/<id_attached_group>

Returns information about the attached group you want.

Parameter Description
id_attached_group Id of the specific attached group.

Create an attached group

curl https://api.senzu.app/makers/7/attached-groups?token={token} \
-X POST \
-d reference = "Attached-Group2" \
-d alias_name = "Another_group"

The above command returns JSON structured like this :

{
    "id": 19,
    "id_maker": 7,
    "reference": "Attached-Group2",
    "alias_name": "Another_group",
    "date_created": {
        "date": "2020-06-23 13:55:28.824483",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/makers/<id_maker>/attached-groups

Create an attached group.

Parameter Description
id_maker Id of the maker of the group.
Arguments Mandatory Description
reference True Reference of the attached group.
alias_name False Alias name of the attached group.

Update an attached group

curl https://api.senzu.app/attached-groups/19?token={token} \
-X POST \
-d alias_name = "NewName"

The above command returns JSON structured like this :

POST https://api.senzu.app/attached-groups/<id_attached_group>

Modify informations about a certain attached group.

Parameter Description
id_attached_group Id of the specific attached group.
Arguments Description
reference Reference of the attached group.
alias_name Alias name of the attached group.

Delete an attached group

curl https://api.senzu.app/attached-groups/19?token={token} \
-X DELETE 

DELETE https://api.senzu.app/attached-groups/<id_attached_group>

Delete an existing attached group.

Parameter Description
id_attached_group Id of the specific attached group.

Companies

ENDPOINTS
GET List all companies
GET Retrieve a company
POST Create a company
POST Update a company
DELETE Delete a company

The company object reference every companies related to senzu near or far. That implies the companies that sells Senzu product, but also the companies buying Senzu products. It's used a lot in the API.

The company object

{
    "id": 3,
    "id_owner": 274,
    "id_headquarters": 13,
    "url_image": null,
    "name": "My Company",
    "phone": "+33700000000",
    "email": "mycompany@senzu.sas",
    "url": "mycompany.com",
    "vat_number": "FR56490020864",
    "status": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-04 14:31:35.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}
Attribute Description
id ID of the company.
id_owner ID of the company's owner.
id_headquarters ID of the headquarters (adress).
url_image Url of the image of the company.
name Name of the company.
phone Phone number of the company.
email Mail of the company.
url Url of the company website.
vat_number Vat number of the company.

List all Companies

curl https://api.senzu.app/companies?token={token} \
-X GET
\Senzu\Senzu

The above command returns JSON structured like this :

{
    "0": {
        "id": 3,
        "name": "My Company"
    },
    "1": {
        "id": 4,
        "name": "MyCompany2"
    },
    "2": {
        "id": 5,
        "name": "MyCompany3"
    }
}

GET https://api.senzu.app/companies

Returns a list of Companies.

Retrive a Company

curl https://api.senzu.app/companies/3?token={token} \
-X GET
\Senzu\Senzu

The above command returns JSON structured like this :

{
    "id": 3,
    "id_owner": 274,
    "id_headquarters": 13,
    "url_image": null,
    "name": "My Company",
    "phone": "+33700000000",
    "email": "mycompany@senzu.sas",
    "url": "mycompany.com",
    "vat_number": "30",
    "status": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-04 14:31:35.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/companies/<id>

Show all the informations for a specific Company.

Parameter Description
id Id of the specific Company.

Create a Company

curl https://api.senzu.app/companies?token={token} \
-X POST \
-d id_headquarters=13 \
-d name="MyCompany3" \
-d phone="+33700000000" \
-d email="mycompany@senzu.sas" \
-d url="mycompany.com" \
-d vat_number = "30"

The above command returns JSON structured like this :

{
    "id": 5,
    "id_owner": 274,
    "id_headquarters": 13,
    "url_image": null,
    "name": "MyCompany3",
    "phone": "+33700000000",
    "email": "mycompany@senzu.sas",
    "url": "mycompany.com",
    "vat_number": "30",
    "status": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-12 13:40:06.055937",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/companies

Creates a Company object.

Arguments Mandatory Description
id_headquarter True Defines the id of your headquarter address.
name True Defines the name of your company.
email True Defines the email of your company.
phone False You can attach a phone number to your company.
url False This is the website address of your company.
vat_number False This is the vat_number that is use by your company.

Update a Company

curl https://api.senzu.app/companies/4?token={your_token} \
-X POST \
-d name="My company with a new name" \
-d phone="+33600000000"

The above command returns JSON structured like this :

{
    "id": 4,
    "id_owner": 274,
    "id_headquarters": 13,
    "url_image": null,
    "name": "My Company with a  new name",
    "phone": "+33700000000",
    "email": "mycompany@senzu.sas",
    "url": "mycompany.com",
    "vat_number": "30",
    "status": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-12 11:30:33.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

POST https://api.senzu.app/companies/<id>

Modify the data of a specific Company.

Parameter Description
id Id of the Company you want to modify.
Arguments Description
id_headquarter Changes the Id of the headquarter Address.
name Changes the name of the Company.
phone Changes the phone of the Company.
email Changes the email.
url Set the Url of the Company.
vat_number Defines a new vat number to the Company.

Delete a Company

curl https://api.senzu.app/companies/4?token={token} \
-X DELETE

DELETE https://api.senzu.app/companies/<id>

Delete a specific Company.

Parameter Description
id Id of the Company you want to delete.

Currencies

ENDPOINTS
GET List all curencies
GET Retrieve a currency

Currencies are the objects used to set the currency of the products, applications, modules, etc.

You can only list the currencies, you can't create currencies.

The currency object

{
    "id": 1,
    "name": "Euro",
    "iso_code": "EUR",
    "iso_code_num": "978",
    "sign": "€",
    "blank": true,
    "format": true,
    "decimals": true,
    "conversion_rate": "1.000000",
    "is_enabled": true
}
Attributes Description
id The ID of the currency.
name Name of the currency.
iso_code Currency's ISO code.
iso_code_num Currency's ISO number.
sign The sign of the currency.
blank
format
decimals
conversion_rate Conversion rate of the currency to Euro.
is_enabled Tells if the currency is enabled or not.

List all Currencies

curl https://api.senzu.app/currencies?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0":
    {
        "id":1,
        "name":"euro"
    },
    "1":
    {
        "id":2,
        "name":"dollar"
    }
}

GET https://api.senzu.app/currencies

Returns a list of Currencies.

Retrieve a Currency

curl https://api.senzu.app/currencies/1?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 1,
    "name": "Euro",
    "iso_code": "EUR",
    "iso_code_num": "978",
    "sign": "€",
    "blank": true,
    "format": true,
    "decimals": true,
    "conversion_rate": "1.000000",
    "is_enabled": true
}

GET https://api.senzu.app/currencies/<id>

Show all the information for a specific Currency.

Parameter Description
id Id of the specific Currency.

Developers

ENDPOINTS
GET List all the developers
GET Retrieve a developer
GET Retrieve the main developer
POST Create a developer
POST Update a developer
POST Update the main developer
DELETE Delete a developer

Developers are the people which develops the new modules for Senzu. A developer account is linked to one developer but you can have multiple developer on a single account.

You can create, update or delete a developer if you have the rights.

The developer object

{
    "id": 10,
    "url_image": null,
    "id_company": null,
    "id_currency": 1,
    "reference": "SenzuDev",
    "alias_name": "Ryan",
    "chmod": 3,
    "is_main_account": true,
    "balance": 0,
    "is_user_chargeable": false,
    "contact_email": "SenzuDev@senzu.app",
    "url": null,
    "is_enabled": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-03 10:14:19.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}
Attributes Description
id Id of the specific developer.
url_image Url of the developer's image.
id_company Id of the developer's company.
id_currency Id of the developer's currency currency.
reference Name of the developer.
alias_name Showed name of the developer.
chmod The acces the developer have on the app.
is_main_account Tells if the developer is on his main account.
balance The user's balance.
is_user_chargeable Tells if the developer is chargeable on this account.
contact_email Developer's contact email.
url Developer's url.
is_enabled Tells if the developer is enabled.
is_verified Tells if the developer is verified.

List all Developers

curl https://api.senzu.app/developers?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 1
    },
    "1": {
        "id": 3
    },
    "2": {
        "id": 4
    }
}

GET https://api.senzu.app/developers

Returns a list of Developers.

Retrieve a Developer

curl https://api.senzu.app/developers/1?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 10,
    "url_image": null,
    "id_company": null,
    "id_currency": 1,
    "reference": "SenzuDev",
    "alias_name": "Ryan",
    "chmod": 3,
    "is_main_account": true,
    "balance": 0,
    "is_user_chargeable": false,
    "contact_email": "SenzuDev@senzu.app",
    "url": null,
    "is_enabled": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-03 10:14:19.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/developers/<id>/account

Show all the information for a specific Developer.

Parameter Description
id Id of the specific Developer.

Retrieve the main developer on the account

curl https://api.senzu.app/developers/account?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 10,
    "url_image": null,
    "id_company": null,
    "id_currency": 1,
    "reference": "Jean",
    "alias_name": "Jean",
    "chmod": 3,
    "is_main_account": true,
    "balance": 0,
    "is_user_chargeable": false,
    "contact_email": "SenzuDev@Senzu.app",
    "url": null,
    "is_enabled": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-03 10:14:19.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

Returns informations about the main developer.

Create a Developer

curl https://api.senzu.app/developers?token={token} \
-X POST \
-d id_company=1

The above command returns JSON structured like this :

{
    "id": 11,
    "url_image": null,
    "id_company": 1,
    "id_currency": 1,
    "reference": "SenzuDev",
    "alias_name": "Ryan",
    "chmod": 3,
    "is_main_account": false,
    "balance": 0,
    "is_user_chargeable": false,
    "contact_email": "SenzuDev@senzu.app",
    "url": null,
    "is_enabled": null,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-08 11:03:07.927293",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/developers

Creates a Developer object.

Arguments Mandatory Description
url_image False Defines the id of your Developer image.
id_company False Defines the id of your Developer company.
id_currency False Defines the id of your Developer currency.

Update a Developer

curl https://api.senzu.app/developers/6?token={token} \
-X POST \
-d url_image=https://test.png

The above command returns JSON structured like this :

{
    "id": 11,   
    "url_image": "https://test.png",
    "id_company": 1,
    "id_currency": 1,
    "reference": "SenzuDev",
    "alias_name": "Ryan",
    "chmod": 3,
    "is_main_account": false,
    "balance": 0,
    "is_user_chargeable": false,
    "contact_email": "SenzuDev@senzu.app",
    "url": null,
    "is_enabled": null,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-08 11:03:07.927293",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/developers/<id>/account

Modify the data of a specific Developer.

Parameter Description
id Id of the Developer you want to modify.
Arguments Description
id_image Change the Id of the Developer image.
id_company Change the Id of the Developer company.
id_currency Change the Id of the Developer currency.

Update the main developer of the account

curl https://api.senzu.app/developers/account?token={token} \
-X POST \
-d alias_name="Jaques"

The above command returns JSON structured like this :

{
    "id": 10,
    "url_image": null,
    "id_company": null,
    "id_currency": 1,
    "reference": "Jean",
    "alias_name": "Jaques",
    "chmod": 3,
    "is_main_account": true,
    "balance": 0,
    "is_user_chargeable": false,
    "contact_email": "SenzuDev@Senzu.app",
    "url": null,
    "is_enabled": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-03 10:14:19.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

Modify the informations about the main developer.

Arguments Description
id_image Change the Id of the Developer image.
id_company Change the Id of the Developer company.
id_currency Change the Id of the Developer currency.

Delete a Developer

curl https://api.senzu.app/developers/6?token={token} \
-X DELETE

DELETE https://api.senzu.app/developers/<id>

Delete a specific Developer.

Parameter Description
id Id of the Developer you want to delete.

Files

ENDPOINTS
GET List all files
GET Retrieve a file
POST Create a file
POST Update a file
DELETE Delete a file

The file object is used when you put files in your application. It's used whenever a file is added in the app.

You can create, update or delete a file if you have the rights.

The file object

{
    "id": 387,
    "user": {
        "id": 274,
        "username": null
    },
    "url": "https://files.senzu.app/274/387-1591686464-a74e73bd45345f2c1d13a8271978b62c.png",
    "folder": null,
    "name": "MyFile",
    "file_name": "1591086833.png",
    "file_size": 1454178,
    "mime": "application/octet-stream",
    "type": "application",
    "extension": "png",
    "date_created": {
        "date": "2020-06-02 10:33:53.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-08 16:27:12.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attribute Description
id Id of the file.
user Informations about the user (id and username).
url The url of the file.
folder The folder wher the file is (is null when it's not in a folder).
name The name you chose for your file.
file_name The "real" name of your file.
file_size The size of your file.
mime The "description" of the type of the object (here it's "octet-stream" which means that it's a .png".
type The beggining of the mime.
extension The extension of the file. Because this file is a photography, it's a ".png".

List all files

curl "https://api.senzu.app/files?token={token} \"
-X GET
$senzu->get('/files', '[token]', 'V1');

The above command returns JSON structured like this:

[
   {  
      "id":1,
      "name":"logo senzu",
      "file_name":"logo.png",
      "extension":"png"
   },
   {  
      "id":2,
      "name":"background",
      "file_name":"background.jpg",
      "extension":"jpg"
   }
]

GET https://api.senzu.app/files

Returns a list of files.

Retrieve a specific file

curl "https://api.senzu.app/files/3/2?token={token} \"
-X GET
$senzu->get('files/3/2', '[token]', 'V1');

The above command returns JSON structured like this:

{  
   "id":2,
   "user":{  
      "id":3,
      "username":"Develogg"
   },
   "url":"https://files.senzu.app/3/2-1560328461-dfa1bed03717fae6e433a726d4b7c739.png",
   "folder":null,
   "name":"logo senzu",
   "file_name":"logo.png",
   "file_size":28682,
   "mime":"image/png",
   "type":"image",
   "extension":"png",
   "date_created":{  
      "date":"2019-06-12 08:07:37.000000",
      "timezone_type":3,
      "timezone":"Europe/Berlin"
   },
   "date_updated":null
}

GET https://api.senzu.app/files/<ID_user>/<ID_file>

Retrieve a specific file for a specific user.

Parameter Description
ID_user ID of the specific user to reach
ID_file ID of the file you want to reach

Create a file

curl https://api.senzu.app/files?token={token} \
-X POST \
-d name="file1"
-d source="myFile"

{
    "id": 475,
    "user": {
        "id": 274,
        "username": null
    },
    "url": "https://files.senzu.app/274/475-1591628009-2980eec5156b5e25d744224450d615bd.png",
    "name": "file1",
    "file_name": "387-1591108720-2d593170f4c4ba77044674056ca0f8d5.png",
    "file_size": 1454178,
    "mime": "image/png",
    "type": "image",
    "extension": "png",
    "date_created": {
        "date": "2020-06-08 16:53:28.539113",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

POST https://api.senzu.app/files

Create a new file for the current user

Arguments Mandatory Description
name True Name of the file to create.
source True The source of the file. Here it's an image.

Update a file

curl https://api.senzu.app/files?token={token} \
-X POST \
-d name="ChangedName"

{
    "id": 387,
    "user": {
        "id": 274,
        "username": null
    },
    "name": "ChangedName",
    "file_name": "1591086833.png",
    "file_size": 1454178,
    "mime": "application/octet-stream",
    "type": "application",
    "extension": "png",
    "date_created": {
        "date": "2020-06-02 10:33:53.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-08 16:27:12.408818",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/files/<ID>

Parameter Description
ID ID of the file you want to reach

Delete a file

curl https://api.senzu.app/files/6?token={token} \
-X DELETE

DELETE https://api.senzu.app/files/<ID>

Delete a specific file for the current user

Folders

ENDPOINTS
GET List all folders
GET Retrieve a folder
GET Show the files of a folder
POST Create a folder
POST Update a folder
DELETE Delete a folder

Folders are objects containing different files. They have an unique ID, and you have to give them a name when you create them.
You can change their name/theirparent folder when you update them. And of course, you can delete a folder whenever you want.

The folder object

{
    "id": 169,
    "parent": null,
    "name": "Folder1",
    "date_created": {
        "date": "2020-06-15 13:40:31.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}
Attributes Description
id ID of the folder.
parent Parent of the folder (null if the folder doesn't have a parent).
name Name of the folder.

List all folders

curl https://api.senzu.app/folders \
-X GET
$senzu->get('/folders', '[token]', 'V1');

The above command returns JSON structured like this:

{
    "0": {
        "id": 169,
        "parent": null,
        "name": "Folder1"
    },
    "1": {
        "id": 170,
        "parent": null,
        "name": "FolderName"
    }
}

GET https://api.senzu.app/folders

List all folders of an user.

Retrieve a specific folder

curl https://api.senzu.app/folders/169 \
-X GET
$senzu->get('/user?fields=id,country', '[token]', 'V1');

The above command returns JSON structured like this:

{
    "id": 169,
    "parent": null,
    "name": "Folder1",
    "date_created": {
        "date": "2020-06-15 13:40:31.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/folders/<ID>

Retrieve a specific folder.

Parameter Description
ID ID of the specific folder to reach

Show files of a specific folder

curl https://api.senzu.app/folders/1/files \
-X GET
$senzu->get('folders/1/files', '[token]', 'V1');

The above command returns JSON structured like this:

{
    "0": {
        "id": 512,
        "user": {
            "id": 274,
            "username": null
        },
        "name": "file1",
        "file_name": "387-1591185863-356954258e8162ce3e74417aa0490c0f.png",
        "file_size": 1454178,
        "mime": "image/png",
        "type": "image",
        "extension": "png",
        "date_created": {
            "date": "2020-06-15 13:47:35.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    },
    "1": {
        "id": 513,
        "user": {
            "id": 274,
            "username": null
        },
        "name": "OtherFile",
        "file_name": "script.html",
        "file_size": 3406,
        "mime": "text/html",
        "type": "text",
        "extension": "html",
        "date_created": {
            "date": "2020-06-15 13:52:30.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    }
}

GET https://api.senzu.app/folders/<ID>/files

Show the files for a specific folder

Parameter Description
ID ID of the specific folder to reach

Create a folder

curl https://api.senzu.app/folders \
-X POST \
-d name="FolderName"

The above command returns JSON structured like this:

{
    "id": 170,
    "user": {
        "id": 274,
        "username": null
    },
    "parent": null,
    "name": "FolderName",
    "date_created": {
        "date": "2020-06-15 13:41:24.932323",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

POST https://api.senzu.app/folders

Create a folder for the current user

Arguments Mandatory Description
name True Name of the folder.
id_parent False Previous folder.

Update a folder

curl https://api.senzu.app/folders/170 \
-X POST \
-d name="NewName" \
-d id_parent=169

The above command returns JSON structured like this:

{
    "id": 170,
    "user": {
        "id": 274,
        "username": null
    },
    "parent": {
        "id": 169,
        "name": "Folder1"
    },
    "name": "NewName",
    "date_created": {
        "date": "2020-06-15 13:41:24.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-15 14:17:38.777263",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/folders/<ID>

Update a folder for the current user.

Parameter Description
ID ID of the specific folder to reach
Arguments Description
name Name of the folder.
id_parent Previous folder.

Delete a folder

DELETE https://api.senzu.app/folders/<ID>

curl https://api.senzu.app/folders/170 \
-X POST \

Delete a specific folder

Parameter Description
ID ID of the specific folder to delete

Icons

List all the icons

curl https://api.senzu.app/icons?token={token} \
-X GET \

The above command returns JSON structured like this :

{
    "0": {
        "id": 1,
        "base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBkPSJNMjI0IDM3My4xMmMtMjUuMjQtMzEuNjctNDAuMDgtNTkuNDMtNDUtODMuMTgtMjIuNTUtODggMTEyLjYxLTg4IDkwLjA2IDAtNS40NSAyNC4yNS0yMC4yOSA1Mi00NSA4My4xOHptMTM4LjE1IDczLjIzYy00Mi4wNiAxOC4zMS04My42Ny0xMC44OC0xMTkuMy01MC40NyAxMDMuOS0xMzAuMDcgNDYuMTEtMjAwLTE4Ljg1LTIwMC01NC45MiAwLTg1LjE2IDQ2LjUxLTczLjI4IDEwMC41IDYuOTMgMjkuMTkgMjUuMjMgNjIuMzkgNTQuNDMgOTkuNS0zMi41MyAzNi4wNS02MC41NSA1Mi42OS04NS4xNSA1NC45Mi01MCA3LjQzLTg5LjExLTQxLjA2LTcxLjMtOTEuMDkgMTUuMS0zOS4xNiAxMTEuNzItMjMxLjE4IDExNS44Ny0yNDEuNTYgMTUuNzUtMzAuMDcgMjUuNTYtNTcuNCA1OS4zOC01Ny40IDMyLjM0IDAgNDMuNCAyNS45NCA2MC4zNyA1OS44NyAzNiA3MC42MiA4OS4zNSAxNzcuNDggMTE0Ljg0IDIzOS4wOSAxMy4xNyAzMy4wNy0xLjM3IDcxLjI5LTM3LjAxIDg2LjY0em00Ny0xMzYuMTJDMjgwLjI3IDM1LjkzIDI3My4xMyAzMiAyMjQgMzJjLTQ1LjUyIDAtNjQuODcgMzEuNjctODQuNjYgNzIuNzlDMzMuMTggMzE3LjEgMjIuODkgMzQ3LjE5IDIyIDM0OS44MS0zLjIyIDQxOS4xNCA0OC43NCA0ODAgMTExLjYzIDQ4MGMyMS43MSAwIDYwLjYxLTYuMDYgMTEyLjM3LTYyLjQgNTguNjggNjMuNzggMTAxLjI2IDYyLjQgMTEyLjM3IDYyLjQgNjIuODkuMDUgMTE0Ljg1LTYwLjg2IDg5LjYxLTEzMC4xOS4wMi0zLjg5LTE2LjgyLTM4LjktMTYuODItMzkuNTh6Ii8+PC9zdmc+",
        "tags": "airbnb"
    },
    "1": {
        "id": 2,
        "base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBkPSJNMjU3LjIgMTYyLjdjLTQ4LjcgMS44LTE2OS41IDE1LjUtMTY5LjUgMTE3LjUgMCAxMDkuNSAxMzguMyAxMTQgMTgzLjUgNDMuMiA2LjUgMTAuMiAzNS40IDM3LjUgNDUuMyA0Ni44bDU2LjgtNTZTMzQxIDI4OC45IDM0MSAyNjEuNFYxMTQuM0MzNDEgODkgMzE2LjUgMzIgMjI4LjcgMzIgMTQwLjcgMzIgOTQgODcgOTQgMTM2LjNsNzMuNSA2LjhjMTYuMy00OS41IDU0LjItNDkuNSA1NC4yLTQ5LjUgNDAuNy0uMSAzNS41IDI5LjggMzUuNSA2OS4xem0wIDg2LjhjMCA4MC04NC4yIDY4LTg0LjIgMTcuMiAwLTQ3LjIgNTAuNS01Ni43IDg0LjItNTcuOHY0MC42em0xMzYgMTYzLjVjLTcuNyAxMC03MCA2Ny0xNzQuNSA2N1MzNC4yIDQwOC41IDkuNyAzNzljLTYuOC03LjcgMS0xMS4zIDUuNS04LjNDODguNSA0MTUuMiAyMDMgNDg4LjUgMzg3LjcgNDAxYzcuNS0zLjcgMTMuMyAyIDUuNSAxMnptMzkuOCAyLjJjLTYuNSAxNS44LTE2IDI2LjgtMjEuMiAzMS01LjUgNC41LTkuNSAyLjctNi41LTMuOHMxOS4zLTQ2LjUgMTIuNy01NWMtNi41LTguMy0zNy00LjMtNDgtMy4yLTEwLjggMS0xMyAyLTE0LS4zLTIuMy01LjcgMjEuNy0xNS41IDM3LjUtMTcuNSAxNS43LTEuOCA0MS0uOCA0NiA1LjcgMy43IDUuMSAwIDI3LjEtNi41IDQzLjF6Ii8+PC9zdmc+",
        "tags": "amazon"
    }
}

Returns a list of icons.

The insight object

{
    "0": {
        "scans": 9,
        "views": 14
    }
}
Attributes Description
scans Number of time your app/plugin/product has been scanned/used (only once per hour per device scanning).
views Exactly the same thing as scan, but it's not limited at once per hour per device.

Insights (Applications)

ENDPOINTS
GET List all application insights
GET List all countries
GET List all informations
GET List all browsers
GET List all devices
GET List all platforms

The insights of your application are information about who, where and when the people scanned your app. You only can retrieve those informations, they are created automatically when someone scan/share/view/use your application.

List all applications insights

curl https:/api.senzu.app/applications/556/insights?token={token} \
-X GET

The above command returns JSON structured like this:

GET https:/api.senzu.app/applications/<id>/insights

Arguments Description
id ID of the application.

List all applications insights.

List all countries where your application have been scanned/viewed

curl https:/api.senzu.app/applications/556/insights/countries?token={token} \
-X GET

The above command returns JSON structured like this:

{
    "0": {
        "country": "France",
        "scans": 9,
        "views": 14
    }
}

GET https:/api.senzu.app/applications/<id>/insights/countries

Arguments Description
id ID of the application.

List the countries where your app has been scanned.

List all informations about the people who scanned your application

curl https:/api.senzu.app/applications/556/insights/plays?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "ip": "xx.xxx.xxx.xx",
        "lang": "",
        "country": "France",
        "latitude": 48.8967,
        "longitude": 3.3964,
        "views": 1,
        "date_created": {
            "date": "2020-06-15 15:26:04.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    },
    "1": {
        "ip": "xx.xxx.xxx.xx",
        "lang": "",
        "country": "France",
        "latitude": 48.8967,
        "longitude": 3.3964,
        "views": 1,
        "date_created": {
            "date": "2020-06-09 16:56:20.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    },
    "2": {
        "ip": "xx.xxx.xxx.xxx",
        "lang": "",
        "country": "France",
        "latitude": 48.8582,
        "longitude": 2.3387,
        "views": 2,
        "date_created": {
            "date": "2020-06-06 18:40:00.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": {
            "date": "2020-06-06 18:40:06.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https:/api.senzu.app/applications/<id>/insights/plays

Arguments Description
id ID of the application.

List informations about the people who has scanned your app.

List all browsers where your application have been scanned

curl https:/api.senzu.app/applications/556/insights/browser?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "browser": "Chrome",
        "scans": 5,
        "views": 8
    },
    "1": {
        "browser": "Default Browser",
        "scans": 4,
        "views": 6
    }
}

GET https:/api.senzu.app/applications/<id>/insights/browsers

Arguments Description
id ID of the application.

List all the browsers used to see your application.

List all devices where your application have been scanned

curl https:/api.senzu.app/applications/556/insights/devices?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "device_type": "Mobile Phone",
        "scans": 5,
        "views": 8
    },
    "1": {
        "device_type": "unknown",
        "scans": 4,
        "views": 6
    }
}

GET https:/api.senzu.app/applications/<id>/insights/devices

Arguments Description
id ID of the application.

List all the devices where your application have been used.

List all platforms where your application have been scanned

curl https:/api.senzu.app/applications/556/insights/browser?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "platform": "Android",
        "scans": 5,
        "views": 8
    },
    "1": {
        "platform": "unknown",
        "scans": 4,
        "views": 6
    }
}

GET https:/api.senzu.app/applications/<id>/insights/platforms

Arguments Description
id ID of the application.

List all the platforms where your application have been used.

Insights (Plugins)

ENDPOINTS
GET List all plugin insights
GET List all countries
GET List all informations
GET List all browsers
GET List all devices
GET List all platforms

The insights of a plugin are information about who, where and when the people used your plugin. You only can retrieve those informations, they are created automatically when someone use a plugin.

List all plugin insights

curl https:/api.senzu.app/plugins/2237/insights?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "views": 2,
    "scans": 4
}

GET https:/api.senzu.app/plugins/<id>/insights

Arguments Description
id ID of the plugin.

List the insights of the plugin.

List all countries where your plugin have been used

curl https:/api.senzu.app/plugins/2237/insights/countries?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "country": "France",
        "scans": 2,
        "views": 4
    }
}

GET https:/api.senzu.app/plugins/<id>/insights/countries

Arguments Description
id ID of the plugin.

List all informations about the people who used your plugin

curl https:/api.senzu.app/plugins/2237/insights/plays?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "ip": "xx.xxx.xxx.xx",
        "lang": "fr-FR",
        "country": "France",
        "latitude": 45.748,
        "longitude": 4.85,
        "views": 3,
        "date_created": {
            "date": "2020-06-16 10:45:04.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": {
            "date": "2020-06-16 10:45:29.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "ip": "xx.xxx.xxx.xxx",
        "lang": "fr-FR",
        "country": "France",
        "latitude": 45.748,
        "longitude": 4.85,
        "views": 1,
        "date_created": {
            "date": "2020-06-02 15:22:35.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    }
}

GET https:/api.senzu.app/plugins/<id>/insights/plays

Arguments Description
id ID of the plugin.

List all browsers where your plugin have been used

curl https:/api.senzu.app/plugins/2237/insights/browsers?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "browser": "Chrome",
        "scans": 2,
        "views": 4
    }
}

GET https:/api.senzu.app/plugins/<id>/insights/browsers

Arguments Description
id ID of the plugin.

List all devices where your plugin have been used

curl https://api.senzu.app/plugins/2237/insights/devices?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "error": {
        "code": 200,
        "message": "Success"
    },
    "0": {
        "device_type": "Mobile Phone",
        "scans": 2,
        "views": 4
    }
}

GET https:/api.senzu.app/plugins/<id>/insights/devices

Arguments Description
id ID of the plugin.

List all platforms where your plugin has been used

curl https://api.senzu.app/plugins/2237/insights/platforms?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "platform": "Android",
        "scans": 2,
        "views": 4
    }
}

GET https:/api.senzu.app/plugins/<id>/insights/platforms

Arguments Description
id ID of the plugin.

Insights (Products)

ENDPOINTS
GET List all product insights
GET List all countries
GET List all informations
GET List all browsers
GET List all devices
GET List all platforms

The insights of a product are information about who, where and when the people scanned your product. You only can retrieve those informations, they are created automatically when someone scan or share a product.

List all product insights

GET https:/api.senzu.app/products/<id>/insights

List countries where your product has been scanned

curl https://api.senzu.app/products/2393/insights/countries?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "error": {
        "code": 200,
        "message": "Success"
    },
    "0": {
        "country": "France",
        "scans": 20,
        "views": 42
    }
}

GET https:/api.senzu.app/products/<id>/insights/countries

Arguments Description
id ID of the product.

List informations about people who scanned your product

curl https://api.senzu.app/products/2393/insights/browsers?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "ip": "xx.xxx.xxx.xx",
        "lang": "fr-FR",
        "country": "France",
        "latitude": 45.748,
        "longitude": 4.85,
        "views": 3,
        "date_created": {
            "date": "2020-06-16 10:45:04.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": {
            "date": "2020-06-16 10:45:29.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "ip": "xx.xxx.xxx.xx",
        "lang": "",
        "country": "France",
        "latitude": 48.8582,
        "longitude": 2.3387,
        "views": 2,
        "date_created": {
            "date": "2020-06-16 10:44:49.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": {
            "date": "2020-06-16 10:44:51.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "2": {
        "ip": "xx.xxx.xxx.xx",
        "lang": "",
        "country": "France",
        "latitude": 48.8967,
        "longitude": 3.3964,
        "views": 1,
        "date_created": {
            "date": "2020-06-15 15:26:04.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    }
}

GET https:/api.senzu.app/products/<id>/insights/plays

Arguments Description
id ID of the product.

List all the browsers which used the apps of your product

curl https://api.senzu.app/products/2393/insights/browsers?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "browser": "Chrome",
        "scans": 15,
        "views": 34
    },
    "1": {
        "browser": "Default Browser",
        "scans": 4,
        "views": 6
    },
    "2": {
        "browser": "Edge",
        "scans": 1,
        "views": 2
    }
}

GET https:/api.senzu.app/products/<id>/insights/browsers

Arguments Description
id ID of the product.

List all the devices where your product has been scanned

curl https://api.senzu.app/products/2393/insights/devices?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "device_type": "Mobile Phone",
        "scans": 16,
        "views": 36
    },
    "1": {
        "device_type": "unknown",
        "scans": 4,
        "views": 6
    }
}

GET https:/api.senzu.app/products/<id>/insights/devices

Arguments Description
id ID of the product.

List all the platforms where your product has been scanned

curl https://api.senzu.app/products/2393/insights/platforms?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "platform": "Android",
        "scans": 16,
        "views": 36
    },
    "1": {
        "platform": "unknown",
        "scans": 4,
        "views": 6
    }
}

GET https:/api.senzu.app/products/<id>/insights/platforms

Arguments Description
id ID of the product.

Insight (Records)

ENDPOINTS
GET List all record insights
GET List all countries
GET List all informations
GET List all browsers
GET List all devices
GET List all platforms

The insights of a record are information about who, where and when the people scanned your record. You only can retrieve those informations, they are created automatically when someone scan or share a record.

List all product insights

GET https:/api.senzu.app/records/<id_record>/insights

List countries where your record has been scanned

curl https://api.senzu.app/records/4290/insights/countries?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "country": "France",
        "scans": 8,
        "views": 19
    }
}

GET https://api.senzu.app/records/<id>/insights/countries

Returns informations about the countries where the record has been scanned/shared.

Arguments Description
id ID of the record.

List informations about people who scanned your record

curl https://api.senzu.app/records/4290/insights/plays?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "ip": "xx.xx.xxx.xxx",
        "lang": "",
        "country": "France",
        "latitude": 48.8582,
        "longitude": 2.3387,
        "views": 2,
        "date_created": {
            "date": "2020-06-06 18:40:00.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": {
            "date": "2020-06-06 18:40:06.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "ip": "xx.xx.xxx.xxx",
        "lang": "",
        "country": "France",
        "latitude": 48.8582,
        "longitude": 2.3387,
        "views": 2,
        "date_created": {
            "date": "2020-06-06 16:44:40.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": {
            "date": "2020-06-06 16:44:43.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "2": {
        "ip": "xx.xx.xxx.xxx",
        "lang": "",
        "country": "France",
        "latitude": 48.8582,
        "longitude": 2.3387,
        "views": 2,
        "date_created": {
            "date": "2020-06-02 20:36:59.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": {
            "date": "2020-06-02 20:37:02.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/records/<id>/insights/plays

Returns informations about the people who scanned/shared the record.

Arguments Description
id ID of the record.

List all the browsers which used the apps of your record

curl https://api.senzu.app/records/4290/insights/browsers?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "browser": "Chrome",
        "scans": 7,
        "views": 17
    },
    "1": {
        "browser": "Edge",
        "scans": 1,
        "views": 2
    }
}

GET https://api.senzu.app/records/<id>/insights/browsers

Returns informations about the browser where the applications on the record has been used.

Arguments Description
id ID of the record.

List all the devices where your record has been scanned

curl https://api.senzu.app/records/4290/insights/devices?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "device_type": "Mobile Phone",
        "scans": 8,
        "views": 19
    }
}

GET https://api.senzu.app/records/<id>/insights/devices

Returns informations about the devices on which the record has been scanned/shared.

Arguments Description
id ID of the record.

List all the platforms where your record has been scanned

curl https://api.senzu.app/records/4290/insights/devices?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "platform": "Android",
        "scans": 8,
        "views": 19
    }
}

GET https://api.senzu.app/records/<id>/insights/platforms

Returns informations about the platform on which the record has been scanned/shared.

Arguments Description
id ID of the record.

Items

ENDPOINTS
GET List all maker's items
GET Retrieve an item
GET List product in an item
POST Create an item
POST Update an item
DELETE Delete an item

An Item is a physicall object in which you can add records (nfc/qr code). For example, a senzu card which has 2 records, a nfc chip and a qr code, a ring which has also 2 records, which are 2 nfc chips.

If you have the rights, you can create an item, update an already existing item and you can also delete an item.

The item object

{
    "id": 162,
    "maker": {
        "id": 1,
        "reference": "Senzu"
    },
    "company": {
        "id": 1,
        "name": "Senzu"
    },
    "url_image": null,
    "reference": "Card",
    "display_name": "Senzu Card",
    "price": 0,
    "language": null,
    "country_code": null,
    "quantity_in_stock": null,
    "is_onsale": false,
    "date_created": {
        "date": "2020-06-04 14:58:26.844018",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attribute Description
id Id of the specific item (here 162).
maker Information of the maker (id, reference).
company Information relative to the company (id, name).
url_image Image of the item.
reference The name of the item.
display_name The name of your item that will display.
price The price of the item.
language The language of the item.
country_code The item's country code.
quantity_in_stock The item's quantity stocked.
is_onsale Sets if the items in on sale or not.

List all Maker's Items

curl https://api.senzu.app/makers/7/items?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 162,
        "reference": "Card",
        "url_image": null
    },
    "1": {
        "id": 163,
        "reference": "Pen",
        "url_image": null
    }
}

GET https://api.senzu.app/makers/<id>/items

Returns a list of Items.

Parameter Description
id Id of the specific Maker.

Retrieve an Item

curl https://api.senzu.app/items/163?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 163,
    "maker": {
        "id": 1,
        "reference": "Senzu"
    },
    "company": {
        "id": 1,
        "name": "Senzu"
    },
    "image": {
        "id": null,
        "url": null
    },
    "reference": "Pen",
    "display_name": "Pen",
    "id_currency": 1,
    "price": 0,
    "language": null,
    "country_code": null,
    "metadata": null,
    "quantity_in_stock": null,
    "is_onsale": false,
    "date_created": {
        "date": "2020-06-04 15:13:04.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/items/<id>

Show all the information for a specific Item.

Parameter Description
id Id of the specific Item.

List product in an Item

curl https://api.senzu.app/items/164/products?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 3244,
        "reference": "Item1",
        "date_created": {
            "date": "2020-06-08 14:58:57.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id": 3252,
        "reference": "Item2",
        "date_created": {
            "date": "2020-06-11 10:43:43.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "2": {
        "id": 3253,
        "reference": "New Ring",
        "date_created": {
            "date": "2020-06-11 10:54:49.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "3": {
        "id": 5254,
        "reference": "NewItem",
        "date_created": {
            "date": "2020-06-12 11:21:56.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/items/<id>/products

List all the products in an item.

Parameter Description
id Id of the specific Item.

Create an Item

curl https://api.senzu.app/makers/1/items?token={token} \
-X POST \
-d id_currency=1 \
-d id_company=1 \
-d reference="Pen" \
-d display_name="Pen" 

The above command returns JSON structured like this :

{
    "id": 163,
    "maker": {
        "id": 1,
        "reference": "Senzu"
    },
    "company": {
        "id": 1,
        "name": "Senzu"
    },
    "url_image": null,
    "reference": "Pen",
    "display_name": "Pen",
    "price": 0,
    "language": null,
    "country_code": null,
    "quantity_in_stock": null,
    "is_onsale": false,
    "date_created": {
        "date": "2020-06-04 15:13:04.706548",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/makers/<id>/items

Creates an Item object.

Parameter Description
id Id of the specific Maker.
Arguments Mandatory Description
id_company True Defines the id of your Item company.
id_currency True Defines the currency of the Item.
id_image False Id of your item's image
reference True Sets the name of the Item.
display_name True Sets the Item's display name.
price False Sets the Item's price.
language False Sets the Item's language.
country_code False Sets the Item's country code.
metadata False Defines some properties of the item, like the weight, the height, etc.
quantity_in_stock False Defines the item's quantity in stock.
is_onsale False Sets if the Item is on sale or not.

Update an Item

curl https://api.senzu.app/items/1?token={token} \
-X POST \
-d price=25

The above command returns JSON structured like this :

{
    "id": 163,
    "maker": {
        "id": 1,
        "reference": "Senzu"
    },
    "company": {
        "id": 1,
        "name": "Senzu"
    },
    "url_image": null,
    "reference": "Pen",
    "display_name": "pen",
    "price": 25,
    "language": null,
    "country_code": null,
    "quantity_in_stock": null,
    "is_onsale": false,
    "date_created": {
        "date": "2020-06-04 15:13:04.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-04 16:07:17.890357",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/items/<id>

Modify the data of a specific Item.

Parameter Description
id Id of the Item you want to modify.
Arguments Description
id_company Changes the Id of the Item's company.
id_currency Changes the Id of the Item's currency.
id_image Changes the Id of the Item's Image.
reference Changes the name of the Item.
display_name Defines the new display name of the Item.
price Sets the price of the Item.
language Sets the language of the Item.
country_code Defines the new country code of the Item.
metadata Changes or adds metadata for the Item.
is_onsale Sets if the Item is on sale or not.

Delete an Item

curl https://api.senzu.app/items/1?token={token} \
-X DELETE

DELETE https://api.senzu.app/items/<id>

Delete a specific Item.

Parameter Description
id Id of the Item you want to delete.

Logs

ENDPOINTS
GET List all user's logs
GET Retrieve a log

Logs are used to record the times when users usage of the app, and which route they have used. You cant create a log with the API, they are created automatically.

But you can list all the logs , or retrieve a specific log with their id.

The log object

{
    "id": 137263,
    "route": "/user",
    "parameters": "returns=id",
    "method": "GET",
    "data_size": 51,
    "price": 0,
    "date": {
        "date": "2020-06-02 10:28:23.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Atttributes Description
id ID of the log.
route Route used in the API.
parameters Parameter of the log.
method Method used in the API.
data_size Size of the log (in Bytes).
price Price.

List all logs

curl "https://api.senzu.app/user/logs"
-X GET
$senzu->get('/user/logs', '[token]', 'V1');

The above command returns JSON structured like this:

{
    "0": {
        "id": 137263,
        "route": "/user",
        "date": {
            "date": "2020-06-02 10:28:23.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id": 137264,
        "route": "/user",
        "date": {
            "date": "2020-06-02 10:28:24.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "2": {
        "id": 137265,
        "route": "/products",
        "date": {
            "date": "2020-06-02 10:28:24.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
]

GET https://api.senzu.app/user/logs

Show all the logs for the current user

Retrieve a log

curl "https://api.senzu.app/user/logs/137263"
-X GET
$senzu->get('/user/logs/137263', '[token]', 'V1');

The above command returns JSON structured like this:

{
    "id": 137263,
    "route": "/user",
    "parameters": "returns=id",
    "method": "GET",
    "data_size": 51,
    "price": 0,
    "date": {
        "date": "2020-06-02 10:28:23.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/user/logs/<ID>

Show a specific part of the logs for the current user

Parameter Description
ID Show all the logs for the ID

Mailbox

ENDPOINTS
GET List all sent mail
GET List all recieved mail
GET Retrieve a sent mail
GET Retrieve a recieved mail
POST Send a mail

The mail object is used to send or recieve mail to/from different users.

The mail object

{
    "id": 2,
    "id_user_recipient": 274,
    "subject": "MyFirstMail",
    "date_created": {
        "date": "2020-06-12 15:59:13.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attributes Description
id ID of the mail.
id_user_recipient ID of the user recieving the mail.
subject Subject of the mail.

Retrieve all sent Mails

curl https://api.senzu.app/mails/sent?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 2,
        "id_user_recipient": 274,
        "subject": "MyFirstMail",
        "date_created": {
            "date": "2020-06-12 15:59:13.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id": 3,
        "id_user_recipient": 274,
        "subject": "A really good mail",
        "date_created": {
            "date": "2020-06-12 15:59:38.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
}

GET https://api.senzu.app/mails/sent

Returns a list of all sent Mails.

Retrieve all received Mails

curl https://api.senzu.app/mails/inbox?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "error": {
        "code": 200,
        "message": "Success"
    },
    "0": {
        "id": 2,
        "id_user_sender": 274,
        "subject": "MyFirstMail",
        "date_created": {
            "date": "2020-06-12 15:59:13.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id": 3,
        "id_user_sender": 274,
        "subject": "A really good mail",
        "date_created": {
            "date": "2020-06-12 15:59:38.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "2": {
        "id": 4,
        "id_user_sender": 274,
        "subject": "Please",
        "date_created": {
            "date": "2020-06-12 16:00:02.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/mails/inbox

Returns a list of all received Mails.

Retrieve a sent Mail

curl https://api.senzu.app/mails/sent/2?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 2,
    "id_user_sender": 274,
    "user_recipient": {
        "id": 274,
        "username": null
    },
    "subject": "MyFirstMail",
    "content": "This is a really important message",
    "date_created": {
        "date": "2020-06-12 15:59:13.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/mails/sent/<id>

Show all the information for a specific sent Mail.

Parameter Description
id Id of the specific Mail.

Retrieve a received Mail

curl https://api.senzu.app/mails/inbox/3?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 3,
    "id_user_recipient": 274,
    "user_sender": {
        "id": 274,
        "username": null
    },
    "subject": "A really good mail",
    "content": "Here is the mail\nWhat a mail",
    "date_created": {
        "date": "2020-06-12 15:59:38.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/mails/inbox/<id>

Show all the information for a specific received Mail.

Parameter Description
id Id of the specific Mail.

Send a Mail

curl https://api.senzu.app/mails?token={token} \
-X POST \
-d subject="My mail" \
-d content="This is my first mail to you" \
-d id_user_recipient="274"

The above command returns JSON structured like this :

{
    "0": {
        "id_user_sender": 274,
        "user_recipient": {
            "id": 274,
            "username": null
        },
        "subject": "My Mail",
        "content": "This is my first mail to you",
        "date_created": {
            "date": "2020-06-12 16:04:14.804916",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

POST https://api.senzu.app/mails

Creates a Mail object.

Arguments Mandatory Description
id_user_recipient True Defines the id of the User that will receive the Mail. You can send it to many Users with a coma to separate each id.
subject False Defines the subject of the Mail.
content False Defines the content of the Mail.

Mails Templates

ENDPOINTS
GET List all mails templates
GET Retrieve a mail template
POST Create a mail template
POST Update a mail template
DELETE Delete a mail template

Mails templates are templates of mails, created for a developer app, used whenever the situation needs a certain type of mail. For example, if a user want to change they password a template mail will be needed.

The mail template object

{
    "id": 2,
    "mail_type": "registration",
    "lang": "fr",
    "code": "<a href=\\\"{{data.change_password_url}}\\\">Link</a>",
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-18 14:10:21.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-18 14:30:48.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attributes Description
id ID of the mail template.
mail_type Type of the mail (change_email, change_password, delete_account, registration, reset_password).
lang Language of the mail.
code Code inside of the mail (linked to the type of the mail).
is_enabled Tells if the template is enabled.

List all Mail Templates

curl https://api.senzu.app/apps/13/mails-templates?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 2,
        "mail_type": "registration",
        "lang": "fr"
    }
}

GET https://api.senzu.app/apps/<id>/mails-templates

Returns a list of Mail Templates for a specific Developer Application.

Parameter Description
id Id of the specific Developer Application.

Retrieve a Mail Template

curl https://api.senzu.app/apps/13/mails-templates/2?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 2,
    "mail_type": "registration",
    "lang": "fr",
    "code": "<a href=\\\"{{data.change_password_url}}\\\">Link</a>",
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-18 14:10:21.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-18 14:30:48.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/apps/<id_app>/mails-templates/<id_template>

Show all the information for a specific Mail Template.

Parameter Description
id_app Id of the specific Developer Application.
id_template Id of the specific Mail Template.

Create a Mail Template

curl https://api.senzu.app/apps/13/mails-templates?token={token} \
-X POST \
-d mail_type="registration" \
-d code="<a href=\"{{data.firstname}}\">Link</a>"

The above command returns JSON structured like this :

{
    "id": 2,
    "id_api_app": 13,
    "mail_type": "registration",
    "lang": null,
    "code": "<a href=\\\"{{data.firstname}}\\\">Link</a>",
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-18 14:10:21.836762",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps/<id>/mails-templates

Creates a Mail Template object.

Parameter Description
id Id of the specific Developer Application.
Arguments Mandatory Description
mail_type True Defines to which mail you set the Template. Available : change_email change_password delete_account registration reset_password
code True Sets the code that you want to display in the Mail. You can use Twig language.
lang False Defines the lang of the Mail Template.
Template Data usable
change_email {{data.change_email_url}}
change_password {{data.change_password_url}}
delete_account {{data.delete_account_url}}
registration {{data.firstname}} {{data.lastname}} {{data.email}} {{data.activation_url}}
reset_password {{data.reset_password_url}}

Update a Mail Template

curl https://api.senzu.app/apps/13/mails-templates/2?token={token} \
-X POST \
-d lang="fr"

The above command returns JSON structured like this :

{
    "id": 2,
    "mail_type": "registration",
    "lang": "fr",
    "code": "<a href=\\\"{{data.change_password_url}}\\\">Link</a>",
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-18 14:10:21.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-18 14:30:48.820169",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/apps/<id_app>/mails-templates/<id_template>

Modify the data of a specific Mail Template.

Parameter Description
id_app Id of the Developer Application.
id_template Id of the Mail Template you want to modify.
Arguments Description
mail_type Changes the Mail Type Template.
lang Defines the language of the Mail.
code Puts your code for the Template.
is_enabled Sets if the Template is enabled or not.

Delete a Mail Template

curl https://api.senzu.app/apps/13/mails-templates/2?token={token} \
-X DELETE

DELETE https://api.senzu.app/apps/<id_app>/mails-templates/<id_template>

Delete a Mail Template.

Parameter Description
id_app Id of the Developer Application.
id_template Id of the Template you want to delete.

Makers

ENDPOINTS
GET List all makers
GET Retrieve a maker
GET Retrieve the main maker
POST Update the main maker
POST Create a maker
POST Update a maker
DELETE Delete a maker

The makers are the people creating the physicall objects, like the cards, the rings, etc.

You can create, update and delete a maker.

The maker object

{
    "id": 7,
    "id_image": null,
    "id_company": null,
    "id_currency": 1,
    "reference": "Ryan",
    "alias_name": "Ryan",
    "chmod": 5,
    "is_main_account": true,
    "balance": 0,
    "price": null,
    "is_user_chargeable": false,
    "contact_email": "contactmaker@senzu.app",
    "url": "senzu.app",
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-03 16:40:04.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}
Attributes Description
id The maker's id.
id_image ID of the image of the maker.
id_company ID of the company of the maker.
id_currency ID of the currency the maker uses.
reference The reference of the user.
alias_name The name showed of the user.
chmod The rights of the maker.
is_main_account Tells if its the maker main account.
balance The balance of the maker.
price The price of the object he is creating.
is_user_chargeable Tells if the maker is chargeable
contact_email The e-mail of the maker.
url The url of the user.
is_enabled Tells if the product the maker created is enabled.

List all Makers

curl https://api.senzu.app/makers?token={token} \
-X GET

The above command returns JSON structured like this:

[
   {
      "id": 1,
      "reference": "Senzu"
   },
   {
      "id": 2,
      "reference": "Victor"
   },
   {
      "id": 3,
      "reference": "Ryan"
   }
]

GET https://api.senzu.app/makers

Returns a list of Makers.

Retrieve the main maker of the account

curl https://api.senzu.app/makers?token={token} \
-X GET

The above command returns JSON structured like this:

{
    "id": 7,
    "id_image": null,
    "id_company": null,
    "id_currency": 1,
    "reference": "Jean",
    "alias_name": "Jean",
    "chmod": 5,
    "is_main_account": true,
    "balance": 0,
    "price": null,
    "is_user_chargeable": false,
    "contact_email": "contactmaker@senzu.app",
    "url": "senzu.app",
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-03 16:40:04.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/makers/account

Returns information about the maker.

Update informations about the main maker

curl https://api.senzu.app/makers?token={token} \
-X POST \
-d contact_email = "senzumakermain@senzu.app"

The above command returns JSON structured like this:

{
    "id": 7,
    "id_image": null,
    "id_company": null,
    "id_currency": 1,
    "reference": "Ryan",
    "alias_name": "Ryan",
    "chmod": 5,
    "is_main_account": true,
    "balance": 0,
    "price": null,
    "is_user_chargeable": false,
    "contact_email": "senzumakermain@senzu.app",
    "url": "senzu.app",
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-03 16:40:04.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/makers/account

Modify information about the main maker.

Arguments Description
contact_email Mail showed for contact.
display_name Name showed.
id_image Id of the image to show.
id_company Id of the maker company.
url Link to a website of the maker.

Retrieve a Maker

curl https://api.senzu.app/makers/1/account?token={token} \
-X GET

The above command returns JSON structured like this:

{
   "id": 1,
   "id_image": null,
   "company": {
      "id": 1,
      "name": "Senzu"
   },
   "display_name": "Senzu",
   "contact_email": "maker@senzu.app",
   "url": "senzu.app",
   "date_created": {
      "date": "2019-05-27 11:50:57.000000",
      "timezone_type": 3,
      "timezone": "Europe/Berlin"
   }
}

GET https://api.senzu.app/makers/<id_maker>/account

Show all the information about a specific maker

Create a Maker

curl https://api.senzu.app/makers?token={token} \
-X POST \
-d contact_email = "contactmaker@senzu.app"
-d alias_name = "Senzu"
-d url = "senzu.app"
-d reference = "Senzu"

The above command returns JSON structured like this :


{
    "id": 12,
    "id_image": null,
    "id_company": null,
    "id_currency": 1,
    "reference": "Senzu",
    "alias_name": "Senzu",
    "chmod": 3,
    "is_main_account": false,
    "balance": 0,
    "price": null,
    "is_user_chargeable": false,
    "contact_email": "contactmaker@senzu.app",
    "url": "senzu.app",
    "is_enabled": null,
    "date_created": {
        "date": "2020-06-09 14:28:04.675349",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

POST https://api.senzu.app/makers

Create a maker

Arguments Mandatory Description
contact_email True Mail showed for contact
display_name True Name showed
id_image False ID of the image to show
id_company False ID of the maker company
url False Link to a website of the maker

Update a Maker

curl https://api.senu.app/makers/12/account?token={token} \
-X POST \
-d url="oui.app"

The above command returns JSON structured like this :

{
    "id": 12,
    "id_image": null,
    "id_company": null,
    "id_currency": 1,
    "reference": "Senzu",
    "alias_name": "Senzu",
    "chmod": 3,
    "is_main_account": false,
    "balance": 0,
    "price": null,
    "is_user_chargeable": false,
    "contact_email": "contactmaker@senzu.app",
    "url": "oui.app",
    "is_enabled": null,
    "date_created": {
        "date": "2020-06-09 14:28:04.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

POST https://api.senzu.app/makers/<id_maker>/account

Modify the data of specific Maker.

Arguments Description
contact_email Mail showed for contact.
display_name Name showed.
id_image Id of the image to show.
id_compangy Id of the maker company.
url Link to a website of the maker.

Delete a Maker

curl https://api.senu.app/makers/12?token={token} \
-X DELETE \

DELETE https://api.senzu.app/makers/<id_maker>

Delete a specific Maker

Orders

Payments

ENDPOINTS
GET List all payments
GET Retrieve a specific payment
POST Create a payment

Payment is the object used when a user buys a shop order. Payments only can be created.

The payment object

{
    "id": 2,
    "id_currency": 1,
    "conversion_rate": "1.000000",
    "payment_id": null,
    "payment_service": null,
    "payment_data": "Array",
    "Amount": "3.00",
    "ip": "xx.xxx.xxx.xxx",
    "status": true,
    "date_created": {
        "date": "2020-06-24 13:55:56.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attributes Description
id ID of the payment.
id_currency ID of the currency used for the payment.
conversion_rate Conversion rate of the currecy (to euros).
payment_id
payment_data
Amount Amount of orders buyed.
ip IP of the device used to pay.
status Tells if the payement worked.

List all payments

curl https://api.senzu.app/payments?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "0": {
        "id": 1,
        "date_created": {
            "date": "2020-06-24 13:55:44.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id": 2,
        "date_created": {
            "date": "2020-06-24 13:55:56.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/payments

List all the payments.

Retrieve a specific payment

curl https://api.senzu.app/payments/2?token={token} \
-X GET

The above command returns JSON sructured like this:

{
    "id": 2,
    "id_currency": 1,
    "conversion_rate": "1.000000",
    "payment_id": null,
    "payment_service": null,
    "payment_data": "Array",
    "Amount": "3.00",
    "ip": "82.248.115.47",
    "status": true,
    "date_created": {
        "date": "2020-06-24 13:55:56.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/payments/<id>

List informations about a specific payment.

Arguments Description
id ID of the payment.

Create a payment

curl https://api.senzu.app/payments?token={token} \
-X POST \
-d id_order = 2
-d currency = "EUR"
-d amount = 3

The above command returns JSON sructured like this:

{
    "id": 2
}

POST https://api.senzu.app/payments

Create a payment.

Arguments Mandatory Description
id_order True ID of the shop order you want to pay.
currency True The currency you're going to use for the payment.
amount True The amount of order you're going to buy.

Plans

ENDPOINTS
GET List all plans
GET Retrieve a plan

Plan are annual subscription.

The plan object

{
    "id": 1,
    "id_currency": 1,
    "name": "Basic",
    "duration": 12,
    "price": "120.00",
    "date_created": {
        "date": "2019-04-25 00:00:00.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}
Attributes Description
id ID of the plan.
id_currency ID of the currency of the plan.
name Name of the plan.
duration Duration of the plan (in month).
price Price of the plan.

List all Plans

curl https://api.senzu.app/plans?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 1,
        "name": "Basic"
    },
    "1": {
        "id": 2,
        "name": "Premium"
    }
}

GET https://api.senzu.app/plans

Returns a list of Plans.

Retrieve a Plan

curl https://api.senzu.app/plans/1?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 1,
    "id_currency": 1,
    "name": "Basic",
    "duration": 12,
    "price": "120.00",
    "date_created": {
        "date": "2019-04-25 00:00:00.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/plans/<id>

Show all the information for a specific Plan.

Parameter Description
id Id of the specific Plan.

Plays

ENDPOINTS
GET Retrieve a play
GET Retrieve a plugin from a play
GET List all dynamic plays
GET Retrieve a plugin from a dynamic play
GET Retrieve a shared play
GET Retrieve a plugin from a shared play

A play is what you see when you scan your record. In the API, it gives information about the application and the plugins.

The play object

{
    "application":
    {
        "id":1  
        "image":null,
        "title":"App Work",
        "subtitle":"My Subtitle",
        "color":"red",
        "background_color":"light"
    },
    "plugins":
    [
        {
            "id":9,
            "name":"My telegram",
            "icon_base64":"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBkPSJNNDQ2LjcgOTguNmwtNjcuNiAzMTguOGMtNS4xIDIyLjUtMTguNCAyOC4xLTM3LjMgMTcuNWwtMTAzLTc1LjktNDkuNyA0Ny44Yy01LjUgNS41LTEwLjEgMTAuMS0yMC43IDEwLjFsNy40LTEwNC45IDE5MC45LTE3Mi41YzguMy03LjQtMS44LTExLjUtMTIuOS00LjFMMTE3LjggMjg0IDE2LjIgMjUyLjJjLTIyLjEtNi45LTIyLjUtMjIuMSA0LjYtMzIuN0w0MTguMiA2Ni40YzE4LjQtNi45IDM0LjUgNC4xIDI4LjUgMzIuMnoiLz48L3N2Zz4"
        },
        {
            "id":165,
            "name":"My Plugin",
            "icon_base64":"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48cGF0aCBkPSJNNTg2IDI4NC41bDUzLjMtNTkuOWgtNjIuNGwtMjEuNyAyNC44LTIyLjUtMjQuOEg0MTR2LTE2aDU2LjF2LTQ4LjFIMzE4LjlWMjM2aC0uNWMtOS42LTExLTIxLjUtMTQuOC0zNS40LTE0LjgtMjguNCAwLTQ5LjggMTkuNC01Ny4zIDQ0LjktMTgtNTkuNC05Ny40LTU3LjYtMTIxLjktMTR2LTI0LjJINDl2LTI2LjJoNjB2LTQxLjFIMFYzNDVoNDl2LTc3LjVoNDguOWMtMS41IDUuNy0yLjMgMTEuOC0yLjMgMTguMiAwIDczLjEgMTAyLjYgOTEuNCAxMzAuMiAyMy43aC00MmMtMTQuNyAyMC45LTQ1LjggOC45LTQ1LjgtMTQuNmg4NS41YzMuNyAzMC41IDI3LjQgNTYuOSA2MC4xIDU2LjkgMTQuMSAwIDI3LTYuOSAzNC45LTE4LjZoLjVWMzQ1aDIxMi4ybDIyLjEtMjUgMjIuMyAyNUg2NDBsLTU0LTYwLjV6bS00NDYuNy0xNi42YzYuMS0yNi4zIDQxLjctMjUuNiA0Ni41IDBoLTQ2LjV6bTE1My40IDQ4LjljLTM0LjYgMC0zNC02Mi44IDAtNjIuOCAzMi42IDAgMzQuNSA2Mi44IDAgNjIuOHptMTY3LjggMTkuMWgtOTQuNFYxNjkuNGg5NXYzMC4ySDQwNXYzMy45aDU1LjV2MjguMWgtNTYuMXY0NC43aDU2LjF2MjkuNnptLTQ1LjktMzkuOHYtMjQuNGg1Ni4xdi00NGw1MC43IDU3LTUwLjcgNTd2LTQ1LjZoLTU2LjF6bTEzOC42IDEwLjNsLTI2LjEgMjkuNUg0ODlsNDUuNi01MS4yLTQ1LjYtNTEuMmgzOS43bDI2LjYgMjkuMyAyNS42LTI5LjNoMzguNWwtNDUuNCA1MSA0NiA1MS40aC00MC41bC0yNi4zLTI5LjV6Ii8"
        },
        {
            "id":166,
            "name":"My VCARD",
            "icon_base64":"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMzYwIDMyMGgxMTJjNC40IDAgOC0zLjYgOC04di0xNmMwLTQuNC0zLjYtOC04LThIMzYwYy00LjQgMC04IDMuNi04IDh2MTZjMCA0LjQgMy42IDggOCA4em0wLTY0aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bTAgMTI4aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bS0xNjgtMzJjNDQuMiAwIDgwLTM1LjggODAtODBzLTM1LjgtODAtODAtODAtODAgMzUuOC04MCA4MCAzNS44IDgwIDgwIDgwem0wLTEyOGMyNi41IDAgNDggMjEuNSA0OCA0OHMtMjEuNSA0OC00OCA0OC00OC0yMS41LTQ4LTQ4IDIxLjUtNDggNDgtNDh6TTUxMiAzMkg2NEMyOC43IDMyIDAgNjAuNyAwIDk2djMyMGMwIDM1LjMgMjguNyA2NCA2NCA2NGg0NDhjMzUuMyAwIDY0LTI4LjcgNjQtNjRWOTZjMC0zNS4zLTI4LjctNjQtNjQtNjR6TTI3MiA0NDhIMTEydi0xNS4xYzAtNyAyLjEtMTMuOCA2LTE5LjYgNS42LTguMyAxNS44LTEzLjIgMjcuMy0xMy4yIDEyLjQgMCAyMC44IDcgNDYuOCA3IDI1LjkgMCAzNC4zLTcgNDYuOC03IDExLjUgMCAyMS43IDUgMjcuMyAxMy4yIDMuOSA1LjggNiAxMi42IDYgMTkuNlY0NDhoLS4yem0yNzItMzJjMCAxNy42LTE0LjQgMzItMzIgMzJIMzA0di0xNS4xYzAtMTMuOS00LjItMjYuOC0xMS40LTM3LjUtMTIuMS0xNy45LTMyLjctMjcuNC01My44LTI3LjQtMTkuNSAwLTI0LjQgNy00Ni44IDdzLTI3LjMtNy00Ni44LTdjLTIxLjIgMC00MS44IDkuNC01My44IDI3LjRDODQuMiA0MDYuMSA4MCA0MTkgODAgNDMyLjlWNDQ4SDY0Yy0xNy42IDAtMzItMTQuNC0zMi0zMlYxNjBoNTEydjI1NnptMC0yODhIMzJWOTZjMC0xNy42IDE0LjQtMzIgMzItMzJoNDQ4YzE3LjYgMCAzMiAxNC40IDMyIDMydjMyeiIvPjwvc3ZnPg"
        }
    ]
}
Attributes Description
id The ID of the play.
image Image of the play.
title Title of the play (limited to 255 characters).
subtitle Subtitle of the play (limited to 255 characters).
color Color of your play (can be red, blue, green, orange, purle. Green by default).
background_color Type of backgroud color (can be light, dark or auto (switch in dark theme at night. Light by defautl).

Retrieve a Play

curl https://api.senzu.app/play/1@937401fd55a161b90f7c98e193a90725?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "application":
    {
        "id":1
        "image":null,
        "title":"App Work",
        "subtitle":"My Subtitle",
        "color":"red",
        "background_color":"light"
    },
    "plugins":
    [
        {
            "id":9,
            "name":"My telegram",
            "icon_base64":"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBkPSJNNDQ2LjcgOTguNmwtNjcuNiAzMTguOGMtNS4xIDIyLjUtMTguNCAyOC4xLTM3LjMgMTcuNWwtMTAzLTc1LjktNDkuNyA0Ny44Yy01LjUgNS41LTEwLjEgMTAuMS0yMC43IDEwLjFsNy40LTEwNC45IDE5MC45LTE3Mi41YzguMy03LjQtMS44LTExLjUtMTIuOS00LjFMMTE3LjggMjg0IDE2LjIgMjUyLjJjLTIyLjEtNi45LTIyLjUtMjIuMSA0LjYtMzIuN0w0MTguMiA2Ni40YzE4LjQtNi45IDM0LjUgNC4xIDI4LjUgMzIuMnoiLz48L3N2Zz4"
        },
        {
            "id":165,
            "name":"My Plugin",
            "icon_base64":"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48cGF0aCBkPSJNNTg2IDI4NC41bDUzLjMtNTkuOWgtNjIuNGwtMjEuNyAyNC44LTIyLjUtMjQuOEg0MTR2LTE2aDU2LjF2LTQ4LjFIMzE4LjlWMjM2aC0uNWMtOS42LTExLTIxLjUtMTQuOC0zNS40LTE0LjgtMjguNCAwLTQ5LjggMTkuNC01Ny4zIDQ0LjktMTgtNTkuNC05Ny40LTU3LjYtMTIxLjktMTR2LTI0LjJINDl2LTI2LjJoNjB2LTQxLjFIMFYzNDVoNDl2LTc3LjVoNDguOWMtMS41IDUuNy0yLjMgMTEuOC0yLjMgMTguMiAwIDczLjEgMTAyLjYgOTEuNCAxMzAuMiAyMy43aC00MmMtMTQuNyAyMC45LTQ1LjggOC45LTQ1LjgtMTQuNmg4NS41YzMuNyAzMC41IDI3LjQgNTYuOSA2MC4xIDU2LjkgMTQuMSAwIDI3LTYuOSAzNC45LTE4LjZoLjVWMzQ1aDIxMi4ybDIyLjEtMjUgMjIuMyAyNUg2NDBsLTU0LTYwLjV6bS00NDYuNy0xNi42YzYuMS0yNi4zIDQxLjctMjUuNiA0Ni41IDBoLTQ2LjV6bTE1My40IDQ4LjljLTM0LjYgMC0zNC02Mi44IDAtNjIuOCAzMi42IDAgMzQuNSA2Mi44IDAgNjIuOHptMTY3LjggMTkuMWgtOTQuNFYxNjkuNGg5NXYzMC4ySDQwNXYzMy45aDU1LjV2MjguMWgtNTYuMXY0NC43aDU2LjF2MjkuNnptLTQ1LjktMzkuOHYtMjQuNGg1Ni4xdi00NGw1MC43IDU3LTUwLjcgNTd2LTQ1LjZoLTU2LjF6bTEzOC42IDEwLjNsLTI2LjEgMjkuNUg0ODlsNDUuNi01MS4yLTQ1LjYtNTEuMmgzOS43bDI2LjYgMjkuMyAyNS42LTI5LjNoMzguNWwtNDUuNCA1MSA0NiA1MS40aC00MC41bC0yNi4zLTI5LjV6Ii8"
        },
        {
            "id":166,
            "name":"My VCARD",
            "icon_base64":"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMzYwIDMyMGgxMTJjNC40IDAgOC0zLjYgOC04di0xNmMwLTQuNC0zLjYtOC04LThIMzYwYy00LjQgMC04IDMuNi04IDh2MTZjMCA0LjQgMy42IDggOCA4em0wLTY0aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bTAgMTI4aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bS0xNjgtMzJjNDQuMiAwIDgwLTM1LjggODAtODBzLTM1LjgtODAtODAtODAtODAgMzUuOC04MCA4MCAzNS44IDgwIDgwIDgwem0wLTEyOGMyNi41IDAgNDggMjEuNSA0OCA0OHMtMjEuNSA0OC00OCA0OC00OC0yMS41LTQ4LTQ4IDIxLjUtNDggNDgtNDh6TTUxMiAzMkg2NEMyOC43IDMyIDAgNjAuNyAwIDk2djMyMGMwIDM1LjMgMjguNyA2NCA2NCA2NGg0NDhjMzUuMyAwIDY0LTI4LjcgNjQtNjRWOTZjMC0zNS4zLTI4LjctNjQtNjQtNjR6TTI3MiA0NDhIMTEydi0xNS4xYzAtNyAyLjEtMTMuOCA2LTE5LjYgNS42LTguMyAxNS44LTEzLjIgMjcuMy0xMy4yIDEyLjQgMCAyMC44IDcgNDYuOCA3IDI1LjkgMCAzNC4zLTcgNDYuOC03IDExLjUgMCAyMS43IDUgMjcuMyAxMy4yIDMuOSA1LjggNiAxMi42IDYgMTkuNlY0NDhoLS4yem0yNzItMzJjMCAxNy42LTE0LjQgMzItMzIgMzJIMzA0di0xNS4xYzAtMTMuOS00LjItMjYuOC0xMS40LTM3LjUtMTIuMS0xNy45LTMyLjctMjcuNC01My44LTI3LjQtMTkuNSAwLTI0LjQgNy00Ni44IDdzLTI3LjMtNy00Ni44LTdjLTIxLjIgMC00MS44IDkuNC01My44IDI3LjRDODQuMiA0MDYuMSA4MCA0MTkgODAgNDMyLjlWNDQ4SDY0Yy0xNy42IDAtMzItMTQuNC0zMi0zMlYxNjBoNTEydjI1NnptMC0yODhIMzJWOTZjMC0xNy42IDE0LjQtMzIgMzItMzJoNDQ4YzE3LjYgMCAzMiAxNC40IDMyIDMydjMyeiIvPjwvc3ZnPg"
        }
    ]
}

GET https://api.senzu.app/play/<id_record>@<key>

Show all the informations for a specific Play.

Parameter Description
key Public key of the Record.

Retrieve a Plugin from a Play

curl https://api.senzu.app/play/1@937401fd55a161b90f7c98e193a90725/plugins/1538?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 1538,
    "name": "Mon contact",
    "icon_base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMzYwIDMyMGgxMTJjNC40IDAgOC0zLjYgOC04di0xNmMwLTQuNC0zLjYtOC04LThIMzYwYy00LjQgMC04IDMuNi04IDh2MTZjMCA0LjQgMy42IDggOCA4em0wLTY0aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bTAgMTI4aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bS0xNjgtMzJjNDQuMiAwIDgwLTM1LjggODAtODBzLTM1LjgtODAtODAtODAtODAgMzUuOC04MCA4MCAzNS44IDgwIDgwIDgwem0wLTEyOGMyNi41IDAgNDggMjEuNSA0OCA0OHMtMjEuNSA0OC00OCA0OC00OC0yMS41LTQ4LTQ4IDIxLjUtNDggNDgtNDh6TTUxMiAzMkg2NEMyOC43IDMyIDAgNjAuNyAwIDk2djMyMGMwIDM1LjMgMjguNyA2NCA2NCA2NGg0NDhjMzUuMyAwIDY0LTI4LjcgNjQtNjRWOTZjMC0zNS4zLTI4LjctNjQtNjQtNjR6TTI3MiA0NDhIMTEydi0xNS4xYzAtNyAyLjEtMTMuOCA2LTE5LjYgNS42LTguMyAxNS44LTEzLjIgMjcuMy0xMy4yIDEyLjQgMCAyMC44IDcgNDYuOCA3IDI1LjkgMCAzNC4zLTcgNDYuOC03IDExLjUgMCAyMS43IDUgMjcuMyAxMy4yIDMuOSA1LjggNiAxMi42IDYgMTkuNlY0NDhoLS4yem0yNzItMzJjMCAxNy42LTE0LjQgMzItMzIgMzJIMzA0di0xNS4xYzAtMTMuOS00LjItMjYuOC0xMS40LTM3LjUtMTIuMS0xNy45LTMyLjctMjcuNC01My44LTI3LjQtMTkuNSAwLTI0LjQgNy00Ni44IDdzLTI3LjMtNy00Ni44LTdjLTIxLjIgMC00MS44IDkuNC01My44IDI3LjRDODQuMiA0MDYuMSA4MCA0MTkgODAgNDMyLjlWNDQ4SDY0Yy0xNy42IDAtMzItMTQuNC0zMi0zMlYxNjBoNTEydjI1NnptMC0yODhIMzJWOTZjMC0xNy42IDE0LjQtMzIgMzItMzJoNDQ4YzE3LjYgMCAzMiAxNC40IDMyIDMydjMyeiIvPjwvc3ZnPg==",
    "plugin_exec": "https://plugins.senzu.app/1538/plugin.php?id_record=1044&id_product=630&timestamp=1590400420&hash=ac6d98bcb5926d026fa4ffa78ad29f37"
}

GET https://api.senzu.app/play/<id_record>@<key>/plugins/<id_plugin>

Show all the informations for a specific Plugin from a specific Play.

Parameter Description
id_record Id of the specific Record.
key Public key of the Record.
id_plugin Id of the specific Plugin.

List all dynamic plays

curl https://api.senzu.app/play/<id_record>@<picc_data>:<cmac>?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "application":
    {
        "id":1
        "image":null,
        "title":"App Work",
        "subtitle":"My Subtitle",
        "color":"red",
        "background_color":"light"
    },
    "plugins":
    [
        {
            "id":9,
            "name":"My telegram",
            "icon_base64":"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBkPSJNNDQ2LjcgOTguNmwtNjcuNiAzMTguOGMtNS4xIDIyLjUtMTguNCAyOC4xLTM3LjMgMTcuNWwtMTAzLTc1LjktNDkuNyA0Ny44Yy01LjUgNS41LTEwLjEgMTAuMS0yMC43IDEwLjFsNy40LTEwNC45IDE5MC45LTE3Mi41YzguMy03LjQtMS44LTExLjUtMTIuOS00LjFMMTE3LjggMjg0IDE2LjIgMjUyLjJjLTIyLjEtNi45LTIyLjUtMjIuMSA0LjYtMzIuN0w0MTguMiA2Ni40YzE4LjQtNi45IDM0LjUgNC4xIDI4LjUgMzIuMnoiLz48L3N2Zz4"
        },
        {
            "id":165,
            "name":"My Plugin",
            "icon_base64":"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48cGF0aCBkPSJNNTg2IDI4NC41bDUzLjMtNTkuOWgtNjIuNGwtMjEuNyAyNC44LTIyLjUtMjQuOEg0MTR2LTE2aDU2LjF2LTQ4LjFIMzE4LjlWMjM2aC0uNWMtOS42LTExLTIxLjUtMTQuOC0zNS40LTE0LjgtMjguNCAwLTQ5LjggMTkuNC01Ny4zIDQ0LjktMTgtNTkuNC05Ny40LTU3LjYtMTIxLjktMTR2LTI0LjJINDl2LTI2LjJoNjB2LTQxLjFIMFYzNDVoNDl2LTc3LjVoNDguOWMtMS41IDUuNy0yLjMgMTEuOC0yLjMgMTguMiAwIDczLjEgMTAyLjYgOTEuNCAxMzAuMiAyMy43aC00MmMtMTQuNyAyMC45LTQ1LjggOC45LTQ1LjgtMTQuNmg4NS41YzMuNyAzMC41IDI3LjQgNTYuOSA2MC4xIDU2LjkgMTQuMSAwIDI3LTYuOSAzNC45LTE4LjZoLjVWMzQ1aDIxMi4ybDIyLjEtMjUgMjIuMyAyNUg2NDBsLTU0LTYwLjV6bS00NDYuNy0xNi42YzYuMS0yNi4zIDQxLjctMjUuNiA0Ni41IDBoLTQ2LjV6bTE1My40IDQ4LjljLTM0LjYgMC0zNC02Mi44IDAtNjIuOCAzMi42IDAgMzQuNSA2Mi44IDAgNjIuOHptMTY3LjggMTkuMWgtOTQuNFYxNjkuNGg5NXYzMC4ySDQwNXYzMy45aDU1LjV2MjguMWgtNTYuMXY0NC43aDU2LjF2MjkuNnptLTQ1LjktMzkuOHYtMjQuNGg1Ni4xdi00NGw1MC43IDU3LTUwLjcgNTd2LTQ1LjZoLTU2LjF6bTEzOC42IDEwLjNsLTI2LjEgMjkuNUg0ODlsNDUuNi01MS4yLTQ1LjYtNTEuMmgzOS43bDI2LjYgMjkuMyAyNS42LTI5LjNoMzguNWwtNDUuNCA1MSA0NiA1MS40aC00MC41bC0yNi4zLTI5LjV6Ii8"
        },
        {
            "id":166,
            "name":"My VCARD",
            "icon_base64":"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMzYwIDMyMGgxMTJjNC40IDAgOC0zLjYgOC04di0xNmMwLTQuNC0zLjYtOC04LThIMzYwYy00LjQgMC04IDMuNi04IDh2MTZjMCA0LjQgMy42IDggOCA4em0wLTY0aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bTAgMTI4aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bS0xNjgtMzJjNDQuMiAwIDgwLTM1LjggODAtODBzLTM1LjgtODAtODAtODAtODAgMzUuOC04MCA4MCAzNS44IDgwIDgwIDgwem0wLTEyOGMyNi41IDAgNDggMjEuNSA0OCA0OHMtMjEuNSA0OC00OCA0OC00OC0yMS41LTQ4LTQ4IDIxLjUtNDggNDgtNDh6TTUxMiAzMkg2NEMyOC43IDMyIDAgNjAuNyAwIDk2djMyMGMwIDM1LjMgMjguNyA2NCA2NCA2NGg0NDhjMzUuMyAwIDY0LTI4LjcgNjQtNjRWOTZjMC0zNS4zLTI4LjctNjQtNjQtNjR6TTI3MiA0NDhIMTEydi0xNS4xYzAtNyAyLjEtMTMuOCA2LTE5LjYgNS42LTguMyAxNS44LTEzLjIgMjcuMy0xMy4yIDEyLjQgMCAyMC44IDcgNDYuOCA3IDI1LjkgMCAzNC4zLTcgNDYuOC03IDExLjUgMCAyMS43IDUgMjcuMyAxMy4yIDMuOSA1LjggNiAxMi42IDYgMTkuNlY0NDhoLS4yem0yNzItMzJjMCAxNy42LTE0LjQgMzItMzIgMzJIMzA0di0xNS4xYzAtMTMuOS00LjItMjYuOC0xMS40LTM3LjUtMTIuMS0xNy45LTMyLjctMjcuNC01My44LTI3LjQtMTkuNSAwLTI0LjQgNy00Ni44IDdzLTI3LjMtNy00Ni44LTdjLTIxLjIgMC00MS44IDkuNC01My44IDI3LjRDODQuMiA0MDYuMSA4MCA0MTkgODAgNDMyLjlWNDQ4SDY0Yy0xNy42IDAtMzItMTQuNC0zMi0zMlYxNjBoNTEydjI1NnptMC0yODhIMzJWOTZjMC0xNy42IDE0LjQtMzIgMzItMzJoNDQ4YzE3LjYgMCAzMiAxNC40IDMyIDMydjMyeiIvPjwvc3ZnPg"
        }
    ]
}

GET https://api.senzu.app/play/<id_record>@<picc_data>:<cmac>

Parameter Description
id_record Id of the specific Record.
picc_data 32 characters representating the informations of the play.
cmac 16 characters used to tell if the picc_data is correct.

Get plugin of a dynamic play

curl https://api.senzu.app/play/<id_record>@<picc_data>:<cmac>/plugins/1538?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 1538,
    "name": "Mon contact",
    "icon_base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMzYwIDMyMGgxMTJjNC40IDAgOC0zLjYgOC04di0xNmMwLTQuNC0zLjYtOC04LThIMzYwYy00LjQgMC04IDMuNi04IDh2MTZjMCA0LjQgMy42IDggOCA4em0wLTY0aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bTAgMTI4aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bS0xNjgtMzJjNDQuMiAwIDgwLTM1LjggODAtODBzLTM1LjgtODAtODAtODAtODAgMzUuOC04MCA4MCAzNS44IDgwIDgwIDgwem0wLTEyOGMyNi41IDAgNDggMjEuNSA0OCA0OHMtMjEuNSA0OC00OCA0OC00OC0yMS41LTQ4LTQ4IDIxLjUtNDggNDgtNDh6TTUxMiAzMkg2NEMyOC43IDMyIDAgNjAuNyAwIDk2djMyMGMwIDM1LjMgMjguNyA2NCA2NCA2NGg0NDhjMzUuMyAwIDY0LTI4LjcgNjQtNjRWOTZjMC0zNS4zLTI4LjctNjQtNjQtNjR6TTI3MiA0NDhIMTEydi0xNS4xYzAtNyAyLjEtMTMuOCA2LTE5LjYgNS42LTguMyAxNS44LTEzLjIgMjcuMy0xMy4yIDEyLjQgMCAyMC44IDcgNDYuOCA3IDI1LjkgMCAzNC4zLTcgNDYuOC03IDExLjUgMCAyMS43IDUgMjcuMyAxMy4yIDMuOSA1LjggNiAxMi42IDYgMTkuNlY0NDhoLS4yem0yNzItMzJjMCAxNy42LTE0LjQgMzItMzIgMzJIMzA0di0xNS4xYzAtMTMuOS00LjItMjYuOC0xMS40LTM3LjUtMTIuMS0xNy45LTMyLjctMjcuNC01My44LTI3LjQtMTkuNSAwLTI0LjQgNy00Ni44IDdzLTI3LjMtNy00Ni44LTdjLTIxLjIgMC00MS44IDkuNC01My44IDI3LjRDODQuMiA0MDYuMSA4MCA0MTkgODAgNDMyLjlWNDQ4SDY0Yy0xNy42IDAtMzItMTQuNC0zMi0zMlYxNjBoNTEydjI1NnptMC0yODhIMzJWOTZjMC0xNy42IDE0LjQtMzIgMzItMzJoNDQ4YzE3LjYgMCAzMiAxNC40IDMyIDMydjMyeiIvPjwvc3ZnPg==",
    "plugin_exec": "https://plugins.senzu.app/1538/plugin.php?id_record=1044&id_product=630&timestamp=1590400420&hash=ac6d98bcb5926d026fa4ffa78ad29f37"
}

GET https://api.senzu.app/play/<id_record>@<picc_data>:<cmac>/plugins/<id_plugin>

Parameter Description
id_record Id of the specific Record.
picc_data 32 characters representating the informations of the play.
cmac 16 characters used to tell if the picc_data is correct.
id_plugin Id of the specific Plugin.

Retrieve a Shared Play

Retrieve a Plugin from a Shared Play

Plugins

ENDPOINTS
GET List all plugins
GET Retrieve a plugin
POST Add a plugin
POST Update a plugin
DELETE Delete a plugin

A plugin is the object you find in the plugstore that you can add in your applications, we currently have 31 plugins, but we'll add more.

Actually, if you have the developer role, you can create your own plugins. You can also update and delete them

The plugin object

{
    "id": 2235,
    "id_parent": null,
    "user": {
        "id": 274,
        "username": null
    },
    "application": {
        "id": 556,
        "name": "SenzuApp"
    },
    "plugstore": {
        "id": 8,
        "name": "Appel"
    },
    "icon": {
        "id": 14,
        "base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNNDg3LjggMjQuMUwzODcgLjhjLTE0LjctMy40LTI5LjggNC4yLTM1LjggMTguMWwtNDYuNSAxMDguNWMtNS41IDEyLjctMS44IDI3LjcgOC45IDM2LjVsNTMuOSA0NC4xYy0zNCA2OS4yLTkwLjMgMTI1LjYtMTU5LjYgMTU5LjZsLTQ0LjEtNTMuOWMtOC44LTEwLjctMjMuOC0xNC40LTM2LjUtOC45TDE4LjkgMzUxLjNDNSAzNTcuMy0yLjYgMzcyLjMuOCAzODdMMjQgNDg3LjdDMjcuMyA1MDIgMzkuOSA1MTIgNTQuNSA1MTIgMzA2LjcgNTEyIDUxMiAzMDcuOCA1MTIgNTQuNWMwLTE0LjYtMTAtMjcuMi0yNC4yLTMwLjR6TTU1LjEgNDgwbC0yMy05OS42IDEwNy40LTQ2IDU5LjUgNzIuOGMxMDMuNi00OC42IDE1OS43LTEwNC45IDIwOC4xLTIwOC4xbC03Mi44LTU5LjUgNDYtMTA3LjQgOTkuNiAyM0M0NzkuNyAyODkuNyAyODkuNiA0NzkuNyA1NS4xIDQ4MHoiLz48L3N2Zz4=",
        "editable": false
    },
    "name": "Téléphone",
    "plugin_exec": "https://plugins.senzu.app/2235/plugin.php?id_application=556&timestamp=1591708954&hash=7e0a5818d7ff314de3fd24113f13b669",
    "password": null,
    "data": {
        "phone_number": "0700000000"
    },
    "status": true,
    "sort_order": 1,
    "is_locked": false,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-02 15:19:48.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attributes Descritption
id ID of the plugin.
id_parent ID of the plugin's parent if it exists.
user Information about the user.
application Information about the application.
plugstore Information about the plugstore. (id of the plugin on the plugstore and name of the plugin in the plugstore).
icon Information about the icon of the plugin.
name Name of the plugin on the application.
plugin_exec Url called when you execute the plugin.
password Password of the plugin if it exists.
data Data inside of the plugin (here the plugin is a phone number).
status
sort_order The position of the plugin in the app.
is_locked Tells if the plugin is locked (if yes, cant be removed).
is_enabled Tells if the plugin is enabled.

List all Plugins

curl https://api.senzu.app/applications/3/plugins?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 2235,
        "id_plugstore": 8,
        "name": "Téléphone",
        "icon": {
            "id": 14,
            "base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNNDg3LjggMjQuMUwzODcgLjhjLTE0LjctMy40LTI5LjggNC4yLTM1LjggMTguMWwtNDYuNSAxMDguNWMtNS41IDEyLjctMS44IDI3LjcgOC45IDM2LjVsNTMuOSA0NC4xYy0zNCA2OS4yLTkwLjMgMTI1LjYtMTU5LjYgMTU5LjZsLTQ0LjEtNTMuOWMtOC44LTEwLjctMjMuOC0xNC40LTM2LjUtOC45TDE4LjkgMzUxLjNDNSAzNTcuMy0yLjYgMzcyLjMuOCAzODdMMjQgNDg3LjdDMjcuMyA1MDIgMzkuOSA1MTIgNTQuNSA1MTIgMzA2LjcgNTEyIDUxMiAzMDcuOCA1MTIgNTQuNWMwLTE0LjYtMTAtMjcuMi0yNC4yLTMwLjR6TTU1LjEgNDgwbC0yMy05OS42IDEwNy40LTQ2IDU5LjUgNzIuOGMxMDMuNi00OC42IDE1OS43LTEwNC45IDIwOC4xLTIwOC4xbC03Mi44LTU5LjUgNDYtMTA3LjQgOTkuNiAyM0M0NzkuNyAyODkuNyAyODkuNiA0NzkuNyA1NS4xIDQ4MHoiLz48L3N2Zz4=",
            "editable": false
        },
        "is_enabled": true,
        "status": true,
        "sort_order": 1
    },
    "1": {
        "id": 2236,
        "id_plugstore": 9,
        "name": "Messages",
        "icon": {
            "id": 16,
            "base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMzA0IDE3NmgtMTZjLTYuMSAwLTExLjYgMy40LTE0LjMgOC44TDI1NiAyMjAuMmwtMTcuNy0zNS40Yy0yLjctNS40LTguMi04LjgtMTQuMy04LjhoLTE2Yy04LjggMC0xNiA3LjItMTYgMTZ2MTA0YzAgNC40IDMuNiA4IDggOGgxNmM0LjQgMCA4LTMuNiA4LTh2LTY4LjJsMjQuOCA1NS44YzIuOSA1LjkgMTEuNCA1LjkgMTQuMyAwbDI0LjgtNTUuOFYyOTZjMCA0LjQgMy42IDggOCA4aDE2YzQuNCAwIDgtMy42IDgtOFYxOTJjLjEtOC44LTcuMS0xNi0xNS45LTE2em0tMTY4LjYgNDIuNWMtMS40LTEuMi0yLjEtMi41LTIuMS0zLjggMC0zLjEgNC41LTYuNiAxMC40LTYuNkgxNTZjNC40IDAgOC0zLjYgOC04di0xNmMwLTQuNC0zLjYtOC04LThoLTEyLjJjLTIzLjQgMC00Mi40IDE3LjMtNDIuNCAzOC42IDAgMTAuNyA0LjkgMjAuOSAxMy4zIDI4LjFsMjEuOSAxOC44YzEuNCAxLjIgMi4xIDIuNSAyLjEgMy44IDAgMy4xLTQuNSA2LjYtMTAuNCA2LjZIMTE2Yy00LjQgMC04IDMuNi04IDh2MTZjMCA0LjQgMy42IDggOCA4aDEyLjNjMjMuNCAwIDQyLjQtMTcuMyA0Mi40LTM4LjYgMC0xMC43LTQuOS0yMC45LTEzLjMtMjguMWwtMjItMTguOHptMjQwIDBjLTEuNC0xLjItMi4xLTIuNS0yLjEtMy44IDAtMy4xIDQuNS02LjYgMTAuNC02LjZIMzk2YzQuNCAwIDgtMy42IDgtOHYtMTZjMC00LjQtMy42LTgtOC04aC0xMi4zYy0yMy40IDAtNDIuNCAxNy4zLTQyLjQgMzguNiAwIDEwLjcgNC45IDIwLjkgMTMuMyAyOC4xbDIxLjkgMTguOGMxLjQgMS4yIDIuMSAyLjUgMi4xIDMuOCAwIDMuMS00LjUgNi42LTEwLjQgNi42SDM1NmMtNC40IDAtOCAzLjYtOCA4djE2YzAgNC40IDMuNiA4IDggOGgxMi4zYzIzLjQgMCA0Mi40LTE3LjMgNDIuNC0zOC42IDAtMTAuNy00LjktMjAuOS0xMy4zLTI4LjFsLTIyLTE4Ljh6TTI1NiAzMkMxMTQuNiAzMiAwIDEyNS4xIDAgMjQwYzAgNDcuNiAxOS45IDkxLjIgNTIuOSAxMjYuM0MzOCA0MDUuNyA3IDQzOS4xIDYuNSA0MzkuNWMtNi42IDctOC40IDE3LjItNC42IDI2IDMuOCA4LjggMTIuNCAxNC41IDIyIDE0LjUgNjEuNSAwIDExMC0yNS43IDEzOS4xLTQ2LjMgMjkgOS4xIDYwLjIgMTQuMyA5MyAxNC4zIDE0MS40IDAgMjU2LTkzLjEgMjU2LTIwOFMzOTcuNCAzMiAyNTYgMzJ6bTAgMzg0Yy0yOC4zIDAtNTYuMy00LjMtODMuMi0xMi44bC0xNS4yLTQuOC0xMyA5LjJjLTIzIDE2LjMtNTguNSAzNS4zLTEwMi42IDM5LjYgMTItMTUuMSAyOS44LTQwLjQgNDAuOC02OS42bDcuMS0xOC43LTEzLjctMTQuNkM0Ny40IDMxMy43IDMyLjEgMjc3LjYgMzIuMSAyNDBjMC05NyAxMDAuNS0xNzYgMjI0LTE3NnMyMjQgNzkgMjI0IDE3NlMzNzkuNSA0MTYgMjU2IDQxNnoiLz48L3N2Zz4=",
            "editable": false
        },
        "is_enabled": true,
        "status": true,
        "sort_order": 2
    }
}

GET https://api.senzu.app/applications/<id>/plugins

Returns a list of Plugins for a specific Application.

Parameter Description
id Id of the specific Application.

Retrieve a Plugin

curl https://api.senzu.app/plugins/152?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 2235,
    "id_parent": null,
    "user": {
        "id": 274,
        "username": null
    },
    "application": {
        "id": 556,
        "name": "Ryan Murati"
    },
    "plugstore": {
        "id": 8,
        "name": "Appel"
    },
    "icon": {
        "id": 14,
        "base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNNDg3LjggMjQuMUwzODcgLjhjLTE0LjctMy40LTI5LjggNC4yLTM1LjggMTguMWwtNDYuNSAxMDguNWMtNS41IDEyLjctMS44IDI3LjcgOC45IDM2LjVsNTMuOSA0NC4xYy0zNCA2OS4yLTkwLjMgMTI1LjYtMTU5LjYgMTU5LjZsLTQ0LjEtNTMuOWMtOC44LTEwLjctMjMuOC0xNC40LTM2LjUtOC45TDE4LjkgMzUxLjNDNSAzNTcuMy0yLjYgMzcyLjMuOCAzODdMMjQgNDg3LjdDMjcuMyA1MDIgMzkuOSA1MTIgNTQuNSA1MTIgMzA2LjcgNTEyIDUxMiAzMDcuOCA1MTIgNTQuNWMwLTE0LjYtMTAtMjcuMi0yNC4yLTMwLjR6TTU1LjEgNDgwbC0yMy05OS42IDEwNy40LTQ2IDU5LjUgNzIuOGMxMDMuNi00OC42IDE1OS43LTEwNC45IDIwOC4xLTIwOC4xbC03Mi44LTU5LjUgNDYtMTA3LjQgOTkuNiAyM0M0NzkuNyAyODkuNyAyODkuNiA0NzkuNyA1NS4xIDQ4MHoiLz48L3N2Zz4=",
        "editable": false
    },
    "name": "Téléphone",
    "plugin_exec": "https://plugins.senzu.app/2235/plugin.php?id_application=556&timestamp=1591711095&hash=b849cb9554f2b9a3ddbe2758971efc2c",
    "password": null,
    "data": {
        "phone_number": "0781718927"
    },
    "status": true,
    "sort_order": 1,
    "is_locked": false,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-02 15:19:48.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/plugins/<id>

Show all the informations for a specific Plugin.

Parameter Description
id Id of the specific Plugin.

Add a Plugin

curl https://api.senzu.app/applications/4/plugstore/91?token={token} \
-X POST \
-d name="My Plugin" \
-d id_icon=3 

The above command returns JSON structured like this :

{
    "id": 2435,
    "parent": null,
    "application": {
        "id": 556,
        "name": "Ryan Murati"
    },
    "id_plugstore": 13,
    "version": {
        "id": 13,
        "name": "1.0"
    },
    "icon_base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMzAxLjE0OCAzOTQuNzAybC03OS4yIDc5LjE5Yy01MC43NzggNTAuNzk5LTEzMy4wMzcgNTAuODI0LTE4My44NCAwLTUwLjc5OS01MC43NzgtNTAuODI0LTEzMy4wMzcgMC0xODMuODRsNzkuMTktNzkuMmExMzIuODMzIDEzMi44MzMgMCAwIDEgMy41MzItMy40MDNjNy41NS03LjAwNSAxOS43OTUtMi4wMDQgMjAuMjA4IDguMjg2LjE5MyA0LjgwNy41OTggOS42MDcgMS4yMTYgMTQuMzg0LjQ4MSAzLjcxNy0uNzQ2IDcuNDQ3LTMuMzk3IDEwLjA5Ni0xNi40OCAxNi40NjktNzUuMTQyIDc1LjEyOC03NS4zIDc1LjI4Ni0zNi43MzggMzYuNzU5LTM2LjczMSA5Ni4xODggMCAxMzIuOTQgMzYuNzU5IDM2LjczOCA5Ni4xODggMzYuNzMxIDEzMi45NCAwbDc5LjItNzkuMi4zNi0uMzZjMzYuMzAxLTM2LjY3MiAzNi4xNC05Ni4wNy0uMzctMTMyLjU4LTguMjE0LTguMjE0LTE3LjU3Ny0xNC41OC0yNy41ODUtMTkuMTA5LTQuNTY2LTIuMDY2LTcuNDI2LTYuNjY3LTcuMTM0LTExLjY3YTYyLjE5NyA2Mi4xOTcgMCAwIDEgMi44MjYtMTUuMjU5YzIuMTAzLTYuNjAxIDkuNTMxLTkuOTYxIDE1LjkxOS03LjI4IDE1LjA3MyA2LjMyNCAyOS4xODcgMTUuNjIgNDEuNDM1IDI3Ljg2OCA1MC42ODggNTAuNjg5IDUwLjY3OSAxMzMuMTcgMCAxODMuODUxem0tOTAuMjk2LTkzLjU1NGMxMi4yNDggMTIuMjQ4IDI2LjM2MiAyMS41NDQgNDEuNDM1IDI3Ljg2OCA2LjM4OCAyLjY4IDEzLjgxNi0uNjggMTUuOTE5LTcuMjhhNjIuMTk3IDYyLjE5NyAwIDAgMCAyLjgyNi0xNS4yNTljLjI5Mi01LjAwMy0yLjU2OS05LjYwNC03LjEzNC0xMS42Ny0xMC4wMDgtNC41MjgtMTkuMzcxLTEwLjg5NC0yNy41ODUtMTkuMTA5LTM2LjUxLTM2LjUxLTM2LjY3MS05NS45MDgtLjM3LTEzMi41OGwuMzYtLjM2IDc5LjItNzkuMmMzNi43NTItMzYuNzMxIDk2LjE4MS0zNi43MzggMTMyLjk0IDAgMzYuNzMxIDM2Ljc1MiAzNi43MzggOTYuMTgxIDAgMTMyLjk0LS4xNTcuMTU3LTU4LjgxOSA1OC44MTctNzUuMyA3NS4yODYtMi42NTEgMi42NS0zLjg3OCA2LjM3OS0zLjM5NyAxMC4wOTZhMTYzLjE1NiAxNjMuMTU2IDAgMCAxIDEuMjE2IDE0LjM4NGMuNDEzIDEwLjI5MSAxMi42NTkgMTUuMjkxIDIwLjIwOCA4LjI4NmExMzEuMzI0IDEzMS4zMjQgMCAwIDAgMy41MzItMy40MDNsNzkuMTktNzkuMmM1MC44MjQtNTAuODAzIDUwLjc5OS0xMzMuMDYyIDAtMTgzLjg0LTUwLjgwMi01MC44MjQtMTMzLjA2Mi01MC43OTktMTgzLjg0IDBsLTc5LjIgNzkuMTljLTUwLjY3OSA1MC42ODItNTAuNjg4IDEzMy4xNjMgMCAxODMuODUxeiIvPjwvc3ZnPg==",
    "name": "my_plugin",
    "password": null,
    "data": [],
    "filters": null,
    "status": true,
    "sort_order": null,
    "is_locked": false,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-09 16:06:28.516624",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/applications/<id_application>/plugstore/<id_plugstore>

Creates a Plugin object that is add to the Application.

Parameter Description
id_application Set the Application where you want to add a Plugin.
id_plugstore Defines on which Plugstore your Plugin will be based.
Arguments Mandatory Description
name True It will be the name of your Plugin and it will show on the Play.
id_icon False Defines the id of your Plugin icon.
id_parent False Defines the id of your parent Plugin.
password False Set the password of your Plugin. It used when your Plugin is locked.
filters False Allows you to put filters on your Plugin. It can be a time during the day.
sort_order False Defines where the Plugin will be shown on the Play.
is_locked False Set if the Plugin is locked or not.

Update a Plugin

curl https://api.senzu.app/plugins/166?token={token} \
-X POST \
-d name="My VCARD"

The above command returns JSON structured like this :

{
    "id": 2241,
    "id_parent": null,
    "application": {
        "id": 556,
        "name": "Ryan Murati"
    },
    "plugstore": {
        "id": 37,
        "name": "LinkedIn"
    },
    "icon_base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBkPSJNMTAwLjI4IDQ0OEg3LjRWMTQ4LjloOTIuODh6TTUzLjc5IDEwOC4xQzI0LjA5IDEwOC4xIDAgODMuNSAwIDUzLjhhNTMuNzkgNTMuNzkgMCAwIDEgMTA3LjU4IDBjMCAyOS43LTI0LjEgNTQuMy01My43OSA1NC4zek00NDcuOSA0NDhoLTkyLjY4VjMwMi40YzAtMzQuNy0uNy03OS4yLTQ4LjI5LTc5LjItNDguMjkgMC01NS42OSAzNy43LTU1LjY5IDc2LjdWNDQ4aC05Mi43OFYxNDguOWg4OS4wOHY0MC44aDEuM2MxMi40LTIzLjUgNDIuNjktNDguMyA4Ny44OC00OC4zIDk0IDAgMTExLjI4IDYxLjkgMTExLjI4IDE0Mi4zVjQ0OHoiLz48L3N2Zz4=",
    "name": "My VCARD",
    "password": null,
    "data": {
        "username": "Ryan Murati"
    },
    "filters": null,
    "status": true,
    "sort_order": 4,
    "is_locked": false,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-02 15:32:15.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/plugins/<id>

Modify the data of a specific Plugin.

Parameter Description
id Id of the Plugin you want to modify.
Arguments Description
name It will be the name of your Plugin and it will show on the Play.
id_icon Changes the id of your Plugin icon.
id_parent Changes the id of your parent Plugin.
password Set the password of your Plugin. It used when your Plugin is locked.
filters Allows you to put filters on your Plugin. It can be a time during the day.
sort_order Changes where the Plugin will be shown on the Play.
is_enabled Set if the Plugin is enabled or not.
is_locked Set if the Plugin is locked or not.

Delete a Plugin

curl https://api.senzu.app/plugins/166?token={token} \
-X DELETE

DELETE https://api.senzu.app/plugins/<id>

Delete a specific Plugin.

Parameter Description
id Id of the Plugin you want to delete.

Plugstore

ENDPOINTS
GET List all the plugstore
GET Retrieve a specific plugstore
POST Create a plugstore
POST Update a plugstore
DELETE Delete a plugstore
GET List all version of a plugstore
GET Retrieve a specific version
POST Create a version
POST Update a version
GET List all lang of a version
GET Retrieve a specific lang
POST Add lang to version
POST Update lang
GET List all the plugstores categories
GET Retrieve form of a plugstore

The plugstore is the "store" of the plugin (the page where you can find all the plugins created by the developers) you can also define plugstore as an object of the store. You can create a plugstore if you have the rights (Senzu has to verify it before the adding).

If you have the developer right, you can also update and delete a plugin from the plugstore.

The plugstore object

{
    "0": {
        "id": 1,
        "display_name": "VCard",
        "icon": {
            "id": 7,
            "base64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMzYwIDMyMGgxMTJjNC40IDAgOC0zLjYgOC04di0xNmMwLTQuNC0zLjYtOC04LThIMzYwYy00LjQgMC04IDMuNi04IDh2MTZjMCA0LjQgMy42IDggOCA4em0wLTY0aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bTAgMTI4aDExMmM0LjQgMCA4LTMuNiA4LTh2LTE2YzAtNC40LTMuNi04LTgtOEgzNjBjLTQuNCAwLTggMy42LTggOHYxNmMwIDQuNCAzLjYgOCA4IDh6bS0xNjgtMzJjNDQuMiAwIDgwLTM1LjggODAtODBzLTM1LjgtODAtODAtODAtODAgMzUuOC04MCA4MCAzNS44IDgwIDgwIDgwem0wLTEyOGMyNi41IDAgNDggMjEuNSA0OCA0OHMtMjEuNSA0OC00OCA0OC00OC0yMS41LTQ4LTQ4IDIxLjUtNDggNDgtNDh6TTUxMiAzMkg2NEMyOC43IDMyIDAgNjAuNyAwIDk2djMyMGMwIDM1LjMgMjguNyA2NCA2NCA2NGg0NDhjMzUuMyAwIDY0LTI4LjcgNjQtNjRWOTZjMC0zNS4zLTI4LjctNjQtNjQtNjR6TTI3MiA0NDhIMTEydi0xNS4xYzAtNyAyLjEtMTMuOCA2LTE5LjYgNS42LTguMyAxNS44LTEzLjIgMjcuMy0xMy4yIDEyLjQgMCAyMC44IDcgNDYuOCA3IDI1LjkgMCAzNC4zLTcgNDYuOC03IDExLjUgMCAyMS43IDUgMjcuMyAxMy4yIDMuOSA1LjggNiAxMi42IDYgMTkuNlY0NDhoLS4yem0yNzItMzJjMCAxNy42LTE0LjQgMzItMzIgMzJIMzA0di0xNS4xYzAtMTMuOS00LjItMjYuOC0xMS40LTM3LjUtMTIuMS0xNy45LTMyLjctMjcuNC01My44LTI3LjQtMTkuNSAwLTI0LjQgNy00Ni44IDdzLTI3LjMtNy00Ni44LTdjLTIxLjIgMC00MS44IDkuNC01My44IDI3LjRDODQuMiA0MDYuMSA4MCA0MTkgODAgNDMyLjlWNDQ4SDY0Yy0xNy42IDAtMzItMTQuNC0zMi0zMlYxNjBoNTEydjI1NnptMC0yODhIMzJWOTZjMC0xNy42IDE0LjQtMzIgMzItMzJoNDQ4YzE3LjYgMCAzMiAxNC40IDMyIDMydjMyeiIvPjwvc3ZnPg==",
            "icon_editable": false
        },
        "catchphrase": "Carte de visite virtuelle prête à être partagée.",
        "description": "Vous pouvez utiliser cette carte de visite virtuelle (vCard) pour permettre à une personne de vous ajouter rapidement à ses contacts. En règle générale, une vCard contient les informations suivantes : nom, fonction, numéros de téléphone, adresse, ville et code postal. Vous pourrez également renseigner d'autres informations au moment de l'installation de ce module. Lorsqu'une personne utilisera votre carte Senzu pour importer cette vCard, elle importera automatiquement les données de ces champs dans une fiche de son répertoire téléphonique.",
        "developer_name": "Senzu Edition",
        "status": "publish",
        "date_created": {
            "date": "2020-01-31 09:42:14.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}
Attributes Description
id ID of the plugin (there is way more plugin than the VCard, but we only showed one for comprehension).
display_name Display name of the plugin
icon Information about the icon of the plugin.
catchphrase The catchphrase of the plugin showed in the plugstore.
description A little description to tell what the plugin is.
developer_name Name of the developer who created the plugin.
status Status of the plugin.

List all the plugstore

curl "https://api.senzu.app/plugstore"
-X GET

The above command returns JSON structured like this:

[  
   {  
      "id":1,
      "display_name":"Plug 1"
   },
   {  
      "id":6,
      "display_name":"Plug2"
   }
]

GET https://api.senzu.app/plugstore

Retrieve a specific plugstore

curl "https://api.senzu.app/plugstore/1?token={token}"
-X GET

The above command returns JSON structured like this:


{  
   "id":1, 
   "developer":{  
      "id":1
   },
   "company":{  
      "id":1,
      "name":"Senzu",
      "email":"company@senzu.app"
   },
   "icon":1,
   "display_name":"Plug 1",
   "alias":"P1",
   "options":[  
      {  
         "id":5,
         "name":"name_fr",
         "value":"Module 1"
      },
      {  
         "id":6,
         "name":"desc_fr",
         "value":"Ceci est un module"
      },
      {  
         "id":7,
         "name":"name_en",
         "value":"Plugin 1"
      },
      {  
         "id":8,
         "name":"desc_en",
         "value":"This is a plugin"
      }
   ],
   "status":true,
   "is_enabled":true,
   "date_created":{  
      "date":"2019-06-19 08:25:40.000000",
      "timezone_type":3,
      "timezone":"Europe/Berlin"
   },
   "date_updated":null
}

GET https://api.senzu.app/plugstore/<ID>

Arguments Description
ID ID of the specific plugin to reach

Create a plugstore

curl "https://api.senzu.app/dev/plugstore?token={token}"
-X POST \
-d display_name="PlugstoreTest"

The above command returns JSON structured like this :

{
    "id": 63,
    "name": "PlugstoreTest",
    "display_name": "PlugstoreTest",
    "developer": {
        "id": 10
    },
    "version": {
        "id": 63,
        "name": "1.0",
        "id_folder": 172,
        "copyright": null,
        "contact_firstname": null,
        "contact_lastname": null,
        "contact_phone": null,
        "contact_email": null,
        "route_admin": null,
        "is_requested": false,
        "date_created": {
            "date": "2020-06-22 10:15:13.446102",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "version_lang": {
        "lang": "fr",
        "catchphrase": null,
        "description": null,
        "tags": null,
        "assistance_url": null,
        "marketing_url": null,
        "privacy_url": null,
        "tos_url": null,
        "gdpr_name": null,
        "gdpr_email": null,
        "gdpr_address_street": null,
        "gdpr_address_other": null,
        "gpdr_address_city": null,
        "gdpr_address_state": null,
        "gdpr_address_zipcode": null,
        "gdpr_address_country": null
    },
    "company": null,
    "icon_base64": null,
    "id_folder": 171,
    "status": false,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-22 10:15:13.445677",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/developers/<ID_developer>/plugstore

Create a new plugin for the plugstore

Arguments Mandatory Description
name False Name of the plugin (not showed).
display_name True Name of the plugin.
version False Version of the plugstore.
copyright False Set the copiryght of the plugstore.
contact_firstname False The firstname of the contact.
contact_lastname False The lastname of the contact.
contact_phone False The phone number of the contact.
contact_email False The e-mail of the contact.
route_admin False Set an administration pannel.
lang False Language of the plugstore.
catchphrase False The catchphrase of the plugstore.
description False Description of the plugstore.
tags False Tags you add to the plugstore.
assistance_url False Url of the assistance page.
marketing_url False Url of the marketing page.
privacy_url False Url of the privacy page.
tos_url False Term of service url.
gdpr_address False General Data Protection Regulation Adress.
id_company False Name of the company who created the plugin.
id_category False Defines the category of the plustore created.
id_icon False The id of the plugstore's icon.
icon_editable False Set to edit the icon.
date_released False The release date of the plugstore.

Update an existing plugstore

curl "https://api.senzu.app/plugstore/63?token={token}"
-X POST
-d is_enabled="false"

The above command returns JSON structured like this :

{
    "id": 63,
    "developer": {
        "id": 10
    },
    "version": {
        "id": 63,
        "name": "1.0"
    },
    "company": null,
    "id_folder": 171,
    "status": false,
    "is_enabled": false,
    "date_created": {
        "date": "2020-06-22 10:15:13.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-22 10:20:51.086939",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/plugstore/<ID>

Modify an existing plugstore.

Arguments Description
id_version ID of the version.
id_category Defines the category of the plustore created.
is_enabled Sets if the plugstore is enabled.

Delete a plugstore

curl "https://api.senzu.app/plugstore/63?token={token}"
-X DELETE

DELETE https://api.senzu.app/plugstore/<ID>

Delete a existing plugin.

Parameter Description
ID ID of the specific plugin

List all the version of a plugstore

curl "https://api.senzu.app/plugstore/63/versions?token={token}"
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 63,
        "id_folder": 172,
        "icon_base64": null,
        "name": "1.0",
        "copyright": null,
        "contact_firstname": null,
        "contact_lastname": null,
        "contact_phone": null,
        "contact_email": null,
        "route_admin": null,
        "is_requested": false,
        "status": "",
        "date_released": null,
        "date_created": {
            "date": "2020-06-22 10:15:13.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    },
    "1": {
        "id": 64,
        "id_folder": 175,
        "icon_base64": null,
        "name": "version2",
        "copyright": null,
        "contact_firstname": null,
        "contact_lastname": null,
        "contact_phone": null,
        "contact_email": null,
        "route_admin": null,
        "is_requested": false,
        "status": "",
        "date_released": null,
        "date_created": {
            "date": "2020-06-22 10:44:37.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        },
        "date_updated": null
    }
}

GET https://api.senzu.app/plugstore/<ID>/versions

List all the versions of a plugstore.

Parameter Description
ID ID of the plugstore

Retrieve a specific version

curl "https://api.senzu.app/plugstore/63/versions/63?token={token}"
-X GET

The above command returns JSON structured like this :

{
    "id": 63,
    "id_folder": 172,
    "icon_base64": null,
    "name": "1.0",
    "copyright": null,
    "contact_firstname": null,
    "contact_lastname": null,
    "contact_phone": null,
    "contact_email": null,
    "route_admin": null,
    "is_requested": false,
    "status": "",
    "date_released": null,
    "date_created": {
        "date": "2020-06-22 10:15:13.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/plugstore/<ID>/versions/<id_version>

List all the versions of a plugstore.

Parameter Description
ID ID of the plugstore
id_version ID of the version

Create a version

curl "https://api.senzu.app/plugstore/63/versions?token={token}"
-X POST \
-d name = "version2"

The above command returns JSON structured like this :

{
    "id": 66,
    "id_plugstore": 63,
    "id_folder": 177,
    "icon_base64": null,
    "name": "version2",
    "copyright": null,
    "contact_firstname": null,
    "contact_lastname": null,
    "contact_phone": null,
    "contact_email": null,
    "route_admin": null,
    "is_requested": false,
    "status": "",
    "date_released": null,
    "date_created": {
        "date": "2020-06-22 10:59:40.203019",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/plugstore/<ID>/versions

Create a new version for a plugstore

Parameter Description
ID ID of the plugstore
Arguments Mandatory Description
name True Name of the version.
id_icon False The id of the plugstore's icon.
icon_editable False Set to edit the icon.
copyright False Set the copiryght of the plugstore.
contact_firstname False The firstname of the contact.
contact_lastname False The lastname of the contact.
contact_phone False The phone number of the contact.
contact_email False The e-mail of the contact.
route_admin False Set an administration pannel.
date_released False Release date of the plugstore.

Update a version

curl "https://api.senzu.app/plugstore-versions/66?token={token}"
-X POST \
-d contact_firstname="Jean" \
-d contact_lastname="Pierre" \
-d contact_email="Jean.Pierre@Senzu.app"

The above command returns JSON structured like this :

{
    "id": 66,
    "id_plugstore": 63,
    "id_folder": 177,
    "icon_base64": null,
    "name": "version2",
    "copyright": null,
    "contact_firstname": "Jean",
    "contact_lastname": "Pierre",
    "contact_phone": null,
    "contact_email": "Jean.Pierre@Senzu.app",
    "route_admin": null,
    "is_requested": false,
    "status": "",
    "date_released": null,
    "date_created": {
        "date": "2020-06-22 10:59:40.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/plugstore-version/<id_version>

Modify a version of a plugstore

Parameter Description
id_version ID of the version
Arguments Description
name Name of the version.
id_icon The id of the plugstore's icon.
icon_editable Set to edit the icon.
copyright Set the copiryght of the plugstore.
contact_firstname The firstname of the contact.
contact_lastname The lastname of the contact.
contact_phone The phone number of the contact.
contact_email The e-mail of the contact.
route_admin Set an administration pannel.
date_released Release date of the plugstore.
is_requested Set 1 to ask senzu the validation of the plugin into the plugstore.

List all lang of a version

curl "https://api.senzu.app/plugstore-versions/63/langs?token={token}"
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id_plugstore_version": 66,
        "lang": "en",
        "status": false,
        "date_created": {
            "date": "2020-06-22 14:02:54.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id_plugstore_version": 66,
        "lang": "fr",
        "status": false,
        "date_created": {
            "date": "2020-06-22 13:56:03.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/plugstore-versions/<ID>/langs

List all the languages of a version of a plugstore.

Parameter Description
ID ID of the version plugstore

Retrieve a specific lang of a version

curl "https://api.senzu.app/plugstore-versions/66/langs/fr?token={token}"
-X GET

The above command returns JSON structured like this :

{
    "lang": "fr",
    "display_name": "Français",
    "catchphrase": "The french language",
    "description": null,
    "tags": null,
    "assistance_url": null,
    "marketing_url": null,
    "privacy_url": null,
    "tos_url": null,
    "gdpr_name": null,
    "gdpr_email": null,
    "gdpr_address_street": null,
    "gdpr_address_other": null,
    "gpdr_address_city": null,
    "gdpr_address_state": null,
    "gdpr_address_zipcode": null,
    "gdpr_address_country": null,
    "status": false,
    "date_created": {
        "date": "2020-06-22 13:56:03.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-22 14:15:32.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/plugstore-versions/<ID>/langs/<lang>

Returns informations about the specific language of the version.

Parameter Description
ID ID of the version.
lang Lang of the language (fr, en...).

Create lang

curl "https://api.senzu.app/plugstore-versions/66/langs?token={token}"
-X POST \
-d lang = "en" \
-d display_name = "English"

The above command returns JSON structured like this :

{
    "id_plugstore_version": 66,
    "lang": "en",
    "display_name": "English",
    "catchphrase": null,
    "description": null,
    "tags": null,
    "assistance_url": null,
    "marketing_url": null,
    "privacy_url": null,
    "tos_url": null,
    "gdpr_name": null,
    "gdpr_email": null,
    "gdpr_address_street": null,
    "gdpr_address_other": null,
    "gpdr_address_city": null,
    "gdpr_address_state": null,
    "gdpr_address_zipcode": null,
    "gdpr_address_country": null,
    "status": false,
    "date_created": {
        "date": "2020-06-22 14:02:54.512605",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/plugstore-versions/<ID>/langs

Create a lang for a version.

Parameter Description
ID ID of the version
Arguments Mandatory Description
lang True Lang of the plugin (not showed).
display_name True Name of the langplugin.
catchphrase False The catchphrase of the lang.
description False Description of the lang.
tags False Tags you add to the lang.
assistance_url False Url of the assistance page.
marketing_url False Url of the marketing page.
privacy_url False Url of the privacy page.
tos_url False Term of service url.
gdpr_address False Arguments needed.
gdpr_name False General Data Protection Regulation Name.
gdpr_email False General Data Protection Regulation Email.
gdpr_address_street False General Data Protection Regulation Street.
gdpr_address_other False General Data Protection Regulation Other.
gdpr_address_city False General Data Protection Regulation City.
gdpr_address_state False General Data Protection Regulation State.
gdpr_address_zipcode False General Data Protection Regulation Zip code.
gdpr_address_country False General Data Protection Regulation Country.

Update lang

curl "https://api.senzu.app/plugstore-versions/66/langs/fr?token={token}"
-X POST \
-d catchphrase = "The french language"

The above command returns JSON structured like this :

{
    "id_plugstore_version": 66,
    "lang": "fr",
    "display_name": "Français",
    "catchphrase": "The french language",
    "description": null,
    "tags": null,
    "assistance_url": null,
    "marketing_url": null,
    "privacy_url": null,
    "tos_url": null,
    "gdpr_name": null,
    "gdpr_email": null,
    "gdpr_address_street": null,
    "gdpr_address_other": null,
    "gpdr_address_city": null,
    "gdpr_address_state": null,
    "gdpr_address_zipcode": null,
    "gdpr_address_country": null,
    "status": false,
    "date_created": {
        "date": "2020-06-22 13:56:03.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-22 14:15:32.540632",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/plugstore-versions/<ID>/langs/<lang>

Modify informations about a certain language for a version.

Parameter Description
ID ID of the version
lang Lang of the language (fr, en...).
Arguments Description
display_name Name of the langplugin.
catchphrase The catchphrase of the lang.
description Description of the lang.
tags Tags you add to the lang.
assistance_url Url of the assistance page.
marketing_url Url of the marketing page.
privacy_url Url of the privacy page.
tos_url Term of service url.gdpr_address
gdpr_name General Data Protection Regulation Name.
gdpr_email General Data Protection Regulation Email.
gdpr_address_street General Data Protection Regulation Street.
gdpr_address_other General Data Protection Regulation Other.
gdpr_address_city General Data Protection Regulation City.
gdpr_address_state General Data Protection Regulation State.
gdpr_address_zipcode General Data Protection Regulation Zip code.
gdpr_address_country General Data Protection Regulation Country.

List all plugstore categories

curl "https://api.senzu.app/plugstore/categories?token={token}"
-X GET \

The above command returns JSON structured like this :

{
    "error": {
        "code": 200,
        "message": "Success"
    },
    "0": {
        "id": 4,
        "name": "Bureautique"
    },
    "1": {
        "id": 1,
        "name": "Communication"
    },
    "2": {
        "id": 3,
        "name": "Divertissement"
    },
    "3": {
        "id": 5,
        "name": "Réseaux Sociaux"
    },
    "4": {
        "id": 7,
        "name": "Shopping"
    },
    "5": {
        "id": 2,
        "name": "Utilitaires"
    },
    "6": {
        "id": 6,
        "name": "Voyages"
    }
}

GET https://api.senzu.app/plugstore/categories

Returns a list of categories.

Get form of a plugstore

curl "https://api.senzu.app/plugstore/10/form?token={token}"
-X GET \

The above command returns JSON structured like this :

{
    "name": "Email",
    "fields": [
        {
            "attributes": {
                "name": "data_email",
                "type": "text",
                "required": true,
                "multiple": false
            },
            "label": "Adresse mail",
            "placeholder": null
        }
    ]
}

GET https://api.senzu.app/plugstore/<ID>/form

Returns form of the plugstore.

Parameter Description
ID ID of the plugstore.

Procedures

ENDPOINTS
POST Create and activate an user account
POST Update an user's password
POST Reset the user's password
POST Update the user's email
DELETE Delete a user

Procedures are the way to trigger a modification on a user. Procedures are only POST requests and they're used to create or ask a modification.

Create an User and activate an account

curl https://api.senzu.app/procedures/users/create?token={app_token} \
-X POST \
-d firstname="Henry" \
-d lastname="Buisson" \
-d email="henry.buisson@senzu.app" \
-d password="My@Password123456" \
-d gender=1 \
-d birthdate=846146133

POST https://api.senzu.app/procedures/users/create

Parameter Description
redirect_url Url where you want to redirect the activation link.

Once you make the request an email is sent to the user email with an activation link. This activation link can refer to your website if you add a redirect_url to the parameters of the route. And when you click the link, it will call the route /activate which will activate the account of the user. Those are the arguments you need to create a user:

Arguments Mandatory Description
firstname True Firstname.
lastname True Lastname.
email True Email. Use to send an email to activate the account.
password True Password (Must contains at least one lowercase letter, one uppercase letter, one numeric, one special character and more than 12 characters.
gender True Gender. It can be 1 for male, 2 for female and 3 for non-binary.
birthdate True Birthdate. It must be a timestamp.
language False Language of the user.
country False Country where the user lives.
phone False Phone.
phone_mobile False Mobile phone.

Change the User password

curl https://api.senzu.app/procedures/users/change-password?token={app_token} \
-X POST \
-d old_password="!Qwerty123456" \
-d new_password="@PasswordMoreSecure!258#"

POST https://api.senzu.app/procedures/users/change-password

Parameter Description
redirect_url Url where you want to redirect the validation link.

Once you make the request an email is sent to the user email with a validation link. This validation link can refer to your website if you add a redirect_url to the parameters of the route.

Then the update link from the mail refer to /change-password route, which takes two arguments:

Argument Mandatory Description
old_password True This is the old password of the user.
new_password True This is the new password of the user.

Reset the User password

curl https://api.senzu.app/procedures/users/reset-password?token={app_token} \
-X POST

POST https://api.senzu.app/procedures/users/reset-password

Parameter Description
redirect_url Url where you want to redirect the reset link.

Once you make the request an email is sent to the user email with a reset link. This reset link can refer to your website if you add a redirect_url to the parameters of the route.

Then the reset link from the mail refer to /reset-password route and it take one argument :

Argument Mandatory Description
password True This is the new password. And it must be enough secure.

Change the User email

curl https://api.senzu.app/procedures/users/email?token={app_token} \
-X POST

POST https://api.senzu.app/procedures/users/email

Parameter Description
redirect_url Url where you want to redirect the activation link.

Once you make the request an email is sent to the old user email with a validation link. This validation link can refer to your website if you add a redirect_url to the parameters of the route.

And when you click the link, it will call the /change-email route which takes one argument:

Argument Mandatory Description
email True This is the new email.

Delete the User account

curl https://api.senzu.app/procedures/users/delete-account?token={app_token} \
-X POST

POST https://api.senzu.app/procedures/users/delete-account

Parameter Description
redirect_url Url where you want to redirect the activation link.

Once you make the request an email is sent to the user email with a validation link to delete his account. This validation link can refer to your website if you add a redirect_url to the parameters of the route.

And when you click the link, it will call the /delete-account route, which takes no arguments.

Products

ENDPOINTS
GET List all user's products
GET List encoded product of a maker
GET Retrieve a product
POST Create a product
POST Update a product
GET Retrieve a group product
GET Retrieve the users of a product
POST Pairing a product
POST Pairing a dynamic product
POST Grant access to a product
POST Update the access to a product
DELETE Delete a product
GET List all products access pending
POST Accept access pending

A product is the physical object with the records inside. Currently Senzu has 2 basic products (the SenzuCard and the Ring).

The product object

{
    "id": 2393,
    "maker": {
        "id": 1,
        "reference": "Senzu",
        "contact_email": "contact@senzu.app"
    },
    "id_reseller": null,
    "item": {
        "id": 100,
        "reference": "Carte SenzuBasics",
        "display_name": "",
        "image_url": "https://files.senzu.app/1/343-1591862735-1089b5c872675d52d172c2b8f71bb606.png"
    },
    "lost": false,
    "groups": {
        "list": null,
        "basic_synchronise": 0,
        "master_synchronise": 0
    },
    "reference": "Idc",
    "alias_name": "My awesome card",
    "records": [
        {
            "id": 3048,
            "is_enabled": true,
            "id_application": 556,
            "technology": "qrcode",
            "token_encryption": "static"
        },
        {
            "id": 4290,
            "is_enabled": true,
            "id_application": 556,
            "technology": "nfc",
            "token_encryption": "static"
        }
    ],
    "records_synchronized": true,
    "chmod": 5,
    "id_issuer": null,
    "is_dual_application": false,
    "date_created": {
        "date": "2020-01-16 11:00:00.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_activated": {
        "date": "2020-06-02 10:28:45.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attributes Description
id ID of the product.
maker_id ID of the maker.
maker_reference Reference of the maker.
maker_contact_email The email to contact the maker.
id_reseller ID of the reseller of the product.
item_id The ID of the item.
item_reference Name of the item.
item_dispaly_name Display name of the item.
item_image_url Url of the item's image.
lost Tells if the item is lost.
groups_list List of the groups
reference Reference of the product.
alias_name Product's alia name.
records Informations about the records inside of the product.
records_synchronized Tells if the records inside of the product are synchronized or not.
chmod What are the rights you have on the product.
id_issuer Id of the user who shared you the app (null if not shared).
is_dual_application Tells if the product has a dual application (some modules can't be removed as advertisement).

List all Products

curl https://api.senzu.app/products?token={token} \
-X GET

The above command returns JSON structured like this :

{
    {
        "id": 1,
        "quantity_records": 2,
        "item": {
            "id": 4,
            "reference": "Carte Senzu Standard Colors Series 1",
            "url_image": "https://files.senzu.app/1/296-1589977162-9389360d0d2648fd92b9fa05c018d204.png"
        },
        "url_image_maker": "https://files.senzu.app/1/130-1589977163-b4d4ec768fd4856a72bd3dfeeaf791a0.png",
        "lost": false,
        "reference": "My Card Black",
        "chmod": 5,
        "alias_name": "My Card Black",
        "records": [
            {
                "id": 1,
                "is_enabled": true,
                "id_application": 1,
                "technology": "qrcode",
                "token_encryption": "static"
            },
            {
                "id": 2,
                "is_enabled": true,
                "id_application": 1,
                "technology": "nfc",
                "token_encryption": "static"
            }
        ],
        "records_synchronized": true
    },
    {
        "id": 2,
        "quantity_records": 2,
        "item": {
            "id": 9,
            "reference": "Carte Senzu Standard Colors Series 2",
            "url_image": "https://files.senzu.app/1/301-1589977163-72ef457a9936455a5aebccc6f8b0e6d8.png"
        },
        "url_image_maker": "https://files.senzu.app/1/130-1589977163-b4d4ec768fd4856a72bd3dfeeaf791a0.png",
        "lost": false,
        "reference": "My Card Color",
        "chmod": 5,
        "alias_name": "My Card Color",
        "records": [
            {
                "id": 3,
                "is_enabled": true,
                "id_application": 2,
                "technology": "qrcode",
                "token_encryption": "static"
            },
            {
                "id": 4,
                "is_enabled": true,
                "id_application": 2,
                "technology": "nfc",
                "token_encryption": "static"
            }
        ],
        "records_synchronized": true
    }
}

GET https://api.senzu.app/products

Returns a list of Products.

List encoded product of a maker

curl https://api.senzu.app/makers/7/products?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "error": {
        "code": 200,
        "message": "Success"
    },
    "0": {
        "id": 3244,
        "id_item": 164,
        "reference": "NewItem",
        "is_deleted": false,
        "record": null
    },
    "1": {
        "id": 3252,
        "id_item": 164,
        "reference": "NewItem",
        "is_deleted": false,
        "record": null
    },
    "2": {
        "id": 3253,
        "id_item": 164,
        "reference": "New Ring",
        "is_deleted": false,
        "record": [
            {
                "id": 4677,
                "technology": "nfc",
                "record_key": "edc758e0156b8998ae9a80a75deb484b",
                "token_encryption": "static",
                "data": [],
                "is_enabled": true,
                "date_created": {
                    "date": "2020-06-11 11:06:13.000000",
                    "timezone_type": 3,
                    "timezone": "Europe/Berlin"
                }
            }
        ]
    },
    "3": {
        "id": 5254,
        "id_item": 164,
        "reference": "NewItem",
        "is_deleted": false,
        "record": null
    }
}

GET https://api.senzu.app/makers/<id_maker>/products

Show all the encoded products for a maker.

Parameter Description
id Id of the specific maker

Retrieve a Product

curl https://api.senzu.app/products/1?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 1,
    "maker": {
        "id": 1,
        "reference": "Senzu",
        "contact_email": "contact@senzu.app"
    },
    "id_reseller": null,
    "item": {
        "id": 4,
        "reference": "Carte Senzu Standard Colors Series 1",
        "display_name": "Carte Senzu Standard Colors Series 1",
        "image_url": "https://files.senzu.app/1/296-1589977162-9389360d0d2648fd92b9fa05c018d204.png"
    },
    "lost": false,
    "groups": {
        "list": null,
        "basic_synchronise": 0,
        "master_synchronise": 0
    },
    "reference": "My Card Black",
    "alias_name": "My Card Black",
    "records": [
        {
          "id": 1,
          "is_enabled": true,
          "id_application": 1,
          "technology": "qrcode",
          "token_encryption": "static"
      },
      {
          "id": 2,
          "is_enabled": true,
          "id_application": 1,
          "technology": "nfc",
          "token_encryption": "static"
        }
    ],
    "records_synchronized": true,
    "chmod": 5,
    "id_issuer": null,
    "is_dual_application": false,
    "date_created": {
        "date": "2018-11-21 17:44:09.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_activated": {
        "date": "2020-04-16 11:44:19.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/products/<id_product>

Show all the information for a specific Product.

Create a Product

curl https://api.senzu.app/products?token={token} \
-X POST \
-d id_maker=7 \
-d id_item=164 \
-d reference="NewItem"

The above command returns JSON structured like this :

{
    "id": 3252,
    "id_maker": 7,
    "id_reseller": null,
    "id_item": 164,
    "id_attached_group": null,
    "reference": "NewItem",
    "is_dual_application": null,
    "date_created": {
        "date": "2020-06-11 10:43:43.228800",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_activated": null
}

POST https://api.senzu.app/products

Creates a Product object.

Arguments Mandatory Description
id_maker True Defines the id of the maker of the Product.
id_item True Defines the id of the item that correspond to the Product.
reference True This is the Product name.
id_reseller False Defines the id of the reseller of the Product.
id_group False Gives an id if you want to put the Product onto a group.
id_attached_group False Allows you to attached the Product to a group of Products.
is_opened False Set if the product is able to have two applications or not.

Update a Product

curl https://api.senzu.app/products/3252?token={token} \
-X POST \
-d reference="New Ring" \

The above command returns JSON structured like this :

{
    "id": 1,
    "id_maker": 1,
    "id_reseller": null,
    "id_user": 4,
    "id_item": 4,
    "lost": false,
    "reference": "New Ring",
    "alias_name": "My Card Black",
    "records": [
        {
          "id": 1,
          "is_enabled": true,
          "id_application": 1,
          "technology": "qrcode"
      },
      {
          "id": 2,
          "is_enabled": true,
          "id_application": 1,
          "technology": "nfc"
        }
    ],
    "is_dual_application": false,
    "date_created": {
        "date": "2018-11-21 17:44:09.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_activated": {
        "date": "2020-04-16 11:44:19.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-11 17:39:16.378296",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/products/<id_product>

Modify the data of a specific Product.

Parameter Description
id_product Id of the Product.
Arguments Description
lost Sets if the Product is lost or not. (You can define a message when the Product is lost).
id_attached_group Defines the Id of the attached group of the Product.
reference Changes the reference name of the Product.
show_records Sets if you show the records or not.
alias_name Changes the alias name of the Product.
id_group Defines the id of the group.
is_enabled Sets if the Product is enabled or not.

Retrieve Group Products

curl https://api.senzu.app/products-groups/3/products?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 3,
    "alias_name": "Group 1",
    "show_products": {
        "id": [
            32,
            83
        ]
    },
    "chmod": 1,
    "id_issuer": 4,
    "date_created": {
        "date": "2019-05-17 14:08:17.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/products-groups/<id_products_group>/products

Show all the Products for a specific Products Group.

Parameter Description
id_products_group Id of the specific Products Group.

Retrieve Product Users

curl https://api.senzu.app/products/1/users?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 1346,
        "user": {
            "id": 274,
            "email": "senzu@senzu.app",
            "firstname": "Senzu",
            "lastname": "SAS"
        },
        "chmod": 5,
        "is_enabled": true
    }
}

GET https://api.senzu.app/products/<id_product>/users

Show all the Users or Groups that have access to a specific Product.

Parameter Description
id_product Id of the specific Product.

Pairing a Product

curl https://api.senzu.app/products/pairing/630@a371085141589afd1b2a5c7aa0378fe7?token={token} \
-X POST
-d alias_name="TestProduct"

The above command returns JSON structured like this :

{
    "id": 3253,
    "quantity_records": 1,
    "item": {
        "id": 164,
        "reference": "Pen",
        "url_image": null
    },
    "url_image_maker": null,
    "reference": "NewItem",
    "chmod": 5,
    "alias_name": "TestProduct",
    "records": [
        {
            "id": 4677,
            "is_enabled": true,
            "id_application": null,
            "technology": "nfc",
            "token_encryption": "static"
        }
    ]
}

POST https://api.senzu.app/products/pairing/<id>@<key>

Pairing a Product to the account.

Parameter Description
id Id of the record that was scanned.
key Key of the record that was scanned.
Arguments Description
alias_name Defines the alias name of the Product that you paired.

Pairing a dynamic Product

curl https://api.senzu.app/products/pairing/<id_record>@<picc_data>:<cmac>?token={token} \
-X POST
-d alias_name="TestProduct"

The above command returns JSON structured like this :

{
    "id": 3253,
    "quantity_records": 1,
    "item": {
        "id": 164,
        "reference": "Pen",
        "url_image": null
    },
    "url_image_maker": null,
    "reference": "NewItem",
    "chmod": 5,
    "alias_name": "TestProduct",
    "records": [
        {
            "id": 4677,
            "is_enabled": true,
            "id_application": null,
            "technology": "nfc",
            "token_encryption": "static"
        }
    ]
}

POST https://api.senzu.app/products/pairing/<id_record>@<picc_data>:<cmac>`

Pairing a Product to the account.

Parameter Description
id_record Id of the specific Record.
picc_data 32 characters representating the informations of the play.
cmac 16 characters used to tell if the picc_data is correct.
Arguments Description
alias_name Defines the alias name of the Product that you paired.

Grant access to a Product

curl https://api.senzu.app/products/1/users?token={token} \
-X POST \
-d chmod=5 \
-d email="endo@senzu.app"


The above command returns JSON structured like this :

{
    "id": 1346,
    "product": {
        "id": 3253,
        "alias_name": "TestProduct"
    },
    "user": {
        "id": 274,
        "username": null
    },
    "chmod": 5,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-11 11:06:34.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/products/<id>/users

Creates a Record object.

Parameter Description
id Id of the specific Product.
Arguments Mandatory Description
email True Needs the email of the User that you want to add to the Product.
chmod True Sets the right that you want to give to the User for the Product.

Update access to a Product

curl https://api.senzu.app/products/1/users/7?token={token} \
-X POST \
-d chmod=4

The above command returns JSON structured like this :

{
    "id": 1346,
    "product": {
        "id": 3253,
        "alias_name": "TestProduct"
    },
    "user": {
        "id": 274,
        "username": "Senzu"
    },
    "chmod": 4,
    "is_enabled": false,
    "date_created": {
        "date": "2019-11-07 11:42:59.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-11 11:06:43.387445",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/products/<id_product>/users/<id_user>

Modify the right to a Product for a specific User. You must be admin of the Product to do that.

Parameter Description
id_product Id of the Product.
id_user Id of the User that you want to modify rights.
Arguments Description
chmod Sets the right that you want to give to the User for the Product.

Delete a Product

curl https://api.senzu.app/products/1?token={token} \
-X DELETE

DELETE https://api.senzu.app/products/<id_product>

Delete a specific Product.

You can define options in the url parameters. If you set force_erase, your product will be erased for everyone if you are the Owner of the Product or the Owner of the Products Group. Else if there are no option, it will be removed from your account but any other User that have access to it will keep it.

Parameter Description
id_product Id of the Product.

Reset a product

curl https://api.senzu.app/products/3253/reset?token={token} \
-X POST

POST https://api.senzu.app/products/<id_product>/reset

When you reset a product, all the applications are removed, and you can give this product to an other user.

Parameter Description
id_product Id of the Product.

List all access pending

curl https://api.senzu.app/products/access-pending?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 1719,
        "product": {
            "id": 634,
            "alias_name": "Bracelet",
            "image_url": null
        },
        "maker": {
            "image_url": "https://files.senzu.app/1/130-1593005334-070e81d925d420263bb183cfe18930a4.png"
        },
        "issuer": {
            "firstname": "Marc",
            "lastname": "Léger"
        },
        "chmod": 3,
        "date_created": {
            "date": "2020-06-24 15:28:46.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/products/access-pending

List all access pending request.

Accept access pending

curl https://api.senzu.app/products/access-pending/1719?token={token} \
-X POST \
-d grant = "true"

The above command returns JSON structured like this :

{
    "id": 1720,
    "id_product": 3243,
    "id_issuer": 159,
    "chmod": 2,
    "alias_name": "NTag 424",
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-24 15:53:52.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-24 15:56:55.191375",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/products/access-pending/<id>

Arguments Mandatory Description
grant True Accept or refuse the access pending (true/false).

Products Groups

ENDPOINTS
GET List all products group
GET Retrieve a products group
GET Retrieve all products from a product group
POST Create a products group
POST Update a products group
DELETE Delete a product group
GET List all user from a products group
GET Add a user to a products group
POST Update the access to a user
POST List all pending request
POST Accept a pending request
POST Accept a shared product group

Products group are groups of products, linked to one or more users. To add a product to a group, you need to add an IdGroup to this product.

The product group object

{
    "id": 125,
    "chmod": 5,
    "alias_name": "New Name",
    "issuer": {
        "id": null,
        "firstname": null,
        "lastname": null
    },
    "products": [],
    "date_created": {
        "date": "2020-06-18 09:44:25.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attributes Description
id ID of the group product.
chmod Level of permission you want to give to the user.
alias_name Name of the product group.
issuer
products All the products inside of the group.

List all Products Groups

curl https://api.senzu.app/products-groups?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 17,
        "alias_name": "MyFirstGroup",
        "chmod": 4,
        "quantity_product": 1
    },
    "1": {
        "id": 125,
        "alias_name": "My Group",
        "chmod": 5,
        "quantity_product": 0
    }
}

GET https://api.senzu.app/products-groups

Returns a list of product group.

Retrieve a Products Group

curl https://api.senzu.app/products-groups/125?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 125,
    "chmod": 5,
    "alias_name": "My Group",
    "issuer": {
        "id": null,
        "firstname": null,
        "lastname": null
    },
    "products": [],
    "date_created": {
        "date": "2020-06-18 09:44:25.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/products-groups/<id>

Returns a specific product group.

Parameter Description
id Id of the specific group.

List all product from a product group

curl https://api.senzu.app/products-groups/17/products?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 582
    },
    "1": {
        "id": 634
    },
    "2": {
        "id": 582
    }
}

GET https://api.senzu.app/products-groups/<ID>/products

List all products from a product group.

Parameter Description
id Id of the specific group.

Create a Products Group

curl https://api.senzu.app/products-groups?token={token} \
-X POST \
-d alias_name = "Test Group"

The above command returns JSON structured like this :

{
    "id": 126,
    "alias_name": "TestGroup",
    "date_created": {
        "date": "2020-06-18 11:00:46.286814",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/products-groups

Returns a specific product group.

Arguments Mandatory Description
alias_name True Name of your group.

Update a Products Group

curl https://api.senzu.app/products-groups/125?token={token} \
-X POST \
-d alias_name = "New Name"

The above command returns JSON structured like this :

{
    "id": 125,
    "user": {
        "id": 274,
        "username": null
    },
    "chmod": 5,
    "alias_name": "New Name",
    "date_created": {
        "date": "2020-06-18 09:44:25.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-18 11:12:22.928703",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/products-groups/<id>

Returns a specific product group.

Parameter Description
id Id of the specific group.
Arguments Description
alias_name Name of your group.
id_application Id of the application you want to put in all the products of the group.
is_enabled Tells if the products of the group are enabled.

Delete a Products Group

curl https://api.senzu.app/products-groups/125?token={token} \
-X DELETE

`DELETE https://api.senzu.app/products-groups/

Delete a specific Application.

Parameter Description
id Id of the Application you want to delete.

List all users from a product group

curl https://api.senzu.app/products-groups/125/users?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 117,
        "user": {
            "id": 274,
            "email": "senzu@senzu.app",
            "firstname": "Ryan",
            "lastname": "DevSenzu"
        },
        "chmod": 5,
        "is_enabled": true
    },
    "1": {
        "id": 118,
        "user": {
            "id": 159,
            "email": "OtherPeople@gmail.com",
            "firstname": null,
            "lastname": null
        },
        "chmod": 5,
        "is_enabled": false
    }
}
}

GET https://api.senzu.app/products-groups/<id>/users

Returns a list of the users having access to the product group.

Parameter Description
id Id of the specific group.

Add user to a products group

curl https://api.senzu.app/products-groups/125/users?token={token} \
-X POST \
-d email = "OtherPeople@gmail.com" \
-d chmod = 5

The above command returns JSON structured like this :

{
    "id": 118,
    "id_group": 125,
    "id_issuer": 274,
    "id_user": 159,
    "chmod": 5,
    "is_enabled": false,
    "date_created": {
        "date": "2020-06-18 10:02:50.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/products-groups/<id>/users

Add a specific user to the product group.

Parameter Description
id Id of the specific group.
Arguments Mandatory Description
email True Email of the user.
chmod True Level of permission you want to give to the user.

Update access to a user

curl https://api.senzu.app/products-groups-users/118?token={token} \
-X POST \
-d chmod = 3

The above command returns JSON structured like this :

{
    "id_group": 125,
    "id_issuer": 274,
    "id_user": 159,
    "chmod": 3,
    "date_created": {
        "date": "2020-06-18 10:02:50.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-18 12:02:30.847477",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/products-groups-users/<id>

Update the access of a specific user.

Parameter Description
id Id of the user.
Arguments Description
chmod Level of permission you want to give to the user.

List all pending access request

curl https://api.senzu.app/products-groups/access-pending?token={token} \
-X GET \

The above command returns JSON structured like this :

{
    "0": {
        "id": 119,
        "group": {
            "id": 17,
            "alias_name": "Mon 1er groupe"
        },
        "issuer": {
            "firstname": "Remy",
            "lastname": "Chelin"
        },
        "chmod": 4,
        "date_created": {
            "date": "2020-06-18 10:32:45.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/products-groups/access-pending

Returns al the pending access request.

Accept/Refuse a pending access request

curl https://api.senzu.app/products-groups/access-pending/119?token={token} \
-X POST \
-d grant = "true"

The above command returns JSON structured like this :

{
    "id": 119,
    "id_group": 17,
    "id_issuer": 159,
    "chmod": 4,
    "alias_name": null,
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-18 10:32:45.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-18 10:33:49.195580",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/products-groups/access-pending/<id>

Parameter Description
id Id of the pending access request.
Arguments Description
grant Defines if you accept the pending access request or not (can be true or false).

Accept a shared product group

When someone share a group of product with you, you're notified with a mail, and you can accept the sharing by clicking the link. When you click the link, the route GET https://api.senzu.app/agree-share-group is called with all the arguments needed to work.

Providers

ENDPOINTS
GET List all providers
GET Retrieve a provider
POST Create a provider
POST Update a provider
DELETE Delete a provider

Providers are the users who sends ordered products. For example, if a user ask for 100 personalized cards, the provider is going to send those cards to the user.

You can create , update and delete providers if you have the rights.

The provider object

{
    "id": 4,
    "user": {
        "id": 274,
        "username": null
    },
    "company": {
        "id": 4,
        "name": "My Company"
    },
    "name": "SenzuProvider",
    "quantity_returned": 0,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-15 11:07:43.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-15 11:39:54.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attributes Description
id ID of the provider.
user_id User ID of the provider.
user_username Username of the provider.
company_id Company ID of the provider.
company_name Name of the company.
name Name of the provider.
quantity_returned Quantity of returned objects.
is_verified Tells if the provider is verified.

List all providers

curl https://api.senzu.app/providers?token={token} \
-X GET

The above command returns JSON structured like this:

{
    "0": {
        "id": 1,
        "name": "provider1"
    },
    "1": {
        "id": 2,
        "name": "provider2"
    },
    "2": {
        "id": 3,
        "name": "provider3"
    },
    "3": {
        "id": 4,
        "name": "SenzuProvider"
    }
}

GET https://api.senzu.app/providers

Show all the providers.

Retrieve a provider

curl https://api.senzu.app/providers/4?token={token} \
-X GET

The above command returns JSON structured like this:

{
    "id": 4,
    "user": {
        "id": 274,
        "username": null
    },
    "company": {
        "id": 4,
        "name": "My Company"
    },
    "name": "SenzuProvider",
    "quantity_returned": 0,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-15 11:07:43.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-15 11:39:54.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/providers/<ID>

Show all the information for a specific provider.

Parameter Description
ID ID of a specific provider

Create a provider

curl https://api.senzu.app/providers?token={token}
-X POST
-d id_company = 5 \
-d name= "Senzu"

The above command returns JSON structured like this :

{
    "id": 4,
    "id_company": 5,
    "name": "Senzu",
    "quantity_returned": 0,
    "status": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-15 11:07:43.754876",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/providers

Create a provider.

Arguments Mandatory Description
id_company True Defines the id of your provider company.
name False Defines the name of the provider

Update a provider

curl https://api.senzu.app/providers/4?token={token}
-X POST
-d id_company = 4 \
-d name= "NewName"

The above command returns JSON structured like this :

{
    "id": 4,
    "id_company": 4,
    "name": "NewName",
    "quantity_returned": 0,
    "status": true,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-15 11:07:43.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-15 11:16:32.451394",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/providers/id

Update a provider.

Parameter Description
id Id of the provider you want to modify.
Arguments Description
id_company Defines the id of your provider company.
name Defines the name of the provider

Delete a provider

curl https://api.senzu.app/providers/4?token={token}
-X DELETE

DELETE https://api.senzu.app/providers/id

Delete a provider.

Parameter Description
id Id of the provider you want to delete.

Records

ENDPOINTS
GET List all the records
GET Retrieve a record
POST Create a record
POST Update a record
DELETE Delete a record

Records are the number of scannable on your object. For example, if your objecr has a qr code and a NFC chip then you have 2 records.

You can create, update and delete a record

The record object

{
    "id": 3048,
    "id_product": 2393,
    "id_application_master": null,
    "id_application": 556,
    "technology": "qrcode",
    "token_encryption": "static",
    "key": "74221bd3245b64f75bf33921e8437b1a",
    "data": null,
    "is_enabled": true,
    "date_created": {
        "date": "2020-01-16 11:00:00.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}
Attributes Description
id The id of the record.
id_product The id of the product of the record.
id_application_master The id of the master of the application (if there is none, set to null).
id_application The id of the application activated on the record.
technology The technology of the record (NFC or QR code).
token_encryption the encryption of the token.
key The token of your record.
data Give information about the record, like the private key of the record for example.
is_enabled Tells if the record is used or not.

List all Records of a Product

curl https://api.senzu.app/products/3/records?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 5,
        "id_application": null,
        "technology": "nfc",
        "key": "937401fd55a161b90f7c98e193a90725",
        "is_enabled": true
    },
    "1": {
        "id": 6,
        "id_application": null,
        "technology": "nfc",
        "key": "0690b7d76a96bed191757c14e5a7faf5",
        "is_enabled": true
    }
}

GET https://api.senzu.app/products/<id>/records

Returns a list of Records for a specific Product.

Parameter Description
id Id of the specific Product.

Retrieve a Record

curl https://api.senzu.app/products/3/records/5?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 5,
    "id_product": 3,
    "id_application_master": null,
    "id_application": null,
    "technology": "nfc",
    "token_encryption": "static",
    "key": "e424d54b8f9de09306abb5f9f21653ec",
    "data": {
        "private_key": "e424d54b8f9de09306abb5f9f21653ec"
    },
    "is_enabled": true,
    "date_created": {
        "date": "2019-06-12 15:09:43.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/records/<id_record>

Show all the information for a specific Record.

Parameter Description
id_product Id of the specific Product.
id_record Id of the specific Record.

Create a Record

curl https://api.senzu.app/products/3/records?token={token} \
-X POST \
-d technology="nfc" \


The above command returns JSON structured like this :

{
    "id": 4662,
    "id_product": 3244,
    "id_application_master": null,
    "id_application": null,
    "technology": "nfc",
    "token_encryption": "static",
    "key": "e424d54b8f9de09306abb5f9f21653ec",
    "data": [],
    "is_enabled": true,
    "date_created": {
        "date": "2020-06-08 14:59:47.775452",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/products/<id>/records

Creates a Record object.

Parameter Description
id Id of the specific Product.
Arguments Mandatory Description
id_application_master False Defines the id of the Application master link to the Record.
id_application False Defines the id of the Application link to the Record.
technology False Defines the technology of the Record. Available : nfc, qrcode, data_matrix, aztec, pdf417.
token_encryption False Allows you to set if the record is active or not. Available : static, aes-128.
If the record is dynamic you'll be able to have information from it during 10 minutes. Each second the Object will create a new key. Currently none object have this function.
key_size False Sets the size of the key of the Record.
data False Puts data like the private key for the NFC technology.

Update a Record

curl https://api.senzu.app/products/3/records/641?token={token} \
-X POST \
-d technology="qrcode"\


The above command returns JSON structured like this :

{
    "id": 4662,
    "id_product": 3244,
    "id_application_master": null,
    "id_application": null,
    "technology": "qrcode",
    "key": "e424d54b8f9de09306abb5f9f21653ec",
    "data": [],
    "is_enabled": true,
    "is_deleted": false,
    "date_created": {
        "date": "2020-06-08 14:59:47.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-08 15:07:30.002593",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/records/<id_record>

Modify the data of a specific Record.

Parameter Description
id_product Id of the Product.
Arguments Description
id_application_master Change the Id of the Master Application that is linked to the Record.
id_application Change the Id of the Application that is linked to the Record.
technology Allows you to change the technology of the Record. You must be the maker of the Product.
key Allows you to change the key of the Record. You must be the maker of the Product.
data Changes or adds data to the Record. You must be the maker of the Product.
is_enabled Defines if the Record is enabled or not. You must be the maker of the Product.

Delete a Record

curl https://api.senzu.app/products/3/records/641?token={token} \
-X DELETE

DELETE https://api.senzu.app/products/<id_product>/records/<id_record>

Delete a specific Record.

Parameter Description
id_product Id of the Product.
id_record Id of the Record that you want to delete.

Resellers

ENDPOINTS
GET List all resellers
GET Retrieve a reseller
GET List all products of a reseller
POST Create a reseller
POST Update a reseller
DELETE Delete a reseller

A reseller is a user reselling products. They can be verified by senzu, if a reseller is verified, they will have a verified badge next to their names on "resellers.senzu.app (in development)". If you have the rights, you can create, update or delete a reseller.

The reseller object

{
    "id": 4,
    "user": {
        "id": 274,
        "username": null
    },
    "url_image": null,
    "id_company": 3,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-12 11:12:10.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}
Attributes Description
id ID of the reseller.
user_id ID of the user (who is the reseller).
user_username Username of the user.
url_mage Url of the image representing the reseller.
id_company ID of the company of the reseller.
is_verified Tells if the reseller is verified.

List all Resellers

curl https://api.senzu.app/resellers?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 4
    },
    "1": {
        "id": 5
    }
}

GET https://api.senzu.app/resellers

Returns a list of Resellers.

Retrieve a Reseller

curl https://api.senzu.app/resellers/1?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 4,
    "user": {
        "id": 274,
        "username": null
    },
    "url_image": null,
    "id_company": null,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-12 11:12:10.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/resellers/<id>

Show all the information for a specific Reseller.

Parameter Description
id Id of the specific Reseller.

List all Products of a Reseller

curl https://api.senzu.app/resellers/4/products?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0":
    {
        "id":1
    },
    "1":
    {
        "id":2
    },
    "2":
    {
        "id":3
    }
}

GET https://api.senzu.app/resellers/<id>/products

Show all products that are links to the Reseller.

Parameter Description
id Id of the Reseller you want to modify.

Create a Reseller

curl https://api.senzu.app/resellers?token={token} \
-X POST \
-d id_company=3

The above command returns JSON structured like this :

{
    "id": 5,
    "url_image": null,
    "id_company": 3,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-12 11:12:15.074067",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/resellers

Creates a Reseller object.

Arguments Mandatory Description
id_image False Defines the id of your reseller image.
id_company False Defines the id of your reseller company.

Update a Reseller

curl https://api.senzu.app/reseller/7?token={token} \
-X POST \
-d id_company=4

The above command returns JSON structured like this :

{
    "id": 6,
    "url_image": null,
    "id_company": 4,
    "is_verified": false,
    "date_created": {
        "date": "2020-06-12 11:22:23.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-12 11:28:36.458577",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/resellers/<id>

Modify the data of a specific Reseller.

Parameter Description
id Id of the Reseller you want to modify.
Arguments Description
id_image Change the Id of the reseller image.
id_company Change the Id of the reseller company.

Delete a Reseller

curl https://api.senzu.app/reseller/7?token={token} \
-X DELETE

DELETE https://api.senzu.app/resellers/<id>

Delete a specific Reseller.

Parameter Description
id Id of the Reseller you want to delete.

Share Links

curl https://api.senzu.app/records/1/share?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 4,
        "public_key": "6e0828ccbdcb5c563952a37aea5a1d7f"
    },
    "1": {
        "id": 5,
        "public_key": "c76a779edabffb0712a212e30c70ff06"
    },
    "2": {
        "id": 6,
        "public_key": "2d9a737dc98c35b4c9b4a73219c96f9f"
    }
}

GET https://api.senzu.app/records/<id>/share

Returns a list of Share Links for a specific record.

Parameter Description
id Id of the specific Record.
curl https://api.senzu.app/applications/3/share?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 40,
        "public_key": "8bdbfd8e257bfb1419b647f28e777357"
    },
    "1": {
        "id": 39,
        "public_key": "62636ce5ab3d26d5f413ce7133e3815c"
    }
}

GET https://api.senzu.app/applications/<id>/share

Returns a list of Share Links for a specific application.

Parameter Description
id Id of the specific Application.
curl https://api.senzu.app/share/40?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 40,
    "id_application_master": 3,
    "id_application": 4,
    "id_creator": 3,
    "public_key": "8bdbfd8e257bfb1419b647f28e777357",
    "is_enabled": true,
    "date_created": {
        "date": "2019-09-23 16:02:52.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_expired": {
        "date": "2019-11-23 16:02:52.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2019-10-30 10:21:52.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

GET https://api.senzu.app/share/<id>

Show all the information for a specific Share Link.

Parameter Description
id Id of the specific Share Link.
curl https://api.senzu.app/play/1@3807bc6134271df0c1bdadd903c6f417/share \
-X POST

The above command returns JSON structured like this :

{
    "id": 44,
    "id_application_master": 3,
    "id_application": 4,
    "id_creator": null,
    "public_key": "d759c858143ed29a630fc998eada7fae",
    "is_enabled": true,
    "date_created": {
        "date": "2019-10-30 16:04:56.150554",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_expired": {
        "date": "2019-11-30 16:04:56.150566",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/play/<id>@<key>/share

Creates a Share Link object from a Record.

Parameter Description
id Id of the specific Record.
key Key of the specific Record.
curl https://api.senzu.app/applications/4/share?token={token} \
-X POST
-d expiration_time=3600

The above command returns JSON structured like this :

{
    "id": 46,
    "id_application": 4,
    "id_creator": 3,
    "public_key": "bd6df01a5f590cf802e6827528217f1b",
    "is_enabled": true,
    "date_created": {
        "date": "2019-10-30 16:09:05.243353",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_expired": {
        "date": "2019-10-30 17:09:05.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/applications/<id>/share

Creates a Share Link object from an Application.

Parameter Description
id Id of the specific Share Link.
Arguments Mandatory Description
expiration_time False Defines the UNIX timestamp before the link expires.
curl https://api.senzu.app/share/46?token={token} \
-X POST \
-d expiration_time=7200

The above command returns JSON structured like this :

{
    "id": 46,
    "id_application_master": null,
    "id_application": 4,
    "id_creator": 3,
    "public_key": "bd6df01a5f590cf802e6827528217f1b",
    "is_enabled": true,
    "date_created": {
        "date": "2019-10-30 16:09:05.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2019-10-30 16:20:21.753785",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_expired": {
        "date": "2019-10-30 18:20:21.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/share/<id>

Modify the data of a specific Share Link.

Parameter Description
id Id of the Share Link you want to modify.
Arguments Description
expiration_time Add the expiration time timestamp to the actual timestamp.
is_enabled Defines if the Share Link is enabled or not.
curl https://api.senzu.app/share/39?token={token} \
-X DELETE

DELETE https://api.senzu.app/share/<id>

Delete a specific Share Link. To delete a Share Link you must at least be admin of one of the application of the Share Link. Or be the creator of the Share Link.

Parameter Description
id Id of the Share Link you want to delete.

/share/{id_share}/insights

Shop Orders

ENDPOINTS
GET List all shop orders
GET Retrieve a shop order
POST Create a shop order
POST Update a shop order

A shop order is a list of products, destined to be selled. When you create a shop order, you have to chose which product and how many of them you want to sell. You can also update a shop order if you ant to modify something.

The shop orders object

{
    "id": 1,
    "address_shipping": {
        "id": 13,
        "firstname": "Remy",
        "lastname": "Fassol",
        "street": "25 rue du champignon",
        "additional": null,
        "country_code": "fr",
        "city": "Lyon",
        "zipcode": "69007",
        "state": "Rhone-Alpes",
        "phone_mobile": "+33700000000"
    },
    "address_billing": {
        "id": 13,
        "firstname": "Remy",
        "lastname": "Fassol",
        "street": "25 rue du champignon",
        "additional": null,
        "country_code": "fr",
        "city": "Lyon",
        "zipcode": "69007",
        "state": "Rhone-Alpes",
        "phone_mobile": "+33700000000"
    },
    "price": 0,
    "order_details":
    {
        "id": 1,
        "id_item": 1,
        "name": "",
        "price": 0,
        "quantity": 1,
        "id_provider": null,
        "quantity_returned": null,
        "quantity_refunded": null,
        "delivery_number": null,
        "date_dispatched": null,
        "date_delivered": null,
        "provider_data": null,
        "date_created": {
            "date": "2020-06-12 09:51:39.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
    "status": false,
    "date_created": {
        "date": "2020-06-12 09:51:39.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}
Attributes Description
id ID of the order.
address_shipping Information about the shipping adress
address_billing Information about the billing adress
price Price of the shop order.
order_details Details about the order.
status Status of the shop order.

List all Shop Orders

curl https://api.senzu.app/shop-orders?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "0": {
        "id": 1,
        "date_created": {
            "date": "2020-06-12 09:51:39.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    },
    "1": {
        "id": 2,
        "date_created": {
            "date": "2020-06-12 09:53:06.000000",
            "timezone_type": 3,
            "timezone": "Europe/Berlin"
        }
    }
}

GET https://api.senzu.app/shop-orders

Returns a list of Shop Orders.

Retrieve a Shop Order

curl https://api.senzu.app/shop-orders/1?token={token} \
-X GET

The above command returns JSON structured like this :

{
    "id": 1,
    "address_shipping": {
        "id": 13,
        "firstname": "Remy",
        "lastname": "Fassol",
        "street": "25 rue du champignon",
        "additional": null,
        "country_code": "fr",
        "city": "Lyon",
        "zipcode": "69007",
        "state": "Rhone-Alpes",
        "phone_mobile": "+33700000000"
    },
    "address_billing": {
        "id": 13,
        "firstname": "Remy",
        "lastname": "Fassol",
        "street": "25 rue du champignon",
        "additional": null,
        "country_code": "fr",
        "city": "Lyon",
        "zipcode": "69007",
        "state": "Rhone-Alpes",
        "phone_mobile": "+33700000000"
    },
    "price": 0,
    "order_details": [
        {
            "id": 1,
            "id_item": 1,
            "name": "",
            "price": 0,
            "quantity": 1,
            "id_provider": null,
            "quantity_returned": null,
            "quantity_refunded": null,
            "delivery_number": null,
            "date_dispatched": null,
            "date_delivered": null,
            "provider_data": null,
            "date_created": {
                "date": "2020-06-12 09:51:39.000000",
                "timezone_type": 3,
                "timezone": "Europe/Berlin"
            }
        },
        {
            "id": 2,
            "id_item": 5,
            "name": "",
            "price": 0,
            "quantity": 5,
            "id_provider": null,
            "quantity_returned": null,
            "quantity_refunded": null,
            "delivery_number": null,
            "date_dispatched": null,
            "date_delivered": null,
            "provider_data": null,
            "date_created": {
                "date": "2020-06-12 09:51:39.000000",
                "timezone_type": 3,
                "timezone": "Europe/Berlin"
            }
        }
    ],
    "status": false,
    "date_created": {
        "date": "2020-06-12 09:51:39.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": null
}

GET https://api.senzu.app/shop-orders/<id>

Show all the informations for a specific Shop Order.

Parameter Description
id Id of the specific Shop Order.

Create a Shop Order

curl https://api.senzu.app/shop-orders?token={token} \
-X POST \
-d id_address_billing=13 \
-d id_address_shipping=13 \
-d items="{"id":"164", "quantity":"5"}"

The above command returns JSON structured like this :

{
    "id": 1,
    "id_address_shipping": 13,
    "id_address_billing": 13,
    "url_checkout": "https://checkout.senzu.app?id_order=1&timestamp=1591948299&hash=61e1f3a17e389e47f136f7d835d5571c981df8a05a54f1956f86629f1e938e48",
    "status": false,
    "date_created": {
        "date": "2020-06-12 09:51:39.267223",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/shop-orders

Creates a Shop Order object.

Arguments Mandatory Description
id_address_shipping True Defines the id of your shipping address.
id_address_billing True Defines the id of your billing address.
items True Json with the id of item and his quantity.

The checkout URL that is returns by the JSON allow you to go to the payment page. And this URL works for 1 hour.

Update a Shop Order

curl https://api.senzu.app/shop-orders/55?token={token} \
-X POST \
-d id_address_billing=3 

The above command returns JSON structured like this :

{
    "id":55,
    "address_billing":
    {
        "id":3,
        "firstname":"Remy",
        "lastname":"Barbet",
        "street":"1 rue de la quarantaine",
        "additional":"null",
        "country_code":"fr",
        "city":"Lyon",
        "zipcode":"69005",
        "state":"Rhone-Alpes",
        "phone_mobile":null
    },
    "address_shipping": {
        "id": 13,
        "firstname": "Remy",
        "lastname": "Fassol",
        "street": "25 rue du champignon",
        "additional": null,
        "country_code": "fr",
        "city": "Lyon",
        "zipcode": "69007",
        "state": "Rhone-Alpes",
        "phone_mobile": "+33700000000"
    },
    "status":false,
    "date_created":
    {
        "date":"2019-10-23 14:33:06.000000",
        "timezone_type":3,
        "timezone":"Europe/Berlin"
    },
    "date_updated":
    {
        "date":"2020-06-12 09:57:05.000000",
        "timezone_type":3,
        "timezone":"Europe/Berlin"
    }
}

POST https://api.senzu.app/shop-orders/<id>

Modify the data of a specific Shop Order.

Parameter Description
ID ID of the Shop Order you want to modify.
Arguments Description
id_address_shipping Change the Id of the shipping address. It can be make only if the order wasn't take by any providers.
id_address_billing Change the Id of the billing address. It can be make before the order was paid.
status Change the status of the Shop Order. Need role : manage_order
quantity_returned Defines how many items where returned. Need role : manage_order
quantity_refunded Defines how many items where refunded. Need role : manage_order

Subscription

Create subscription

curl https://api.senzu.app/subscriptions?token={token} \
-X POST \
-d id_address_billing = 13 \
-d id_plan = 1 \
-d quantity = 2

The above command returns JSON structured like this :

{
    "id": 5,
    "address_billing": {
        "id": 13,
        "firstname": "Remy",
        "lastname": "Fassol",
        "street": "25 rue du champignon",
        "additional": null,
        "country_code": "fr",
        "city": "Lyon",
        "zipcode": "69007",
        "state": "Rhone-Alpes",
        "phone_mobile": "+33700000000"
    },
    "id_currency": 1,
    "plan": {
        "id": 1,
        "name": "Test",
        "price": "10.00",
        "duration": 12
    },
    "url_checkout": "https://checkout.senzu.app?id_order=5&timestamp=1593003330&hash=172a388078b5e04120232db578a0b8afeae7707312f62180b798deb575d5f8f3",
    "date_created": {
        "date": "2020-06-24 14:55:30.530023",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/subscription

Create a subscription.

Arguments Mandatory Description
id_address_billing True Address of the billing.
id_plan True ID of the plan you want to subscribe to.
quantity True Number (in month) your subscription will be available.

Retrieve a specific subscription

curl https://api.senzu.app/subscriptions/<id>?token={token} \
-X GET

The above command returns JSON structured like this :

GET https://api.senzu.app/subscriptions/<id>

Returns informations about a specific subscription.

Parameter Description
id Id of the specific subscription.

Users

ENDPOINTS
GET Retrieve an user
POST Create an user
POST Update an user
DELETE Delete an user

The users are the people using the application. They are identified with an id. You can modify your information whenever you want.

If you have the rights, you can create, update and delete the users.

The user object

Attributes Description
id This is the id of the user.
id_image This is the id of the profile picture.
id_currency Refer to the currency use by the user.
username Username of the user.
firstname Firstname of the user.
lastname Lastname of the user.
email Email of the user.
password Password.
gender Gender. 1 for male, 2 for female and 3 for non-binary.
birthdate Birthdate. It must be a timestamp.
lang Language spoke by the user.
country Country where the user lives.
balance Balance of the user with the currency defines before.
phone Phone.
phone_mobile Mobile phone.
date_created Date when the user was created.
date_updated Date when the user was updated.
{
    "username": null,
    "firstname": "Ryan",
    "lastname": "DevSenzu",
    "status": 1,
    "gender": "male",
    "country": "FR",
    "date_sunrise": "04:50",
    "date_sunset": "20:30",
    "id": 255
}

Retrieve user

curl https://api.senzu.app/user?token={token} \
-X GET
\Senzu\Senzu

The above command returns JSON structured like this :

{
    "username": null,
    "firstname": "Ryan",
    "lastname": "DevSenzu",
    "status": 1,
    "gender": "male",
    "country": "FR",
    "date_sunrise": "04:50",
    "date_sunset": "20:30",
    "id": 255
}

GET https://api.senzu.app/user

Show all informations for an user.

With the returns option you can retrieve : birthdate, email, balance, phone, username, firstname, lastname, gender, country, profile_picture, currency, roles, id.

Create user

You need to refer to the Procedures tab
Route to create an user : /procedures/users/create

Update an User

curl https://api.senzu.app/user?token={token} \
-X POST \
-d username="Develog16" 

The above command returns JSON structured like this :

{
    "id": 255,
    "username": "Develog16",
    "firstname": "Ryan",
    "lastname": "SenzuDev",
    "gender": "male",
    "birthdate": {
        "date": "2001-05-04 00:00:00.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "lang": "fr",
    "country": "FR",
    "date_created": {
        "date": "2020-06-02 10:22:22.000000",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    },
    "date_updated": {
        "date": "2020-06-11 14:33:09.605011",
        "timezone_type": 3,
        "timezone": "Europe/Berlin"
    }
}

POST https://api.senzu.app/user

Modify the basics data of the current user

Arguments Description
username Name of the user.
firstname First name of the user.
lastname Last name of the user.
gender Gender of the user. It must be an Integer (1 : male, 2 : female, 3 : non binary)
birthdate Birthdate of the user. It must be a timestamp.
country Country of the user.
language Language of the user.

Delete an User

You need to refer to the Procedures tab
Route to delete an user : /procedures/users/delete-account

Wallet

Displaying

Modifying

Errors

The SENZU API uses the following errors :

Code Status Meaning
190 Token Expired Token expired
200 Ok Everything went alright
201 Created Entity created succesfully
400 Bad Request Wrong route, parameter or request error.
401 Unauthorized Bad or expired token.
402 Payment required Need more funds in your account.
403 Forbidden Not enough rights.
404 Not Found Wrong route.
405 Method not allowed Bad method, GET, POST or DELETE.
409 Conflict This entity already exist.
417 Payload too large You try to upload a file that exceed the maximum size authorized
419 Missing Argument There is a missing argument in your request.
420 Bad argument Wrong argument.
430 Bad Filter Filter issue.
429 Too many request Too much calls on the API.
460 Wrong Password Wrong plugin password.
461 Not Activated Product not activated.
462 Record Disabled Disabled record.
463 Delay Expired Dinamic play's delay expired.
464 Missing Application No application on the play.
465 Product Lost The product is lost.
500 Internal Server Error We had a problem with our server. Try again later.
512 Depreciate This route is not used anymore.