Create a bing geocoder

How to create a bing geocoder via API

To create a new bing geocoder, send a POST request to the /api/bing_geocoders endpoint, passing the resource arguments in the request body.

Request

POST https://yourdomain.commercelayer.io/api/bing_geocoders

Arguments

Body ParameterTypeRequired

type

string

Required

attributes.name

string

Required

attributes.reference

string

Optional

attributes.reference_origin

string

Optional

attributes.metadata

object

Optional

attributes.key

string

Required

Example

The following request creates a new bing geocoder:

curl -g -X POST \
  'https://yourdomain.commercelayer.io/api/bing_geocoders' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token' \
  -H 'Content-Type: application/vnd.api+json' \
  -d '{
  "data": {
    "type": "bing_geocoders",
    "attributes": {
      "name": "Default geocoder",
      "key": "xxxx-yyyy-zzzz"
    }
  }
}'

Last updated