API

Notes

Authentification

Routes

Opération Verbe HTTP URI X-Auth
Créer un utilisateur commun POST /register/common No
Connexion facebook POST /connect/facebook No
Connexion google POST /connect/google No
Créer un utilisateur pro POST /register/pro No
Demande Token POST /auth-tokens No
Renouveller Token POST /renew No
Suppression Token DELETE /auth-tokens/{id} Yes
Mot de passe oublié POST /forgotten-password No

Exemples

POST : /register/common

{
    "email": "test@test.com",
    "plainPassword": "testtest",
    "firstname": "Test",
    "lastname": "Test",
    "birthday": {
        "year": "1994",
        "month": "2",
        "day": "23"
    },
    "gender": "male"
}

POST : /connect/facebook

{
   "declinedPermissions":[

   ],
   "provider":"facebook",
   "profile":{
      "id":"XXXXXX",
      "name":"Test test",
      "email":"test@test.fr",
      "first_name":"Test",
      "last_name":"Test",
      "age_range":{
         "min":21
      },
      "link":"XXXXXX",
      "picture":{
         "data":{
            "height":50,
            "is_silhouette":false,
            "url":"XXXXXX",
            "width":50
         }
      },
      "gender":"male",
      "locale":"fr_FR",
      "timezone":1,
      "updated_time":"2018-02-13T16:38:49+0000",
      "verified":true
   },
   "type":"success",
   "credentials":{
      "permissions":[
         "user_birthday",
         "public_profile",
         "user_friends",
         "email"
      ],
      "tokenExpirationDate":"2018-04-20T10:12:15.193+0200",
      "userId":"XXXXXX",
      "token":"XXXXXX"
   }
}

POST : /register/pro

{
    "email": "testpro@test.com",
    "plainPassword": "testtest",
    "publicname": "Test"
}

POST : /auth-tokens

{
    "login": "test@test.com",
    "password": "testtest"
}

POST : /renew

{
    "token" : "6hrf9WK976JzjqRYXbaiIWFgn52APm7R+WWKEBWcvFdj5260hTmvmI2MKz+6DYKdhUQ=",
    "key" : "kjbvksjbclksndxs"
}

POST : /forgotten-password

{
    "email": "test@test.com"
}

Gestion utilisateur

Routes

Opération Verbe HTTP URI X-Auth
Informations utilisateur connecté GET /api/profile Yes
Informations utilisateur GET /api/profile/{username} Yes
Modification totale infos utilisateur PUT /api/profile Yes
Modification partielle infos utilisateur PATCH /api/profile Yes
Suppression utilisateur connecté DELETE /api/profile Yes
Renvoi mail confirmation POST /api/profile/confirmation Yes
Recherche utilisateur (pro ou common) GET /api/profile/search/{recherche} Yes
Lister les pros GET /api/pros Yes
Ajouter ville POST /api/profile/city Yes
Supprimer ville DELETE /api/profile/city Yes
Lister les villes GET /api/cities Yes
Associer device POST /api/profile/device Yes

Exemples

RGPD

Routes

Opération Verbe HTTP URI X-Auth
Reset classifier DELETE /api/profile/classifier Yes
User soft delete DELETE /api/profile/deactivate Yes

Gestion ami

Routes

Opération Verbe HTTP URI X-Auth Scope
Lister amis GET /api/profile/{username}/friends Yes Amis
Lister requêtes d'ami envoyés GET /api/profile/{username}/friends/requests/to Yes Common
Lister requêtes d'ami reçu GET /api/profile/{username}/friends/requests/from Yes Common
Afficher relation amicale entretenue GET /api/profile/{username}/friends/status Yes Common
Ajout ami (demande/acceptation) POST /api/profile/{username}/friends/request Yes Common
Suppression ami (rejet/suppression) DELETE /api/profile/{username}/friends/request Yes Common

Gestion produit

Routes

Opération Verbe HTTP URI X-Auth Scope
Création produit POST /api/profile/{username}/products Yes Pro
Modification totale produit PUT /api/profile/{username}/products/{id} Yes Pro
Modification partielle produit PATCH /api/profile/{username}/products/{id} Yes Pro
Suppression produit DELETE /api/profile/{username}/products/{id} Yes Pro
Affichage produit GET /api/profile/{username}/products/{id} Yes Public
Affichage produit 2 GET /api/products/{id} Yes Public
Affichage liste produits GET /api/profile/{username}/products?page Yes Public

Body

Key Value
title Text
description Text
price Price
public Text: male, female, kid, adult, malekid, maleadult, femalekid, femaleadult, all
image Base64
keywords Array Text

Exemples

