Skip to content

Instantly share code, notes, and snippets.

@Gubio
Created May 24, 2017 18:48
Show Gist options
  • Save Gubio/56a69fb4003862470c1878b9b7af0d77 to your computer and use it in GitHub Desktop.
Save Gubio/56a69fb4003862470c1878b9b7af0d77 to your computer and use it in GitHub Desktop.

API iter

Servidor de Homologação

http://api.cnxs.us-east-1.elasticbeanstalk.com/

Versão da api

v1

Autenticação

"Authorization: bearer {API_KEY}" 

Model User - Usuário

Atributo Type extra
name string
company_id integer
email string
phone string
document string rg, cpf
expire_date datetime 2019-04-01 03:00:00
active boolean
language string pt-BR, es, en

Listar Usuários

get '/users' ?company_id=

Ver Usuário

get '/users/:id'

Cadastrar Usuário

post '/users'

Editar Usuário

put '/users/:id'

Apagar Usuário

delete '/users/:id' 

Model Company - Cliente

Atributo Type extra
name string
owner_id integer id de usuário proprietário desta empresa
financial_id integer id da empresa Financeira / Pagante
email string
phone string
document string cpf, cpnj

Listar Empresas

get '/companies'

Ver Empresa

put '/companies/:id'

Cadastrar Empresa

post '/companies'

Editar Empresa

put '/companies/:id'

Apagar Empresa

delete '/companies/:id' 

Model Vehicle - Veículo

Atributo Type extra
name string
company_id integer
plate string
mark string
car_model string
year string
color string
fuel string
fipe string código na tabela FIPE
description text
active boolena

Listar Veículos

get '/vehicles' ?company_id=

Ver Veículo

get '/vehicles/:id'

Cadastrar Veículo

post '/vehicles'

Editar Veículo

put '/vehicles/:id'

Apagar Veículo

delete  '/vehicles/:id'

Model Tracker - Rastreador

Atributo Type extra
uin string UIN / IMEI do rastreador
company_id integer
owner_id integer Id do usuário proprietario
name string
description text Anotações gerais
active boolena

Listar Rastreadores

get '/trackers' ?company_id=

Ver Rastreador

get '/trackers/:uin'

Cadastrar Rastreador

post '/trackers'

Editar Rastreador

put '/trackers/:uin'

Apagar Rastreador

delete  '/trackers/:id'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment