### User Management Source: https://docs.lawmatics.com/ Endpoints for creating, retrieving, updating, and deleting users. ```APIDOC ## POST /user ### Description Creates a new user. ### Method POST ### Endpoint /user ### Parameters #### Request Body - **first_name** (string) - Required - The first name of the user. - **last_name** (string) - Required - The last name of the user. - **email** (string) - Required - The email address of the user. ### Request Example ```json { "first_name": "Jane", "last_name": "Doe", "email": "jane.doe@example.com" } ``` ### Response #### Success Response (201) - **id** (integer) - The unique identifier for the created user. - **first_name** (string) - The first name of the user. - **last_name** (string) - The last name of the user. - **email** (string) - The email address of the user. #### Response Example ```json { "id": 601, "first_name": "Jane", "last_name": "Doe", "email": "jane.doe@example.com" } ``` ## PUT /user/{id} ### Description Updates an existing user. ### Method PUT ### Endpoint /user/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the user to update. #### Request Body - **first_name** (string) - Optional - The updated first name. - **last_name** (string) - Optional - The updated last name. - **email** (string) - Optional - The updated email address. ### Request Example ```json { "email": "jane.doe.updated@example.com" } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the updated user. - **first_name** (string) - The first name of the user. - **last_name** (string) - The last name of the user. - **email** (string) - The email address of the user. #### Response Example ```json { "id": 601, "first_name": "Jane", "last_name": "Doe", "email": "jane.doe.updated@example.com" } ``` ## DELETE /user/{id} ### Description Deletes a specific user by its ID. ### Method DELETE ### Endpoint /user/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the user to delete. ### Response #### Success Response (204) No content is returned upon successful deletion. ``` -------------------------------- ### Company Management Source: https://docs.lawmatics.com/ Endpoints for retrieving, creating, updating, and deleting companies. ```APIDOC ## GET /companies ### Description Retrieves a list of companies. ### Method GET ### Endpoint /companies ### Response #### Success Response (200) - An array of company objects. #### Response Example ```json [ { "id": 201, "name": "Acme Corporation", "email": "info@acme.com", "phone": "123-456-7890" }, { "id": 202, "name": "Acme Ltd.", "email": "contact@acmeltd.com", "phone": "987-654-3210" } ] ``` ## GET /company/{id} ### Description Retrieves a specific company by its ID. ### Method GET ### Endpoint /company/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the company to retrieve. ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the company. - **name** (string) - The name of the company. - **email** (string) - The email address of the company. - **phone** (string) - The phone number of the company. #### Response Example ```json { "id": 201, "name": "Acme Corporation", "email": "info@acme.com", "phone": "123-456-7890" } ``` ## POST /company ### Description Creates a new company. ### Method POST ### Endpoint /company ### Parameters #### Request Body - **name** (string) - Required - The name of the company. - **email** (string) - Optional - The email address of the company. - **phone** (string) - Optional - The phone number of the company. ### Request Example ```json { "name": "Beta Industries", "email": "contact@betaind.com", "phone": "555-123-4567" } ``` ### Response #### Success Response (201) - **id** (integer) - The unique identifier for the created company. - **name** (string) - The name of the company. - **email** (string) - The email address of the company. - **phone** (string) - The phone number of the company. #### Response Example ```json { "id": 203, "name": "Beta Industries", "email": "contact@betaind.com", "phone": "555-123-4567" } ``` ## PUT /company/{id} ### Description Updates an existing company. ### Method PUT ### Endpoint /company/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the company to update. #### Request Body - **name** (string) - Optional - The updated name of the company. - **email** (string) - Optional - The updated email address of the company. - **phone** (string) - Optional - The updated phone number of the company. ### Request Example ```json { "email": "updated.info@acmecorp.com" } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the updated company. - **name** (string) - The name of the company. - **email** (string) - The email address of the company. - **phone** (string) - The phone number of the company. #### Response Example ```json { "id": 201, "name": "Acme Corporation", "email": "updated.info@acmecorp.com", "phone": "123-456-7890" } ``` ## DELETE /company/{id} ### Description Deletes a specific company by its ID. ### Method DELETE ### Endpoint /company/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the company to delete. ### Response #### Success Response (204) No content is returned upon successful deletion. ``` -------------------------------- ### Expense Management Source: https://docs.lawmatics.com/ Endpoints for creating, retrieving, updating, and deleting expenses. ```APIDOC ## GET /expenses ### Description Retrieves a list of expenses, with optional filtering. ### Method GET ### Endpoint /expenses ### Parameters #### Query Parameters - **matter_id** (integer) - Optional - Filter by matter ID. - **user_id** (integer) - Optional - Filter by user ID. - **date_from** (string) - Optional - Filter by date from (YYYY-MM-DD). - **date_to** (string) - Optional - Filter by date to (YYYY-MM-DD). ### Response #### Success Response (200) - An array of expense objects, each containing: - **id** (integer) - The unique identifier for the expense. - **date** (string) - The date the expense was incurred. - **amount** (number) - The amount of the expense. - **description** (string) - A description of the expense. - **matter_id** (integer) - The ID of the matter associated with the expense. - **user_id** (integer) - The ID of the user who incurred the expense. #### Response Example ```json [ { "id": 101, "date": "2023-10-26", "amount": 50.75, "description": "Photocopying costs", "matter_id": 123, "user_id": 456 }, { "id": 102, "date": "2023-10-25", "amount": 120.00, "description": "Expert witness fee", "matter_id": 124, "user_id": 457 } ] ``` ## GET /expense/{id} ### Description Retrieves a specific expense by its ID. ### Method GET ### Endpoint /expense/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the expense to retrieve. ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the expense. - **date** (string) - The date the expense was incurred. - **amount** (number) - The amount of the expense. - **description** (string) - A description of the expense. - **matter_id** (integer) - The ID of the matter associated with the expense. - **user_id** (integer) - The ID of the user who incurred the expense. #### Response Example ```json { "id": 101, "date": "2023-10-26", "amount": 50.75, "description": "Photocopying costs", "matter_id": 123, "user_id": 456 } ``` ## POST /expense ### Description Creates a new expense. ### Method POST ### Endpoint /expense ### Parameters #### Request Body - **date** (string) - Required - The date the expense was incurred (YYYY-MM-DD). - **amount** (number) - Required - The amount of the expense. - **description** (string) - Optional - A description of the expense. - **matter_id** (integer) - Required - The ID of the matter associated with the expense. - **user_id** (integer) - Required - The ID of the user who incurred the expense. ### Request Example ```json { "date": "2023-10-27", "amount": 75.50, "description": "Travel expenses", "matter_id": 125, "user_id": 458 } ``` ### Response #### Success Response (201) - **id** (integer) - The unique identifier for the created expense. - **date** (string) - The date the expense was incurred. - **amount** (number) - The amount of the expense. - **description** (string) - A description of the expense. - **matter_id** (integer) - The ID of the matter associated with the expense. - **user_id** (integer) - The ID of the user who incurred the expense. #### Response Example ```json { "id": 103, "date": "2023-10-27", "amount": 75.50, "description": "Travel expenses", "matter_id": 125, "user_id": 458 } ``` ## PUT /expense/{id} ### Description Updates an existing expense. ### Method PUT ### Endpoint /expense/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the expense to update. #### Request Body - **date** (string) - Optional - The updated date of the expense (YYYY-MM-DD). - **amount** (number) - Optional - The updated amount of the expense. - **description** (string) - Optional - The updated description of the expense. - **matter_id** (integer) - Optional - The updated matter ID. - **user_id** (integer) - Optional - The updated user ID. ### Request Example ```json { "amount": 80.00, "description": "Updated travel expenses" } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the updated expense. - **date** (string) - The date the expense was incurred. - **amount** (number) - The amount of the expense. - **description** (string) - A description of the expense. - **matter_id** (integer) - The ID of the matter associated with the expense. - **user_id** (integer) - The ID of the user who incurred the expense. #### Response Example ```json { "id": 101, "date": "2023-10-26", "amount": 80.00, "description": "Updated travel expenses", "matter_id": 123, "user_id": 456 } ``` ## DELETE /expense/{id} ### Description Deletes a specific expense by its ID. ### Method DELETE ### Endpoint /expense/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the expense to delete. ### Response #### Success Response (204) No content is returned upon successful deletion. ``` -------------------------------- ### Matter Management Source: https://docs.lawmatics.com/ Endpoints for managing matters (prospects), including creation and association with companies. ```APIDOC ## POST /matters ### Description Creates a new matter (prospect). Can be associated with an existing company by ID or created/found by company name. ### Method POST ### Endpoint /matters ### Parameters #### Request Body - **name** (string) - Required - The name of the matter. - **company_id** (integer) - Optional - The ID of the company this matter belongs to. - **company_name** (string) - Optional - The name of the company to associate with this matter. If the company does not exist, it will be created. - **contact_info** (object) - Optional - Contact information for the primary contact of the matter. - **email** (string) - Optional - Email address. - **phone** (string) - Optional - Phone number. - **first_name** (string) - Optional - First name. - **last_name** (string) - Optional - Last name. ### Request Example ```json { "name": "New Client Matter", "company_name": "Global Corp", "contact_info": { "email": "john.doe@globalcorp.com", "phone": "111-222-3333", "first_name": "John", "last_name": "Doe" } } ``` ### Response #### Success Response (201) - **id** (integer) - The unique identifier for the created matter. - **name** (string) - The name of the matter. - **company_id** (integer) - The ID of the associated company. - **primary_contact_id** (integer) - The ID of the primary contact for this matter. #### Response Example ```json { "id": 301, "name": "New Client Matter", "company_id": 204, "primary_contact_id": 501 } ``` ``` -------------------------------- ### Matter Sub Status Management Source: https://docs.lawmatics.com/ Endpoints for creating, retrieving, updating, and deleting matter sub statuses. ```APIDOC ## POST /matter-sub-status ### Description Creates a new matter sub status. ### Method POST ### Endpoint /matter-sub-status ### Parameters #### Request Body - **name** (string) - Required - The name of the sub status. - **matter_status_id** (integer) - Required - The ID of the parent matter status. ### Request Example ```json { "name": "Initial Consultation Scheduled", "matter_status_id": 10 } ``` ### Response #### Success Response (201) - **id** (integer) - The unique identifier for the created matter sub status. - **name** (string) - The name of the sub status. - **matter_status_id** (integer) - The ID of the parent matter status. #### Response Example ```json { "id": 401, "name": "Initial Consultation Scheduled", "matter_status_id": 10 } ``` ## PUT /matter-sub-status/{id} ### Description Updates an existing matter sub status. ### Method PUT ### Endpoint /matter-sub-status/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the matter sub status to update. #### Request Body - **name** (string) - Optional - The updated name of the sub status. - **matter_status_id** (integer) - Optional - The updated ID of the parent matter status. ### Request Example ```json { "name": "Consultation Completed" } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the updated matter sub status. - **name** (string) - The name of the sub status. - **matter_status_id** (integer) - The ID of the parent matter status. #### Response Example ```json { "id": 401, "name": "Consultation Completed", "matter_status_id": 10 } ``` ## DELETE /matter-sub-status/{id} ### Description Deletes a specific matter sub status by its ID. ### Method DELETE ### Endpoint /matter-sub-status/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the matter sub status to delete. ### Response #### Success Response (204) No content is returned upon successful deletion. ``` -------------------------------- ### Time Entry Management Source: https://docs.lawmatics.com/ Endpoints for creating, retrieving, updating, and deleting time entries. ```APIDOC ## POST /time-entry ### Description Creates a new time entry. ### Method POST ### Endpoint /time-entry ### Parameters #### Request Body - **start_time** (string) - Required - The start time of the entry. - **end_time** (string) - Required - The end time of the entry. - **matter_id** (integer) - Required - The ID of the matter associated with the time entry. - **user_id** (integer) - Required - The ID of the user who performed the work. - **description** (string) - Optional - A description of the work performed. ### Request Example ```json { "start_time": "2023-10-27T09:00:00Z", "end_time": "2023-10-27T10:30:00Z", "matter_id": 123, "user_id": 456, "description": "Consultation with client" } ``` ### Response #### Success Response (201) - **id** (integer) - The unique identifier for the created time entry. - **start_time** (string) - The start time of the entry. - **end_time** (string) - The end time of the entry. - **matter_id** (integer) - The ID of the matter associated with the time entry. - **user_id** (integer) - The ID of the user who performed the work. - **description** (string) - A description of the work performed. #### Response Example ```json { "id": 789, "start_time": "2023-10-27T09:00:00Z", "end_time": "2023-10-27T10:30:00Z", "matter_id": 123, "user_id": 456, "description": "Consultation with client" } ``` ## PUT /time-entry/{id} ### Description Updates an existing time entry. ### Method PUT ### Endpoint /time-entry/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the time entry to update. #### Request Body - **start_time** (string) - Optional - The updated start time of the entry. - **end_time** (string) - Optional - The updated end time of the entry. - **matter_id** (integer) - Optional - The updated matter ID. - **user_id** (integer) - Optional - The updated user ID. - **description** (string) - Optional - The updated description. ### Request Example ```json { "end_time": "2023-10-27T11:00:00Z", "description": "Follow-up call with client" } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the updated time entry. - **start_time** (string) - The start time of the entry. - **end_time** (string) - The end time of the entry. - **matter_id** (integer) - The ID of the matter associated with the time entry. - **user_id** (integer) - The ID of the user who performed the work. - **description** (string) - A description of the work performed. #### Response Example ```json { "id": 789, "start_time": "2023-10-27T09:00:00Z", "end_time": "2023-10-27T11:00:00Z", "matter_id": 123, "user_id": 456, "description": "Follow-up call with client" } ``` ## GET /time-entry/{id} ### Description Retrieves a specific time entry by its ID. ### Method GET ### Endpoint /time-entry/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the time entry to retrieve. ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the time entry. - **start_time** (string) - The start time of the entry. - **end_time** (string) - The end time of the entry. - **matter_id** (integer) - The ID of the matter associated with the time entry. - **user_id** (integer) - The ID of the user who performed the work. - **description** (string) - A description of the work performed. #### Response Example ```json { "id": 789, "start_time": "2023-10-27T09:00:00Z", "end_time": "2023-10-27T10:30:00Z", "matter_id": 123, "user_id": 456, "description": "Consultation with client" } ``` ## GET /time-entries ### Description Retrieves a list of time entries, with optional filtering. ### Method GET ### Endpoint /time-entries ### Parameters #### Query Parameters - **matter_id** (integer) - Optional - Filter by matter ID. - **user_id** (integer) - Optional - Filter by user ID. - **start_date** (string) - Optional - Filter by start date (YYYY-MM-DD). - **end_date** (string) - Optional - Filter by end date (YYYY-MM-DD). ### Response #### Success Response (200) - An array of time entry objects, each containing: - **id** (integer) - The unique identifier for the time entry. - **start_time** (string) - The start time of the entry. - **end_time** (string) - The end time of the entry. - **matter_id** (integer) - The ID of the matter associated with the time entry. - **user_id** (integer) - The ID of the user who performed the work. - **description** (string) - A description of the work performed. #### Response Example ```json [ { "id": 789, "start_time": "2023-10-27T09:00:00Z", "end_time": "2023-10-27T10:30:00Z", "matter_id": 123, "user_id": 456, "description": "Consultation with client" }, { "id": 790, "start_time": "2023-10-26T14:00:00Z", "end_time": "2023-10-26T15:00:00Z", "matter_id": 124, "user_id": 457, "description": "Document review" } ] ``` ## DELETE /time-entry/{id} ### Description Deletes a specific time entry by its ID. ### Method DELETE ### Endpoint /time-entry/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the time entry to delete. ### Response #### Success Response (204) No content is returned upon successful deletion. ``` -------------------------------- ### Company Finder Endpoints Source: https://docs.lawmatics.com/ Endpoints for finding companies based on various criteria. ```APIDOC ## GET /find-company-by-name ### Description Finds companies by their name. ### Method GET ### Endpoint /find-company-by-name ### Parameters #### Query Parameters - **name** (string) - Required - The name of the company to search for. ### Response #### Success Response (200) - An array of company objects matching the provided name. #### Response Example ```json [ { "id": 201, "name": "Acme Corporation", "email": "info@acme.com" }, { "id": 202, "name": "Acme Ltd.", "email": "contact@acmeltd.com" } ] ``` ## GET /find-company-by-email ### Description Finds companies by their email address. ### Method GET ### Endpoint /find-company-by-email ### Parameters #### Query Parameters - **email** (string) - Required - The email address to search for. ### Response #### Success Response (200) - An array of company objects matching the provided email address. #### Response Example ```json [ { "id": 201, "name": "Acme Corporation", "email": "info@acme.com" } ] ``` ## GET /find-company-by-phone ### Description Finds companies by their phone number. ### Method GET ### Endpoint /find-company-by-phone ### Parameters #### Query Parameters - **phone** (string) - Required - The phone number to search for. ### Response #### Success Response (200) - An array of company objects matching the provided phone number. #### Response Example ```json [ { "id": 201, "name": "Acme Corporation", "phone": "123-456-7890" } ] ``` ``` -------------------------------- ### Custom Contact Type Management Source: https://docs.lawmatics.com/ Endpoints for creating, retrieving, updating, and deleting custom contact types. ```APIDOC ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.