Example.com (1.0.0)

Download OpenAPI specification:Download

This is the API used in Salvy mobile app.

Authentication

User authentication is done through the POST /login endpoint. On success response, payload will contain access_token field. API clients must include the access_token in the Authorization header for further requests that require authentication.

Login

Operations about login

Login

Authenticate the user and responds with access token

Request Body schema: application/json
email
required
string

User email

password
required
string

User password

Responses

Request samples

Content type
application/json
{
  • "email": "example@example.com",
  • "password": "Passw0rd!"
}

Response samples

Content type
application/json
{
  • "access_token": "eyJz93a...k4laUWw",
  • "expires_in": 86400
}

Signup

Operations about signup

Creates a signup form

Creates a signup form request, return possible existing values from employers file

Request Body schema: application/json
email
required
string
full_name
string
social_name
string
phone_number
string

User current phone number

cpf
string
date_of_birth
string

User date of birth in ISO8601 format

subscription_plan_id
string

The ID of the chosen subscription plan

phone_account_company_id
string

The ID of the company that will own the created phone_account

area_code
number [ 11 .. 99 ]

The desired area code for the new phone number

object

Responses

Request samples

Content type
application/json
{
  • "email": "john.smith@example.com",
  • "full_name": "Jhon Smith",
  • "social_name": "Jane Smith",
  • "phone_number": "+5541999999999",
  • "cpf": "111-111-111-11",
  • "date_of_birth": "1994-10-29",
  • "subscription_plan_id": "4fe9628e-e651-4635-b922-ee1976420570",
  • "phone_account_company_id": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "area_code": 41,
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "email": "john.smith@example.com",
  • "full_name": "Jhon Smith",
  • "social_name": "Jane Smith",
  • "phone_number": "+5541999999999",
  • "cpf": "111-111-111-11",
  • "date_of_birth": "1994-10-29",
  • "subscription_plan_id": "4fe9628e-e651-4635-b922-ee1976420570",
  • "phone_account_company_id": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "area_code": 41,
  • "address": {
    }
}

Update signup form

Updates signup form data, returns signup form data updated

path Parameters
id
required
string

The id of the signup form

Request Body schema: application/json
email
string
full_name
string
social_name
string
phone_number
string

User current phone number

cpf
string
date_of_birth
string

User date of birth in ISO8601 format

subscription_plan_id
string

The ID of the chosen subscription plan

phone_account_company_id
string

The ID of the company that will own the created phone_account

area_code
number [ 11 .. 99 ]

The desired area code for the new phone number

object

Responses

Request samples

Content type
application/json
{
  • "email": "john.smith@example.com",
  • "full_name": "Jhon Smith",
  • "social_name": "Jane Smith",
  • "phone_number": "+5541999999999",
  • "cpf": "111-111-111-11",
  • "date_of_birth": "1994-10-29",
  • "subscription_plan_id": "4fe9628e-e651-4635-b922-ee1976420570",
  • "phone_account_company_id": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "area_code": 41,
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "email": "john.smith@example.com",
  • "full_name": "Jhon Smith",
  • "social_name": "Jane Smith",
  • "phone_number": "+5541999999999",
  • "cpf": "111-111-111-11",
  • "date_of_birth": "1994-10-29",
  • "subscription_plan_id": "4fe9628e-e651-4635-b922-ee1976420570",
  • "phone_account_company_id": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "area_code": 41,
  • "address": {
    }
}

Complete signup form

Completes signup form data, returns access_token and User created

path Parameters
id
required
string

The id of the signup form

Request Body schema: application/json
password
string
confirm_password
string

Responses

Request samples

Content type
application/json
{
  • "password": "Passw0rd!",
  • "confirm_password": "Passw0rd!"
}

Response samples

Content type
application/json
{
  • "access_token": "eyJz93a...k4laUWw",
  • "user": {
    },
  • "phone_account_id": "b1791ea1-f882-49a0-98e5-b14295da73ad"
}

Request new email verification challenge

Requests a new email verification challenge and invalidates the previous one

Request Body schema: application/json
email
string

Responses

Request samples

Content type
application/json
{
  • "email": "example@email.com"
}

