Retrieving companies
Edit on GitHubThis endpoint allows retrieving information about companies.
Installation
For detailed information on the modules that provide the API functionality and related installation instructions, see Glue API: Company Account Feature Integration.
Retrieve a company
To retrieve information about a company, send the request:
GET
/companies/{{company_id}}
PATH PARAMETER | DESCRIPTION |
---|---|
{{company_id}} | Unique identifier of a company to retrieve information about. Enter mine to retrieve information about the company of the currently authenticated company user. |
Request
HEADER KEY | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
Authorization | string | ✓ | String containing digits, letters, and symbols that authorize the company user. Authenticate as a company user to get the value. |
REQUEST | USAGE |
---|---|
GET https://glue.mysprykershop.com/companies/59b6c025-cc00-54ca-b101-191391adf2af | Retrieve information about the company with id 59b6c025-cc00-54ca-b101-191391adf2af . |
GET https://glue.mysprykershop.com/companies/mine | Retrieve information about the company of the currently authenticated company user. |
Response
Response sample: retrieve information about the companies of the currently authenticated company user
{
"data": [
{
"type": "companies",
"id": "88efe8fb-98bd-5423-a041-a8f866c0f913",
"attributes": {
"isActive": true,
"name": "BoB-Hotel Mitte",
"status": "approved"
},
"links": {
"self": "https://glue.mysprykershop.com/companies/88efe8fb-98bd-5423-a041-a8f866c0f913"
}
}
],
"links": {
"self": "https://glue.mysprykershop.com/companies/mine"
}
}
ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|
name | String | Company name. |
isActive | Boolean | Defines if the company is active. |
status | String | Company status. Possible values are: Pending , Approved , or Denied . |
Possible errors
CODE | REASON |
---|---|
001 | Authentication token is invalid. |
002 | Authentication token is missing. |
1801 | Specified company is not found, or the current authenticated company user does not have access to it. |
1803 | Current company account is not set. Select the current company user with /company-user-access-tokens to access the resource collection. |
To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.
Next steps
Thank you!
For submitting the form