Place a new order
Create a new order for one or more service offers. Each offer will be sent to its respective provider for fulfillment. You can only order offers that are available to your reseller team. A partner-signup (lead_gen) offer is captured on the order as an item in status handoff and finished by the customer on the provider’s site: the response carries a handoffs array with a prefilled redirectUrl per such item (also persisted as metadata.handoff on the item), its price is not included in totalMonthly, and the provider accepts the item against the order once the signup completes.
curl --request POST \
--url https://api.offergrid.io/reseller/orders \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"items": [
{
"offerId": "123e4567-e89b-12d3-a456-426614174000"
}
],
"serviceAddress": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zipCode": "94102",
"country": "US"
},
"customerInfo": {
"email": "john@example.com",
"phone": "+1-555-123-4567",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"dwellingType": "apartment_condo",
"occupancyStatus": "rent"
},
"notes": "Customer prefers morning installations",
"metadata": {
"referralSource": "property-listing",
"unitNumber": "4B"
},
"isTraining": false
}
'import requests
url = "https://api.offergrid.io/reseller/orders"
payload = {
"items": [{ "offerId": "123e4567-e89b-12d3-a456-426614174000" }],
"serviceAddress": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zipCode": "94102",
"country": "US"
},
"customerInfo": {
"email": "john@example.com",
"phone": "+1-555-123-4567",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"dwellingType": "apartment_condo",
"occupancyStatus": "rent"
},
"notes": "Customer prefers morning installations",
"metadata": {
"referralSource": "property-listing",
"unitNumber": "4B"
},
"isTraining": False
}
headers = {
"idempotency-key": "<idempotency-key>",
"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: {
'idempotency-key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [{offerId: '123e4567-e89b-12d3-a456-426614174000'}],
serviceAddress: {
street: '123 Main St',
city: 'San Francisco',
state: 'CA',
zipCode: '94102',
country: 'US'
},
customerInfo: {
email: 'john@example.com',
phone: '+1-555-123-4567',
firstName: 'John',
lastName: 'Doe',
fullName: 'John Doe',
dwellingType: 'apartment_condo',
occupancyStatus: 'rent'
},
notes: 'Customer prefers morning installations',
metadata: {referralSource: 'property-listing', unitNumber: '4B'},
isTraining: false
})
};
fetch('https://api.offergrid.io/reseller/orders', 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/reseller/orders",
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([
'items' => [
[
'offerId' => '123e4567-e89b-12d3-a456-426614174000'
]
],
'serviceAddress' => [
'street' => '123 Main St',
'city' => 'San Francisco',
'state' => 'CA',
'zipCode' => '94102',
'country' => 'US'
],
'customerInfo' => [
'email' => 'john@example.com',
'phone' => '+1-555-123-4567',
'firstName' => 'John',
'lastName' => 'Doe',
'fullName' => 'John Doe',
'dwellingType' => 'apartment_condo',
'occupancyStatus' => 'rent'
],
'notes' => 'Customer prefers morning installations',
'metadata' => [
'referralSource' => 'property-listing',
'unitNumber' => '4B'
],
'isTraining' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"idempotency-key: <idempotency-key>",
"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/reseller/orders"
payload := strings.NewReader("{\n \"items\": [\n {\n \"offerId\": \"123e4567-e89b-12d3-a456-426614174000\"\n }\n ],\n \"serviceAddress\": {\n \"street\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94102\",\n \"country\": \"US\"\n },\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\",\n \"dwellingType\": \"apartment_condo\",\n \"occupancyStatus\": \"rent\"\n },\n \"notes\": \"Customer prefers morning installations\",\n \"metadata\": {\n \"referralSource\": \"property-listing\",\n \"unitNumber\": \"4B\"\n },\n \"isTraining\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
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/reseller/orders")
.header("idempotency-key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"offerId\": \"123e4567-e89b-12d3-a456-426614174000\"\n }\n ],\n \"serviceAddress\": {\n \"street\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94102\",\n \"country\": \"US\"\n },\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\",\n \"dwellingType\": \"apartment_condo\",\n \"occupancyStatus\": \"rent\"\n },\n \"notes\": \"Customer prefers morning installations\",\n \"metadata\": {\n \"referralSource\": \"property-listing\",\n \"unitNumber\": \"4B\"\n },\n \"isTraining\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offergrid.io/reseller/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"offerId\": \"123e4567-e89b-12d3-a456-426614174000\"\n }\n ],\n \"serviceAddress\": {\n \"street\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94102\",\n \"country\": \"US\"\n },\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\",\n \"dwellingType\": \"apartment_condo\",\n \"occupancyStatus\": \"rent\"\n },\n \"notes\": \"Customer prefers morning installations\",\n \"metadata\": {\n \"referralSource\": \"property-listing\",\n \"unitNumber\": \"4B\"\n },\n \"isTraining\": false\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}Authorizations
Team API key for authentication. Your team role (provider/reseller/hybrid) determines which endpoints you can access.
Headers
Client-generated key for this checkout attempt. A repeat request with the same key (e.g. a network retry or double-click) returns the original order instead of creating a duplicate.
Body
Array of items to order (offers)
Show child attributes
Show child attributes
[
{
"offerId": "123e4567-e89b-12d3-a456-426614174000"
}
]
Service address for installation
Show child attributes
Show child attributes
Customer information
Show child attributes
Show child attributes
Additional notes for the order
"Customer prefers morning installations"
Additional metadata for the order
{
"referralSource": "property-listing",
"unitNumber": "4B"
}
Mark this as a training order. It is delivered to the provider and flows through the normal lifecycle, but is labeled "Training" on every surface and in every notification and webhook (data.training: true, X-Offergrid-Training: true). Training orders never accrue commission, never create customer records, are excluded from analytics, and can be deleted by the reseller from the dashboard. Defaults to false.
false
Response
Order successfully created
Was this page helpful?
curl --request POST \
--url https://api.offergrid.io/reseller/orders \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"items": [
{
"offerId": "123e4567-e89b-12d3-a456-426614174000"
}
],
"serviceAddress": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zipCode": "94102",
"country": "US"
},
"customerInfo": {
"email": "john@example.com",
"phone": "+1-555-123-4567",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"dwellingType": "apartment_condo",
"occupancyStatus": "rent"
},
"notes": "Customer prefers morning installations",
"metadata": {
"referralSource": "property-listing",
"unitNumber": "4B"
},
"isTraining": false
}
'import requests
url = "https://api.offergrid.io/reseller/orders"
payload = {
"items": [{ "offerId": "123e4567-e89b-12d3-a456-426614174000" }],
"serviceAddress": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zipCode": "94102",
"country": "US"
},
"customerInfo": {
"email": "john@example.com",
"phone": "+1-555-123-4567",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"dwellingType": "apartment_condo",
"occupancyStatus": "rent"
},
"notes": "Customer prefers morning installations",
"metadata": {
"referralSource": "property-listing",
"unitNumber": "4B"
},
"isTraining": False
}
headers = {
"idempotency-key": "<idempotency-key>",
"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: {
'idempotency-key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [{offerId: '123e4567-e89b-12d3-a456-426614174000'}],
serviceAddress: {
street: '123 Main St',
city: 'San Francisco',
state: 'CA',
zipCode: '94102',
country: 'US'
},
customerInfo: {
email: 'john@example.com',
phone: '+1-555-123-4567',
firstName: 'John',
lastName: 'Doe',
fullName: 'John Doe',
dwellingType: 'apartment_condo',
occupancyStatus: 'rent'
},
notes: 'Customer prefers morning installations',
metadata: {referralSource: 'property-listing', unitNumber: '4B'},
isTraining: false
})
};
fetch('https://api.offergrid.io/reseller/orders', 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/reseller/orders",
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([
'items' => [
[
'offerId' => '123e4567-e89b-12d3-a456-426614174000'
]
],
'serviceAddress' => [
'street' => '123 Main St',
'city' => 'San Francisco',
'state' => 'CA',
'zipCode' => '94102',
'country' => 'US'
],
'customerInfo' => [
'email' => 'john@example.com',
'phone' => '+1-555-123-4567',
'firstName' => 'John',
'lastName' => 'Doe',
'fullName' => 'John Doe',
'dwellingType' => 'apartment_condo',
'occupancyStatus' => 'rent'
],
'notes' => 'Customer prefers morning installations',
'metadata' => [
'referralSource' => 'property-listing',
'unitNumber' => '4B'
],
'isTraining' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"idempotency-key: <idempotency-key>",
"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/reseller/orders"
payload := strings.NewReader("{\n \"items\": [\n {\n \"offerId\": \"123e4567-e89b-12d3-a456-426614174000\"\n }\n ],\n \"serviceAddress\": {\n \"street\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94102\",\n \"country\": \"US\"\n },\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\",\n \"dwellingType\": \"apartment_condo\",\n \"occupancyStatus\": \"rent\"\n },\n \"notes\": \"Customer prefers morning installations\",\n \"metadata\": {\n \"referralSource\": \"property-listing\",\n \"unitNumber\": \"4B\"\n },\n \"isTraining\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
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/reseller/orders")
.header("idempotency-key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"offerId\": \"123e4567-e89b-12d3-a456-426614174000\"\n }\n ],\n \"serviceAddress\": {\n \"street\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94102\",\n \"country\": \"US\"\n },\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\",\n \"dwellingType\": \"apartment_condo\",\n \"occupancyStatus\": \"rent\"\n },\n \"notes\": \"Customer prefers morning installations\",\n \"metadata\": {\n \"referralSource\": \"property-listing\",\n \"unitNumber\": \"4B\"\n },\n \"isTraining\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offergrid.io/reseller/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"offerId\": \"123e4567-e89b-12d3-a456-426614174000\"\n }\n ],\n \"serviceAddress\": {\n \"street\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zipCode\": \"94102\",\n \"country\": \"US\"\n },\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\",\n \"dwellingType\": \"apartment_condo\",\n \"occupancyStatus\": \"rent\"\n },\n \"notes\": \"Customer prefers morning installations\",\n \"metadata\": {\n \"referralSource\": \"property-listing\",\n \"unitNumber\": \"4B\"\n },\n \"isTraining\": false\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}