Skip to Content

Matter

Description: Represents a matter or project in the system. Matters are the primary work units that track legal or professional services provided to clients.

Type Structure

Type Name: Matter

Fields:

  • Id: String! - Unique identifier for the matter
  • Number: String! - Matter reference number (e.g., MAT-2023-001)
  • Name: String! - Descriptive name of the matter
  • Client: Client! - The client associated with this matter (non-null)
  • Phases: [MatterPhase!]! - Array of phases associated with this matter (non-null array of non-null objects)

Example Usage

curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "query": "query { AllMatters { Id Number Name Client { Id Number Name } Phases { Id Number Name } } }" }' \ https://sandbox.drivepractice.com/api/v1/graphql

Example Response

{ "data": { "AllMatters": [ { "Id": "5f8d0d5a7b3e4f1234567890", "Number": "MAT-2023-001", "Name": "Corporate Restructuring Project", "Client": { "Id": "5f8d0d5a7b3e4f1234567891", "Number": "CLI-2022-456", "Name": "Acme Corporation" }, "Phases": [ { "Id": "5f8d0d5a7b3e4f1234567892", "Number": "PH-2023-001-A", "Name": "Discovery Phase" }, { "Id": "5f8d0d5a7b3e4f1234567893", "Number": "PH-2023-001-B", "Name": "Implementation Phase" } ] } ] } }

Field Details

Id

  • Type: String! (Non-null String)
  • Description: System-generated unique identifier for the matter
  • Example: "5f8d0d5a7b3e4f1234567890"
  • Usage: Used for internal references and relationships

Number

  • Type: String! (Non-null String)
  • Description: Human-readable reference number assigned to the matter
  • Example: "MAT-2023-001"
  • Format: Typically follows a pattern like MAT-YYYY-NNN where YYYY is the year and NNN is a sequential number
  • Usage: Used for matter identification in documents and communications

Name

  • Type: String! (Non-null String)
  • Description: Descriptive name of the matter/project
  • Example: "Corporate Restructuring Project"
  • Usage: Display purposes and matter identification

Client

  • Type: Client! (Non-null Client object)
  • Description: The client associated with this matter
  • Fields: See Client Type documentation
  • Usage: Essential for understanding who the work is being performed for

Phases

  • Type: [MatterPhase!]! (Non-null array of non-null MatterPhase objects)
  • Description: Array of phases that make up this matter
  • Fields: See MatterPhase Type documentation
  • Usage: Track progress through different stages of the matter

Relationships

The Matter type has relationships with:

  • Client: Each matter belongs to exactly one client (one-to-one relationship)
  • MatterPhase: Each matter can have multiple phases (one-to-many relationship)
  • Activity: Activities are associated with matters through phases

Best Practices

  1. Matter Identification: Use the Number field for matter references in external systems
  2. Complete Information: When querying matters, always include both Client and Phases for complete context
  3. Filtering: Use matter numbers to filter and organize work
  4. Time Tracking: Associate time entries with specific matter phases for accurate billing

Common Use Cases

  1. Project Management: Track and manage legal or professional projects
  2. Client Work: Organize work by client and matter
  3. Phase Tracking: Monitor progress through different stages of a project
  4. Time Entry: Record time spent on specific matters and phases
  5. Reporting: Generate reports by matter, client, or phase
  6. Billing: Create invoices based on matter phases and time entries

Query Examples

Basic Matter Information

curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "query": "query { AllMatters { Id Number Name } }" }' \ https://sandbox.drivepractice.com/api/v1/graphql

Matter with Client Only

curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "query": "query { AllMatters { Id Number Name Client { Id Number Name } } }" }' \ https://sandbox.drivepractice.com/api/v1/graphql

Matter with Phases Only

curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "query": "query { AllMatters { Id Number Name Phases { Id Number Name } } }" }' \ https://sandbox.drivepractice.com/api/v1/graphql

Complete Matter Information

curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "query": "query { AllMatters { Id Number Name Client { Id Number Name } Phases { Id Number Name } } }" }' \ https://sandbox.drivepractice.com/api/v1/graphql