Retrieving companies

Edit on GitHub
You are browsing a previous version of the document. The latest version is 202212.0.

This 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
{
    "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. You need to select the current company user with /company-user-access-tokens in order to access the resource collection.

To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.

Next steps