Wello

Wello

  • Docs
  • API
  • Publication
  • Livre Blanc

›Utilisateur

Utilisateur

  • Authentification

Organisation

  • Organisation
  • Membre d'une organisation
  • Timeline d'une organisation
  • Activités par organisation
  • Demande de rappel / Devis
  • Formations - Video - Moocs
  • Groupe de discussion

League

  • City
  • Leagues
  • Articles

Carnet de liaison

  • Carnet de liaison / Pro
  • Carnet de liaison / Perso
  • Commentaire
  • Restriction

Concept

  • Tâche (task)
  • Récurrence d'un tâche (twig)

Authentification

L'authentification se fait par un appel au service de signin qui retourne dans sa requete un "token" qui sera ensuite a faire suivre aux requetes nécécitant une identification en header. Le header en question :

curl -H "Authorisation: Bearer :token" \
     ...

Sign in

Connexion de l'utilisateur

basePath: /api/v0/login

params methode email/password pair: {helper: { email: 'sophie.finot@gmail.com', password: 'a'} }

params méthode auth_token: {helper: { auth_token: 'boomboom'} }

curl

curl -H "Accept: application/json" \
     -H "Content-type: application/json" \
     -X POST \
       -d '{"helper": {"email":"sophie.finot@gmail.com", "password":"a"}}' \
     https://twigy-server-staging.herokuapp.com/api/v0/login

reponse