Users

Operations about users

Change password

Authorizations:
access_token
Request Body schema: application/json
current_password
string
new_password
string

Responses

Request samples

Content type
application/json
{
  • "current_password": "Passw0rd!",
  • "new_password": "N3wPassw0rd!"
}

Request user password reset

Start's the password reset flow for the given user

Request Body schema: application/json
email
string

Responses

Request samples

Content type
application/json
{
  • "email": "john.smith@example.com"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Validate user password reset request

Validates a user's password reset request, redirecting them to the password reset form

path Parameters
id
required
string

The id of the password reset request

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Finish user password reset

Finishes a user's password reset process, effectively changing their password

path Parameters
id
required
string

The id of the password reset request

Request Body schema: application/json
new_password
string

Responses

Request samples

Content type
application/json
{
  • "new_password": 123456
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Phone Accounts

Operations about phone accounts

Get all phone accounts

Get all phone accounts of the authenticated user. Phone accounts are automatically created after user completes signup form.

Authorizations:
access_token

Responses

Response samples

Content type
application/json
{
  • "phone_accounts": [
    ]
}

Activate SIM Card

Authorizations:
access_token
path Parameters
id
required
string

The id of the phone_account

Request Body schema: application/json
sim_card_number
string

Responses

Request samples

Content type
application/json
{
  • "sim_card_number": "12312312313"
}

Get balance

Get the remaining phone account's internet balance, in GB

Authorizations:
access_token
path Parameters
id
required
string

The id of the phone_account

Responses

Response samples

Content type
application/json
{
  • "balance": 3.21,
  • "total_available_data": 10
}

Request portability

Request portability for an existing phone number to the provided phone account

Authorizations:
access_token
path Parameters
id
required
string

The id of the phone_account

Request Body schema: application/json
phone_number
required
string

Responses

Request samples

Content type
application/json
{
  • "phone_number": "+5511123456789"
}

Request portability

Request portability for an existing phone number to the provided phone account

Authorizations:
access_token
path Parameters
id
required
string

The id of the phone_account

Responses

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "status": "SUCCESSFUL",
  • "status_reason": "Deu boa",
  • "phone_number": "+5541999999999"
}

Features

Gets all enabled features for a given Context

The context is defined by the authenticated user and phoneAccountId query param (for now)

Authorizations:
access_token
query Parameters
phoneAccountId
required
string

The id of the phoneAccount

Responses

Response samples

Content type
application/json
[
  • "app:stripe-manage-billing"
]

Management Sign Up Form

Creates a signup form

Creates a signup form request, return possible existing values from employers file

Authorizations:
api_key
Request Body schema: application/json
email
required
string
full_name
string
social_name
string
phone_number
string

User current phone number

cpf
string
date_of_birth
string

User date of birth in ISO8601 format

subscription_plan_id
string

The ID of the chosen subscription plan

phone_account_company_id
string

The ID of the company that will own the created phone_account

area_code
number [ 11 .. 99 ]

The desired area code for the new phone number

object

Responses

Request samples

Content type
application/json
{
  • "email": "john.smith@example.com",
  • "full_name": "Jhon Smith",
  • "social_name": "Jane Smith",
  • "phone_number": "+5541999999999",
  • "cpf": "111-111-111-11",
  • "date_of_birth": "1994-10-29",
  • "subscription_plan_id": "4fe9628e-e651-4635-b922-ee1976420570",
  • "phone_account_company_id": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "area_code": 41,
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "email": "john.smith@example.com",
  • "full_name": "Jhon Smith",
  • "social_name": "Jane Smith",
  • "phone_number": "+5541999999999",
  • "cpf": "111-111-111-11",
  • "date_of_birth": "1994-10-29",
  • "subscription_plan_id": "4fe9628e-e651-4635-b922-ee1976420570",
  • "phone_account_company_id": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "area_code": 41,
  • "address": {
    }
}

Update signup form

Updates signup form data, returns signup form data updated

Authorizations:
api_key
path Parameters
id
required
string

The id of the signup form

Request Body schema: application/json
email
string
full_name
string
social_name
string
phone_number
string

User current phone number

cpf
string
date_of_birth
string

User date of birth in ISO8601 format

subscription_plan_id
string

The ID of the chosen subscription plan

phone_account_company_id
string

The ID of the company that will own the created phone_account

area_code
number [ 11 .. 99 ]

The desired area code for the new phone number

object

Responses

Request samples

Content type
application/json
{
  • "email": "john.smith@example.com",
  • "full_name": "Jhon Smith",
  • "social_name": "Jane Smith",
  • "phone_number": "+5541999999999",
  • "cpf": "111-111-111-11",
  • "date_of_birth": "1994-10-29",
  • "subscription_plan_id": "4fe9628e-e651-4635-b922-ee1976420570",
  • "phone_account_company_id": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "area_code": 41,
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "email": "john.smith@example.com",
  • "full_name": "Jhon Smith",
  • "social_name": "Jane Smith",
  • "phone_number": "+5541999999999",
  • "cpf": "111-111-111-11",
  • "date_of_birth": "1994-10-29",
  • "subscription_plan_id": "4fe9628e-e651-4635-b922-ee1976420570",
  • "phone_account_company_id": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "area_code": 41,
  • "address": {
    }
}

Management Companies

Search company phone accounts

Paginated search through company phone accounts

Authorizations:
api_key
path Parameters
id
required
string

The id of the company

query Parameters
searchTerm
string

Term to search for in phone accounts

limit
number

The size limit of each page in response

offset
number

The number of phone accounts to skip before sending result.

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "phone_accounts": [
    ]
}

