public
Submit an order via a shareable link
Create a new order for the selected service offers. The order will be associated with the reseller who created the link. This endpoint does not require authentication.
POST
/
public
/
links
/
{slug}
/
orders
Submit an order via a shareable link
curl --request POST \
--url https://api.offergrid.io/public/links/{slug}/orders \
--header 'Content-Type: application/json' \
--data '
{
"customerInfo": {
"email": "john@example.com",
"phone": "+1-555-123-4567",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe"
},
"items": [
{
"offerId": "uuid-of-offer"
}
],
"moveInDate": "2025-02-01",
"notes": "Please contact me in the morning",
"idempotencyKey": "a1b2c3d4-checkout-attempt"
}
'import requests
url = "https://api.offergrid.io/public/links/{slug}/orders"
payload = {
"customerInfo": {
"email": "john@example.com",
"phone": "+1-555-123-4567",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe"
},
"items": [{ "offerId": "uuid-of-offer" }],
"moveInDate": "2025-02-01",
"notes": "Please contact me in the morning",
"idempotencyKey": "a1b2c3d4-checkout-attempt"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
customerInfo: {
email: 'john@example.com',
phone: '+1-555-123-4567',
firstName: 'John',
lastName: 'Doe',
fullName: 'John Doe'
},
items: [{offerId: 'uuid-of-offer'}],
moveInDate: '2025-02-01',
notes: 'Please contact me in the morning',
idempotencyKey: 'a1b2c3d4-checkout-attempt'
})
};
fetch('https://api.offergrid.io/public/links/{slug}/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/public/links/{slug}/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([
'customerInfo' => [
'email' => 'john@example.com',
'phone' => '+1-555-123-4567',
'firstName' => 'John',
'lastName' => 'Doe',
'fullName' => 'John Doe'
],
'items' => [
[
'offerId' => 'uuid-of-offer'
]
],
'moveInDate' => '2025-02-01',
'notes' => 'Please contact me in the morning',
'idempotencyKey' => 'a1b2c3d4-checkout-attempt'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/public/links/{slug}/orders"
payload := strings.NewReader("{\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\"\n },\n \"items\": [\n {\n \"offerId\": \"uuid-of-offer\"\n }\n ],\n \"moveInDate\": \"2025-02-01\",\n \"notes\": \"Please contact me in the morning\",\n \"idempotencyKey\": \"a1b2c3d4-checkout-attempt\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/public/links/{slug}/orders")
.header("Content-Type", "application/json")
.body("{\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\"\n },\n \"items\": [\n {\n \"offerId\": \"uuid-of-offer\"\n }\n ],\n \"moveInDate\": \"2025-02-01\",\n \"notes\": \"Please contact me in the morning\",\n \"idempotencyKey\": \"a1b2c3d4-checkout-attempt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offergrid.io/public/links/{slug}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\"\n },\n \"items\": [\n {\n \"offerId\": \"uuid-of-offer\"\n }\n ],\n \"moveInDate\": \"2025-02-01\",\n \"notes\": \"Please contact me in the morning\",\n \"idempotencyKey\": \"a1b2c3d4-checkout-attempt\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 400,
"message": [
"name should not be empty",
"category must be one of the following values: internet, electricity"
],
"error": "Bad Request"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}Path Parameters
The unique link identifier (from the URL)
Example:
"abc123"
Body
application/json
Customer contact information
Show child attributes
Show child attributes
List of offers to order (one per category)
Show child attributes
Show child attributes
Move-in date (ISO 8601)
Example:
"2025-02-01"
Additional notes from the customer
Example:
"Please contact me in the morning"
Client-generated key for this checkout attempt. A repeat submission with the same key (e.g. a network retry or double-click on Submit) returns the original order instead of creating a duplicate.
Example:
"a1b2c3d4-checkout-attempt"
Response
Order successfully created
Was this page helpful?
⌘I
Submit an order via a shareable link
curl --request POST \
--url https://api.offergrid.io/public/links/{slug}/orders \
--header 'Content-Type: application/json' \
--data '
{
"customerInfo": {
"email": "john@example.com",
"phone": "+1-555-123-4567",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe"
},
"items": [
{
"offerId": "uuid-of-offer"
}
],
"moveInDate": "2025-02-01",
"notes": "Please contact me in the morning",
"idempotencyKey": "a1b2c3d4-checkout-attempt"
}
'import requests
url = "https://api.offergrid.io/public/links/{slug}/orders"
payload = {
"customerInfo": {
"email": "john@example.com",
"phone": "+1-555-123-4567",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe"
},
"items": [{ "offerId": "uuid-of-offer" }],
"moveInDate": "2025-02-01",
"notes": "Please contact me in the morning",
"idempotencyKey": "a1b2c3d4-checkout-attempt"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
customerInfo: {
email: 'john@example.com',
phone: '+1-555-123-4567',
firstName: 'John',
lastName: 'Doe',
fullName: 'John Doe'
},
items: [{offerId: 'uuid-of-offer'}],
moveInDate: '2025-02-01',
notes: 'Please contact me in the morning',
idempotencyKey: 'a1b2c3d4-checkout-attempt'
})
};
fetch('https://api.offergrid.io/public/links/{slug}/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/public/links/{slug}/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([
'customerInfo' => [
'email' => 'john@example.com',
'phone' => '+1-555-123-4567',
'firstName' => 'John',
'lastName' => 'Doe',
'fullName' => 'John Doe'
],
'items' => [
[
'offerId' => 'uuid-of-offer'
]
],
'moveInDate' => '2025-02-01',
'notes' => 'Please contact me in the morning',
'idempotencyKey' => 'a1b2c3d4-checkout-attempt'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/public/links/{slug}/orders"
payload := strings.NewReader("{\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\"\n },\n \"items\": [\n {\n \"offerId\": \"uuid-of-offer\"\n }\n ],\n \"moveInDate\": \"2025-02-01\",\n \"notes\": \"Please contact me in the morning\",\n \"idempotencyKey\": \"a1b2c3d4-checkout-attempt\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/public/links/{slug}/orders")
.header("Content-Type", "application/json")
.body("{\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\"\n },\n \"items\": [\n {\n \"offerId\": \"uuid-of-offer\"\n }\n ],\n \"moveInDate\": \"2025-02-01\",\n \"notes\": \"Please contact me in the morning\",\n \"idempotencyKey\": \"a1b2c3d4-checkout-attempt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offergrid.io/public/links/{slug}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerInfo\": {\n \"email\": \"john@example.com\",\n \"phone\": \"+1-555-123-4567\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"fullName\": \"John Doe\"\n },\n \"items\": [\n {\n \"offerId\": \"uuid-of-offer\"\n }\n ],\n \"moveInDate\": \"2025-02-01\",\n \"notes\": \"Please contact me in the morning\",\n \"idempotencyKey\": \"a1b2c3d4-checkout-attempt\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 400,
"message": [
"name should not be empty",
"category must be one of the following values: internet, electricity"
],
"error": "Bad Request"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}{
"statusCode": 404,
"message": "Offer not found",
"error": "Not Found"
}