GET All companies

Changed on

Através deste endpoint é possível recuperar os dados das subcontas que você criou, incluindo o token de acesso de cada conta.

IMPORTANTE: Caso precise redefinir o token de uma conta (por vazamento ou qualquer outro problema), use PUT /api/companies/tokens informando o company_id da subconta.

É possível filtrar os resultados utilizando os query params disponíveis listados abaixo.

Disponível apenas para contas revendedoras (outras contas recebem 501). A lista vem em ordem decrescente de id, com 50 subcontas por página.

Filtro token: muda o formato da resposta. Retorna um único objeto {"data": {...}} com a subconta dona do token, sem paginação; se o token não pertencer a uma subconta sua, a resposta é 200 com [].

access.token é o token de API da subconta: use-o no header Authorization para operar em nome dela.

get/api/companies

Request

  • Base URL
    https://app.plugsign.com.br
  • URL
    https://app.plugsign.com.br/api/companies
  • Auth
    API key in header Authorization

Query parameters

idinteger

Id da subconta (comparação exata).

namestring

Nome da empresa cadastrada (company_name), comparação exata.

emailstring

E-mail da empresa.

phonestring

Telefone da empresa.

cnpjstring

CNPJ da empresa.

addressstring

Endereço da empresa (busca parcial, contém).

tokenstring

Token de API de uma subconta. Com este filtro a resposta é um único objeto (sem paginação).

Response

200

Example response

{
  "data": [
    {
      "id": 8037,
      "name": "Empresa Exemplo",
      "email": "empresa@exemplo.com",
      "phone": "11989999999",
      "cnpj": "22345678000199",
      "address": "Rua Exemplo, 100, Centro, São Paulo",
      "can_login": 1,
      "mail_host": "smtp.exemplo.com",
      "mail_from": "no-reply@exemplo.com",
      "mail_username": "usuario@exemplo.com",
      "mail_encryption": "ssl",
      "mail_port": 465,
      "company_name": "Empresa Exemplo LTDA",
      "editablevalidate": 1
    }
  ],
  "links": {
    "first": "/?page=1",
    "last": "/?page=1"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "label": "« Previous"
      }
    ],
    "path": "/",
    "per_page": 50,
    "to": 2,
    "total": 2
  }
}

Changes

    • breaking

      the // response's property type changed from string to object for status

    • breaking

      the // response's property type changed from string to integer for status

    • breaking

      the // response's property type changed from string to integer for status

    • breaking

      the / response's property type changed from string to integer for status

    • info

      added the non-success response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status