Create company phone account

Create a phone account owned by a company

Authorizations:
api_key
path Parameters
id
required
string

The id of the company

Request Body schema: application/json
subscription_plan_id
required
string
area_code
required
number
user_id
string

Responses

Request samples

Content type
application/json
{
  • "subscription_plan_id": "e885e8e1-8925-4e2a-a9e1-d6326b719209",
  • "area_code": 41,
  • "user_id": "8307fddf-2cdc-47f4-bbc1-5bc26fa78fbc"
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "user_id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "company_id": "bf0443ca-18f2-436a-b846-eb2b4fd8b418",
  • "provider": "americanet",
  • "phone_number": "+5541999999999",
  • "is_portability": false,
  • "simcard_number": "123",
  • "status": "active",
  • "subscription_plan_id": "e0483338-15e0-4ec4-aab8-c00e17edd6cf",
  • "created_at": "2022-01-01T00:00:00Z",
  • "updated_at": "2022-01-01T00:00:00Z"
}

Get company employees

Get all the employees for a company

Authorizations:
api_key
path Parameters
id
required
string

The ID of the company

Responses

Response samples

Content type
application/json
{
  • "employees": [
    ]
}

Get company invoices

Get all of a company's invoices

Authorizations:
api_key
path Parameters
id
required
string

The id of the company

Responses

Response samples

Content type
application/json
{
  • "invoices": [
    ]
}

Create company invoice

Request the creation of an invoice for the given company

Authorizations:
api_key
path Parameters
id
required
string

The ID of the company

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Change company registration data

Change the company's registration data

Authorizations:
api_key
path Parameters
id
required
string

The id of the company

Request Body schema: application/json
officialName
string

The company's updated official name

tradingName
string

The company's updated trading name

cnpj
string

The company's updated CNPJ

phoneNumber
string

The company's updated phone number

email
string

The company's updated email

billingEmail
string

The company's updated billing email

object

Responses

Request samples

