curl --request POST \
--url https://shelfforce.ai/api/v1/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Check Coca-Cola facing at Walmart #4523",
"placeId": "pl_abc123",
"assignedTo": "usr_qrs789",
"dueDate": "2026-03-15",
"notes": "Verify the new promo display is set up correctly.",
"expectationIds": [
"inv_a1b2c3",
"inv_d4e5f6"
]
}
'import requests
url = "https://shelfforce.ai/api/v1/tasks"
payload = {
"title": "Check Coca-Cola facing at Walmart #4523",
"placeId": "pl_abc123",
"assignedTo": "usr_qrs789",
"dueDate": "2026-03-15",
"notes": "Verify the new promo display is set up correctly.",
"expectationIds": ["inv_a1b2c3", "inv_d4e5f6"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Check Coca-Cola facing at Walmart #4523',
placeId: 'pl_abc123',
assignedTo: 'usr_qrs789',
dueDate: '2026-03-15',
notes: 'Verify the new promo display is set up correctly.',
expectationIds: ['inv_a1b2c3', 'inv_d4e5f6']
})
};
fetch('https://shelfforce.ai/api/v1/tasks', 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://shelfforce.ai/api/v1/tasks",
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([
'title' => 'Check Coca-Cola facing at Walmart #4523',
'placeId' => 'pl_abc123',
'assignedTo' => 'usr_qrs789',
'dueDate' => '2026-03-15',
'notes' => 'Verify the new promo display is set up correctly.',
'expectationIds' => [
'inv_a1b2c3',
'inv_d4e5f6'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://shelfforce.ai/api/v1/tasks"
payload := strings.NewReader("{\n \"title\": \"Check Coca-Cola facing at Walmart #4523\",\n \"placeId\": \"pl_abc123\",\n \"assignedTo\": \"usr_qrs789\",\n \"dueDate\": \"2026-03-15\",\n \"notes\": \"Verify the new promo display is set up correctly.\",\n \"expectationIds\": [\n \"inv_a1b2c3\",\n \"inv_d4e5f6\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://shelfforce.ai/api/v1/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Check Coca-Cola facing at Walmart #4523\",\n \"placeId\": \"pl_abc123\",\n \"assignedTo\": \"usr_qrs789\",\n \"dueDate\": \"2026-03-15\",\n \"notes\": \"Verify the new promo display is set up correctly.\",\n \"expectationIds\": [\n \"inv_a1b2c3\",\n \"inv_d4e5f6\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://shelfforce.ai/api/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Check Coca-Cola facing at Walmart #4523\",\n \"placeId\": \"pl_abc123\",\n \"assignedTo\": \"usr_qrs789\",\n \"dueDate\": \"2026-03-15\",\n \"notes\": \"Verify the new promo display is set up correctly.\",\n \"expectationIds\": [\n \"inv_a1b2c3\",\n \"inv_d4e5f6\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "tsk_lmn012",
"status": "pending",
"createdAt": "2026-02-23T10:30:00Z"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "The provided API key is invalid or has been revoked."
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The 'imageUrl' field must be a valid URL."
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 12 seconds."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred. Please try again or contact support with request ID."
}
}Create a task
Creates a new field data-collection task. Optionally link to a place, assign a user, and attach inventory items.
curl --request POST \
--url https://shelfforce.ai/api/v1/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Check Coca-Cola facing at Walmart #4523",
"placeId": "pl_abc123",
"assignedTo": "usr_qrs789",
"dueDate": "2026-03-15",
"notes": "Verify the new promo display is set up correctly.",
"expectationIds": [
"inv_a1b2c3",
"inv_d4e5f6"
]
}
'import requests
url = "https://shelfforce.ai/api/v1/tasks"
payload = {
"title": "Check Coca-Cola facing at Walmart #4523",
"placeId": "pl_abc123",
"assignedTo": "usr_qrs789",
"dueDate": "2026-03-15",
"notes": "Verify the new promo display is set up correctly.",
"expectationIds": ["inv_a1b2c3", "inv_d4e5f6"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Check Coca-Cola facing at Walmart #4523',
placeId: 'pl_abc123',
assignedTo: 'usr_qrs789',
dueDate: '2026-03-15',
notes: 'Verify the new promo display is set up correctly.',
expectationIds: ['inv_a1b2c3', 'inv_d4e5f6']
})
};
fetch('https://shelfforce.ai/api/v1/tasks', 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://shelfforce.ai/api/v1/tasks",
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([
'title' => 'Check Coca-Cola facing at Walmart #4523',
'placeId' => 'pl_abc123',
'assignedTo' => 'usr_qrs789',
'dueDate' => '2026-03-15',
'notes' => 'Verify the new promo display is set up correctly.',
'expectationIds' => [
'inv_a1b2c3',
'inv_d4e5f6'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://shelfforce.ai/api/v1/tasks"
payload := strings.NewReader("{\n \"title\": \"Check Coca-Cola facing at Walmart #4523\",\n \"placeId\": \"pl_abc123\",\n \"assignedTo\": \"usr_qrs789\",\n \"dueDate\": \"2026-03-15\",\n \"notes\": \"Verify the new promo display is set up correctly.\",\n \"expectationIds\": [\n \"inv_a1b2c3\",\n \"inv_d4e5f6\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://shelfforce.ai/api/v1/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Check Coca-Cola facing at Walmart #4523\",\n \"placeId\": \"pl_abc123\",\n \"assignedTo\": \"usr_qrs789\",\n \"dueDate\": \"2026-03-15\",\n \"notes\": \"Verify the new promo display is set up correctly.\",\n \"expectationIds\": [\n \"inv_a1b2c3\",\n \"inv_d4e5f6\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://shelfforce.ai/api/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Check Coca-Cola facing at Walmart #4523\",\n \"placeId\": \"pl_abc123\",\n \"assignedTo\": \"usr_qrs789\",\n \"dueDate\": \"2026-03-15\",\n \"notes\": \"Verify the new promo display is set up correctly.\",\n \"expectationIds\": [\n \"inv_a1b2c3\",\n \"inv_d4e5f6\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "tsk_lmn012",
"status": "pending",
"createdAt": "2026-02-23T10:30:00Z"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "The provided API key is invalid or has been revoked."
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The 'imageUrl' field must be a valid URL."
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 12 seconds."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred. Please try again or contact support with request ID."
}
}Authorizations
API key with sf_live_ prefix. Pass as Authorization: Bearer sf_live_...
Headers
Unique key for idempotent requests. If a request with the same key was already processed within the last 24 hours, the cached response is returned with X-Idempotent-Replayed: true.
"idk_550e8400-e29b-41d4-a716-446655440000"
Body
Short descriptive title for the task.
"Check Coca-Cola facing at Walmart #4523"
Place ID to associate with this task.
"pl_abc123"
User ID to assign the task to.
"usr_qrs789"
Task due date in ISO 8601 date format.
"2026-03-15"
Free-form notes or instructions.
"Verify the new promo display is set up correctly."
Expectation IDs to check during this task.
["inv_a1b2c3", "inv_d4e5f6"]
Response
Task created.
Show child attributes
Show child attributes