Accounts

  • Curl
  • Ruby
  • Phyton
  • PHP
  • Java

Curl

curl -X POST
https://api.userontrack.com.br/v1/accounts
-H 'content-type: application/json'
-H 'Authorization: Bearer 7477fbdc-2d27-de10'
-d '{
"accountExtId": "1d1a-8561",
"name": "account 5",
"ingressDate": 1514417779713,
"additionalData": {"value": "32423"}
}'

The above command returns structured JSON like this:

{
"message": "Account created",
"accountId": "03bfa209-4401-4106-8a2d-61d6b925bf3e"
}
curl -X POST
https://api.userontrack.com.br/v1/accounts/03bfa209-4401-4106-8a2d-61d6b925bf3e
-H 'content-type: application/json'
-H 'Authorization: Bearer 7477fbdc-2d27-de10'
-d '{
"accountExtId": "1d1a-8561",
"name": "account 5",
"ingressDate": 1514417779713,
"additionalData": {"value": "32423"}
}'

The above command returns structured JSON like this:

{
"message": "Account updated"
}
curl -X GET
https://api.userontrack.com.br/v1/accounts
-H 'Authorization: Bearer 7477fbdc-2d27-de10'

The above command returns structured JSON like this:

[
{
"id": "2de9e7a2-1d1a-4697-ae8b-233ff0c6541a",
"accountExtId": "1d1a-4697",
"name": "account 1",
"status": "ACTIVE",
"ingressDate": 1514057562990,
"additionalData": {"value": "32423"}
},
{
"id": "5267f7ad-bf4e-4a5e-ba5c-558b18d77ed9",
"accountExtId": "bf4e-4a5e",
"name": "account 2",
"status": "ACTIVE",
"ingressDate": 1514057412080,
"additionalData": {"value": "32423"}
}
]
curl -X GET
https://api.userontrack.com.br/v1/accounts/
2de9e7a2-1d1a-4697-ae8b-233ff0c6541a
-H 'Authorization: Bearer 7477fbdc-2d27-de10'

The above command returns structured JSON like this:

{
"id": "2de9e7a2-1d1a-4697-ae8b-233ff0c6541a",
"accountExtId": "1d1a-4697",
"name": "account 1",
"status": "ACTIVE",
"ingressDate": 1514057562990,
"additionalData": {"value": "32423"}
}
curl -X DELETE
https://api.userontrack.com.br/v1/accounts/
8fda0695-0e22-47a0-8e9a-baab2dffb8ef
-H 'Authorization: Bearer 7477fbdc-2d27-de10'

Ruby

Ruby
curl -X DELETE
https://api.userontrack.com.br/v1/accounts/
8fda0695-0e22-47a0-8e9a-baab2dffb8ef
-H 'Authorization: Bearer 7477fbdc-2d27-de10'

Phyton

Phyton
curl -X DELETE
https://api.userontrack.com.br/v1/accounts/
8fda0695-0e22-47a0-8e9a-baab2dffb8ef
-H 'Authorization: Bearer 7477fbdc-2d27-de10'

PHP

PHP
curl -X DELETE
https://api.userontrack.com.br/v1/accounts/
8fda0695-0e22-47a0-8e9a-baab2dffb8ef
-H 'Authorization: Bearer 7477fbdc-2d27-de10'

Java

Java
curl -X DELETE
https://api.userontrack.com.br/v1/accounts/
8fda0695-0e22-47a0-8e9a-baab2dffb8ef
-H 'Authorization: Bearer 7477fbdc-2d27-de10'