PEPPERI NOTIFICATION SERVICE
Actions Queue
CPI Node

Create User

Will later become Upsert - Create/Update User - by InternalId Or ExternalID Or UUID

PHASE #1 : Create Only temporary internal URI will be : /restapi/PepperiAPInt.Data.svc/V1.0/CreateUser APIGee will redirect /users to this function - once we release UpdateUser we will change the internal API to : /users as an UPSERT function

  • The only mandatory field is: Email.

  • If exceeds users limit - returns 400 Bad Request - with the number of the licensed users

  • ExternalID is unique

  • Generates random password

  • New field both for POST and GET: SecurityGroup (see also also new endpoint /security_groups)

By default - if profiles , roles and security groups are not provided:

  1. connect users to all brands

  2. do NOT connect to all Price lists

  3. do Not connect to all Accounts

  4. IsAdmin = False

  5. Profile = Rep(Root)

  6. Role = Root

  7. Security Group = Default Security Group

post
Create User

https://papi.pepperi.com/V1.0/createUser
This endpoint allows you to create a user
Request
Response
Request
Headers
Authentication
required
string
Authentication token to track down who is emptying our stocks.
Body Parameters
Email
required
string
ExternalID
optional
string
Mobile
optional
string
Phone
optional
string
FirstName
optional
string
LastName
optional
string
Role
optional
string
the default is: Root (ie. ParentRoleID is null or not exists)
Profile
optional
string
the default is: Rep ( the root)
SecurityGroup
optional
string
the default is: Default security group
IsInTradeShowMode
optional
string
the default is: false
Response
200: OK
User successfully created.
{
"InternalID": 107200,
"UUID": "f577c6ac-737e-49fd-839d-e62bf9338f1b",
"ExternalID": "310603",
"CreationDateTime": "2014-12-28T12:26:00Z",
"Email": "[email protected]",
"FirstName": "יקיר",
"Hidden": false,
"IsInTradeShowMode": false,
"LastName": "כהן",
"Mobile": "",
"ModificationDateTime": "2016-08-28T06:44:47Z",
"Phone": "",
"Profile": {
"InternalID": 1201,
"Name": "Rep"
}
},
"Role": {
"InternalID": 282,
"Name": "יועץ טכני צפון יקיר כהן "
}
},
"SecurityGruop":
{
"InternalID": 12,
"Name": "מנהלים"
}
}
400: Bad Request
Verification that email does not exist in the distributor failed
{
"fault": {
"faultstring": "Cannot create a new employee because email address ([email protected]) is already in use by another employee",
"detail": {
"errorcode": "UnAuthorotized"
}
}
}