βš’ Create user as Exhibitor

Create a new account and flag the user as exhibitor with the given "fromSessionSalon" parameter.

Description

ENDPOINT DESCRIPTION METHOD EXEMPLE
/_plugin/Comexposium/thirdParty/createUserAsExhibitor Create a new account and flag the user as exhibitor with the given "fromSessionSalon" parameter POST https://api.preprod.comexposium-sso.com/_login

Body

{
  "email": "[email protected]",
  "fromSalon": "foire_de_paris",
  "fromSessionSalon": "foire_de_paris_2017",
  "language": "fre-FR // Accepted languages are fre-FR and eng-GB",
  "fromThirdParty": "f9c7c303bbc3531781fe52b6e4123d5e40ba8581"
}

Call Exemple

curl -X POST "https://api.preprod.comexposium-sso.com/_plugin/Comexposium/thirdParty/createUserAsExhibitor" -H "accept: application/json" -H "Authorization: Bearer mybearertoken" -H "content-type: application/json" -d "{ \"email\": \"[email protected]\", \"fromSalon\": \"foire_de_paris\", \"fromSessionSalon\": \"foire_de_paris_2017\", \"language\": \"fre-FR // Accepted languages are fre-FR and eng-GB\", \"applicationToken\": \"f9c7c303bbc3531781fe52b6e4123d5e40ba8581\"}"

Details

Responses

You can only get a 200 or 401 status code by using this endpoint, you will find results in the statusCode attribute .

Success

statusCode: 0, message: generic_success

Exemple:

{
  "requestId": "cbb03c20-3dd4-4c79-bc73-792239ce88a2",
  "status": 200,
  "error": null,
  "controller": "Comexposium/thirdPartyController",
  "action": "createUserAsExhibitor",
  "collection": null,
  "index": null,
  "volatile": null,
  "result": {
    "statusCode": 0,
    "message": "create_user_success",
    "data": {}
  }
}

Errors

statusCode: 1 || 132 || 133 || 134 || 135 || 161 || 170: Internal error

statusCode: 124: Wrong configuration on url reference

statusCode: 131: Missing credentials

statusCode: 143: Email already exists

statusCode: 187: There is no configured template

statusCode: 180: Error retrieving thirdParty informations

statusCode: 181: Your application token is now allowed to flag an exhibitor

statusCode: 203: Error retrieving thirdParty informations

Exemple:

{
  "requestId": "7d4ab476-80c7-4033-af48-1d997312bac4",
  "status": 401,
  "error": {
    "message": "Json Web Token Error",
    "status": 401,
    "stack": "UnauthorizedError: Json Web Token Error\n    at UnauthorizedError (/opt/kuzzle/node_modules/kuzzle-common-objects/lib/errors/unauthorizedError.js:5:5)\n    at TokenRepository.verifyToken (/opt/kuzzle/lib/api/core/models/repositories/tokenRepository.js:152:17)\n    at FunnelController.checkRights (/opt/kuzzle/lib/api/controllers/funnelController.js:316:43)\n    at FunnelController.execute (/opt/kuzzle/lib/api/controllers/funnelController.js:218:10)\n    at kuzzle.pluginsManager.trigger.then.mutatedRequest (/opt/kuzzle/lib/api/controllers/routerController.js:146:28)\n    at tryCatcher (/opt/kuzzle/node_modules/bluebird/js/release/util.js:16:23)\n    at Promise._settlePromiseFromHandler (/opt/kuzzle/node_modules/bluebird/js/release/promise.js:512:31)\n    at Promise._settlePromise (/opt/kuzzle/node_modules/bluebird/js/release/promise.js:569:18)\n    at Promise._settlePromise0 (/opt/kuzzle/node_modules/bluebird/js/release/promise.js:614:10)\n    at Promise._settlePromises (/opt/kuzzle/node_modules/bluebird/js/release/promise.js:693:18)\n    at Async._drainQueue (/opt/kuzzle/node_modules/bluebird/js/release/async.js:133:16)\n    at Async._drainQueues (/opt/kuzzle/node_modules/bluebird/js/release/async.js:143:10)\n    at Immediate.Async.drainQueues (/opt/kuzzle/node_modules/bluebird/js/release/async.js:17:14)\n    at runCallback (timers.js:637:20)\n    at tryOnImmediate (timers.js:610:5)\n    at processImmediate [as _immediateCallback] (timers.js:582:5)"
  },
  "controller": "Comexposium/thirdPartyController",
  "action": "createUserAsExhibitor",
  "collection": null,
  "index": null,
  "volatile": null,
  "result": null
}