{
    "helper": {
        "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/fbd6710b-cbbc-44a0-a51b-10f6d9aa95b6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181018%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181018T100230Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=07d28e2f17cf53675e0a86f6984df29a997c0cc0b168a893c1523028f5bb46bc",
        "confirmed_by_primary": null,
        "coordinates": {
            "latitude": 47.2221579,
            "longitude": -1.53478999999993
        },
        "description": "Co-fondatrice de Wello, et à votre service pour faire évoluer la plateforme selon vos besoins et vos usages !",
        "email": "sophie.finot@gmail.com",
        "first_name": "Sophie",
        "formatted_address": "67T Rue d'Abbeville, 44000 Nantes, France",
        "helped": {
            "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/6f6f363f-e036-4592-9d1f-434b6c263b71?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181018%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181018T100230Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=bb80acd47ad668da0ecfb2f0073b0d3f24475a98e415095c542441140ee4db0e",
            "coordinates": {
                "latitude": 47.2204737,
                "longitude": -1.5390970999999354
            },
            "description": "Thérèse est une championne de tarot",
            "family_id": 77,
            "first_name": "Thérèse",
            "formatted_address": "3 Avenue de Montdidier, 44000 Nantes, France",
            "id": 99,
            "last_name": "Tamis",
            "locality": "Nantes",
            "pathology": null,
            "phone": null,
            "preoccupations": [],
            "relationship": null
        },
        "id": 379,
        "last_name": "Finot",
        "organisations": [
            {
                "admin_count": 1,
                "associations_count": 0,
                "avatar_url": null,
                "banner_background_color": null,
                "banner_url": null,
                "coordinates": null,
                "country": null,
                "description": null,
                "family_count": 0,
                "formatted_address": null,
                "friend_count": 1,
                "helpeds": [
                    {
                        "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/8bead011-d168-4fa3-b3a7-626366f867c1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181018%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181018T100230Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=b926ec75eb9a56d51f33d5f6948a48fd8e68ab93f24a7a45a934cc92a504fae0",
                        "coordinates": {
                            "latitude": 47.2140642,
                            "longitude": -1.5382958000000144
                        },
                        "description": "Margo c'est comme les chouquettes ; en surface un peu rugueux mais avec un coeur tendre ; mais tennnndrreee! Bref il me faudrait du répit car je vois surtout la surface, rarement le coeur!",
                        "family_id": 131,
                        "first_name": "Margo",
                        "formatted_address": "Allée de l'Indre, 44000 Nantes, France",
                        "id": 124,
                        "last_name": "Smith",
                        "locality": "Nantes",
                        "pathology": "Un diabète",
                        "phone": "",
                        "preoccupations": [
                            "Maladie d'Alzheimer"
                        ],
                        "primary_helper": {
                            "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/617492df-4584-485b-9f74-1c7cf7cc14ec?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181018%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181018T100230Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=da4c999a8874bfb90d1b199819d33a7bfd5298daecca6929cf111dc862c31c26",
                            "confirmed_by_primary": null,
                            "coordinates": {
                                "latitude": 47.2050549,
                                "longitude": -1.5769863000000441
                            },
                            "description": "Moi c'est Alexis un des cofondateurs de Wello ! Je suis la pour comprendre vos besoins et les réaliser du mieux possible ;-)",
                            "email": "alexis.bond@gmail.com",
                            "first_name": "Alexis",
                            "formatted_address": "3B Impasse des Salorges, 44100 Nantes, France",
                            "id": 433,
                            "last_name": "Bond",
                            "phone": "626336084",
                            "structure_creation_allowed": false,
                            "user_type": "primary",
                            "username": null
                        },
                        "relationship": "father",
                        "validated": true
                    }
                ],
                "holding_id": null,
                "id": 131,
                "locality": null,
                "name": "Margo Smith & Alexis Bond",
                "neighbor_count": 1,
                "phone": null,
                "postal_code": null,
                "primary_count": 0,
                "pro_count": 0,
                "role": "neighbor",
                "route": null,
                "street_number": null,
                "type": "Organisations::Family",
                "validated": true,
                "volunteer_count": 0
            },
            {
                "admin_count": 1,
                "associations_count": 0,
                "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/45fca0f1-c77f-40f1-8c5c-c9e21e3d2f08?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181018%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181018T100230Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=799ecb98630f507fabe52c63f398809a70bb728c9fc3d1547c301b586b2f73e8",
                "banner_background_color": "rgb(120, 144, 156)",
                "banner_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/9f813de8-7a73-484d-baa1-fe0010c69216?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181018%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181018T100230Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=53d648dfc32e96cadafc357a788bb8b6fdb55b7ac1d577bcf73eed65aea26324",
                "coordinates": {
                    "latitude": 43.3045455,
                    "longitude": 5.376086900000018
                },
                "country": "France",
                "description": "La plateforme Wello accompagne les personnes en perte d'autonomie et fournissant à l'aidant un outils numérique lui permettant de s'organiser et de se coordonner avec ses proches et les professionnels",
                "family_count": 0,
                "formatted_address": "Avenue du Général Leclerc, 13003 Marseille, France",
                "friend_count": 0,
                "helpeds": [
                    {
                        "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/7e1fb4d0-5081-4b95-ba38-81c80e9dd8b9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181018%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181018T100230Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=a2b993be9d51856b87fa0ecf3d712f4a3813dcdac33ece91a152de7a32fe1394",
                        "coordinates": {
                            "latitude": 49.14271069999999,
                            "longitude": 2.4677822999999535
                        },
                        "description": "deux ans et demi, besoin d'un accompagnement pour aller au bar",
                        "family_id": 190,
                        "first_name": "Alix",
                        "formatted_address": "7 Rue du Puits, 60580 Coye-sur-seine, France",
                        "id": 174,
                        "last_name": "Mourcade",
                        "locality": "Coye-sur-seine",
                        "pathology": null,
                        "phone": "637607756",
                        "preoccupations": [],
                        "primary_helper": {
                            "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/71b15c68-9985-4113-a15f-d3de531aa2f9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181018%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181018T100230Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=5b9aa4879d02c696417c2e52d06145fd893caf184730fd98626f41c1090cf97e",
                            "confirmed_by_primary": null,
                            "coordinates": {
                                "latitude": 49.14271069999999,
                                "longitude": 2.4677822999999535
                            },
                            "description": "HELLO",
                            "email": "mourcade.m+wello@gmail.com",
                            "first_name": "Marc",
                            "formatted_address": "7 Rue du Puits, 60580 Coye-sur-seine, France",
                            "id": 614,
                            "last_name": "Mourcade",
                            "phone": "637607756",
                            "structure_creation_allowed": false,
                            "user_type": "primary",
                            "username": null
                        },
                        "relationship": null,
                        "validated": true
                    }
                ],
                "holding_id": 1,
                "id": 166,
                "locality": "Marseille",
                "name": "Wello",
                "neighbor_count": 0,
                "phone": "637607756",
                "postal_code": "13003",
                "primary_count": 1,
                "pro_count": 0,
                "role": "admin",
                "route": "Avenue du Général Leclerc",
                "street_number": "5",
                "type": "Organisations::Association",
                "validated": true,
                "volunteer_count": 3
            }
        ],
        "pending_organisations": [],
        "phone": "689673286",
        "structure_creation_allowed": false,
        "token": "9e7de626-5c23-46a7-a90d-cb1d8a9b57ab",
        "user_type": "primary",
        "username": null
    }
}

