> You can check the endpoint “Create new Owner” in this document.
Remember or save the keys generated to your “Owner” account so that later you can use them to create, modify and administer your users.
After creating your “Owner” account, you can start using the api easily and simply.
Method: POST
URL: /owner
Headers: “country-code”: “AR”
Body:
{ "email": "owner@owner.com", "password": "Password123", "owner": "Your name here" }
Response:
{ "result": { "uuid": "426e8da8-ba8d-4622-9e53-86587d6bca9c", "verificationCode": "9946", "secret": "oItQ7vJSViXDjcmPywrX+USAbVE4R44Zsoz/0wZVXhk=" } }
Where:
uuid => Owner uuid
verificationCode => Owner verification code for activate owner
secret => Owner secret key (Not in use yet)
Method: PUT
URL: /owner/426e8da8-ba8d-4622-9e53-86587d6bca9c/verify
Headers: “country-code”: “AR”
Body:
{ "verificationCode": "9946" }
Response:
{ "result": { "id": 8 } }
Where:
id => Owner id
Method: PUT
URL: /owner/426e8da8-ba8d-4622-9e53-86587d6bca9c/resend
Headers: “country-code”: “AR”
Body:
none
Response:
{ "verificationCode": "5844" }
Method: POST
URL: /owner/request-change-password
Headers: “country-code”: “AR”
Body:
{ "email": "owner@owner.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d" }
Response:
{ "result": { "successful": true, "verificationCodePassword": "1878" } }
Method: PUT
URL: /owner/change-password
Headers: “country-code”: “AR”
Body:
{ "email": "owner@owner.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d", "verificationCodePassword": "1878", "password": "newPassword123" }
Response:
{ "result": { "successful": true } }
Method: POST
URL: /users
Headers: “country-code”: “AR”
Body:
{ "email": "user@user.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d", "password": "Password123", "rol": 1 }
Response:
{ "result": { "uuid": "a367d66b-c695-43fc-bccd-f7964059d45c", "verificationCode": "3623" } }
Where Body Request:
ownerUuid => Your Owner uuid
rol => Role to assign to the user
Where Body Response:
uuid => User Uuid
verificationCode => User Verification Code
Method: PUT
URL: /users/a367d66b-c695-43fc-bccd-f7964059d45c/verify
Headers: “country-code”: “AR”
Body:
{ "verificationCode": "3623" }
Response:
{ "result": { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Miwicm9sIjoxLCJpYXQiOjE2MzQwMDQ0NzIsImV4cCI6MTYzNDAwNTA3Mn0.1FY5Z9LAo7unJpPRp3MoIt8A5IsxHKJCHPRbqAQh1_4", "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Miwicm9sIjoxLCJpYXQiOjE2MzQwMDQ0NzJ9.QNO69a4pu0n3j57GfZS7a7eyQxd4zMIArIq4Cx2XV8M", "id": 2 } }
Where Body Response:
id => User id
Method: PUT
URL: /users/a367d66b-c695-43fc-bccd-f7964059d45c/resend
Headers: “country-code”: “AR”
Body:
none
Response:
{ "result": { "verificationCode": "8018" } }
Method: POST
URL: /users/request-change-password
Headers: “country-code”: “AR”
Body:
{ "email": "user@user.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d" }
Response:
{ "result": { "successful": true, "verificationCodePassword": "2635" } }
Method: POST
URL: /users/request-change-password-verify
Headers: “country-code”: “AR”
Body:
{ "email": "user@user.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d", "verificationCode": "2635" }
Response:
{ "result": { "successful": true } }
Method: PUT
URL: /users/change-password
Headers: “country-code”: “AR”
Body:
{ "email": "user@user.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d", "verificationCodePassword": "2635", "password": "newPassword123" }
Response:
{ "result": { "successful": true } }
Method: GET
URL: /users?owner=bdd339af-b926-4215-94d6-29375773695d
Headers: “country-code”: “AR”
Body:
none
Response:
{ "result": [ { "id": 1, "email": "test@test.com", "rol": { "id": 1, "description": "USER" } }, { "id": 2, "email": "user@user.com", "rol": { "id": 1, "description": "USER" } } ] }
Method: GET
URL: */users/id/2/?owner=bdd339af-b926-4215-94d6-29375773695d
Headers: “country-code”: “AR”
Body:
none
Response:
{ "result": { "createdAt": "2021-10-12T04:58:34.000Z", "updateAt": "2021-10-12T05:10:35.000Z", "id": 2, "email": "user@user.com", "emailToVerificate": "user@user.com", "verificationAt": "2021-10-12T02:07:52.000Z", "password": "$2b$10$zCZlLapxZlmf3DBmsYHne.OL8VE3ztJbnf2MJnSOGfuKORWyEGlUi", "verificationCode": "8018", "verificationCodePassword": null, "active": true, "uuid": "a367d66b-c695-43fc-bccd-f7964059d45c", "refreshToken": null, "rol": { "id": 1, "description": "USER", "enable": true }, "country": { "id": 11, "name": "Argentina", "acronym": "AR", "iso": "54" } } }
Method: GET
URL: */users/uuid/a367d66b-c695-43fc-bccd-f7964059d45c
Headers: “country-code”: “AR”
Body:
none
Response:
{ "result": { "createdAt": "2021-10-12T04:58:34.000Z", "updateAt": "2021-10-12T05:10:35.000Z", "id": 2, "email": "user@user.com", "emailToVerificate": "user@user.com", "verificationAt": "2021-10-12T02:07:52.000Z", "password": "$2b$10$zCZlLapxZlmf3DBmsYHne.OL8VE3ztJbnf2MJnSOGfuKORWyEGlUi", "verificationCode": "8018", "verificationCodePassword": null, "active": true, "uuid": "a367d66b-c695-43fc-bccd-f7964059d45c", "refreshToken": null, "rol": { "id": 1, "description": "USER", "enable": true }, "country": { "id": 11, "name": "Argentina", "acronym": "AR", "iso": "54" } } }
Method: GET
URL: */users/id/2/?owner=bdd339af-b926-4215-94d6-29375773695d
Headers: “country-code”: “AR”
Body:
none
Response:
{ "result": { "id": 2 } }
Method: DELETE
URL: */users/uuid/a367d66b-c695-43fc-bccd-f7964059d45c
Headers: “country-code”: “AR”
Body:
none
Response:
{ "result": { "id": 2 } }
> These roles are simply for organizing, but you can put them to whatever use you like.