User


The User resource represents a single person who is a user of the Pilon Merchant App. A user must be identified by a unique email address.

Pilon support custom merchant-facing front-ends. And for that, we support User authentication for API calls.

Create a User

POST/users

curl -X POST https://api.pilon.io/users \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json" \
     -d $'{
		  "cognitoUsername": "string",
		  "email": "string",
		  "firstName": "string",
		  "lastName": "string",
		  "isEnabled": "string",
		  "environments": "string"
		}'

Retrieve a User

GET/users/{id}

curl -X GET https://api.pilon.io/users/{id} \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json"

Retrieve Current User

GET/users/me

curl -X GET https://api.pilon.io/users/me \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json"

Update a User

PUT/users/{id}

curl -X PUT https://api.pilon.io/users/{id} \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json" \
     -d $'{
		  "firstName": "string",
		  "lastName": "string",
		  "isEnabled": "string",
		  "environments": "string"
		}'

Delete a User

DELETE/users/{id}

curl -X DELETE https://api.pilon.io/users/{id} \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json"

List All Users

GET/users

curl -X GET https://api.pilon.io/users \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json"