Create a new offer
Create a new service offering as a provider. The offer will be associated with your team.
curl --request POST \
--url https://api.offergrid.io/provider/offers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "High-Speed Internet 1000 Mbps",
"internalName": "HSI-1000-Q4-2024",
"category": "internet",
"status": "draft",
"sku": "INT-1000-001",
"externalId": "ext-12345",
"externalProductKey": "FIBER-500",
"metadata": {
"tags": [
"fiber",
"residential"
],
"priority": 1
},
"description": "Blazing fast fiber internet with unlimited data",
"internalDescription": "Q4 promotional offer for new markets",
"marketingHeadline": "Get Lightning-Fast Internet Today!",
"marketingDescription": "Experience the future of connectivity with our fiber-optic network",
"keyFeatures": [
"1000 Mbps download",
"Unlimited data",
"No contract"
],
"imageUrl": "https://cdn.example.com/offers/internet-1000.jpg",
"overview": "This package includes installation, router, and 24/7 support",
"brandId": "a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77",
"brandName": "Direct Energy",
"brandImageUrl": "https://logo.clearbit.com/directenergy.com",
"submissionUrl": "https://provider.example.com/api/orders",
"submissionConfig": {
"formFields": [
{
"name": "address",
"type": "text",
"required": true
},
{
"name": "phone",
"type": "tel",
"required": true
}
],
"metadata": []
},
"electricity": {
"rate": {
"charges": [
{
"type": "perKwh",
"centsPerKwh": 1,
"label": "<string>",
"minUsageKwh": 1,
"maxUsageKwh": 1
}
],
"avgPriceAt1000Kwh": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"plan": {
"renewablePercentage": 50,
"freeNightsWeekends": true,
"noDeposit": true
},
"disclosures": {
"electricityFactsLabel": {
"url": "<string>",
"versionId": "<string>",
"avgPrice500kwh": 1,
"avgPrice1000kwh": 1,
"avgPrice2000kwh": 1,
"renewablePercent": 50
},
"puctCertNumber": "<string>",
"puctCertifiedName": "<string>",
"termsOfServiceUrl": "<string>",
"yourRightsUrl": "<string>"
}
},
"internet": {
"speed": {
"minBandwidthMbps": 1,
"maxBandwidthMbps": 1
},
"data": {
"capGb": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"disclosures": {
"broadbandLabel": {
"url": "<string>",
"typicalDownload": 1,
"typicalUpload": 1,
"typicalLatency": 1,
"dataCapGb": 1
},
"networkManagementUrl": "<string>"
}
},
"pricingType": "fixed",
"monthlyPrice": 59.99,
"marketNames": [
"Texas — Oncor",
"Texas — CenterPoint"
],
"marketIds": [
"b1c8d1e2-..."
]
}
'import requests
url = "https://api.offergrid.io/provider/offers"
payload = {
"name": "High-Speed Internet 1000 Mbps",
"internalName": "HSI-1000-Q4-2024",
"category": "internet",
"status": "draft",
"sku": "INT-1000-001",
"externalId": "ext-12345",
"externalProductKey": "FIBER-500",
"metadata": {
"tags": ["fiber", "residential"],
"priority": 1
},
"description": "Blazing fast fiber internet with unlimited data",
"internalDescription": "Q4 promotional offer for new markets",
"marketingHeadline": "Get Lightning-Fast Internet Today!",
"marketingDescription": "Experience the future of connectivity with our fiber-optic network",
"keyFeatures": ["1000 Mbps download", "Unlimited data", "No contract"],
"imageUrl": "https://cdn.example.com/offers/internet-1000.jpg",
"overview": "This package includes installation, router, and 24/7 support",
"brandId": "a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77",
"brandName": "Direct Energy",
"brandImageUrl": "https://logo.clearbit.com/directenergy.com",
"submissionUrl": "https://provider.example.com/api/orders",
"submissionConfig": {
"formFields": [
{
"name": "address",
"type": "text",
"required": True
},
{
"name": "phone",
"type": "tel",
"required": True
}
],
"metadata": []
},
"electricity": {
"rate": {
"charges": [
{
"type": "perKwh",
"centsPerKwh": 1,
"label": "<string>",
"minUsageKwh": 1,
"maxUsageKwh": 1
}
],
"avgPriceAt1000Kwh": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"plan": {
"renewablePercentage": 50,
"freeNightsWeekends": True,
"noDeposit": True
},
"disclosures": {
"electricityFactsLabel": {
"url": "<string>",
"versionId": "<string>",
"avgPrice500kwh": 1,
"avgPrice1000kwh": 1,
"avgPrice2000kwh": 1,
"renewablePercent": 50
},
"puctCertNumber": "<string>",
"puctCertifiedName": "<string>",
"termsOfServiceUrl": "<string>",
"yourRightsUrl": "<string>"
}
},
"internet": {
"speed": {
"minBandwidthMbps": 1,
"maxBandwidthMbps": 1
},
"data": { "capGb": 1 },
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"disclosures": {
"broadbandLabel": {
"url": "<string>",
"typicalDownload": 1,
"typicalUpload": 1,
"typicalLatency": 1,
"dataCapGb": 1
},
"networkManagementUrl": "<string>"
}
},
"pricingType": "fixed",
"monthlyPrice": 59.99,
"marketNames": ["Texas — Oncor", "Texas — CenterPoint"],
"marketIds": ["b1c8d1e2-..."]
}
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({
name: 'High-Speed Internet 1000 Mbps',
internalName: 'HSI-1000-Q4-2024',
category: 'internet',
status: 'draft',
sku: 'INT-1000-001',
externalId: 'ext-12345',
externalProductKey: 'FIBER-500',
metadata: {tags: ['fiber', 'residential'], priority: 1},
description: 'Blazing fast fiber internet with unlimited data',
internalDescription: 'Q4 promotional offer for new markets',
marketingHeadline: 'Get Lightning-Fast Internet Today!',
marketingDescription: 'Experience the future of connectivity with our fiber-optic network',
keyFeatures: ['1000 Mbps download', 'Unlimited data', 'No contract'],
imageUrl: 'https://cdn.example.com/offers/internet-1000.jpg',
overview: 'This package includes installation, router, and 24/7 support',
brandId: 'a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77',
brandName: 'Direct Energy',
brandImageUrl: 'https://logo.clearbit.com/directenergy.com',
submissionUrl: 'https://provider.example.com/api/orders',
submissionConfig: {
formFields: [
{name: 'address', type: 'text', required: true},
{name: 'phone', type: 'tel', required: true}
],
metadata: []
},
electricity: {
rate: {
charges: [
{
type: 'perKwh',
centsPerKwh: 1,
label: '<string>',
minUsageKwh: 1,
maxUsageKwh: 1
}
],
avgPriceAt1000Kwh: 1
},
term: {earlyTerminationFee: 1, earlyTerminationFeeNotes: '<string>'},
plan: {renewablePercentage: 50, freeNightsWeekends: true, noDeposit: true},
disclosures: {
electricityFactsLabel: {
url: '<string>',
versionId: '<string>',
avgPrice500kwh: 1,
avgPrice1000kwh: 1,
avgPrice2000kwh: 1,
renewablePercent: 50
},
puctCertNumber: '<string>',
puctCertifiedName: '<string>',
termsOfServiceUrl: '<string>',
yourRightsUrl: '<string>'
}
},
internet: {
speed: {minBandwidthMbps: 1, maxBandwidthMbps: 1},
data: {capGb: 1},
term: {earlyTerminationFee: 1, earlyTerminationFeeNotes: '<string>'},
disclosures: {
broadbandLabel: {
url: '<string>',
typicalDownload: 1,
typicalUpload: 1,
typicalLatency: 1,
dataCapGb: 1
},
networkManagementUrl: '<string>'
}
},
pricingType: 'fixed',
monthlyPrice: 59.99,
marketNames: ['Texas — Oncor', 'Texas — CenterPoint'],
marketIds: ['b1c8d1e2-...']
})
};
fetch('https://api.offergrid.io/provider/offers', 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/offers",
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([
'name' => 'High-Speed Internet 1000 Mbps',
'internalName' => 'HSI-1000-Q4-2024',
'category' => 'internet',
'status' => 'draft',
'sku' => 'INT-1000-001',
'externalId' => 'ext-12345',
'externalProductKey' => 'FIBER-500',
'metadata' => [
'tags' => [
'fiber',
'residential'
],
'priority' => 1
],
'description' => 'Blazing fast fiber internet with unlimited data',
'internalDescription' => 'Q4 promotional offer for new markets',
'marketingHeadline' => 'Get Lightning-Fast Internet Today!',
'marketingDescription' => 'Experience the future of connectivity with our fiber-optic network',
'keyFeatures' => [
'1000 Mbps download',
'Unlimited data',
'No contract'
],
'imageUrl' => 'https://cdn.example.com/offers/internet-1000.jpg',
'overview' => 'This package includes installation, router, and 24/7 support',
'brandId' => 'a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77',
'brandName' => 'Direct Energy',
'brandImageUrl' => 'https://logo.clearbit.com/directenergy.com',
'submissionUrl' => 'https://provider.example.com/api/orders',
'submissionConfig' => [
'formFields' => [
[
'name' => 'address',
'type' => 'text',
'required' => true
],
[
'name' => 'phone',
'type' => 'tel',
'required' => true
]
],
'metadata' => [
]
],
'electricity' => [
'rate' => [
'charges' => [
[
'type' => 'perKwh',
'centsPerKwh' => 1,
'label' => '<string>',
'minUsageKwh' => 1,
'maxUsageKwh' => 1
]
],
'avgPriceAt1000Kwh' => 1
],
'term' => [
'earlyTerminationFee' => 1,
'earlyTerminationFeeNotes' => '<string>'
],
'plan' => [
'renewablePercentage' => 50,
'freeNightsWeekends' => true,
'noDeposit' => true
],
'disclosures' => [
'electricityFactsLabel' => [
'url' => '<string>',
'versionId' => '<string>',
'avgPrice500kwh' => 1,
'avgPrice1000kwh' => 1,
'avgPrice2000kwh' => 1,
'renewablePercent' => 50
],
'puctCertNumber' => '<string>',
'puctCertifiedName' => '<string>',
'termsOfServiceUrl' => '<string>',
'yourRightsUrl' => '<string>'
]
],
'internet' => [
'speed' => [
'minBandwidthMbps' => 1,
'maxBandwidthMbps' => 1
],
'data' => [
'capGb' => 1
],
'term' => [
'earlyTerminationFee' => 1,
'earlyTerminationFeeNotes' => '<string>'
],
'disclosures' => [
'broadbandLabel' => [
'url' => '<string>',
'typicalDownload' => 1,
'typicalUpload' => 1,
'typicalLatency' => 1,
'dataCapGb' => 1
],
'networkManagementUrl' => '<string>'
]
],
'pricingType' => 'fixed',
'monthlyPrice' => 59.99,
'marketNames' => [
'Texas — Oncor',
'Texas — CenterPoint'
],
'marketIds' => [
'b1c8d1e2-...'
]
]),
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/offers"
payload := strings.NewReader("{\n \"name\": \"High-Speed Internet 1000 Mbps\",\n \"internalName\": \"HSI-1000-Q4-2024\",\n \"category\": \"internet\",\n \"status\": \"draft\",\n \"sku\": \"INT-1000-001\",\n \"externalId\": \"ext-12345\",\n \"externalProductKey\": \"FIBER-500\",\n \"metadata\": {\n \"tags\": [\n \"fiber\",\n \"residential\"\n ],\n \"priority\": 1\n },\n \"description\": \"Blazing fast fiber internet with unlimited data\",\n \"internalDescription\": \"Q4 promotional offer for new markets\",\n \"marketingHeadline\": \"Get Lightning-Fast Internet Today!\",\n \"marketingDescription\": \"Experience the future of connectivity with our fiber-optic network\",\n \"keyFeatures\": [\n \"1000 Mbps download\",\n \"Unlimited data\",\n \"No contract\"\n ],\n \"imageUrl\": \"https://cdn.example.com/offers/internet-1000.jpg\",\n \"overview\": \"This package includes installation, router, and 24/7 support\",\n \"brandId\": \"a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77\",\n \"brandName\": \"Direct Energy\",\n \"brandImageUrl\": \"https://logo.clearbit.com/directenergy.com\",\n \"submissionUrl\": \"https://provider.example.com/api/orders\",\n \"submissionConfig\": {\n \"formFields\": [\n {\n \"name\": \"address\",\n \"type\": \"text\",\n \"required\": true\n },\n {\n \"name\": \"phone\",\n \"type\": \"tel\",\n \"required\": true\n }\n ],\n \"metadata\": []\n },\n \"electricity\": {\n \"rate\": {\n \"charges\": [\n {\n \"type\": \"perKwh\",\n \"centsPerKwh\": 1,\n \"label\": \"<string>\",\n \"minUsageKwh\": 1,\n \"maxUsageKwh\": 1\n }\n ],\n \"avgPriceAt1000Kwh\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"plan\": {\n \"renewablePercentage\": 50,\n \"freeNightsWeekends\": true,\n \"noDeposit\": true\n },\n \"disclosures\": {\n \"electricityFactsLabel\": {\n \"url\": \"<string>\",\n \"versionId\": \"<string>\",\n \"avgPrice500kwh\": 1,\n \"avgPrice1000kwh\": 1,\n \"avgPrice2000kwh\": 1,\n \"renewablePercent\": 50\n },\n \"puctCertNumber\": \"<string>\",\n \"puctCertifiedName\": \"<string>\",\n \"termsOfServiceUrl\": \"<string>\",\n \"yourRightsUrl\": \"<string>\"\n }\n },\n \"internet\": {\n \"speed\": {\n \"minBandwidthMbps\": 1,\n \"maxBandwidthMbps\": 1\n },\n \"data\": {\n \"capGb\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"disclosures\": {\n \"broadbandLabel\": {\n \"url\": \"<string>\",\n \"typicalDownload\": 1,\n \"typicalUpload\": 1,\n \"typicalLatency\": 1,\n \"dataCapGb\": 1\n },\n \"networkManagementUrl\": \"<string>\"\n }\n },\n \"pricingType\": \"fixed\",\n \"monthlyPrice\": 59.99,\n \"marketNames\": [\n \"Texas — Oncor\",\n \"Texas — CenterPoint\"\n ],\n \"marketIds\": [\n \"b1c8d1e2-...\"\n ]\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/offers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"High-Speed Internet 1000 Mbps\",\n \"internalName\": \"HSI-1000-Q4-2024\",\n \"category\": \"internet\",\n \"status\": \"draft\",\n \"sku\": \"INT-1000-001\",\n \"externalId\": \"ext-12345\",\n \"externalProductKey\": \"FIBER-500\",\n \"metadata\": {\n \"tags\": [\n \"fiber\",\n \"residential\"\n ],\n \"priority\": 1\n },\n \"description\": \"Blazing fast fiber internet with unlimited data\",\n \"internalDescription\": \"Q4 promotional offer for new markets\",\n \"marketingHeadline\": \"Get Lightning-Fast Internet Today!\",\n \"marketingDescription\": \"Experience the future of connectivity with our fiber-optic network\",\n \"keyFeatures\": [\n \"1000 Mbps download\",\n \"Unlimited data\",\n \"No contract\"\n ],\n \"imageUrl\": \"https://cdn.example.com/offers/internet-1000.jpg\",\n \"overview\": \"This package includes installation, router, and 24/7 support\",\n \"brandId\": \"a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77\",\n \"brandName\": \"Direct Energy\",\n \"brandImageUrl\": \"https://logo.clearbit.com/directenergy.com\",\n \"submissionUrl\": \"https://provider.example.com/api/orders\",\n \"submissionConfig\": {\n \"formFields\": [\n {\n \"name\": \"address\",\n \"type\": \"text\",\n \"required\": true\n },\n {\n \"name\": \"phone\",\n \"type\": \"tel\",\n \"required\": true\n }\n ],\n \"metadata\": []\n },\n \"electricity\": {\n \"rate\": {\n \"charges\": [\n {\n \"type\": \"perKwh\",\n \"centsPerKwh\": 1,\n \"label\": \"<string>\",\n \"minUsageKwh\": 1,\n \"maxUsageKwh\": 1\n }\n ],\n \"avgPriceAt1000Kwh\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"plan\": {\n \"renewablePercentage\": 50,\n \"freeNightsWeekends\": true,\n \"noDeposit\": true\n },\n \"disclosures\": {\n \"electricityFactsLabel\": {\n \"url\": \"<string>\",\n \"versionId\": \"<string>\",\n \"avgPrice500kwh\": 1,\n \"avgPrice1000kwh\": 1,\n \"avgPrice2000kwh\": 1,\n \"renewablePercent\": 50\n },\n \"puctCertNumber\": \"<string>\",\n \"puctCertifiedName\": \"<string>\",\n \"termsOfServiceUrl\": \"<string>\",\n \"yourRightsUrl\": \"<string>\"\n }\n },\n \"internet\": {\n \"speed\": {\n \"minBandwidthMbps\": 1,\n \"maxBandwidthMbps\": 1\n },\n \"data\": {\n \"capGb\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"disclosures\": {\n \"broadbandLabel\": {\n \"url\": \"<string>\",\n \"typicalDownload\": 1,\n \"typicalUpload\": 1,\n \"typicalLatency\": 1,\n \"dataCapGb\": 1\n },\n \"networkManagementUrl\": \"<string>\"\n }\n },\n \"pricingType\": \"fixed\",\n \"monthlyPrice\": 59.99,\n \"marketNames\": [\n \"Texas — Oncor\",\n \"Texas — CenterPoint\"\n ],\n \"marketIds\": [\n \"b1c8d1e2-...\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offergrid.io/provider/offers")
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 \"name\": \"High-Speed Internet 1000 Mbps\",\n \"internalName\": \"HSI-1000-Q4-2024\",\n \"category\": \"internet\",\n \"status\": \"draft\",\n \"sku\": \"INT-1000-001\",\n \"externalId\": \"ext-12345\",\n \"externalProductKey\": \"FIBER-500\",\n \"metadata\": {\n \"tags\": [\n \"fiber\",\n \"residential\"\n ],\n \"priority\": 1\n },\n \"description\": \"Blazing fast fiber internet with unlimited data\",\n \"internalDescription\": \"Q4 promotional offer for new markets\",\n \"marketingHeadline\": \"Get Lightning-Fast Internet Today!\",\n \"marketingDescription\": \"Experience the future of connectivity with our fiber-optic network\",\n \"keyFeatures\": [\n \"1000 Mbps download\",\n \"Unlimited data\",\n \"No contract\"\n ],\n \"imageUrl\": \"https://cdn.example.com/offers/internet-1000.jpg\",\n \"overview\": \"This package includes installation, router, and 24/7 support\",\n \"brandId\": \"a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77\",\n \"brandName\": \"Direct Energy\",\n \"brandImageUrl\": \"https://logo.clearbit.com/directenergy.com\",\n \"submissionUrl\": \"https://provider.example.com/api/orders\",\n \"submissionConfig\": {\n \"formFields\": [\n {\n \"name\": \"address\",\n \"type\": \"text\",\n \"required\": true\n },\n {\n \"name\": \"phone\",\n \"type\": \"tel\",\n \"required\": true\n }\n ],\n \"metadata\": []\n },\n \"electricity\": {\n \"rate\": {\n \"charges\": [\n {\n \"type\": \"perKwh\",\n \"centsPerKwh\": 1,\n \"label\": \"<string>\",\n \"minUsageKwh\": 1,\n \"maxUsageKwh\": 1\n }\n ],\n \"avgPriceAt1000Kwh\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"plan\": {\n \"renewablePercentage\": 50,\n \"freeNightsWeekends\": true,\n \"noDeposit\": true\n },\n \"disclosures\": {\n \"electricityFactsLabel\": {\n \"url\": \"<string>\",\n \"versionId\": \"<string>\",\n \"avgPrice500kwh\": 1,\n \"avgPrice1000kwh\": 1,\n \"avgPrice2000kwh\": 1,\n \"renewablePercent\": 50\n },\n \"puctCertNumber\": \"<string>\",\n \"puctCertifiedName\": \"<string>\",\n \"termsOfServiceUrl\": \"<string>\",\n \"yourRightsUrl\": \"<string>\"\n }\n },\n \"internet\": {\n \"speed\": {\n \"minBandwidthMbps\": 1,\n \"maxBandwidthMbps\": 1\n },\n \"data\": {\n \"capGb\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"disclosures\": {\n \"broadbandLabel\": {\n \"url\": \"<string>\",\n \"typicalDownload\": 1,\n \"typicalUpload\": 1,\n \"typicalLatency\": 1,\n \"dataCapGb\": 1\n },\n \"networkManagementUrl\": \"<string>\"\n }\n },\n \"pricingType\": \"fixed\",\n \"monthlyPrice\": 59.99,\n \"marketNames\": [\n \"Texas — Oncor\",\n \"Texas — CenterPoint\"\n ],\n \"marketIds\": [\n \"b1c8d1e2-...\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"serviceType": "internet",
"electricity": {
"rate": {
"charges": [
{
"type": "perKwh",
"centsPerKwh": 1,
"label": "<string>",
"minUsageKwh": 1,
"maxUsageKwh": 1
}
],
"avgPriceAt1000Kwh": 1,
"estimatedMonthlyAt1000Kwh": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"plan": {
"renewablePercentage": 50,
"freeNightsWeekends": true,
"noDeposit": true
},
"disclosures": {
"electricityFactsLabel": {
"url": "<string>",
"versionId": "<string>",
"avgPrice500kwh": 1,
"avgPrice1000kwh": 1,
"avgPrice2000kwh": 1,
"renewablePercent": 50
},
"puctCertNumber": "<string>",
"puctCertifiedName": "<string>",
"termsOfServiceUrl": "<string>",
"yourRightsUrl": "<string>"
}
},
"internet": {
"speed": {
"minBandwidthMbps": 1,
"maxBandwidthMbps": 1
},
"data": {
"capGb": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"disclosures": {
"broadbandLabel": {
"url": "<string>",
"typicalDownload": 1,
"typicalUpload": 1,
"typicalLatency": 1,
"dataCapGb": 1
},
"networkManagementUrl": "<string>"
}
}
}Authorizations
Team API key for authentication. Your team role (provider/reseller/hybrid) determines which endpoints you can access.
Body
Public-facing name of the offer
"High-Speed Internet 1000 Mbps"
Internal name for tracking (not shown to customers)
"HSI-1000-Q4-2024"
Service category
internet, electricity, other "internet"
Current status of the offer
draft, active, inactive, archived "draft"
Stock Keeping Unit (SKU) - must be unique
"INT-1000-001"
External system identifier
"ext-12345"
Identifier of this offer's product in the provider's serviceability source. When the source returns several products for an address, this selects the one whose price/plan is shown for this offer; offers sharing a market can therefore each surface their own address-level pricing. Leave unset to use the source's default (payload-level) projection.
"FIBER-500"
Custom metadata as JSON object
{ "tags": ["fiber", "residential"], "priority": 1 }
Detailed description of the offer
"Blazing fast fiber internet with unlimited data"
Internal notes and description
"Q4 promotional offer for new markets"
Marketing headline
"Get Lightning-Fast Internet Today!"
Marketing description
"Experience the future of connectivity with our fiber-optic network"
Array of key features
[ "1000 Mbps download", "Unlimited data", "No contract" ]
URL to offer image
"https://cdn.example.com/offers/internet-1000.jpg"
Detailed overview of the offer
"This package includes installation, router, and 24/7 support"
Id of one of your team brands (see /provider/brands) to display the offer under. Takes precedence over brandName. Send null on update to clear the brand and fall back to the provider team identity.
"a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77"
Brand display name. When set, buyer-facing surfaces show this brand's name/logo instead of the owning provider team — used to load offers under another company's identity. If your team has no brand with this name it is created; matching is case/space-insensitive within your team. Falls back to the provider team name when omitted. Ignored when brandId is set.
"Direct Energy"
Brand logo URL. Only used to set the image when the brand is first created (or when an existing brand has no image); it never overwrites an existing brand logo.
"https://logo.clearbit.com/directenergy.com"
URL for order submission
"https://provider.example.com/api/orders"
Submission configuration including form fields
{ "formFields": [ { "name": "address", "type": "text", "required": true }, { "name": "phone", "type": "tel", "required": true } ], "metadata": [] }
Structured electricity contract — the only way to set an electricity offer’s pricing, term, plan and disclosures. Folded into storage server-side. Grouped as rate / term / plan / disclosures.
Show child attributes
Show child attributes
Structured internet contract — the only way to set an internet offer’s speed, data allowance, term and disclosures. Folded into storage server-side. Grouped as speed / data / term / disclosures.
Show child attributes
Show child attributes
Pricing type
fixed, variable, tiered, custom "fixed"
Monthly recurring price
x >= 059.99
Scope the offer to one or more existing markets by NAME. Each name must match an existing market on your team (create markets separately via the markets API). Mirrors the CSV bulk-upload marketNames column so a JSON integration and the CSV path use the same identifier. Use marketIds if you already have market IDs. Cannot be combined with marketIds.
["Texas — Oncor", "Texas — CenterPoint"]
Scope the offer to one or more existing markets by ID. Each id must belong to a market on your team. Prefer marketNames when you have the market name (matches the CSV column and is easier to author). Cannot be combined with marketNames.
["b1c8d1e2-..."]
Response
Offer successfully created
An offer. Always includes a top-level serviceType discriminator ("electricity", "internet", …); electricity offers additionally include a grouped electricity object and internet offers a grouped internet object. The underlying offer fields (name, status, markets, marketing, pricing, …) are also present.
Flat service-type discriminator derived from category. Check this instead of category directly.
"internet"
Present only on electricity offers.
Show child attributes
Show child attributes
Present only on internet offers.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.offergrid.io/provider/offers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "High-Speed Internet 1000 Mbps",
"internalName": "HSI-1000-Q4-2024",
"category": "internet",
"status": "draft",
"sku": "INT-1000-001",
"externalId": "ext-12345",
"externalProductKey": "FIBER-500",
"metadata": {
"tags": [
"fiber",
"residential"
],
"priority": 1
},
"description": "Blazing fast fiber internet with unlimited data",
"internalDescription": "Q4 promotional offer for new markets",
"marketingHeadline": "Get Lightning-Fast Internet Today!",
"marketingDescription": "Experience the future of connectivity with our fiber-optic network",
"keyFeatures": [
"1000 Mbps download",
"Unlimited data",
"No contract"
],
"imageUrl": "https://cdn.example.com/offers/internet-1000.jpg",
"overview": "This package includes installation, router, and 24/7 support",
"brandId": "a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77",
"brandName": "Direct Energy",
"brandImageUrl": "https://logo.clearbit.com/directenergy.com",
"submissionUrl": "https://provider.example.com/api/orders",
"submissionConfig": {
"formFields": [
{
"name": "address",
"type": "text",
"required": true
},
{
"name": "phone",
"type": "tel",
"required": true
}
],
"metadata": []
},
"electricity": {
"rate": {
"charges": [
{
"type": "perKwh",
"centsPerKwh": 1,
"label": "<string>",
"minUsageKwh": 1,
"maxUsageKwh": 1
}
],
"avgPriceAt1000Kwh": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"plan": {
"renewablePercentage": 50,
"freeNightsWeekends": true,
"noDeposit": true
},
"disclosures": {
"electricityFactsLabel": {
"url": "<string>",
"versionId": "<string>",
"avgPrice500kwh": 1,
"avgPrice1000kwh": 1,
"avgPrice2000kwh": 1,
"renewablePercent": 50
},
"puctCertNumber": "<string>",
"puctCertifiedName": "<string>",
"termsOfServiceUrl": "<string>",
"yourRightsUrl": "<string>"
}
},
"internet": {
"speed": {
"minBandwidthMbps": 1,
"maxBandwidthMbps": 1
},
"data": {
"capGb": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"disclosures": {
"broadbandLabel": {
"url": "<string>",
"typicalDownload": 1,
"typicalUpload": 1,
"typicalLatency": 1,
"dataCapGb": 1
},
"networkManagementUrl": "<string>"
}
},
"pricingType": "fixed",
"monthlyPrice": 59.99,
"marketNames": [
"Texas — Oncor",
"Texas — CenterPoint"
],
"marketIds": [
"b1c8d1e2-..."
]
}
'import requests
url = "https://api.offergrid.io/provider/offers"
payload = {
"name": "High-Speed Internet 1000 Mbps",
"internalName": "HSI-1000-Q4-2024",
"category": "internet",
"status": "draft",
"sku": "INT-1000-001",
"externalId": "ext-12345",
"externalProductKey": "FIBER-500",
"metadata": {
"tags": ["fiber", "residential"],
"priority": 1
},
"description": "Blazing fast fiber internet with unlimited data",
"internalDescription": "Q4 promotional offer for new markets",
"marketingHeadline": "Get Lightning-Fast Internet Today!",
"marketingDescription": "Experience the future of connectivity with our fiber-optic network",
"keyFeatures": ["1000 Mbps download", "Unlimited data", "No contract"],
"imageUrl": "https://cdn.example.com/offers/internet-1000.jpg",
"overview": "This package includes installation, router, and 24/7 support",
"brandId": "a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77",
"brandName": "Direct Energy",
"brandImageUrl": "https://logo.clearbit.com/directenergy.com",
"submissionUrl": "https://provider.example.com/api/orders",
"submissionConfig": {
"formFields": [
{
"name": "address",
"type": "text",
"required": True
},
{
"name": "phone",
"type": "tel",
"required": True
}
],
"metadata": []
},
"electricity": {
"rate": {
"charges": [
{
"type": "perKwh",
"centsPerKwh": 1,
"label": "<string>",
"minUsageKwh": 1,
"maxUsageKwh": 1
}
],
"avgPriceAt1000Kwh": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"plan": {
"renewablePercentage": 50,
"freeNightsWeekends": True,
"noDeposit": True
},
"disclosures": {
"electricityFactsLabel": {
"url": "<string>",
"versionId": "<string>",
"avgPrice500kwh": 1,
"avgPrice1000kwh": 1,
"avgPrice2000kwh": 1,
"renewablePercent": 50
},
"puctCertNumber": "<string>",
"puctCertifiedName": "<string>",
"termsOfServiceUrl": "<string>",
"yourRightsUrl": "<string>"
}
},
"internet": {
"speed": {
"minBandwidthMbps": 1,
"maxBandwidthMbps": 1
},
"data": { "capGb": 1 },
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"disclosures": {
"broadbandLabel": {
"url": "<string>",
"typicalDownload": 1,
"typicalUpload": 1,
"typicalLatency": 1,
"dataCapGb": 1
},
"networkManagementUrl": "<string>"
}
},
"pricingType": "fixed",
"monthlyPrice": 59.99,
"marketNames": ["Texas — Oncor", "Texas — CenterPoint"],
"marketIds": ["b1c8d1e2-..."]
}
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({
name: 'High-Speed Internet 1000 Mbps',
internalName: 'HSI-1000-Q4-2024',
category: 'internet',
status: 'draft',
sku: 'INT-1000-001',
externalId: 'ext-12345',
externalProductKey: 'FIBER-500',
metadata: {tags: ['fiber', 'residential'], priority: 1},
description: 'Blazing fast fiber internet with unlimited data',
internalDescription: 'Q4 promotional offer for new markets',
marketingHeadline: 'Get Lightning-Fast Internet Today!',
marketingDescription: 'Experience the future of connectivity with our fiber-optic network',
keyFeatures: ['1000 Mbps download', 'Unlimited data', 'No contract'],
imageUrl: 'https://cdn.example.com/offers/internet-1000.jpg',
overview: 'This package includes installation, router, and 24/7 support',
brandId: 'a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77',
brandName: 'Direct Energy',
brandImageUrl: 'https://logo.clearbit.com/directenergy.com',
submissionUrl: 'https://provider.example.com/api/orders',
submissionConfig: {
formFields: [
{name: 'address', type: 'text', required: true},
{name: 'phone', type: 'tel', required: true}
],
metadata: []
},
electricity: {
rate: {
charges: [
{
type: 'perKwh',
centsPerKwh: 1,
label: '<string>',
minUsageKwh: 1,
maxUsageKwh: 1
}
],
avgPriceAt1000Kwh: 1
},
term: {earlyTerminationFee: 1, earlyTerminationFeeNotes: '<string>'},
plan: {renewablePercentage: 50, freeNightsWeekends: true, noDeposit: true},
disclosures: {
electricityFactsLabel: {
url: '<string>',
versionId: '<string>',
avgPrice500kwh: 1,
avgPrice1000kwh: 1,
avgPrice2000kwh: 1,
renewablePercent: 50
},
puctCertNumber: '<string>',
puctCertifiedName: '<string>',
termsOfServiceUrl: '<string>',
yourRightsUrl: '<string>'
}
},
internet: {
speed: {minBandwidthMbps: 1, maxBandwidthMbps: 1},
data: {capGb: 1},
term: {earlyTerminationFee: 1, earlyTerminationFeeNotes: '<string>'},
disclosures: {
broadbandLabel: {
url: '<string>',
typicalDownload: 1,
typicalUpload: 1,
typicalLatency: 1,
dataCapGb: 1
},
networkManagementUrl: '<string>'
}
},
pricingType: 'fixed',
monthlyPrice: 59.99,
marketNames: ['Texas — Oncor', 'Texas — CenterPoint'],
marketIds: ['b1c8d1e2-...']
})
};
fetch('https://api.offergrid.io/provider/offers', 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/offers",
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([
'name' => 'High-Speed Internet 1000 Mbps',
'internalName' => 'HSI-1000-Q4-2024',
'category' => 'internet',
'status' => 'draft',
'sku' => 'INT-1000-001',
'externalId' => 'ext-12345',
'externalProductKey' => 'FIBER-500',
'metadata' => [
'tags' => [
'fiber',
'residential'
],
'priority' => 1
],
'description' => 'Blazing fast fiber internet with unlimited data',
'internalDescription' => 'Q4 promotional offer for new markets',
'marketingHeadline' => 'Get Lightning-Fast Internet Today!',
'marketingDescription' => 'Experience the future of connectivity with our fiber-optic network',
'keyFeatures' => [
'1000 Mbps download',
'Unlimited data',
'No contract'
],
'imageUrl' => 'https://cdn.example.com/offers/internet-1000.jpg',
'overview' => 'This package includes installation, router, and 24/7 support',
'brandId' => 'a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77',
'brandName' => 'Direct Energy',
'brandImageUrl' => 'https://logo.clearbit.com/directenergy.com',
'submissionUrl' => 'https://provider.example.com/api/orders',
'submissionConfig' => [
'formFields' => [
[
'name' => 'address',
'type' => 'text',
'required' => true
],
[
'name' => 'phone',
'type' => 'tel',
'required' => true
]
],
'metadata' => [
]
],
'electricity' => [
'rate' => [
'charges' => [
[
'type' => 'perKwh',
'centsPerKwh' => 1,
'label' => '<string>',
'minUsageKwh' => 1,
'maxUsageKwh' => 1
]
],
'avgPriceAt1000Kwh' => 1
],
'term' => [
'earlyTerminationFee' => 1,
'earlyTerminationFeeNotes' => '<string>'
],
'plan' => [
'renewablePercentage' => 50,
'freeNightsWeekends' => true,
'noDeposit' => true
],
'disclosures' => [
'electricityFactsLabel' => [
'url' => '<string>',
'versionId' => '<string>',
'avgPrice500kwh' => 1,
'avgPrice1000kwh' => 1,
'avgPrice2000kwh' => 1,
'renewablePercent' => 50
],
'puctCertNumber' => '<string>',
'puctCertifiedName' => '<string>',
'termsOfServiceUrl' => '<string>',
'yourRightsUrl' => '<string>'
]
],
'internet' => [
'speed' => [
'minBandwidthMbps' => 1,
'maxBandwidthMbps' => 1
],
'data' => [
'capGb' => 1
],
'term' => [
'earlyTerminationFee' => 1,
'earlyTerminationFeeNotes' => '<string>'
],
'disclosures' => [
'broadbandLabel' => [
'url' => '<string>',
'typicalDownload' => 1,
'typicalUpload' => 1,
'typicalLatency' => 1,
'dataCapGb' => 1
],
'networkManagementUrl' => '<string>'
]
],
'pricingType' => 'fixed',
'monthlyPrice' => 59.99,
'marketNames' => [
'Texas — Oncor',
'Texas — CenterPoint'
],
'marketIds' => [
'b1c8d1e2-...'
]
]),
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/offers"
payload := strings.NewReader("{\n \"name\": \"High-Speed Internet 1000 Mbps\",\n \"internalName\": \"HSI-1000-Q4-2024\",\n \"category\": \"internet\",\n \"status\": \"draft\",\n \"sku\": \"INT-1000-001\",\n \"externalId\": \"ext-12345\",\n \"externalProductKey\": \"FIBER-500\",\n \"metadata\": {\n \"tags\": [\n \"fiber\",\n \"residential\"\n ],\n \"priority\": 1\n },\n \"description\": \"Blazing fast fiber internet with unlimited data\",\n \"internalDescription\": \"Q4 promotional offer for new markets\",\n \"marketingHeadline\": \"Get Lightning-Fast Internet Today!\",\n \"marketingDescription\": \"Experience the future of connectivity with our fiber-optic network\",\n \"keyFeatures\": [\n \"1000 Mbps download\",\n \"Unlimited data\",\n \"No contract\"\n ],\n \"imageUrl\": \"https://cdn.example.com/offers/internet-1000.jpg\",\n \"overview\": \"This package includes installation, router, and 24/7 support\",\n \"brandId\": \"a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77\",\n \"brandName\": \"Direct Energy\",\n \"brandImageUrl\": \"https://logo.clearbit.com/directenergy.com\",\n \"submissionUrl\": \"https://provider.example.com/api/orders\",\n \"submissionConfig\": {\n \"formFields\": [\n {\n \"name\": \"address\",\n \"type\": \"text\",\n \"required\": true\n },\n {\n \"name\": \"phone\",\n \"type\": \"tel\",\n \"required\": true\n }\n ],\n \"metadata\": []\n },\n \"electricity\": {\n \"rate\": {\n \"charges\": [\n {\n \"type\": \"perKwh\",\n \"centsPerKwh\": 1,\n \"label\": \"<string>\",\n \"minUsageKwh\": 1,\n \"maxUsageKwh\": 1\n }\n ],\n \"avgPriceAt1000Kwh\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"plan\": {\n \"renewablePercentage\": 50,\n \"freeNightsWeekends\": true,\n \"noDeposit\": true\n },\n \"disclosures\": {\n \"electricityFactsLabel\": {\n \"url\": \"<string>\",\n \"versionId\": \"<string>\",\n \"avgPrice500kwh\": 1,\n \"avgPrice1000kwh\": 1,\n \"avgPrice2000kwh\": 1,\n \"renewablePercent\": 50\n },\n \"puctCertNumber\": \"<string>\",\n \"puctCertifiedName\": \"<string>\",\n \"termsOfServiceUrl\": \"<string>\",\n \"yourRightsUrl\": \"<string>\"\n }\n },\n \"internet\": {\n \"speed\": {\n \"minBandwidthMbps\": 1,\n \"maxBandwidthMbps\": 1\n },\n \"data\": {\n \"capGb\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"disclosures\": {\n \"broadbandLabel\": {\n \"url\": \"<string>\",\n \"typicalDownload\": 1,\n \"typicalUpload\": 1,\n \"typicalLatency\": 1,\n \"dataCapGb\": 1\n },\n \"networkManagementUrl\": \"<string>\"\n }\n },\n \"pricingType\": \"fixed\",\n \"monthlyPrice\": 59.99,\n \"marketNames\": [\n \"Texas — Oncor\",\n \"Texas — CenterPoint\"\n ],\n \"marketIds\": [\n \"b1c8d1e2-...\"\n ]\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/offers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"High-Speed Internet 1000 Mbps\",\n \"internalName\": \"HSI-1000-Q4-2024\",\n \"category\": \"internet\",\n \"status\": \"draft\",\n \"sku\": \"INT-1000-001\",\n \"externalId\": \"ext-12345\",\n \"externalProductKey\": \"FIBER-500\",\n \"metadata\": {\n \"tags\": [\n \"fiber\",\n \"residential\"\n ],\n \"priority\": 1\n },\n \"description\": \"Blazing fast fiber internet with unlimited data\",\n \"internalDescription\": \"Q4 promotional offer for new markets\",\n \"marketingHeadline\": \"Get Lightning-Fast Internet Today!\",\n \"marketingDescription\": \"Experience the future of connectivity with our fiber-optic network\",\n \"keyFeatures\": [\n \"1000 Mbps download\",\n \"Unlimited data\",\n \"No contract\"\n ],\n \"imageUrl\": \"https://cdn.example.com/offers/internet-1000.jpg\",\n \"overview\": \"This package includes installation, router, and 24/7 support\",\n \"brandId\": \"a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77\",\n \"brandName\": \"Direct Energy\",\n \"brandImageUrl\": \"https://logo.clearbit.com/directenergy.com\",\n \"submissionUrl\": \"https://provider.example.com/api/orders\",\n \"submissionConfig\": {\n \"formFields\": [\n {\n \"name\": \"address\",\n \"type\": \"text\",\n \"required\": true\n },\n {\n \"name\": \"phone\",\n \"type\": \"tel\",\n \"required\": true\n }\n ],\n \"metadata\": []\n },\n \"electricity\": {\n \"rate\": {\n \"charges\": [\n {\n \"type\": \"perKwh\",\n \"centsPerKwh\": 1,\n \"label\": \"<string>\",\n \"minUsageKwh\": 1,\n \"maxUsageKwh\": 1\n }\n ],\n \"avgPriceAt1000Kwh\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"plan\": {\n \"renewablePercentage\": 50,\n \"freeNightsWeekends\": true,\n \"noDeposit\": true\n },\n \"disclosures\": {\n \"electricityFactsLabel\": {\n \"url\": \"<string>\",\n \"versionId\": \"<string>\",\n \"avgPrice500kwh\": 1,\n \"avgPrice1000kwh\": 1,\n \"avgPrice2000kwh\": 1,\n \"renewablePercent\": 50\n },\n \"puctCertNumber\": \"<string>\",\n \"puctCertifiedName\": \"<string>\",\n \"termsOfServiceUrl\": \"<string>\",\n \"yourRightsUrl\": \"<string>\"\n }\n },\n \"internet\": {\n \"speed\": {\n \"minBandwidthMbps\": 1,\n \"maxBandwidthMbps\": 1\n },\n \"data\": {\n \"capGb\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"disclosures\": {\n \"broadbandLabel\": {\n \"url\": \"<string>\",\n \"typicalDownload\": 1,\n \"typicalUpload\": 1,\n \"typicalLatency\": 1,\n \"dataCapGb\": 1\n },\n \"networkManagementUrl\": \"<string>\"\n }\n },\n \"pricingType\": \"fixed\",\n \"monthlyPrice\": 59.99,\n \"marketNames\": [\n \"Texas — Oncor\",\n \"Texas — CenterPoint\"\n ],\n \"marketIds\": [\n \"b1c8d1e2-...\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offergrid.io/provider/offers")
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 \"name\": \"High-Speed Internet 1000 Mbps\",\n \"internalName\": \"HSI-1000-Q4-2024\",\n \"category\": \"internet\",\n \"status\": \"draft\",\n \"sku\": \"INT-1000-001\",\n \"externalId\": \"ext-12345\",\n \"externalProductKey\": \"FIBER-500\",\n \"metadata\": {\n \"tags\": [\n \"fiber\",\n \"residential\"\n ],\n \"priority\": 1\n },\n \"description\": \"Blazing fast fiber internet with unlimited data\",\n \"internalDescription\": \"Q4 promotional offer for new markets\",\n \"marketingHeadline\": \"Get Lightning-Fast Internet Today!\",\n \"marketingDescription\": \"Experience the future of connectivity with our fiber-optic network\",\n \"keyFeatures\": [\n \"1000 Mbps download\",\n \"Unlimited data\",\n \"No contract\"\n ],\n \"imageUrl\": \"https://cdn.example.com/offers/internet-1000.jpg\",\n \"overview\": \"This package includes installation, router, and 24/7 support\",\n \"brandId\": \"a3f1c9c2-7f42-4b6e-9a8e-2f0d5c6b1e77\",\n \"brandName\": \"Direct Energy\",\n \"brandImageUrl\": \"https://logo.clearbit.com/directenergy.com\",\n \"submissionUrl\": \"https://provider.example.com/api/orders\",\n \"submissionConfig\": {\n \"formFields\": [\n {\n \"name\": \"address\",\n \"type\": \"text\",\n \"required\": true\n },\n {\n \"name\": \"phone\",\n \"type\": \"tel\",\n \"required\": true\n }\n ],\n \"metadata\": []\n },\n \"electricity\": {\n \"rate\": {\n \"charges\": [\n {\n \"type\": \"perKwh\",\n \"centsPerKwh\": 1,\n \"label\": \"<string>\",\n \"minUsageKwh\": 1,\n \"maxUsageKwh\": 1\n }\n ],\n \"avgPriceAt1000Kwh\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"plan\": {\n \"renewablePercentage\": 50,\n \"freeNightsWeekends\": true,\n \"noDeposit\": true\n },\n \"disclosures\": {\n \"electricityFactsLabel\": {\n \"url\": \"<string>\",\n \"versionId\": \"<string>\",\n \"avgPrice500kwh\": 1,\n \"avgPrice1000kwh\": 1,\n \"avgPrice2000kwh\": 1,\n \"renewablePercent\": 50\n },\n \"puctCertNumber\": \"<string>\",\n \"puctCertifiedName\": \"<string>\",\n \"termsOfServiceUrl\": \"<string>\",\n \"yourRightsUrl\": \"<string>\"\n }\n },\n \"internet\": {\n \"speed\": {\n \"minBandwidthMbps\": 1,\n \"maxBandwidthMbps\": 1\n },\n \"data\": {\n \"capGb\": 1\n },\n \"term\": {\n \"earlyTerminationFee\": 1,\n \"earlyTerminationFeeNotes\": \"<string>\"\n },\n \"disclosures\": {\n \"broadbandLabel\": {\n \"url\": \"<string>\",\n \"typicalDownload\": 1,\n \"typicalUpload\": 1,\n \"typicalLatency\": 1,\n \"dataCapGb\": 1\n },\n \"networkManagementUrl\": \"<string>\"\n }\n },\n \"pricingType\": \"fixed\",\n \"monthlyPrice\": 59.99,\n \"marketNames\": [\n \"Texas — Oncor\",\n \"Texas — CenterPoint\"\n ],\n \"marketIds\": [\n \"b1c8d1e2-...\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"serviceType": "internet",
"electricity": {
"rate": {
"charges": [
{
"type": "perKwh",
"centsPerKwh": 1,
"label": "<string>",
"minUsageKwh": 1,
"maxUsageKwh": 1
}
],
"avgPriceAt1000Kwh": 1,
"estimatedMonthlyAt1000Kwh": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"plan": {
"renewablePercentage": 50,
"freeNightsWeekends": true,
"noDeposit": true
},
"disclosures": {
"electricityFactsLabel": {
"url": "<string>",
"versionId": "<string>",
"avgPrice500kwh": 1,
"avgPrice1000kwh": 1,
"avgPrice2000kwh": 1,
"renewablePercent": 50
},
"puctCertNumber": "<string>",
"puctCertifiedName": "<string>",
"termsOfServiceUrl": "<string>",
"yourRightsUrl": "<string>"
}
},
"internet": {
"speed": {
"minBandwidthMbps": 1,
"maxBandwidthMbps": 1
},
"data": {
"capGb": 1
},
"term": {
"earlyTerminationFee": 1,
"earlyTerminationFeeNotes": "<string>"
},
"disclosures": {
"broadbandLabel": {
"url": "<string>",
"typicalDownload": 1,
"typicalUpload": 1,
"typicalLatency": 1,
"dataCapGb": 1
},
"networkManagementUrl": "<string>"
}
}
}