---
agentTools:
  projectIndex: https://developer-docs.gomotive.com/llms.txt
---

# Fetch a specific group using its ID

**Purpose**: Use this API to find a specific group using its ID. You must specify the ID as a path parameter. Ensure that you are entering the exact ID for the endpoint to fetch the info of the group.

```ruby Ruby (OAuth 2.0)
require 'uri'
require 'net/http'

url = URI('https://api.gomotive.com/v1/groups/3')

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"

response = http.request(request)
puts response.read_body
```

## Response Parameters

### Group

* **Type**: Object
* **Description**: Details of a specific group.

### id

* **Type**: Integer
* **Description**: The unique identifier for the group.

### name

* **Type**: String
* **Description**: The name of the group.

### company\_id

* **Type**: Integer
* **Description**: The unique identifier for the company associated with the group.

***

### user

* **Type**: Object
* **Description**: Details about the user associated with the group.

### id

* **Type**: Integer
* **Description**: The unique identifier for the user.

### first\_name

* **Type**: String
* **Description**: The first name of the user.

### last\_name

* **Type**: String
* **Description**: The last name of the user.

### username

* **Type**: String or null
* **Description**: The username of the user, if available.

### email

* **Type**: String
* **Description**: The email address of the user.

### driver\_company\_id

* **Type**: Integer or null
* **Description**: The unique identifier for the company associated with the driver, if available.

### status

* **Type**: String
* **Description**: The status of the user.

### role

* **Type**: String
* **Description**: The role of the user within the company.

***

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Motive",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.gomotive.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/groups/{id}": {
      "get": {
        "summary": "Fetch a specific group using its ID",
        "description": "",
        "operationId": "fetch-a-specific-group-using-its-id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Specify the ID of the group that you want to fetch.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "X-Time-Zone",
            "in": "header",
            "description": "Specify the timezone for formatting the timestamps.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Metric-Units",
            "in": "header",
            "description": "Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "X-User-Id",
            "in": "header",
            "description": "Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Fetch a group using its ID": {
                    "value": "  {\n  \"group\": {\n    \"id\": 7,\n    \"name\": \"Grocery & Shoes\",\n    \"company_id\": 75,\n    \"user\": {\n      \"id\": 295456,\n      \"first_name\": \"Amory\",\n      \"last_name\": \"Davis\",\n      \"username\": null,\n      \"email\": \"d77d64aa04d1@keeptruckin.com\",\n      \"driver_company_id\": null,\n      \"status\": \"active\",\n      \"role\": \"admin\"\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "group": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 7,
                          "default": 0
                        },
                        "name": {
                          "type": "string",
                          "example": "Grocery & Shoes"
                        },
                        "company_id": {
                          "type": "integer",
                          "example": 75,
                          "default": 0
                        },
                        "user": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 295456,
                              "default": 0
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Amory"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Davis"
                            },
                            "username": {},
                            "email": {
                              "type": "string",
                              "example": "d77d64aa04d1@keeptruckin.com"
                            },
                            "driver_company_id": {},
                            "status": {
                              "type": "string",
                              "example": "active"
                            },
                            "role": {
                              "type": "string",
                              "example": "admin"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid group ID": {
                    "value": "{\n  \"error_message\": \"group not found\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_message": {
                      "type": "string",
                      "example": "group not found"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66acf64a829e88001980fbf2:66d73b571fab510044128e56"
}
```