> ## 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 graf de xarxa de frau

> Obtén una xarxa de frau com a graf de nodes de subjecte i senyal amb Didit. El paràmetre de profunditat limita el veïnatge del subjecte focal.



Prompt de l'API de graf de xarxa
        Copia el prompt al porta-retalls



      
      

\<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>



      
      

Enganxa a

Obtén la xarxa com a graf: nodes de subjecte per a cada usuari del proveïdor, empresa del proveïdor o part en una transacció que forma part de la xarxa; nodes de senyal per a cada valor compartit de dispositiu, adreça IP, cara, número de document, telèfon, correu electrònic o adreça que els enllaça; i arestes per a les pertinences entre ells.Fes servir `depth` per limitar el nombre de salts que es poden recórrer a partir d'un subjecte `focus_kind`/`focus_id`. Això és el que fa que la vista de graf de la Console pugui fer zoom sobre les connexions immediates d'un sol·licitant, en lloc de carregar tota la xarxa. Omet `depth` (o passa `all`) per obtenir tot el veïnatge. `truncated` t'indica si una sol·licitud limitada ha truncat alguna part de la resposta.## Relacionat- [Obté la xarxa](https://docs.didit.me/ca/management-api/networks/get.md)
- [Membres de la xarxa](https://docs.didit.me/ca/management-api/networks/members.md)
- [Senyals de la xarxa](https://docs.didit.me/ca/management-api/networks/signals.md)


## OpenAPI

````yaml ca/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 verificació d'identitat. Autentica't amb la capçalera 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: Obtenir el graf de la xarxa
      description: >-
        Recupera la xarxa com un graf de nodes de subjecte (usuaris del
        proveïdor, empreses del proveïdor, parts de transacció) i nodes de
        senyal (els valors compartits de
        dispositiu/IP/cara/document/telèfon/correu electrònic/adreça que els
        connecten), amb arestes que representen relacions de pertinença.
      operationId: get_network_graph
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID de l'organització.
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID de l'aplicació.
        - name: network_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: n3a5e000-0000-4000-8000-000000000001
          description: UUID de la xarxa.
        - name: depth
          in: query
          schema:
            type: string
            enum:
              - '1'
              - '2'
              - '3'
              - all
          description: >-
            Salts des del subjecte principal que cal incloure. Per defecte, tots
            (sense límit).
        - name: focus_kind
          in: query
          schema:
            type: string
            enum:
              - vendor_user
              - vendor_business
              - transaction_party
          description: >-
            Tipus de subjecte sobre el qual centrar el graf. Cal proporcionar-lo
            juntament amb focus_id; per defecte pren un membre arbitrari quan la
            profunditat està delimitada i no s'especifica cap dels dos.
        - name: focus_id
          in: query
          schema:
            type: string
            format: uuid
          description: UUID del subjecte sobre el qual centrar el graf.
      responses:
        '200':
          description: Graf de xarxa.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkGraph'
        '404':
          description: No s'ha trobat la xarxa (o no és visible per a aquesta aplicació).
          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: >-
            Profunditat efectiva aplicada, o null quan no està limitada
            (depth=all).
        truncated:
          type: boolean
          description: Cert si el veïnat s'ha truncat per profunditat.
        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: Estadístiques agregades de la xarxa (p. ex., totals de membres).
            fraud_tags:
              type: array
              items:
                type: object
              description: Etiquetes de patrons de frau detectades a la xarxa.
            risk_signals:
              type: object
              description: >-
                Resums dels senyals de risc: 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: Nombre de notes privades d'analista en aquesta investigació.
    NetworkGraphNode:
      type: object
      description: >-
        Un node de subjecte o un node de senyal, distingits per tipus. Els nodes
        de subjecte (kind: vendor_user | vendor_business | transaction_party)
        inclouen id, kind, subject, node_status (approved | in_review | declined
        | not_completed) i tags. Els nodes de senyal (kind: signal) inclouen 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 i 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 del node subjecte.
        target:
          type: string
          description: ID del node de senyal.
        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 per a una coincidència exacta.
        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 seqüencial per organització llegible per a humans, p. ex. N-0001.
        name:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - active
            - in_review
            - resolved
            - dismissed
          description: >-
            Estat del cicle de vida de la xarxa. Distint de l'outcome_status per
            sol·licitant dins d'una xarxa
            (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: Els patrons d'agrupament detectats en aquesta xarxa.
        signal_types:
          type: array
          items:
            type: string
            enum:
              - ip_address
              - device
              - face
              - document_number
              - phone
              - email
              - address
          description: Els diferents tipus de senyals presents en aquesta xarxa.
        member_counts:
          type: object
          description: >-
            Recomptes de membres per categoria (p. ex. total, per
            outcome_status).
        member_status:
          type: object
          description: Desglossament dels membres per outcome_status.
        signal_coverage:
          type: object
          description: Cobertura dels membres d'aquesta xarxa per signal_type.
        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: Puntuació de risc, 0-100.
        band:
          type: string
          enum:
            - low
            - medium
            - high
          description: >-
            Franja en què es representa la puntuació. high >= 70, medium >= 40;
            altrament, low.
        bar:
          type: number
          format: float
          description: Valor normalitzat de 0 a 1 per renderitzar una barra de risc.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        La clau d'API de la teva aplicació, des de Developers -> API keys a la
        Business Console. La clau primària té accés complet. Una clau amb nom
        pot tenir l'abast limitat: cap, lectura o escriptura per recurs,
        limitada a determinats fluxos de treball o a sessions aprovades, a una
        llista d'adreces IP i a una data de caducitat. 401 significa que la clau
        és incorrecta, revocada o caducada; 403 significa que no s'ha enviat cap
        clau, que la clau no té accés a aquest recurs o acció, o que la
        sol·licitud prové d'una adreça fora de la seva llista d'IP; 404 en una
        ruta de sessió significa que la sessió està fora dels fluxos de treball
        o estats de la clau. Una clau sense accés a fitxers multimèdia rep els
        URL d'imatge, vídeo i PDF com a null, i una clau sense permís
        d'escriptura de sessions rep els enllaços de sessió i els tokens com a
        null. Consulta https://docs.didit.me/console/api-keys.

````

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