Content type
application/json
{
  • "officialName": "New Official Name",
  • "tradingName": "New Trading Name",
  • "cnpj": "97.986.734/0001-23",
  • "phoneNumber": "+5541987654321",
  • "email": "new@email.com",
  • "billingEmail": "new.billing@email.com",
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Set company email domain

Sets a company email domain for signup-by-domain (without a signup form)

Authorizations:
api_key
path Parameters
id
required
string

The id of the company

Request Body schema: application/json
email_domain
required
string
default_subscription_plan_id
required
string

Responses

Request samples

Content type
application/json
{
  • "email_domain": "domain.com",
  • "default_subscription_plan_id": "e885e8e1-8925-4e2a-a9e1-d6326b719209"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Delete company email domain

Deletes a company email domain for signup-by-domain (without a signup form)

Authorizations:
api_key
path Parameters
id
required
string

The id of the company

Request Body schema: application/json
email_domain
required
string

Responses

Request samples

Content type
application/json
{
  • "email_domain": "domain.com"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Get available subscription plans

Get available subscription plans

Authorizations:
api_key
path Parameters
id
required
string

The id of the company

Responses

Response samples

Content type
application/json
{
  • "subscription_plans": [
    ]
}

Rename company's phone accounts custom field key

Rename the key of all of a company's phone accounts custom field

Authorizations:
api_key
path Parameters
id
required
string

The id of the company

Request Body schema: application/json
currentKey
required
string

The current key of the custom field

newKey
string

The new key of the custom field

Responses

Request samples

Content type
application/json
{
  • "currentKey": "Current key",
  • "newKey": "New key"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Get a company's SIM card shipments

Get all SIM card shipments of a company

Authorizations:
api_key
path Parameters
id
required
string

The id of the company

Responses

Response samples

Content type
application/json
{
  • "shipments": [
    ]
}

Update a subscription plan price for a given company

Update a subscription plan price for a given company

Authorizations:
api_key
path Parameters
companyId
required
string

The id of the company

subscriptionPlanId
required
string

The id of the subscription plan

Request Body schema: application/json
priceCents
required
number

Responses

Request samples

Content type
application/json
{
  • "priceCents": 990
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Management Phone Accounts

Delete phone account

Delete a phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Change phone account user

Change the user attributed to a phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Request Body schema: application/json
user_email
required
string

The email of the new phone account owner. If no user with the given email exists, a new user will be created with a blank password

user_name
required
string

The full name of the new phone account user

Responses

Request samples

Content type
application/json
{
  • "user_email": "test@mctest.com",
  • "user_name": "Test McTest"
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "user_id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "company_id": "bf0443ca-18f2-436a-b846-eb2b4fd8b418",
  • "provider": "americanet",
  • "phone_number": "+5541999999999",
  • "is_portability": false,
  • "simcard_number": "123",
  • "status": "active",
  • "subscription_plan_id": "e0483338-15e0-4ec4-aab8-c00e17edd6cf",
  • "created_at": "2022-01-01T00:00:00Z",
  • "updated_at": "2022-01-01T00:00:00Z"
}

Activate SIM card

Activate a SIM card

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Request Body schema: application/json
sim_card_number
required
string

The SIM card number that will be activated (all 20 digits or only the last 7)

Responses

Request samples

Content type
application/json
{
  • "sim_card_number": "89552600000001234567"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Provision new random phone number

Provision new random phone number

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Request Body schema: application/json
area_code
string

The area code for the new number

Responses

Request samples

Content type
application/json
{
  • "area_code": "41"
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "user_id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "company_id": "bf0443ca-18f2-436a-b846-eb2b4fd8b418",
  • "provider": "americanet",
  • "phone_number": "+5541999999999",
  • "is_portability": false,
  • "simcard_number": "123",
  • "status": "active",
  • "subscription_plan_id": "e0483338-15e0-4ec4-aab8-c00e17edd6cf",
  • "created_at": "2022-01-01T00:00:00Z",
  • "updated_at": "2022-01-01T00:00:00Z"
}

Updates phone account simcard

Updates phone account simcard

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Request Body schema: application/json
newSimCard
required
string

The new simcard to be assigned to the phone account

Responses

Request samples

Content type
application/json
{
  • "newSimCard": "1233211"
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "user_id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "company_id": "bf0443ca-18f2-436a-b846-eb2b4fd8b418",
  • "provider": "americanet",
  • "phone_number": "+5541999999999",
  • "is_portability": false,
  • "simcard_number": "123",
  • "status": "active",
  • "subscription_plan_id": "e0483338-15e0-4ec4-aab8-c00e17edd6cf",
  • "created_at": "2022-01-01T00:00:00Z",
  • "updated_at": "2022-01-01T00:00:00Z"
}

Request portability

Request portability for an existing phone number to the provided phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Request Body schema: application/json
phone_number
required
string

The phone number that will be ported to the provided phone account

Responses

Request samples

Content type
application/json
{
  • "phone_number": "+5511123456789"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Resend portability request

Resend the latest phone account portability request

Authorizations:
api_key
path Parameters
id
required
string

The ID of the phone account

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Cancel portability request

Cancel the latest portability request for the provided phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Change phone account owner

Change the contract owner of a phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Request Body schema: application/json
company_id
required
string

The ID of the company that will own the phone account contract

Responses

Request samples

Content type
application/json
{
  • "company_id": "e885e8e1-8925-4e2a-a9e1-d6326b719209"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Tag phone account

Assign a tag to a phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Request Body schema: application/json
tag
required
string

The tag that will be assigned to the phone account. If the tag is not sent or an empty tag is sent (""), the current tag will be removed

Responses

Request samples

Content type
application/json
{
  • "tag": "Support team"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Data top-up

Add data to phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Request Body schema: application/json
quantity_gb
required
number

Quantity of data to be available to the user in Gigabytes.

unit_amount_cents
required
number

Amount paid for a unit of quantity. Eg, for unit_amount_cents = 10000 and quantity_gb = 1.5 the total price will be 15000

Responses

Request samples

Content type
application/json
{
  • "quantity_gb": 1.5,
  • "unit_amount_cents": 10000
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Partial block Phone account

Partial block phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Block Phone account

Block phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Request Body schema: application/json
reason
required
string
Enum: "theft" "loss" "misuse" "no-pay"

Block reason

Responses

Request samples

Content type
application/json
{
  • "reason": "theft"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Unblock phone account

Unblock phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Change phone account subscription plan

Change the subscription plan of a phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

planId
required
string

The id of the new subscription plan

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Set phone account custom field

Set the custom field value of a phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

fieldName
required
string

The name of the custom field

Request Body schema: application/json
fieldValue
required
string

The value of the provided field

Responses

Request samples

Content type
application/json
{
  • "fieldValue": "Some value"
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Remove phone account custom field

Remove a custom field from a phone account

Authorizations:
api_key
path Parameters
id
required
string

The id of the phone account

fieldName
required
string

The name of the custom field

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Management Sim Card Shipments

Create SIM card shipment

Create a new SIM card shipment

Authorizations:
api_key
Request Body schema: application/json
status
string

Current status of the shipment. Possible values are: PROCESSING, LABELED, IN TRANSIT, DELIVERED, FAILED

companyId
string

The ID of the company that owns the shipment

provider
string

The provider of the shipment

providerId
string

The ID of the shipment in the provider

trackingCode
string

The tracking code of the shipment

statusReason
string

The reason for the current status of the shipment

quantity
number

The quantity of SIM cards in the shipment

object

Responses

Request samples

Content type
application/json
{
  • "status": "PROCESSING",
  • "companyId": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "provider": "Melhor Envio",
  • "providerId": 123456789,
  • "trackingCode": 987654321,
  • "statusReason": "The shipment is in transit",
  • "quantity": 10,
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": "7b145d46-9d72-467d-aa37-4add0d6d697c"
}

Update a SIM card shipment

Update an existing SIM card shipment

Authorizations:
api_key
path Parameters
id
required
string

The sim card shipment's ID

Request Body schema: application/json
status
string

Current status of the shipment. Possible values are: PROCESSING, LABELED, IN TRANSIT, DELIVERED, FAILED

companyId
string

The ID of the company that owns the shipment

provider
string

The provider of the shipment

providerId
string

The ID of the shipment in the provider

trackingCode
string

The tracking code of the shipment

statusReason
string

The reason for the current status of the shipment. May be empty

quantity
number

The quantity of SIM cards in the shipment

object

Responses

Request samples

Content type
application/json
{
  • "status": "PROCESSING",
  • "companyId": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "provider": "Melhor Envio",
  • "providerId": 123456789,
  • "trackingCode": 987654321,
  • "statusReason": "The shipment is in transit",
  • "quantity": 10,
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": "7b145d46-9d72-467d-aa37-4add0d6d697c",
  • "status": "PROCESSING",
  • "company_id": "9df54b15-1a57-4e11-917a-5a5ddedb99ea",
  • "provider": "Melhor Envio",
  • "provider_id": 123456789,
  • "tracking_code": 987654321,
  • "status_reason": "The shipment is in transit",
  • "quantity": 10,
  • "address": {
    }
}

Management Users

Change user password

Authorizations:
api_key
path Parameters
id
required
string

The user's ID

Request Body schema: application/json
current_password
string
new_password
string

Responses

Request samples

Content type
application/json
{
  • "current_password": "123456",
  • "new_password": "654321"
}

Change user registration data

Change the user's registration data

Authorizations:
api_key
path Parameters
id
required
string

The id of the user

Request Body schema: application/json
phoneNumber
string

The user's updated phone number

email
string

The user's updated email

fullName
string

The user's updated full name

socialName
string

The user's updated social name

cpf
string

The user's updated CPF

dateOfBirth
string

The user's updated date of birth

object

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": "+5541987654321",
  • "email": "new@email.com",
  • "fullName": "new@email.com",
  • "socialName": "New Social Name",
  • "cpf": "01234567890",
  • "dateOfBirth": "2000-01-01",
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Management Billing

Backoffice operations rearding billing

Emit user nfe

Authorizations:
api_key
path Parameters
id
required
string

The user's ID

Request Body schema: application/json
amount
required
number
sendEmail
boolean
Default: true

Responses

Request samples

Content type
application/json
{
  • "amount": 100.25,
  • "sendEmail": false
}

Response samples

Content type
application/json
{}

Emit company nfe

Authorizations:
api_key
path Parameters
id
required
string

The company's ID

Request Body schema: application/json
amount
required
number
sendEmail
boolean
Default: true

Responses

Request samples

Content type
application/json
{
  • "amount": 100.25,
  • "sendEmail": false
}

Response samples

Content type
application/json
{}

Management Employees

Create new employee

Crate a new employee

Authorizations:
api_key
Request Body schema: application/json

Employee data

fullName
required
string

Full name of the employee

socialName
string

Social name of the employee

status
required
string

Employment status: active, terminated

workEmail
string

Work email of the employee, used in a professional setting

personalEmail
string

Personal email of the employee

workPhoneNumber
string

Work phone number of the employee, used in a professional setting

personalPhoneNumber
string

Personal phone number of the employee

cpf
string

CPF of the employee

position
string

Position of the employee in the company

area
string

Area in which the employee works

birthDate
string

Birth date of the employee

companyId
required
string

ID of the company in which the employee works

userId
string

ID of the employee's user

admittedAt
string

Date and time at which the employee was admitted

terminatedAt
string

Date and time at which the employee was terminated

object

Responses

Request samples

Content type
application/json
{
  • "fullName": "Test McTest",
  • "socialName": "The Scatman",
  • "status": "active",
  • "workEmail": "work.email@email.com",
  • "personalEmail": "personal.email@email.com",
  • "workPhoneNumber": "+5541987654321",
  • "personalPhoneNumber": "+5541912345678",
  • "cpf": "123.456.789-00",
  • "position": "CEO",
  • "area": "Marketing",
  • "birthDate": "1990-01-01",
  • "companyId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "userId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "admittedAt": "2020-01-01T00:00:00Z",
  • "terminatedAt": "2021-01-01T00:00:00Z",
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "fullName": "Test McTest",
  • "socialName": "The Scatman",
  • "status": "active",
  • "workEmail": "work.email@email.com",
  • "personalEmail": "personal.email@email.com",
  • "workPhoneNumber": "+5541987654321",
  • "personalPhoneNumber": "+5541912345678",
  • "cpf": "123.456.789-00",
  • "position": "CEO",
  • "area": "Marketing",
  • "birthDate": "1990-01-01",
  • "companyId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "userId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "admittedAt": "2020-01-01T00:00:00Z",
  • "terminatedAt": "2021-01-01T00:00:00Z",
  • "address": {
    }
}

Get employee

Get's a single employee

Authorizations:
api_key
path Parameters
id
required
string

The id of the employee

Responses

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "fullName": "Test McTest",
  • "socialName": "The Scatman",
  • "status": "active",
  • "workEmail": "work.email@email.com",
  • "personalEmail": "personal.email@email.com",
  • "workPhoneNumber": "+5541987654321",
  • "personalPhoneNumber": "+5541912345678",
  • "cpf": "123.456.789-00",
  • "position": "CEO",
  • "area": "Marketing",
  • "birthDate": "1990-01-01",
  • "companyId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "userId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "admittedAt": "2020-01-01T00:00:00Z",
  • "terminatedAt": "2021-01-01T00:00:00Z",
  • "address": {
    }
}

Delete employee

Delete an employee

Authorizations:
api_key
path Parameters
id
required
string

The id of the employee

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Update employee

Update an employee's data

Authorizations:
api_key
path Parameters
id
required
string

The id of the employee

Request Body schema: application/json

Employee data

fullName
required
string

Full name of the employee

socialName
string

Social name of the employee

status
required
string

Employment status: active, terminated

workEmail
string

Work email of the employee, used in a professional setting

personalEmail
string

Personal email of the employee

workPhoneNumber
string

Work phone number of the employee, used in a professional setting

personalPhoneNumber
string

Personal phone number of the employee

cpf
string

CPF of the employee

position
string

Position of the employee in the company

area
string

Area in which the employee works

birthDate
string

Birth date of the employee

companyId
required
string

ID of the company in which the employee works

userId
string

ID of the employee's user

admittedAt
string

Date and time at which the employee was admitted

terminatedAt
string

Date and time at which the employee was terminated

object

Responses

Request samples

Content type
application/json
{
  • "fullName": "Test McTest",
  • "socialName": "The Scatman",
  • "status": "active",
  • "workEmail": "work.email@email.com",
  • "personalEmail": "personal.email@email.com",
  • "workPhoneNumber": "+5541987654321",
  • "personalPhoneNumber": "+5541912345678",
  • "cpf": "123.456.789-00",
  • "position": "CEO",
  • "area": "Marketing",
  • "birthDate": "1990-01-01",
  • "companyId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "userId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "admittedAt": "2020-01-01T00:00:00Z",
  • "terminatedAt": "2021-01-01T00:00:00Z",
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": "53af5437-dd2b-4efb-84c2-d16c6fffd376",
  • "fullName": "Test McTest",
  • "socialName": "The Scatman",
  • "status": "active",
  • "workEmail": "work.email@email.com",
  • "personalEmail": "personal.email@email.com",
  • "workPhoneNumber": "+5541987654321",
  • "personalPhoneNumber": "+5541912345678",
  • "cpf": "123.456.789-00",
  • "position": "CEO",
  • "area": "Marketing",
  • "birthDate": "1990-01-01",
  • "companyId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "userId": "4489fccb-4c3e-4cd6-90c0-6aae84e71edc",
  • "admittedAt": "2020-01-01T00:00:00Z",
  • "terminatedAt": "2021-01-01T00:00:00Z",
  • "address": {
    }
}

Terminate employee

Mark an employee as terminated

Authorizations:
api_key
path Parameters
id
required
string

The id of the employee

Responses

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}

Dashboard Phone Accounts

Request a new phone account

Request a new phone account:

  • if an address is given a new SimCardShipment will be created
  • if changingOwnership is true -> user information is required, a new signup form will be created with automatic ownership change after portability
  • if an user information is given:
    • if the user already exists -> the user is assigned to the phone account.
    • if the user does not exist -> a new sign up form is created for the user.
Authorizations:
api_key
path Parameters
id
required
string

The id of the company

Request Body schema: application/json
subscriptionPlanId
required
string
areaCode
required
number
object
changeOwnership
boolean
object

Responses

Request samples

Content type
application/json
{
  • "subscriptionPlanId": "e885e8e1-8925-4e2a-a9e1-d6326b719209",
  • "areaCode": 41,
  • "user": {
    },
  • "changeOwnership": true,
  • "simcardDeliveryAddress": {
    }
}

Response samples

Content type
application/json
{
  • "code": "resource-not-found",
  • "message": "Resource not found!"
}