Listar informações do usuário:

Informações do usuário podem ser listadas do seguinte modo:

Endpoint GET /api/v2/me

Exemplo com cURL:

$ curl -X GET \
  'https://www.melhorenvio.com.br/api/v2/me' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjNjYmQzNTBjYzI0YmI5NzdjMDRkNTRmYzg1NThhOTE4ZjNkZDBmMDBkMTFhYzg2ZmI0OTViMDBiNzQxODEwZDlhMWM2ZWVlNTRkMTdhZDkxIn0.eyJhdWQiOiIxIiwianRpIjoiM2NiZDM1MGNjMjRiYjk3N2MwNGQ1NGZjODU1OGE5MThmM2RkMGYwMGQxMWFjODZmYjQ5NWIwMGI3NDE4MTBkOWExYzZlZWU1NGQxN2FkOTEiLCJpYXQiOjE1MDY1MjMzODYsIm5iZiI6MTUwNjUyMzM4NiwiZXhwIjoxNTM4MDU5Mzg2LCJzdWIiOiIxNmIyMWVhNS00NmVjLTQ0Y2MtYjdmNS1hMDJmZmY3YjljMjgiLCJzY29wZXMiOlsiY2FydC1yZWFkIiwiY2FydC13cml0ZSIsImNvbXBhbmllcy1yZWFkIiwiY29tcGFuaWVzLXdyaXRlIiwiY291cG9ucy1yZWFkIiwibm90aWZpY2F0aW9ucy1yZWFkIiwiY291cG9ucy13cml0ZSIsIm9yZGVycy1yZWFkIiwicHVyY2hhc2VzLXJlYWQiLCJzaGlwcGluZy1jYWxjdWxhdGUiLCJzaGlwcGluZy1jYW5jZWwiLCJzaGlwcGluZy1jaGVja291dCIsInNoaXBwaW5nLWNvbXBhbmllcyIsInNoaXBwaW5nLWdlbmVyYXRlIiwic2hpcHBpbmctcHJldmlldyIsInNoaXBwaW5nLXByaW50Iiwic2hpcHBpbmctdHJhY2tpbmciLCJ3ZWJob29rcy1yZWFkIiwid2ViaG9va3Mtd3JpdGUiLCJ0cmFuc2FjdGlvbnMtcmVhZCIsInVzZXJzLXJlYWQiLCJ1c2Vycy13cml0ZSJdfQ.GpVYhn4ZLjvtBsNq_sLullUV5E-zb3t009IuKkeRHgDGiDlnt_Lslv7elg6ou2nD_t0u2REIv3umZsLhYxUhHak732DSek84YJ14ehF4OCwFDYY8j1qOHB91YpXIUe6BzrDSD58IC3sknmoV7Cln2oLWwsooHTmowVFceCW5BNzavoT-wawUGxfOKb-el0exgtfx9gs-ppEdfSYfRvRvvfGMDqcbqaoIZxOE1hf9LK1qIbuOjLUO0lPwXCmhIe8q-fKfb-DvGXhz9aTCZ2K4khaseDGkjXOQyB_abOqfzktcFOfqcXuInv53-UoPQNZhzfTPqu2ATe73AlVsbS9Y1w_F40cVgHfhlOujcqccpQiErM6mZvDkx7EIIcEXM7wmX4kDZzWBm5ZEf1Y4WX0lSR-zOK0jm-rOZ6MWKeko5-GcQaeqho9Q3I4o-RViVznBCBW1OnGy7K2jNlB0juL6ZL2YKgKhjxmhe-_dNSQ7BMvJpzhQsKcOkJXS70RBJvx17Dl0vHMuCbW-K1KT1HrPasMVB3psHNNE1wtPI1IeAogcd9eTtvD2Easy7hS0YUqf7KCXk7h2qJdGHpgbjwALGq4U6JvpDeyqWHmS5_d8v92dtJ5Lz4wFc-JYsueNU5tqJiz03ORnRCZCkYZu52pc5kiW7-fo-UVfxSDdizf76Fk' \
  -H 'content-type: application/json'

Nota: O Parâmetro pretty pode ser passado para imprimir o JSON de modo que se possa visualizar a informação na fase de desenvolvimento, não sendo recomendado para produção por aumentar o tamanho da resposta enviada ao cliente.

Resposta:

{
  "id": "16b21ea5-46ec-44cc-b7f5-a02fff7b9c28", // id do usuário
  "firstname": "Antônio", // primeiro nome do usuário
  "lastname": "Augusto", // sobrenome do usuário
  "email": "email@melhorenvio.com.br", // email do usuário
  "picture": "https://melhorenvio-qa.s3-sa-east-1.amazonaws.com/profiles/16b21ea5-46ec-44cc-b7f5-a02fff7b9c28-WfACVZ4EPjjqAQQCQvS2nJ8j.jpeg", // imagem do usuário
  "thumbnail": "https://melhorenvio-qa.s3-sa-east-1.amazonaws.com/profiles/thumbnails/16b21ea5-46ec-44cc-b7f5-a02fff7b9c28-WfACVZ4EPjjqAQQCQvS2nJ8j.jpeg", // miniatura da imagem do usuário
  "document": "69464115017", // cpf do usuário
  "birthdate": "1990-01-01 00:00:00", // data de nascimento do usuário
  "email_confirmed_at": "2017-09-10 18:02:40", // data de confirmação do email
  "email_alternative": null, // email alternativo
  "access_at": "2017-09-27 13:18:53", // data do último acesso
  "created_at": "2017-09-10 18:02:40", // data de cadastro
  "updated_at": "2017-09-27 13:18:53", // data da última atualização
  "status": { // status
    "id": 4,
    "status": "Allowed" // liberado para comprar
  },
  "phone": { // telefone
    "id": 240,
    "label": null,
    "phone": "53984000000",
    "type": "mobile",
    "country_id": "BR",
    "created_at": "2017-09-10 18:02:40",
    "updated_at": "2017-09-10 18:02:40"
  },
  "address": { // endereço
    "id": 239,
    "label": "Pelotas Parque Tecnológico",
    "postal_code": "96085470",
    "address": "Av. Domingos de Almeida",
    "number": "1785",
    "complement": null,
    "district": "Areal",
    "latitude": -31.7552206,
    "longitude": -52.3156841,
    "created_at": "2017-09-10 18:02:40",
    "updated_at": "2017-09-10 18:02:40",
    "city": {
      "id": 4159,
      "city": "Pelotas",
      "state": {
        "id": 21,
        "state": "Rio Grande do Sul",
        "state_abbr": "RS",
        "country": {
          "id": "BR",
          "country": "Brazil"
        }
      }
    }
  }
}

results matching ""

    No results matching ""