This endpoint is used to obtain an Access Token using the Client Credentials Grant flow. This flow is typically used for machine-to-machine (M2M) communication where a specific user’s consent is not required, and the client application is acting on its own behalf.

Create site

This endpoint provisions a new Site resource within a specific namespace. It features automatic address standardization and geocoding: the system accepts a raw address string (inputAddress) and transforms it into a structured address object with precise geospatial coordinates.

HTTP request

Method: POST

URL: https://test.api.gtt.services/apis/v1alpha/namespaces/{namespace}/site

Path parameters

ParameterTypeRequiredDescriptionExample
namespaceStringYesThe unique identifier for the tenant or grouping.2135

Headers

HeaderValueDescription
Content-Typeapplication/jsonRequired. Indicates the payload format.
AuthorizationBearer <TOKEN>Required. Standard OAuth 2.0 access token.

Request body

The payload requires standard resource identifiers (kind, version) and a spec object containing the site details.

FieldTypeRequiredDescription
kindStringYesResource type classifier. Must be “site”.
versionStringYesAPI version. Must be “v1alpha”.
namespaceStringYesMust match the namespace provided in the URL path.
nameStringYesUnique user-defined identifier (slug) for this site.
metadataObjectNoContainer for custom tags and labels.
metadata.labelsMapNoKey-value pairs for external tracking (e.g., Project IDs).
specObjectYesThe technical specifications of the site.
spec.inputAddressStringYesRaw Address. A single string representing the physical location. The API will parse this to generate structured data.
spec.friendlyStringYesA human-readable display name for the site.

Response body

The API returns the created resource with additional system-generated fields.

Note: The inputAddress is removed and replaced by a structured address object and geoLocation data.

FieldTypeDescription
metadata.dateCreatedLongTimestamp of creation (Unix Epoch).
metadata.geoLocationObjectEnrichment. Geospatial data derived from the input address.
metadata.geoLocation.coordinatesArray[Longitude, Latitude] pair.
metadata.geoLocation.plusCodeStringThe Google Open Location Code (Plus Code) for the site.
spec.addressObjectEnrichment. The parsed, structured version of the inputAddress.
spec.address.line1StringStreet address line 1.
spec.address.cityStringCity name.
spec.address.stateStringState or province code.
spec.address.zipcodeStringPostal code.
spec.address.latitudeFloatPrecise latitude of the address.
spec.address.longitudeFloatPrecise longitude of the address.

Example

Request

The user sends a raw address string (2015 2nd ave...).

{
    "kind": "site",
    "version": "v1alpha",
    "namespace": "2135",
    "name": "intl-test-001",
    "metadata": {
        "labels": {
            "project": "MR-PROJ-1000-A"
        }
    },
    "spec": {
        "inputAddress" : "2015 2nd ave seattle wa 98121",
        "friendly": "Seattle Branch"
    }
}

Response

The system validates the address and returns the structured data.

{
    "kind": "site",
    "version": "v1alpha",
    "namespace": "2135",
    "name": "intl-test-001",
    "metadata": {
        "dateCreated": 1764966214549,
        "dateUpdated": 1764966215838,
        "labels": {
            "project-id": "MR-PROJ-1000-A"
        },
        "geoLocation": {
            "type": "Point",
            "coordinates": [ -122.3424101, 47.6117607 ],
            "plusCode": "84VVJM65+P24"
        }
    },
    "spec": {
        "address": {
            "line1": "2015 2nd Ave",
            "line2": null,
            "city": "Seattle",
            "state": "WA",
            "zipcode": "98121",
            "country": "USA",
            "latitude": 47.61176,
            "longitude": -122.34241,
            "streetNumber": "2015",
            "routeShort": "2nd Ave"
        },
        "friendly": "Seattle Branch"
    }
}

Get site details

Retrieves the configuration, metadata, and geospatial data for a specific site.

HTTP request

GET https://test.api.gtt.services/apis/v1alpha/namespaces/{namespaceId}/site/{name}

Path parameters

ParameterTypeRequiredDescription
namespaceIdstringYesThe unique identifier for the customer or organizational namespace (e.g., 2135).
namestringYesThe name or ID of the specific site to retrieve (e.g., intl-test-001).

Headers

HeaderValueRequiredDescription
AuthorizationBearer <TOKEN>YesValid OAuth2 bearer token.

Response schema

The response returns a Site object containing the resource’s identity, metadata, and specification.

Top-level attributes

  • kind (string): The resource type (always site).
  • version (string): The API version (e.g., v1alpha).
  • namespace (string): The namespace ID linked to this site.
  • name (string): The unique name of the site.

Metadata (metadata)

This object contains system-generated timestamps and user-defined identifiers.

  • **dateCreated / dateUpdated** (long): Epoch timestamps representing the site lifecycle.
  • labels (object): Dictionary of key-value pairs used for internal tracking (e.g., projectatt-id).
  • geoLocation (object):
  • type: Geometry type (typically Point).
  • coordinates: An array containing [longitude, latitude].
  • plusCode: The Google Plus Code for high-accuracy location sharing.

Specification (spec)

Defines the physical and operational characteristics of the site.

Address Object

FieldDescription
line1Primary street address.
city / state / zipcodeStandard US address components.
countryISO 3166-1 alpha-3 country code (e.g., USA).
streetNumberExtracted building number.
routeLong / routeShortFull and abbreviated street names (e.g., “2nd Avenue” vs “2nd Ave”).
uk* fieldsRegional fields specific to UK addresses (e.g., ukExchangeCode). These are null for non-UK sites.

Quotes Object (quotes)

An optional collection of quote references associated with this site.

  • offers (array): A list of objects containing kindversionnamespace, and name pointing to specific quote resources.

Example response

{
    "kind": "site",
    "version": "v1alpha",
    "namespace": "2135",
    "name": "intl-test-001",
    "metadata": {
        "dateCreated": 1764966214549,
        "dateUpdated": 1764966215838,
        "labels": {
            "att-id": "EXT-123456",
            "project": "MR-PROJ-1000-A"
        },
        "geoLocation": {
            "type": "Point",
            "coordinates": [-122.3424101, 47.6117607],
            "plusCode": "84VVJM65+P24"
        }
    },
    "spec": {
        "address": {
            "line1": "2015 2nd Ave",
            "city": "Seattle",
            "state": "WA",
            "zipcode": "98121",
            "country": "USA",
            "latitude": 47.61176,
            "longitude": -122.34241,
            "streetNumber": "2015",
            "routeLong": "2nd Avenue",
            "routeShort": "2nd Ave"
        },
        "friendly": "Seattle Branch",
        "quotes": {
            "offers": [
                {
                    "kind": "quote",
                    "version": "v1alpha",
                    "namespace": "2135",
                    "name": "intl-test-001"
                }
            ]
        }
    }
}