> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# API de grafo de rede de fraude

> O Didit retorna uma rede de fraude como grafo de nós de sujeitos e sinais, com o parâmetro depth para limitar a vizinhança de um sujeito foco.



Prompt da API de grafo de rede
        Copiar o prompt para a área de transferência



      
      

\<pre>

\`Retrieve a fraud network as a graph through the Management API.

Endpoint:
GET https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/graph/

Authentication:
Use the x-api-key header with my Didit API key.

Path parameter:
\- network_uuid - the network's UUID.

Query params:
\- depth=1|2|3|all - hops from the focus subject to include. Defaults to all (unbounded).
\- focus_kind=vendor_user|vendor_business|transaction_party - must be supplied together with focus_id.
\- focus_id=<uuid> - subject UUID to center the graph on.

Response 200: NetworkGraph - { network: NetworkDetail, depth: int|null, truncated: bool, nodes: [...], edges: [...], metrics: {node_count, edge_count, hub_signal_count} }.

Node shapes:
\- Subject node (kind: vendor_user | vendor_business | transaction_party): id, kind, subject, node_status (approved|in_review|declined|not_completed), tags.
\- Signal node (kind: signal): id, kind, uuid, signal_type, subject_count, coverage, is_hub, is_datacenter_ip, is_high_collision_device, node_status (signal_active|signal_guarded), tags, risk_evidence, first_seen_at, last_seen_at.

Edge shape: id, source (subject node id), target (signal node id), subject_kind, signal_type, confidence, observation_count, first_seen_at, last_seen_at.

Failure modes:
\- 404 - network not found or not visible.
\- 400 - depth is not one of 1, 2, 3, all, or focus_kind/focus_id supplied without the other.
\- 401/403 - auth/permission errors.

Side effects: none, pure read.

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

Colar em

Recupere a rede como um grafo: nós de entidades para cada usuário do fornecedor, empresa do fornecedor ou parte de transação na rede, nós de sinal para cada valor compartilhado de dispositivo, IP, rosto, número de documento, telefone, e-mail ou endereço que os conecta, e arestas para as associações entre eles.Use `depth` para limitar quantos saltos a partir de um sujeito definido por `focus_kind`/`focus_id` devem ser retornados. É isso que sustenta a visualização de grafo do Console ao ampliar a visualização para as conexões imediatas de um solicitante, em vez de carregar a rede inteira. Omita `depth` (ou passe `all`) para obter a vizinhança completa; `truncated` informa se uma requisição limitada deixou algo de fora.## Relacionados- [Obter rede](https://docs.didit.me/pt-br/management-api/networks/get.md)
- [Membros da rede](https://docs.didit.me/pt-br/management-api/networks/members.md)
- [Sinais da rede](https://docs.didit.me/pt-br/management-api/networks/signals.md)


## OpenAPI

````yaml pt-br/openapi-25.json GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/graph/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: API de verificação de identidade. Autentique-se com o cabeçalho x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/graph/:
    get:
      tags:
        - Networks
      summary: Obter o grafo da rede
      description: >-
        Recupera a rede como um grafo de nós de sujeitos (usuários do
        fornecedor, empresas do fornecedor, partes de transações) e nós de
        sinais (os valores compartilhados de
        dispositivo/IP/rosto/documento/telefone/e-mail/endereço que os
        conectam), com arestas que representam vínculos.
      operationId: get_network_graph
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID da organização.
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID da aplicação.
        - name: network_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: n3a5e000-0000-4000-8000-000000000001
          description: UUID da rede.
        - name: depth
          in: query
          schema:
            type: string
            enum:
              - '1'
              - '2'
              - '3'
              - all
          description: >-
            Número de saltos a partir do sujeito em foco a incluir. O padrão é
            todos (sem limite).
        - name: focus_kind
          in: query
          schema:
            type: string
            enum:
              - vendor_user
              - vendor_business
              - transaction_party
          description: >-
            Tipo do sujeito no qual centralizar o grafo. Deve ser informado
            junto com focus_id; quando a profundidade é limitada e nenhum dos
            dois é informado, o padrão é um membro arbitrário.
        - name: focus_id
          in: query
          schema:
            type: string
            format: uuid
          description: UUID do sujeito no qual centralizar o grafo.
      responses:
        '200':
          description: Grafo da rede.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkGraph'
        '404':
          description: Rede não encontrada (ou não visível para esta aplicação).
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/graph/?depth=2'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            # and DIDIT_APPLICATION_ID.
            client = Didit()

            result = client.networks.retrieve_graph(
                "n3a5e000-0000-4000-8000-000000000001",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            const didit = new Didit();


            const result = await
            didit.networks.retrieveGraph("n3a5e000-0000-4000-8000-000000000001");

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.RetrieveGraph(ctx, \"n3a5e000-0000-4000-8000-000000000001\", didit.NetworksRetrieveGraphParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            Didit client = new Didit();


            var result =
            client.networks().retrieveGraph("n3a5e000-0000-4000-8000-000000000001");

            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            $didit = new DiditClient();


            $result =
            $didit->networks->retrieveGraph('n3a5e000-0000-4000-8000-000000000001');

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            # and DIDIT_APPLICATION_ID.

            didit = Didit::Client.new


            result =
            didit.networks.retrieve_graph("n3a5e000-0000-4000-8000-000000000001")

            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            using var client = new DiditClient();


            var result = await
            client.Networks.RetrieveGraphAsync("n3a5e000-0000-4000-8000-000000000001");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    NetworkGraph:
      type: object
      properties:
        network:
          $ref: '#/components/schemas/NetworkDetail'
        depth:
          type: integer
          nullable: true
          description: Profundidade efetiva aplicada, ou null quando ilimitada (depth=all).
        truncated:
          type: boolean
          description: True se a vizinhança foi cortada pela profundidade.
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/NetworkGraphNode'
        edges:
          type: array
          items:
            $ref: '#/components/schemas/NetworkGraphEdge'
        metrics:
          type: object
          properties:
            node_count:
              type: integer
            edge_count:
              type: integer
            hub_signal_count:
              type: integer
    NetworkDetail:
      allOf:
        - $ref: '#/components/schemas/NetworkListItem'
        - type: object
          properties:
            stats:
              type: object
              description: Estatísticas agregadas da rede (por exemplo, totais de membros).
            fraud_tags:
              type: array
              items:
                type: object
              description: Tags de padrões de fraude identificadas na rede.
            risk_signals:
              type: object
              description: >-
                Resumos dos sinais de risco: residential_proxy_reuse,
                email_intelligence, phone_intelligence.
            reviewed_at:
              type: string
              format: date-time
              nullable: true
            reviewed_by:
              type: string
              nullable: true
            review_reason:
              type: string
              nullable: true
      properties:
        notes_count:
          type: integer
          minimum: 0
          readOnly: true
          description: Número de notas privadas de analistas nesta investigação.
    NetworkGraphNode:
      type: object
      description: >-
        Um nó de sujeito ou um nó de sinal, diferenciados por kind. Nós de
        sujeito (kind: vendor_user | vendor_business | transaction_party) contêm
        id, kind, subject, node_status (approved | in_review | declined |
        not_completed) e tags. Nós de sinal (kind: signal) contêm id, kind,
        uuid, signal_type, subject_count, coverage, is_hub, is_datacenter_ip,
        is_high_collision_device, node_status (signal_active | signal_guarded),
        tags, risk_evidence, first_seen_at e last_seen_at.
      properties:
        id:
          type: string
        kind:
          type: string
          enum:
            - vendor_user
            - vendor_business
            - transaction_party
            - signal
    NetworkGraphEdge:
      type: object
      properties:
        id:
          type: string
          format: uuid
        source:
          type: string
          description: ID do nó do sujeito.
        target:
          type: string
          description: ID do nó de sinal.
        subject_kind:
          type: string
          enum:
            - vendor_user
            - vendor_business
            - transaction_party
        signal_type:
          type: string
          enum:
            - ip_address
            - device
            - face
            - document_number
            - phone
            - email
            - address
        confidence:
          type: number
          format: float
          description: 1.0 para uma correspondência exata.
        observation_count:
          type: integer
        first_seen_at:
          type: string
          format: date-time
          nullable: true
        last_seen_at:
          type: string
          format: date-time
          nullable: true
    NetworkListItem:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        network_id:
          type: string
          description: ID sequencial legível por organização, por exemplo N-0001.
        name:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - active
            - in_review
            - resolved
            - dismissed
          description: >-
            Status do ciclo de vida da rede. Diferente do outcome_status por
            candidato dentro de uma rede
            (approved/in_review/declined/not_completed).
        risk:
          $ref: '#/components/schemas/NetworkRiskDisplay'
        pattern_types:
          type: array
          items:
            type: string
            enum:
              - exact_same_device
              - similar_device
              - same_ip_address
              - same_address
              - similar_selfie_backgrounds
              - similar_poa_documents
              - same_document_number
              - same_phone_number
              - same_email
          description: Os padrões de agrupamento detectados nesta rede.
        signal_types:
          type: array
          items:
            type: string
            enum:
              - ip_address
              - device
              - face
              - document_number
              - phone
              - email
              - address
          description: Os tipos de sinal distintos presentes nesta rede.
        member_counts:
          type: object
          description: >-
            Contagens de membros por categoria (por exemplo, total, por
            outcome_status).
        member_status:
          type: object
          description: Distribuição dos membros por outcome_status.
        signal_coverage:
          type: object
          description: Cobertura por signal_type dos membros desta rede.
        first_activity_at:
          type: string
          format: date-time
          nullable: true
        last_activity_at:
          type: string
          format: date-time
          nullable: true
    NetworkRiskDisplay:
      type: object
      properties:
        score:
          type: integer
          description: Pontuação de risco, de 0 a 100.
        band:
          type: string
          enum:
            - low
            - medium
            - high
          description: >-
            Faixa em que a pontuação é exibida. high >= 70, medium >= 40, caso
            contrário low.
        bar:
          type: number
          format: float
          description: Valor normalizado de 0 a 1 para renderizar uma barra de risco.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Chave de API da sua aplicação, em Developers -> API keys no Business
        Console. A chave principal tem acesso total. Uma chave nomeada pode ter
        escopo restrito: nenhum acesso, leitura ou escrita por recurso, limitada
        a alguns fluxos ou a sessões aprovadas, a uma lista de endereços IP e a
        uma data de validade. 401 significa que a chave está errada, revogada ou
        expirada; 403 significa que nenhuma chave foi enviada, que a chave não
        tem acesso a este recurso ou ação, ou que a requisição veio de um
        endereço fora da sua lista de IPs; 404 em uma rota de sessão significa
        que a sessão está fora dos fluxos ou status da chave. Uma chave sem
        acesso a mídia recebe URLs de imagem, vídeo e PDF como null, e uma chave
        sem permissão de escrita em sessões recebe links e tokens de sessão como
        null. Consulte https://docs.didit.me/console/api-keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.