Add Alternative
curl --request POST \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives \
--header 'Content-Type: application/json' \
--data '
{
"catalogFamilyId": "<string>",
"catalogItemId": "<string>",
"sourceSelection": {
"mode": "catalog_item_source",
"catalogItemSourceId": "<string>"
},
"name": "<string>",
"categoryId": "<string>"
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives"
payload = {
"catalogFamilyId": "<string>",
"catalogItemId": "<string>",
"sourceSelection": {
"mode": "catalog_item_source",
"catalogItemSourceId": "<string>"
},
"name": "<string>",
"categoryId": "<string>"
}
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({
catalogFamilyId: '<string>',
catalogItemId: '<string>',
sourceSelection: {mode: 'catalog_item_source', catalogItemSourceId: '<string>'},
name: '<string>',
categoryId: '<string>'
})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives', 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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives",
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([
'catalogFamilyId' => '<string>',
'catalogItemId' => '<string>',
'sourceSelection' => [
'mode' => 'catalog_item_source',
'catalogItemSourceId' => '<string>'
],
'name' => '<string>',
'categoryId' => '<string>'
]),
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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives"
payload := strings.NewReader("{\n \"catalogFamilyId\": \"<string>\",\n \"catalogItemId\": \"<string>\",\n \"sourceSelection\": {\n \"mode\": \"catalog_item_source\",\n \"catalogItemSourceId\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"categoryId\": \"<string>\"\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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives")
.header("Content-Type", "application/json")
.body("{\n \"catalogFamilyId\": \"<string>\",\n \"catalogItemId\": \"<string>\",\n \"sourceSelection\": {\n \"mode\": \"catalog_item_source\",\n \"catalogItemSourceId\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"categoryId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives")
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 \"catalogFamilyId\": \"<string>\",\n \"catalogItemId\": \"<string>\",\n \"sourceSelection\": {\n \"mode\": \"catalog_item_source\",\n \"catalogItemSourceId\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"categoryId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 409,
"message": "Conflict",
"code": "VARIANT_COMBO_TAKEN",
"entity": "<string>"
}Project Item Slots
Add Alternative
POST
/
v1
/
workspaces
/
{workspaceId}
/
projects
/
{projectId}
/
item-slots
/
{id}
/
alternatives
Add Alternative
curl --request POST \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives \
--header 'Content-Type: application/json' \
--data '
{
"catalogFamilyId": "<string>",
"catalogItemId": "<string>",
"sourceSelection": {
"mode": "catalog_item_source",
"catalogItemSourceId": "<string>"
},
"name": "<string>",
"categoryId": "<string>"
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives"
payload = {
"catalogFamilyId": "<string>",
"catalogItemId": "<string>",
"sourceSelection": {
"mode": "catalog_item_source",
"catalogItemSourceId": "<string>"
},
"name": "<string>",
"categoryId": "<string>"
}
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({
catalogFamilyId: '<string>',
catalogItemId: '<string>',
sourceSelection: {mode: 'catalog_item_source', catalogItemSourceId: '<string>'},
name: '<string>',
categoryId: '<string>'
})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives', 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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives",
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([
'catalogFamilyId' => '<string>',
'catalogItemId' => '<string>',
'sourceSelection' => [
'mode' => 'catalog_item_source',
'catalogItemSourceId' => '<string>'
],
'name' => '<string>',
'categoryId' => '<string>'
]),
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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives"
payload := strings.NewReader("{\n \"catalogFamilyId\": \"<string>\",\n \"catalogItemId\": \"<string>\",\n \"sourceSelection\": {\n \"mode\": \"catalog_item_source\",\n \"catalogItemSourceId\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"categoryId\": \"<string>\"\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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives")
.header("Content-Type", "application/json")
.body("{\n \"catalogFamilyId\": \"<string>\",\n \"catalogItemId\": \"<string>\",\n \"sourceSelection\": {\n \"mode\": \"catalog_item_source\",\n \"catalogItemSourceId\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"categoryId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/item-slots/{id}/alternatives")
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 \"catalogFamilyId\": \"<string>\",\n \"catalogItemId\": \"<string>\",\n \"sourceSelection\": {\n \"mode\": \"catalog_item_source\",\n \"catalogItemSourceId\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"categoryId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 409,
"message": "Conflict",
"code": "VARIANT_COMBO_TAKEN",
"entity": "<string>"
}Body
application/json
pick = link to existing catalog entry; create = new family + item
Available options:
pick, create (mode=pick) BigInt ID of the catalog family to link
(mode=pick) BigInt ID of the catalog item to link
- Option 1
- Option 2
Show child attributes
Show child attributes
(mode=create) Name for the new catalog family / project item
Maximum string length:
200(mode=create) BigInt ID of the category for the new family
Response
409 - application/json
Example:
409
Example:
"Conflict"
UPPER_SNAKE_CASE domain error code. Present on validation / business-rule errors; absent on generic HTTP errors.
Example:
"VARIANT_COMBO_TAKEN"
Entity type that caused the conflict (e.g. "ProjectItem"). Present when the error is entity-specific.
⌘I