Getting Started
This tutorial explains how to get started with Arratech. Create your account and make your first API calls!
If you prefer importing this tutorial into Postman or Insomnia, download the har archive file and import into your preferred tool.
Step 1. Create your account
You need an account in Arratech to be able to use the API. To get one, you make the below call replacing my_email , my_password , first_name , last_name , country_code , company_name , company_size with your own credentials
curl -X 'POST' \
'https://api.arratech.com/users/signup' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"email": "my_email",
"password": "my_password",
"firstName": "first_name",
"lastName": "last_name",
"phone": "phone_number",
"countryCode": "country_code",
"companyName": "company_name",
"companySize": "company_size"
}'Step 2. Confirm the account
Afterwards you need to confirm the account by making the below call replacing my_email & confirmationCode
curl -X 'POST' \
'https://api.arratech.com/users/confirm-signup' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"username": "my_email",
"confirmationCode": "confirmationCode"
}'
Important Note: The Arratech Business portal is work in progress. We are continuously releasing features and kindly ask you to contact us at support@arratech.com if you have questions or find bugs.
Step 3. Get an Access Token
Most API calls require authentication using an access token.
To retrieve it you make the below API call replacing my_email and my_password with your own credentials.
curl -X 'POST' \
'https://api.arratech.com/users/login' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"username": "my_email",
"password": "my_password"
}'The response is in json format and has your access token in the AuthenticationResult.AccessToken property. The access token expires after 60 minutes, after which you have to use the AuthenticationResult.RefreshToken for a token refresh.
Make sure to save the token for later use.
Step 4. Make your first call
As a user you can access all API methods which has the minimum role level set to user or public. Let's get your own user data and list which organizations you are a member of by calling the /users/me endpoint.
curl -X GET https://api.arratech.com/users/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"The response contains details about your user, including which organizations that you are a member of. A sample resonse can be found below.
As you can see in the response above, the user has the role 'orgmember' in three organizations and the role 'orgadmin' in one (the last one in the list).
That's it!
Congratulations, you have now made your first call to the API! Feel free to explore the other endpoints in our documentation.
As a new user your API capabilities are rather limited. It is not until you become member of an organisation that you can perform operations such as sending a business document. In the "Create an Organisation" tutorial we describe how you create or join an organisation to obtain additional capabilities.