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 matterNumber:String!- Matter reference number (e.g., MAT-2023-001)Name:String!- Descriptive name of the matterClient: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
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/graphqlExample 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-NNNwhere 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
- Matter Identification: Use the
Numberfield for matter references in external systems - Complete Information: When querying matters, always include both
ClientandPhasesfor complete context - Filtering: Use matter numbers to filter and organize work
- Time Tracking: Associate time entries with specific matter phases for accurate billing
Common Use Cases
- Project Management: Track and manage legal or professional projects
- Client Work: Organize work by client and matter
- Phase Tracking: Monitor progress through different stages of a project
- Time Entry: Record time spent on specific matters and phases
- Reporting: Generate reports by matter, client, or phase
- 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/graphqlMatter 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/graphqlMatter 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/graphqlComplete 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