Sign Up

Création d'un aidant from scratch

basePath: /api/v0/helpers

body params

  • helper.email (string, required): email name of user
  • helper.password (string, required): password name of user
  • helper.helped_id (fkey, optional): helped.id
  • helper.signup_organisation_id (fkey, optional): id of organisation to join after helped creation
  • helper.user_type (enum(primary,voisin,ami,famille,professionel,volunteer,linked_volunteer), optional, default:primary): kind of user
  • helper.confirmed_by_primary (boolean, optional): if he had been validated by primary
  • helper.avatar_data (imbase64:image, optional): base 64 of his avatar picture
  • helper.username (string, optional): deprecated [formely used by facebook users]
  • helper.first_name (string, optional): first name of user
  • helper.last_name (string, optional): last name of user
  • helper.phone (string, optional): phone name of user
  • helper.description (string, optional): user details
  • helper.street_number (string, optional):
  • helper.route (string, optional):
  • helper.locality (string, optional):
  • helper.postal_code (string, optional):
  • helper.country (string, optional):
  • helper.formatted_address (string, optional):
  • helper.latitude (coordinate, optional)
  • helper.longitude (coordinate, optional)

curl

curl -H "Content-Type: application/json" \
     -X POST \
     -d '{"helper": { "email": "foo@bar.com", "password": "foobar" }}' "https://twigy-server-staging.herokuapp.com/api/v0/helpers"

reponse

OK

{
    "helper": {
        "avatar_url": null,
        "confirmed_by_primary": null,
        "coordinates": null,
        "description": null,
        "email": "foo@bar.com",
        "first_name": null,
        "formatted_address": null,
        "id": 696,
        "last_name": null,
        "phone": null,
        "structure_creation_allowed": false,
        "user_type": "primary",
        "username": null
    }
}

KO

{
    "error": {
        "code": "DUPLICATE_DATA",
        "message": [
            "Could not create helper : [\"Email has already been taken\"]"
        ]
    }
}

Sign Up (Après invitation)

description: Après une invitation, un aidant peut confirmer son compte en reseignant son password.

La methode l'authentification se fait via le :verification_code en place de l'auth_token.

L'appel a ce endpoint ne fonctionnera qu'une seule fois.

basePath: /api/v0/invitations/signup

body params

  • helper.password (string, required): password name of user

curl

curl -H "Content-Type: application/json" \
      -H "Authorisation: Bearer :verification_code" \
      -X POST \
      -d '{"helper": { "password": "foobar" }}' "https://twigy-server-staging.herokuapp.com/api/v0/helpers"

reponse

OK

