# `client.ResolvePlace()`

Resolve Place

Returns the full place for a place ID taken from a `/places` suggestion.

On top of the fields carried by the suggestion, the response adds coordinates, language and the underlying dataset record.

Each request decrements your lookup balance. An unknown ID returns `404`.

## Endpoint

`GET /places/{place}`

See the [API reference](/docs/api/resolve-place.md) for this endpoint.

## Signature

```go
func (c *Client) ResolvePlace(ctx context.Context, place string, params *ResolvePlaceParams) (*ResolvePlaceResponse, error)
```

## Arguments

| Name     | Type                  | Required | Description                                                                            |
| -------- | --------------------- | -------- | -------------------------------------------------------------------------------------- |
| `ctx`    | `context.Context`     | yes      | Cancels the request and sets its deadline.                                             |
| `place`  | `string`              | yes      | ID of place suggestion                                                                 |
| `params` | `*ResolvePlaceParams` | no       | Optional query parameters, or nil. Fields under [Query Parameters](#query-parameters). |

## Query Parameters

A required parameter is a method argument. Set the rest as fields of `params`, named in Studly case (`post_town` is `PostTown`); a field left at its zero value is not sent.

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `tags` | `string` | no       | Tags        |

## Response

`*idealpostcodes.ResolvePlaceResponse`. Fields the API may leave out or send as null are pointers. `RawJSON()` returns the body as received. See [responses](/docs/sdks/go/responses.md).

## Errors

An HTTP error returns `*idealpostcodes.APIError` with the HTTP status, the API error code and the body; match it with `errors.AsType`. A transport failure returns the `net/http` error, wrapped. See [error handling](/docs/sdks/go/errors.md).

## Example

resolve-place/main.gogo

```go
package main

import (
	"context"
	"fmt"
	"log"

	idealpostcodes "go.ideal-postcodes.co.uk/sdk"
)

func main() {
	client := idealpostcodes.NewClient("ak_test")
	res, err := client.ResolvePlace(context.Background(), "geonames_7296662", nil)
	if err != nil {
		log.Fatal(err)
	}
	place := res.Result
	fmt.Printf("%s (%s)\n", place.DescriptiveName, place.CountryISO)
	fmt.Printf("%s, %s\n", place.Latitude, place.Longitude)
}
```