{
    "title": "Test Produit",
    "description": "Test Description",
    "price": "300",
    "public": "all",
    "image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAADAFBMVEUAAAAAAFUkAAAAAKokAFUAJABIAAAAAP8kAKoAJFVIAFUkJABsAAAkAP8AJKpIAKokJFVsAFUASABIJACQAAAAJP9IAP8kJKpsAKoASFVIJFWQAFUkS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TP URI X-Auth Scope
Création point de vente physique POST /api/profile/{username}/locations/address Yes Pro
Création point de vente web POST /api/profile/{username}/locations/web Yes Pro
Lister points de vente GET /api/profile/{username}/locations Yes Pro
Supprimer point de vente DELETE /api/profile/{username}/locations/{id} Yes Pro
Associer point de vente à un produit POST /api/profile/{username}/products/{pid}/location/{lid} Yes Pro

Gestion favoris

Routes

Opération Verbe HTTP URI X-Auth Scope
Ajouter un produit en favori POST /api/profile/{username}/products/{id} Yes Common
Ajouter un produit en favori v2 POST /api/products/{id}/favorite Yes Common
Supprimer un produit en favori DELETE /api/products/{id}/favorite Yes Common
Lister GET /api/profile/{username}/favorites Yes Public

Gestion followers

Routes

Opération Verbe HTTP URI X-Auth Scope
Suivre POST /api/profile/{username}/followers Yes Common
Lister followers GET /api/profile/{username}/followers Yes Common
Lister following GET /api/profile/{username}/following Yes Common
Ne plus suivre DELETE /api/profile/{username}/followers Yes Common

Gestion mots-clés

Routes

Opération Verbe HTTP URI X-Auth Scope
Associer mots-clés et catégories POST /api/keywords/categories Yes Pro

Exemples

[
    {
        "keyword" : "toto",
        "categories" : ["Livres & Audible", "Musique, DVD et Blu-ray"]
    },
    {
        "keyword" : "titi",
        "categories" : ["Beauté, Santé, Épicerie"]
    }
]

Gestion évenement

Routes

Opération Verbe HTTP URI X-Auth Scope
Créer un évenement POST /api/profile/{username}/events Yes Common
Afficher les évenements GET /api/profile/{username}/events Yes Common
Afficher un évenement GET /api/profile/{username}/events/{id} Yes Common
Afficher les membres d'un évenement GET /api/profile/{username}/events/{id}/members Yes Common
Supprimer un évenement DELETE /api/profile/{username}/events/{id} Yes Common
Modification totale d'un évenement PUT /api/profile/{username}/events/{id} Yes Common
Modification partielle d'un évenement PATCH /api/profile/{username}/events/{id} Yes Common
Inviter à un évenement POST /api/profile/{username}/events/{id}/invitations/{invited} Yes Common
Lister les personnes "invitable" GET /api/profile/{username}/events/{id}/invitations Yes Common
Afficher les invitations reçues GET /api/profile/{username}/invitations Yes Common
Accepter une invitation POST /api/profile/{username}/invitations/{id} Yes Common
Refuser une invitation DELETE /api/profile/{username}/invitations/{id} Yes Common
Modification contribution PUT /api/profile/{username}/event/{id}/contribution Yes Common

Exemples

{
    "title" : "Le cadeau de César",
    "target" : 64,
    "event_type" : "birthday",
    "contribution" : 2000,
    "date": {
        "year": "2019",
        "month": "2",
        "day": "23"
    }
}

Target not null && event_type = 'birthday' => date = target's birthday

Gestion recherche

Routes

Opération Verbe HTTP URI X-Auth Scope
Parcourir POST /api/profile/{username}/events/{id} Yes Common
Swiper POST /api/profile/{username}/events/{id}/product Yes Common
Lister les produits d'un event GET /api/profile/{username}/events/{id}/products Yes Common
Voter pour un produit POST /api/profile/{username}/events/{eventid}/products/{productid} Yes Common
Lister mes produits vues d'un event GET /api/profile/{username}/events/{id}/products/{type} Yes Common

type : POSITIVE | NEGATIVE | MAYBE | ALL

Exemples

Parcourir

{
    "step" : 1,
    "response" : "YES"
}

Response : YES | NO

Body pas nécessaire et pas utile

Swipe

{
    "product" : 337,
    "type" : "MAYBE"
}

Type : POSITIVE | NEGATIVE | MAYBE

Gestion activité

Routes

Opération Verbe HTTP URI X-Auth Scope
Recuperer fil d'actualité GET /api/profile/{username}/activities?page={page:default:0} Yes Common

Gestion Notification

Routes

Opération Verbe HTTP URI X-Auth Scope
Récupérer clé connexion token (pour l'action 'join') GET /api/socket Yes Connected
Lister les notifications GET /api/profile/{username}/notifications?page= Yes Common
Lister les notifications Events GET /api/profile/{username}/notifications/events?page= Yes Common
Lister les notifications Friends GET /api/profile/{username}/notifications/friends?page= Yes Common
Lister les notifications Global GET /api/profile/{username}/notifications/global?page= Yes Common
Compter le nombres de nouvelles notifications reçues GET /api/profile/{username}/notifications/count Yes Common
Compter le nombres de nouvelles notifications reçues Events GET /api/profile/{username}/notifications/events/count Yes Common
Compter le nombres de nouvelles notifications reçues Friends GET /api/profile/{username}/notifications/friends/count Yes Common
Compter le nombres de nouvelles notifications reçues Global GET /api/profile/{username}/notifications/global/count Yes Common
Mettre à 0 le compte de notifs POST /api/profile/{username}/notifications/noted Yes Common
Mettre à 0 le compte de notifs Events POST /api/profile/{username}/notifications/events/noted Yes Common
Mettre à 0 le compte de notifs Friends POST /api/profile/{username}/notifications/friends/noted Yes Common
Mettre à 0 le compte de notifs Global POST /api/profile/{username}/notifications/global/noted Yes Common
Tout marquer comme lu POST /api/profile/{username}/notifications/viewed Yes Common
Tout marquer comme lu Events POST /api/profile/{username}/notifications/viewed/events Yes Common
Tout marquer comme lu Friends POST /api/profile/{username}/notifications/viewed/friends Yes Common
Tout marquer comme lu Global POST /api/profile/{username}/notifications/viewed/global Yes Common
Marquer comme lu POST /api/profile/{username}/notifications/viewed/{id}/read Yes Common
Marquer comme non lu POST /api/profile/{username}/notifications/viewed/{id}/unread Yes Common

Gestion Report

Routes

Opération Verbe HTTP URI X-Auth Scope
Report bug POST /api/report/bug Yes Connected
Report product POST /api/report/product/{id} Yes Connected

Fields form bug:

Fields form product:

Exemple

{
    "device" : "mobile"
    "activity" : "other"
    "type" : "graphism"
    "description" : "Test report bug"
}