Skip to content

Instantly share code, notes, and snippets.

@antoineayoub
Created June 9, 2017 14:19
Show Gist options
  • Save antoineayoub/55b0b6ee7b668f814e2c35de85c164e1 to your computer and use it in GitHub Desktop.
Save antoineayoub/55b0b6ee7b668f814e2c35de85c164e1 to your computer and use it in GitHub Desktop.
Doc Mission Carrefour
FORMAT: 1A
HOST: https://mission-carrefour-staging.herokuapp.com
# Mission Carrefour
This is the API documentation for Mission Carrefour Application iOS and Android.
## Users Collection [/v1/users]
### Sign Up [POST /v1/users{?user%5Bemail%5D,user%5Bpassword%5D}]
User must sign up to access the application
+ Parameters
+ user%5Bemail%5D: `erick@stoltenberg.net` (string, required) - Email
+ user%5Bpassword%5D: `12345678` (string, required) - Password
+ Response 200 (application/json)
{
"data": {
"id": "755eec43-b2e6-42e1-8f38-00fed04e1728",
"type": "users",
"attributes": {
"email": "john@deer.com",
"authentication-token": "J3eXLFsS8xq2E_vt6jKF",
"first-name": "Alicia",
"last-name": "Noel"
},
"relationships": {
"profil": {
"data": {
"id": "097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1",
"type": "shoppers"
}
}
},
"links": {
"self": "/v1/users/755eec43-b2e6-42e1-8f38-00fed04e1728"
}
},
"included": [
{
"id": "097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1",
"type": "shoppers",
"attributes": {
"gender": 0,
"address": "747 Rue Molière",
"phone": "+33 722499332",
"birthdate": "1985-07-26",
"loyalty-card": "12345678",
"loyalty-type": "pass"
}
}
]
}
+ Response 422 (application/json)
{
"errors": {
"email": [
"Ceci n'est pas un email"
]
}
}
+ Response 422 (application/json)
{
"errors": {
"email": [
"Merci de bien vouloir saisir un email"
]
}
}
+ Response 422 (application/json)
{
"errors": {
"password": [
"Password trop court (le minimum est 6 caractères)"
]
}
}
+ Response 422 (application/json)
{
"errors": {
"password": [
"Merci de bien vouloir saisir un password"
]
}
}
## Sessions Collection [/v1/sessions]
### Sign In [POST /v1/sessions{?session%5Bemail%5D,session%5Bpassword%5D}]
User must sign in to access the application
+ Parameters
+ session%5Bemail%5D: `erick@stoltenberg.net` (string, required) - Email
+ session%5Bpassword%5D: `12345678` (string, required) - Password
+ Request (application/json)
+ Response 200 (application/json)
{
"data": {
"id": "755eec43-b2e6-42e1-8f38-00fed04e1728",
"type": "users",
"attributes": {
"email": "john@deer.com",
"authentication-token": "Qw3ku2CwTn-bDkzykDjS",
"first-name": "Valentin",
"last-name": "Martin"
},
"relationships": {
"profil": {
"data": {
"id": "097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1",
"type": "shoppers"
}
}
},
"links": {
"self": "/v1/users/755eec43-b2e6-42e1-8f38-00fed04e1728"
}
},
"included": [
{
"id": "097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1",
"type": "shoppers",
"attributes": {
"gender": 1,
"address": "35 Impasse de Tilsitt",
"phone": "0763006595",
"birthdate": "1996-11-11",
"loyalty-card": "12345678",
"loyalty-type": "pass"
}
}
]
}
+ Response 200 (application/json)
{
"errors": "Mot de passe ou email invalide.",
"code": "2002"
}
+ Response 200 (application/json)
{
"errors": "Créer un compte ou vérifier votre email",
"code": "2001"
}
### Sign Out [DELETE /v1/sessions/{id}{?email}]
+ Parameters
+ id: `ff9ecf50-1b7d-428a-8f3d-fbf677b408c1` (uuid, required) - User ID
+ email: `erick@stoltenberg.net` (string) - Email
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 204
## Stores Collection [/v1/stores]
### GET List Stores [GET /v1/stores{?email,latitude,longitude,distance,page%5Bnumber%5D,page%5Bsize%5D}]
Getting the list of missions located by store and all the mission "Home"
Il y a 2 sortes de missions :
* Les Missions STORE : Missions reliées à des Stores classiques qui ont des coordonées GPS
* Les Missions HOME : Missions reliées au Store qui a pour `name: "Home"` et qui n'a pas de coordonées GPS
+ Parameters
+ email: "erick@stoltenberg.net"
+ latitude: 48.8629303
+ longitude: 2.2096882
+ distance: 20
+ page%5Bnumber%5D: 1
+ page%5Bsize%5D: 10
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": [
{
"id": "0b08fef2-ade1-4922-92d1-84cf7d63ae2a",
"type": "stores",
"attributes": {
"name": "home",
"address": null,
"latitude": null,
"longitude": null,
"distance": 0
},
"relationships": {
"sign": {
"data": {
"id": "03c4cd81-e272-4476-abfc-55dd0dc005e2",
"type": "signs"
}
},
"missions": {
"data": []
}
}
},
{
"id": "a302940b-bd32-432c-8d9a-58a3592d0880",
"type": "stores",
"attributes": {
"name": "Carrefour Paris",
"address": "avenue edouard vaillant 92150 Suresnes",
"latitude": 48.8628882,
"longitude": 2.2097122,
"distance": 5
},
"relationships": {
"sign": {
"data": {
"id": "ae8fb06c-8945-4faa-9276-274d1c7ccd57",
"type": "signs"
}
},
"missions": {
"data": [
{
"id": "81e2185d-0887-4043-82b6-a30cc35bdb26",
"type": "missions"
}
]
}
}
}
],
"included": [
{
"id": "ae8fb06c-8945-4faa-9276-274d1c7ccd57",
"type": "signs",
"attributes": {
"name": "montagne",
"image-url": "https://mission-carrefour.s3.amazonaws.com/uploads/standard_logo_montagne.png"
}
},
{
"id": "81e2185d-0887-4043-82b6-a30cc35bdb26",
"type": "missions",
"attributes": {
"title": "Du café à foison",
"description": "Super mission à faire pour gagner de l'argent",
"reward-cents": 300,
"total-stock": 10,
"expiration-date": "2016-11-22T16:20:52.152Z",
"status": "open",
"originator-id": "ed0740ad-e800-40cb-a4bf-04e164eb82ba",
"home": false,
"mission-letter-url": null
},
"links": {
"self": "/v1/missions/81e2185d-0887-4043-82b6-a30cc35bdb26"
}
}
],
"links": {
},
"meta": {
"current-page": 1,
"next-page": 2,
"previous-page": null,
"total-pages": 4,
"total-entries": 19
}
}
## Visits Collection [/v1/visits]
### CREATE Visit [POST /v1/visits{?email,latitude,longitude,visit%5Bstore_id%5D,visit%5Bmission_id%5D,visit%5Bshopper_id%5D}]
Book a visit and get all the information about the mission
+ Parameters
+ email: "erick@stoltenberg.net" - Email
+ visit%5Bstore_id%5D: `7ead870b-6192-43c4-b3f2-966c7ce7b711` (uuid, required) - Store ID
+ visit%5Bmission_id%5D: `62be5336-58a0-4234-9e7b-fd1fe3fb4822` (uuid, required) - Mission ID
+ visit%5Bshopper_id%5D: `36b11951-8753-4252-8933-f74eaab0b964` (uuid, required) - Shopper ID
+ latitude: 48.8629303
+ longitude: 2.2096882
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": {
"id": "6e2cd777-7466-424c-9311-ea60aee132c2",
"type": "visits",
"attributes": {
"status": "booked",
"rating": null,
"expires-at": "2016-12-16T18:38:07.012Z",
"store-id": "a302940b-bd32-432c-8d9a-58a3592d0880",
"shopper-id": "097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1",
"reward-visit-cents": 300
},
"relationships": {
"mission": {
"data": {
"id": "81e2185d-0887-4043-82b6-a30cc35bdb26",
"type": "missions"
}
},
"questions": {
"data": [
{
"id": "1089195b-40ec-4e9f-a2f8-e6c36953e333",
"type": "questions"
}
]
},
"sign": {
"data": {
"id": "76c7485d-f8d5-4ce7-bbca-9f326892357c",
"type": "signs"
}
}
},
"links": {
"self": "/v1/visits/6e2cd777-7466-424c-9311-ea60aee132c2"
}
},
"included": [
{
"id": "81e2185d-0887-4043-82b6-a30cc35bdb26",
"type": "missions",
"attributes": {
"title": "Du café à foison",
"description": "Super mission à faire pour gagner de l'argent",
"reward-cents": 300,
"stock-per-store": 9,
"expiration-date": "2016-12-16T16:38:11.896Z",
"status": "open",
"originator-id": "ed0740ad-e800-40cb-a4bf-04e164eb82ba",
"home": false,
"mission-letter-url": null
},
"links": {
"self": "/v1/missions/81e2185d-0887-4043-82b6-a30cc35bdb26"
}
},
{
"id": "1089195b-40ec-4e9f-a2f8-e6c36953e333",
"type": "questions",
"attributes": {
"description": "<h3>Combien de trace de pneu sur cette photo ?</h3>\r\n<p><img src=\"https://mission-carrefour.s3.amazonaws.com/uploads/standard_c27943944b_50143605_mars-panorama.jpg\" alt=\"\" width=\"340\" height=\"255\" /></p>\r\n<p>&nbsp;</p>",
"question-step": 1,
"required": true,
"question-type": 1,
"nb-max-char": 100,
"nb-pic-min": 0,
"nb-pic-max": 0,
"photo-title": null,
"comment-title": "Laissez un commentaire",
"comment-available": true
},
"relationships": {
"choices": {
"data": [
{
"id": "c94c0b43-36c5-48c9-a29e-5e61d58ab06f",
"type": "choices"
},
{
"id": "9d3789cf-e41f-43c2-b9b5-4cc6570f24c7",
"type": "choices"
},
{
"id": "d0f3b3d0-1d04-4736-afa5-7d0edb39fc9d",
"type": "choices"
}
]
},
"assets": {
"data": [
]
}
},
"links": {
"self": "/v1/questions/1089195b-40ec-4e9f-a2f8-e6c36953e333"
}
},
{
"id": "c94c0b43-36c5-48c9-a29e-5e61d58ab06f",
"type": "choices",
"attributes": {
"position": 1,
"value": "0"
}
},
{
"id": "9d3789cf-e41f-43c2-b9b5-4cc6570f24c7",
"type": "choices",
"attributes": {
"position": 2,
"value": "1"
}
},
{
"id": "d0f3b3d0-1d04-4736-afa5-7d0edb39fc9d",
"type": "choices",
"attributes": {
"position": 3,
"value": "Plus de 2"
}
},
{
"id": "76c7485d-f8d5-4ce7-bbca-9f326892357c",
"type": "signs",
"attributes": {
"name": "montagne",
"image-url": "https://mission-carrefour.s3.amazonaws.com/uploads/standard_logo_montagne.png"
}
}
]
}
+ Response 200 (application/json)
{
"code": "1001",
"errors": "Sorry, the visit is expired.",
"description": "The mission expiration date is passed."
}
+ Response 200 (application/json)
{
"code": "1000",
"errors": "Sorry, the mission is sold out.",
"description": "No more stock for this mission on that store."
}
+ Response 200 (application/json)
{
"code": "2005",
"errors": "Sorry, the mission_store does not exist",
"description": "No relation between store and mission."
}
+ Response 200 (application/json)
{
"code": "2006",
"errors": "Sorry, the mission is too far from you",
"description": "Store is located more than 25km from the user"
}
### UPDATE Visit [POST /v1/visits/{id}{?email,visit%5Bstore_id%5D,visit%5Bmission_id%5D,visit%5Bshopper_id%5D,visit%5Bstatus%5D}]
This is the endpoint to update a visit or a visit status :
- Visit **Cancelled** : update status to `cancelled`
- Visit **Finished** : send the zip and change status to `finished`. Body is necessary only for this case.
- Visit **Expired** : update status to `expired`
+ Parameters
+ id: `787d767b-2b96-4e99-aa08-0592377a7740` (uuid, required) - Visit ID
+ email: "erick@stoltenberg.net" - Email
+ visit%5Bstore_id%5D: `7ead870b-6192-43c4-b3f2-966c7ce7b711` (uuid, required) - Store ID
+ visit%5Bmission_id%5D: `62be5336-58a0-4234-9e7b-fd1fe3fb4822` (uuid, required) - Mission ID
+ visit%5Bshopper_id%5D: `36b11951-8753-4252-8933-f74eaab0b964` (uuid, required) - Shopper ID
+ visit%5Bstatus%5D: `finished` (string, required) - Visit Status
+ Request (multipart/form-data;boundary=---BOUNDARY)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Body
---BOUNDARY
Content-Disposition: form-data; name="answer"; filename="filename.zip"
Content-Type: application/zip
data
---BOUNDARY--
+ Response 200 (application/json)
{
"code": "1004",
"message": "The visit zip was well received.",
"description": ""
}
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Parameters
+ visit%5Bstatus%5D: `cancelled` (string, required) - Visit Status
+ Response 200 (application/json)
{
"code": "1006",
"message": "The visit is cancelled.",
"description": ""
}
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Parameters
+ visit%5Bstatus%5D: `expired` (string, required) - Visit Status
+ Response 200 (application/json)
{
"code": "1005",
"message": "The visit is expired.",
"description": ""
}
### GET Shopper Visit List [GET /v1/visits{?email,page%5Bnumber%5D,page%5Bsize%5D}]
Get the shopper's visit list
+ Parameters
+ email: "erick@stoltenberg.net" - Email
+ page%5Bnumber%5D: 1
+ page%5Bsize%5D: 10
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": [
{
"id": "787d767b-2b96-4e99-aa08-0592377a7739",
"type": "visits",
"attributes": {
"status": "finished",
"rating": 4,
"expires-at": "2016-08-09T21:16:07.000Z",
"store-id": "a302940b-bd32-432c-8d9a-58a3592d0880",
"shopper-id": "097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1",
"reward-visit-cents": 300
},
"relationships": {
"mission": {
"data": {
"id": "81e2185d-0887-4043-82b6-a30cc35bdb26",
"type": "missions"
}
},
"questions": {
"data": [
{
"id": "1089195b-40ec-4e9f-a2f8-e6c36953e333",
"type": "questions"
}
]
},
"sign": {
"data": {
"id": "f3b50e80-b113-4266-a918-c7ae5f65e743",
"type": "signs"
}
}
},
"links": {
"self": "/v1/visits/787d767b-2b96-4e99-aa08-0592377a7739"
}
}
],
"included": [
{
"id": "81e2185d-0887-4043-82b6-a30cc35bdb26",
"type": "missions",
"attributes": {
"title": "Du café à foison",
"description": "Super mission à faire pour gagner de l'argent",
"reward-cents": 300,
"stock-per-store": 10,
"expiration-date": "2016-12-16T16:08:18.477Z",
"status": "open",
"originator-id": "ed0740ad-e800-40cb-a4bf-04e164eb82ba",
"home": false,
"mission-letter-url": null
},
"links": {
"self": "/v1/missions/81e2185d-0887-4043-82b6-a30cc35bdb26"
}
},
{
"id": "f3b50e80-b113-4266-a918-c7ae5f65e743",
"type": "signs",
"attributes": {
"name": "montagne",
"image-url": "https://mission-carrefour.s3.amazonaws.com/uploads/standard_logo_montagne.png"
}
}
],
"links": {
},
"meta": {
"current-page": 1,
"next-page": null,
"previous-page": null,
"total-pages": 1,
"total-entries": 1
}
}
### DELETE a Visit [DELETE /v1/visits/{id}{?email}]
Destroy a visit after having create it
+ Parameters
+ id: `787d767b-2b96-4e99-aa08-0592377a7740` (uuid, required) - Visit ID
+ email: "erick@stoltenberg.net" - Email
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"code": "1003",
"status": "The visit is cancelled.",
"description": ""
}
+ Response 200 (application/json)
{
"code": "1002",
"status": "The visit does not exist.",
"description": "This visit could not be find in the BDD"
}
## Shoppers Collection [/v1/shoppers]
### GET Shopper Info [GET /v1/shoppers/{id}?{email}]
Get Informations about the shopper
+ Parameters
+ id: `097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1` (uuid, required) - User ID
+ email: "erick@stoltenberg.net" - Email
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": {
"id": "097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1",
"type": "shoppers",
"attributes": {
"gender": 1,
"address": "486 Quai du Havre",
"phone": "07 77 37 91 83",
"birthdate": "1972-03-23",
"loyalty-card": "12345678",
"loyalty-type": "Carte Pass",
"user": {
"id": "755eec43-b2e6-42e1-8f38-00fed04e1728",
"email": "john@deer.com",
"first-name": "Julie",
"last-name": "Meunier"
}
},
"links": {
"self": "/v1/shoppers/097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1"
}
}
}
+ Response 404 (application/json)
{
"status": 404,
"error": "Not Found",
"exception": "#<ActiveRecord::RecordNotFound: Couldn't find Shopper with 'id'=097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1>"
}
### UPDATE shopper Info [POST /v1/shoppers/{id}?{shopper%5Bgender%5D,shopper%5Baddress%5D,shopper%5Bbirthdate%5D,shopper%5Bloyalty_card%5D,shopper%5Bloyalty_type%5D,shopper%5Bphone%5D,shopper%5Buser%5Fattributes%5D%5Bid%5D,shopper%5Buser%5Fattributes%5D%5Bemail%5D,shopper%5Buser%5Fattributes%5D%5Bfirst%5Fname%5D,shopper%5Buser%5Fattributes%5D%5Blast%5Fname%5D}]
Update Shopper Informations
+ Parameters
+ id: `36b11951-8753-4252-8933-f74eaab0b964` (uuid, required) - Shopper ID
+ shopper%5Bgender%5D: 2
+ shopper%5Baddress%5D: '392 Boulevard Charlemagne'
+ shopper%5Bbirthdate%5D: '1968-01-26'
+ shopper%5Bloyalty_card%5D: '12345678'
+ shopper%5Bloyalty_type%5D: 'Carte Pass'
+ shopper%5Bphone%5D: '12345678'
+ shopper%5Buser%5Fattributes%5D%5Bid%5D: `755eec43-b2e6-42e1-8f38-00fed04e1728` (uuid, required) - Shopper ID
+ shopper%5Buser%5Fattributes%5D%5Bemail%5D: `erick@stoltenberg.net` - Email
+ shopper%5Buser%5Fattributes%5D%5Bfirst%5Fname%5D: `Robert` - First Name
+ shopper%5Buser%5Fattributes%5D%5Blast%5Fname%5D: `Deniro` - Last Name
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": {
"id": "097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1",
"type": "shoppers",
"attributes": {
"gender": 1,
"address": "392 Boulevard Charlemagne",
"phone": "+33 641703338",
"birthdate": "1968-01-26",
"loyalty-card": "12345678",
"loyalty-type": "Carte Pass",
"user": {
"id": "755eec43-b2e6-42e1-8f38-00fed04e1728",
"email": "john@deer.com",
"first-name": "Robert",
"last-name": "Deniro"
}
},
"links": {
"self": "/v1/shoppers/097b28cd-bdd2-43a3-bd49-6adaf1f4dcf1"
}
}
}
## Rewards Collection [/v1/rewards]
### GET Pendind Rewards shopper list [GET /v1/rewards/rewards_pending?{email}]
Get the pending rewards shopper list
+ Parameters
+ email: "erick@stoltenberg.net" - Email
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": [
{
"id": "787d767b-2b96-4e99-aa08-0592377a5566",
"type": "rewards",
"attributes": {
"status": "pending",
"visit-id": "787d767b-2b96-4e99-aa08-0592377a7739",
"reward-visit-cents": 300,
"created-at": "2017-01-12T22:44:22Z",
"updated-at": "2017-01-12T22:44:22Z",
"reward-informations": {
"store-name": "Carrefour Paris",
"store-sign": "https://mission-carrefour.s3.amazonaws.com/uploads/standard_logo_montagne.png",
"mission-name": "Du café à foison",
"visit-date": "2017-01-12T22:44:22.697Z"
}
}
}
],
"meta": {
"total-pending": 300
}
}
### GET Paid Rewards shopper list [GET /v1/rewards/rewards_paid?{email}]
Get the paid rewards shopper list
+ Parameters
+ email: "erick@stoltenberg.net" - Email
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": [
{
"id": "787d767b-2b96-4e99-aa08-0592377a5566",
"type": "rewards",
"attributes": {
"status": "pending",
"visit-id": "787d767b-2b96-4e99-aa08-0592377a7739",
"reward-visit-cents": 300,
"created-at": "2017-01-12T22:44:22Z",
"updated-at": "2017-01-12T22:44:22Z",
"reward-informations": {
"store-name": "Carrefour Paris",
"store-sign": "https://mission-carrefour.s3.amazonaws.com/uploads/standard_logo_montagne.png",
"mission-name": "Du café à foison",
"visit-date": "2017-01-12T22:44:22.697Z"
}
}
}
],
"meta": {
"total-pending": 300
}
}
## Missions Collection [/v1/missions]
### GET Missions List [GET /v1/missions{?email,page%5Bnumber%5D,page%5Bsize%5D}]
Get the open missions list
+ Parameters
+ email: "erick@stoltenberg.net" - Email
+ page%5Bnumber%5D: 1 (integer) - Page
+ page%5Bsize%5D: 10 (integer) - Number of visit per page
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": [
{
"id": "81e2185d-0887-4043-82b6-a30cc35bdb26",
"type": "missions",
"attributes": {
"title": "Du café à foison",
"description": "Super mission à faire pour gagner de l'argent",
"reward-cents": 300,
"total-stock": 10,
"expiration-date": "2016-11-02T10:44:51.807Z",
"status": "open",
"originator-id": "ed0740ad-e800-40cb-a4bf-04e164eb82ba",
"home": false,
"mission-letter-url": null
},
"links": {
"self": "/v1/missions/81e2185d-0887-4043-82b6-a30cc35bdb26"
}
}
],
"meta": {
"current-page": 1,
"next-page": 2,
"previous-page": null,
"total-pages": 4,
"total-entries": 19
}
}
### GET Mission details [GET /v1/missions/{id}{?email}]
Get mission informations detail
+ Parameters
+ id: `62be5336-58a0-4234-9e7b-fd1fe3fb4822` (uuid, required) - Mission ID
+ email: "erick@stoltenberg.net" - Email
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": {
"id": "81e2185d-0887-4043-82b6-a30cc35bdb26",
"type": "missions",
"attributes": {
"title": "Du café à foison",
"description": "Super mission à faire pour gagner de l'argent",
"reward-cents": 300,
"total-stock": 10,
"expiration-date": "2016-11-02T10:44:52.733Z",
"status": "open",
"originator-id": "ed0740ad-e800-40cb-a4bf-04e164eb82ba",
"home": false,
"mission-letter-url": null
},
"links": {
"self": "/v1/missions/81e2185d-0887-4043-82b6-a30cc35bdb26"
}
}
}
## FAQs Collection [/v1/faqs]
### GET FAQ [GET /v1/faqs/{id}{?email}]
Get the faq list of questions and answers
+ Request (application/json)
+ Headers
Authorization: Token token="MXzVAusCzwxnvr2NJSo7"
+ Response 200 (application/json)
{
"data": [
{
"id": "787d767b-2b96-4e99-aa08-0592377a1234",
"type": "faqs",
"attributes": {
"question-order": 3,
"theme": "Mission Carrefour",
"question": "Qu'est-ce que Mission Carrefour ?",
"answer": "\"Mission Carrefour\" est une application mobile qui vous rémunère sous la forme d'une remise fidélité Carrefour lorsque vous répondez à des questions rapides tout en faisant vos courses dans votre magasin Carrefour."
}
},
{
"id": "787d767b-2b96-4e99-aa08-0592377a1235",
"type": "faqs",
"attributes": {
"question-order": 17,
"theme": "En magasin",
"question": "Combien de photos faut-il prendre par mission ?",
"answer": "Selon le guide d'entretien, la mission vous demandera de prendre le plus souvent entre 5 et 10 photos grâce à votre téléphone mobile. N'hésitez pas à nous envoyer plus de photos si vous voyez des choses que vous souhaitez partager !"
}
},
{
"id": "787d767b-2b96-4e99-aa08-0592377a1236",
"type": "faqs",
"attributes": {
"question-order": 20,
"theme": "Fin de la mission",
"question": "Que faîtes-vous de mes réponses ?",
"answer": "Une fois l'ensemble des magasins visités, nous rédigeons un rapport de mission à destination des équipes de Carrefour et ses marques partenaires. Ce rapport servira à améliorer la qualité de votre accueil pour vos prochaines visites !"
}
},
{
"id": "787d767b-2b96-4e99-aa08-0592377a1237",
"type": "faqs",
"attributes": {
"question-order": 23,
"theme": "Fonctionnement de la carte de fidélité Carrefour",
"question": "Comment utiliser ma cagnotte fidélité en magasin ?",
"answer": "Lors de votre passage en caisse, il suffit de présenter votre Carte Carrefour, l’hôtesse de caisse vous indique le montant disponible et vous choisissez si vous souhaitez utiliser tout ou une partie. Il suffit de saisir votre code secret pour utiliser vos économies. La Cagnotte Fidélité est utilisable dès 0,01€ et les avantages sont valables dès le lendemain des achats et jusqu’au 31 décembre de l’année suivante (Par exemple, vos euros accumulés en avril 2014 seront utilisables jusqu’au 31 décembre 2015)."
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment