Add a geographic area to a market
Areas compose a market. Supply the type field and the matching fields: postalCodes (postal), admin* fields (admin), geometry (polygon), h3Cells (h3), or sourceRef (serviceability — must name an active serviceability integration source owned by your team). Use operation=exclude to carve a hole out of the market.
curl --request POST \
--url https://api.offergrid.io/provider/markets/{id}/areas \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"operation": "include",
"label": "<string>",
"postalCodes": [
"78701",
"78702"
],
"postalCountry": "US",
"adminCountry": "US",
"adminState": "TX",
"adminCounty": "Travis",
"adminCity": "Austin",
"adminGeoid": "<string>",
"geometry": {},
"h3Cells": [
"<string>"
],
"h3Resolution": 8,
"utilityCodes": [
"1039940674000"
],
"utilityCountry": "US",
"sourceRef": "<string>",
"gating": false
}
'import requests
url = "https://api.offergrid.io/provider/markets/{id}/areas"
payload = {
"operation": "include",
"label": "<string>",
"postalCodes": ["78701", "78702"],
"postalCountry": "US",
"adminCountry": "US",
"adminState": "TX",
"adminCounty": "Travis",
"adminCity": "Austin",
"adminGeoid": "<string>",
"geometry": {},
"h3Cells": ["<string>"],
"h3Resolution": 8,
"utilityCodes": ["1039940674000"],
"utilityCountry": "US",
"sourceRef": "<string>",
"gating": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operation: 'include',
label: '<string>',
postalCodes: ['78701', '78702'],
postalCountry: 'US',
adminCountry: 'US',
adminState: 'TX',
adminCounty: 'Travis',
adminCity: 'Austin',
adminGeoid: '<string>',
geometry: {},
h3Cells: ['<string>'],
h3Resolution: 8,
utilityCodes: ['1039940674000'],
utilityCountry: 'US',
sourceRef: '<string>',
gating: false
})
};
fetch('https://api.offergrid.io/provider/markets/{id}/areas', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.offergrid.io/provider/markets/{id}/areas",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'operation' => 'include',
'label' => '<string>',
'postalCodes' => [
'78701',
'78702'
],
'postalCountry' => 'US',
'adminCountry' => 'US',
'adminState' => 'TX',
'adminCounty' => 'Travis',
'adminCity' => 'Austin',
'adminGeoid' => '<string>',
'geometry' => [
],
'h3Cells' => [
'<string>'
],
'h3Resolution' => 8,
'utilityCodes' => [
'1039940674000'
],
'utilityCountry' => 'US',
'sourceRef' => '<string>',
'gating' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.offergrid.io/provider/markets/{id}/areas"
payload := strings.NewReader("{\n \"operation\": \"include\",\n \"label\": \"<string>\",\n \"postalCodes\": [\n \"78701\",\n \"78702\"\n ],\n \"postalCountry\": \"US\",\n \"adminCountry\": \"US\",\n \"adminState\": \"TX\",\n \"adminCounty\": \"Travis\",\n \"adminCity\": \"Austin\",\n \"adminGeoid\": \"<string>\",\n \"geometry\": {},\n \"h3Cells\": [\n \"<string>\"\n ],\n \"h3Resolution\": 8,\n \"utilityCodes\": [\n \"1039940674000\"\n ],\n \"utilityCountry\": \"US\",\n \"sourceRef\": \"<string>\",\n \"gating\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.offergrid.io/provider/markets/{id}/areas")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"operation\": \"include\",\n \"label\": \"<string>\",\n \"postalCodes\": [\n \"78701\",\n \"78702\"\n ],\n \"postalCountry\": \"US\",\n \"adminCountry\": \"US\",\n \"adminState\": \"TX\",\n \"adminCounty\": \"Travis\",\n \"adminCity\": \"Austin\",\n \"adminGeoid\": \"<string>\",\n \"geometry\": {},\n \"h3Cells\": [\n \"<string>\"\n ],\n \"h3Resolution\": 8,\n \"utilityCodes\": [\n \"1039940674000\"\n ],\n \"utilityCountry\": \"US\",\n \"sourceRef\": \"<string>\",\n \"gating\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offergrid.io/provider/markets/{id}/areas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"operation\": \"include\",\n \"label\": \"<string>\",\n \"postalCodes\": [\n \"78701\",\n \"78702\"\n ],\n \"postalCountry\": \"US\",\n \"adminCountry\": \"US\",\n \"adminState\": \"TX\",\n \"adminCounty\": \"Travis\",\n \"adminCity\": \"Austin\",\n \"adminGeoid\": \"<string>\",\n \"geometry\": {},\n \"h3Cells\": [\n \"<string>\"\n ],\n \"h3Resolution\": 8,\n \"utilityCodes\": [\n \"1039940674000\"\n ],\n \"utilityCountry\": \"US\",\n \"sourceRef\": \"<string>\",\n \"gating\": false\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Team API key for authentication. Your team role (provider/reseller/hybrid) determines which endpoints you can access.
Path Parameters
Body
postal, admin, polygon, h3, utility_territory, serviceability include, exclude Optional display label (e.g. "Travis County", "78704 cluster").
["78701", "78702"]
"US"
state, county, city, census_place "US"
"TX"
"Travis"
"Austin"
Census GEOID for stable matching.
GeoJSON Polygon or MultiPolygon.
8
TDSP/TDU DUNS codes, e.g. Oncor "1039940674000".
["1039940674000"]
"US"
fabric_upload, external_api The IntegrationSource key this area resolves through. Required for serviceability areas, where it must name an active serviceability source owned by your team.
Serviceability areas only. true = the market covers an address only when this source answers on-net; false (default) = the source enriches offer detail but never hides the offer. An unanswerable lookup never gates.
Response
Was this page helpful?
curl --request POST \
--url https://api.offergrid.io/provider/markets/{id}/areas \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"operation": "include",
"label": "<string>",
"postalCodes": [
"78701",
"78702"
],
"postalCountry": "US",
"adminCountry": "US",
"adminState": "TX",
"adminCounty": "Travis",
"adminCity": "Austin",
"adminGeoid": "<string>",
"geometry": {},
"h3Cells": [
"<string>"
],
"h3Resolution": 8,
"utilityCodes": [
"1039940674000"
],
"utilityCountry": "US",
"sourceRef": "<string>",
"gating": false
}
'import requests
url = "https://api.offergrid.io/provider/markets/{id}/areas"
payload = {
"operation": "include",
"label": "<string>",
"postalCodes": ["78701", "78702"],
"postalCountry": "US",
"adminCountry": "US",
"adminState": "TX",
"adminCounty": "Travis",
"adminCity": "Austin",
"adminGeoid": "<string>",
"geometry": {},
"h3Cells": ["<string>"],
"h3Resolution": 8,
"utilityCodes": ["1039940674000"],
"utilityCountry": "US",
"sourceRef": "<string>",
"gating": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operation: 'include',
label: '<string>',
postalCodes: ['78701', '78702'],
postalCountry: 'US',
adminCountry: 'US',
adminState: 'TX',
adminCounty: 'Travis',
adminCity: 'Austin',
adminGeoid: '<string>',
geometry: {},
h3Cells: ['<string>'],
h3Resolution: 8,
utilityCodes: ['1039940674000'],
utilityCountry: 'US',
sourceRef: '<string>',
gating: false
})
};
fetch('https://api.offergrid.io/provider/markets/{id}/areas', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.offergrid.io/provider/markets/{id}/areas",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'operation' => 'include',
'label' => '<string>',
'postalCodes' => [
'78701',
'78702'
],
'postalCountry' => 'US',
'adminCountry' => 'US',
'adminState' => 'TX',
'adminCounty' => 'Travis',
'adminCity' => 'Austin',
'adminGeoid' => '<string>',
'geometry' => [
],
'h3Cells' => [
'<string>'
],
'h3Resolution' => 8,
'utilityCodes' => [
'1039940674000'
],
'utilityCountry' => 'US',
'sourceRef' => '<string>',
'gating' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.offergrid.io/provider/markets/{id}/areas"
payload := strings.NewReader("{\n \"operation\": \"include\",\n \"label\": \"<string>\",\n \"postalCodes\": [\n \"78701\",\n \"78702\"\n ],\n \"postalCountry\": \"US\",\n \"adminCountry\": \"US\",\n \"adminState\": \"TX\",\n \"adminCounty\": \"Travis\",\n \"adminCity\": \"Austin\",\n \"adminGeoid\": \"<string>\",\n \"geometry\": {},\n \"h3Cells\": [\n \"<string>\"\n ],\n \"h3Resolution\": 8,\n \"utilityCodes\": [\n \"1039940674000\"\n ],\n \"utilityCountry\": \"US\",\n \"sourceRef\": \"<string>\",\n \"gating\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.offergrid.io/provider/markets/{id}/areas")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"operation\": \"include\",\n \"label\": \"<string>\",\n \"postalCodes\": [\n \"78701\",\n \"78702\"\n ],\n \"postalCountry\": \"US\",\n \"adminCountry\": \"US\",\n \"adminState\": \"TX\",\n \"adminCounty\": \"Travis\",\n \"adminCity\": \"Austin\",\n \"adminGeoid\": \"<string>\",\n \"geometry\": {},\n \"h3Cells\": [\n \"<string>\"\n ],\n \"h3Resolution\": 8,\n \"utilityCodes\": [\n \"1039940674000\"\n ],\n \"utilityCountry\": \"US\",\n \"sourceRef\": \"<string>\",\n \"gating\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offergrid.io/provider/markets/{id}/areas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"operation\": \"include\",\n \"label\": \"<string>\",\n \"postalCodes\": [\n \"78701\",\n \"78702\"\n ],\n \"postalCountry\": \"US\",\n \"adminCountry\": \"US\",\n \"adminState\": \"TX\",\n \"adminCounty\": \"Travis\",\n \"adminCity\": \"Austin\",\n \"adminGeoid\": \"<string>\",\n \"geometry\": {},\n \"h3Cells\": [\n \"<string>\"\n ],\n \"h3Resolution\": 8,\n \"utilityCodes\": [\n \"1039940674000\"\n ],\n \"utilityCountry\": \"US\",\n \"sourceRef\": \"<string>\",\n \"gating\": false\n}"
response = http.request(request)
puts response.read_body