{
    "helper": {
        "avatar_url": null,
        "confirmed_by_primary": true,
        "coordinates": null,
        "description": null,
        "email": "mourcade.m+123456@gmail.com",
        "first_name": null,
        "formatted_address": null,
        "id": 699,
        "last_name": null,
        "organisations": [
            {
                "admin_count": 1,
                "associations_count": 0,
                "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/45fca0f1-c77f-40f1-8c5c-c9e21e3d2f08?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181123%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181123T112521Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=358e6561e0db25fba546d90d4dd1f2fbbd8963ebdbb14328a7b108c95804e6be",
                "banner_background_color": "rgb(120, 144, 156)",
                "banner_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/9f813de8-7a73-484d-baa1-fe0010c69216?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181123%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181123T112521Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=8d7480d0d6858e59ae5b20531caae0c6f7e633782f569542b5e177164b4c1750",
                "coordinates": {
                    "latitude": 43.3045455,
                    "longitude": 5.376086900000018
                },
                "country": "France",
                "description": "La plateforme Wello accompagne les personnes en perte d'autonomie et fournissant à l'aidant un outils numérique lui permettant de s'organiser et de se coordonner avec ses proches et les professionnels",
                "family_count": 0,
                "formatted_address": "Avenue du Général Leclerc, 13003 Marseille, France",
                "friend_count": 0,
                "helpeds": [
                    {
                        "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/7e1fb4d0-5081-4b95-ba38-81c80e9dd8b9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181123%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181123T112521Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=5f922b30f31f98158795851d05b22ada2870576f2173c3017eff24c47a9db2f3",
                        "coordinates": {
                            "latitude": 49.14271069999999,
                            "longitude": 2.4677822999999535
                        },
                        "description": "deux ans et demi, besoin d'un accompagnement pour aller au bar",
                        "family_id": 190,
                        "first_name": "Alix",
                        "formatted_address": "7 Rue du Puits, 60580 Coye-sur-seine, France",
                        "id": 174,
                        "last_name": "Mourcade",
                        "locality": "Coye-sur-seine",
                        "pathology": null,
                        "phone": "637607756",
                        "preoccupations": [],
                        "primary_helper": {
                            "avatar_url": "https://wello-avatars-staging.s3.eu-west-1.amazonaws.com/71b15c68-9985-4113-a15f-d3de531aa2f9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3UHEOMIB2X7AY3A%2F20181123%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20181123T112521Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=4544efa9fe8e3b2316bd559686e4513a13df209875e82a4da582724381e93fed",
                            "confirmed_by_primary": null,
                            "coordinates": {
                                "latitude": 49.14271069999999,
                                "longitude": 2.4677822999999535
                            },
                            "description": "HELLO",
                            "email": "mourcade.m+wello@gmail.com",
                            "first_name": "Marc",
                            "formatted_address": "7 Rue du Puits, 60580 Coye-sur-seine, France",
                            "id": 614,
                            "last_name": "Mourcade",
                            "phone": "637607756",
                            "structure_creation_allowed": false,
                            "user_type": "primary",
                            "username": null
                        },
                        "relationship": null,
                        "validated": true
                    }
                ],
                "holding_id": 1,
                "id": 166,
                "locality": "Marseille",
                "name": "Wello",
                "neighbor_count": 0,
                "phone": "637607756",
                "postal_code": "13003",
                "primary_count": 2,
                "pro_count": 0,
                "role": "primary",
                "route": "Avenue du Général Leclerc",
                "slug": "wello",
                "street_number": "5",
                "type": "Organisations::Association",
                "validated": true,
                "volunteer_count": 3
            }
        ],
        "pending_organisations": [],
        "phone": null,
        "structure_creation_allowed": false,
        "user_type": null,
        "username": null
    }
}

KO: 401

{"message":"unauthorized"}

Vérification d'un user - v1

description: vérificaiton d'un user après une création de compte ou invitation

basePath: /api/v1/verify/:verification_code

url params

  • :verification_code (string, required): token de verificatino

curl

curl -H "Content-Type: application/json" \
     "https://twigy-server-staging.herokuapp.com/api/v1/verify/e6deeb9c-9c68-4021-a938-51e3ba413214"

reponse

OK, cas création de compte front end home

Location: https://v2.wello.be/verify/success

OK, redirect apres une invitation

Location: https://app.wello.be/signup/:user.verification_code/user.email

KO, bad verification_code, 404, empty body

Vérification d'un user - v0 [DEPRECATED]

description: vérificaiton d'un user après une création de compte ou invitation

basePath: /api/v0/verify/:verification_code

url params

  • :verification_code (string, required): token de verification

curl

curl -H "Content-Type: application/json" \
     "https://twigy-server-staging.herokuapp.com/api/v0/verify/e6deeb9c-9c68-4021-a938-51e3ba413214"

reponse

OK, cas création de compte front end home

Location: https://app.wello.be

OK, redirect apres une invitation

Location: https://app.wello.be/account-invitation-signup/#{user.verification_code}?auth_token=#{user.auth_token}&helper_organisation_id=#{params[:helper_organisation_id]}

KO, bad verification_code, 404, empty body

Organisation →
  • Sign in
  • Sign Up
  • Sign Up (Après invitation)
  • Vérification d'un user - v1
  • Vérification d'un user - v0 [DEPRECATED]
Wello
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
HelpBlogGitHubStar
Facebook Open Source
Copyright © 2020 Wello