Skip to main content
GET
/
regions
/
{region_id}
Go (SDK)
package main

import(
	"context"
	"os"
	latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
	"log"
)

func main() {
    ctx := context.Background()

    s := latitudeshgosdk.New(
        latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
    )

    res, err := s.Regions.Fetch(ctx, "reg_GMy1DbYLqN50m")
    if err != nil {
        log.Fatal(err)
    }
    if res.Region != nil {
        // handle response
    }
}
{
  "data": {
    "id": "loc_WVQJDMQlDRbyE",
    "type": "regions",
    "attributes": {
      "name": "MacGyver-Tremblay",
      "slug": "macgyver-tremblay",
      "facility": "MacGyver-Tremblay",
      "country": {
        "name": "Breitenberg, Kirlin and Doyle",
        "slug": "breitenberg,-kirlin-and-doyle"
      },
      "type": "core"
    }
  },
  "meta": {}
}

Authorizations

Authorization
string
header
required

Path Parameters

region_id
string
required

The region region_ID

Response

200 - application/vnd.api+json

Success

data
object