Set signature to user
Circularo REST API example
Uploads image to be used as signature and sets it to the user.
Step 1 - Sign in
Sign user in.
Endpoint
POST - /login
Example
/login
Content-Type: application/json
{
"name": "mary.griffin@circularo.com",
"password": "#32Password1!",
"tenant": "default"
}
Response
Note following properties in response object:
- token - In response object at position ‘token‘. It may have value of “ZyhBW23zGjUXjmvzIgi9li87aJHuzv4ez0PNTsPJ2W5NOCV72FGHXkLYzXJiH0gB“.
Step 2 - Upload signature file
Upload image that will be used as signature.
Endpoint
POST - /files/saveFile
Example
/files/saveFile?token=ZyhBW23zGjUXjmvzIgi9li87aJHuzv4ez0PNTsPJ2W5NOCV72FGHXkLYzXJiH0gB
Content-Type: multipart/form-data
{
"file": "blob",
"fileName": "Signature"
}
Response
Note following properties in response object:
- fileId - In response object at position ‘file.id‘. It may have value of “FBYRX8HOLEgYIdmsx3f5kWA9ViR7QUwFEFLdcboEHsytbtdgoo4I9HF5LV6J6bR9“.
Signature file is now uploaded.
Step 3 - Set user signature
Set file to be used as user signature.
Endpoint
PUT - /configuration/images
Example
/configuration/images?token=ZyhBW23zGjUXjmvzIgi9li87aJHuzv4ez0PNTsPJ2W5NOCV72FGHXkLYzXJiH0gB
Content-Type: application/json
{
"signaturesData": [
{
"name": "signature",
"imageId": "FBYRX8HOLEgYIdmsx3f5kWA9ViR7QUwFEFLdcboEHsytbtdgoo4I9HF5LV6J6bR9"
}
]
}
Selected image is now used as the signature.
Step 4 - Sign out (Optional)
Sign user out.
Endpoint
GET - /logout
Example
/logout?token=ZyhBW23zGjUXjmvzIgi9li87aJHuzv4ez0PNTsPJ2W5NOCV72FGHXkLYzXJiH0gB