curl --request PATCH \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection \
--header 'Content-Type: application/json' \
--data '
{
"version": 123,
"estimateColumnsAttributes": {},
"catalogFamilySourceId": "<string>"
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection"
payload = {
"version": 123,
"estimateColumnsAttributes": {},
"catalogFamilySourceId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({version: 123, estimateColumnsAttributes: {}, catalogFamilySourceId: '<string>'})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection', 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}/items/{id}/source-selection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'version' => 123,
'estimateColumnsAttributes' => [
],
'catalogFamilySourceId' => '<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}/items/{id}/source-selection"
payload := strings.NewReader("{\n \"version\": 123,\n \"estimateColumnsAttributes\": {},\n \"catalogFamilySourceId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection")
.header("Content-Type", "application/json")
.body("{\n \"version\": 123,\n \"estimateColumnsAttributes\": {},\n \"catalogFamilySourceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 123,\n \"estimateColumnsAttributes\": {},\n \"catalogFamilySourceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"notes": "<string>",
"id": "<string>",
"projectId": "<string>",
"projectItemSlotId": "<string>",
"name": "<string>",
"catalogFamilyId": "<string>",
"catalogItemId": "<string>",
"materialFinish": {
"id": "<string>",
"name": "<string>",
"isBaseMaterial": true
},
"columnsAttributes": {},
"formulaAssignments": {},
"effectiveFormulaAssignments": {},
"effectiveTaxSettings": {
"sources": {},
"values": {
"purchaseTaxRate": "<string>",
"clientSalesTaxRate": "<string>",
"purchaseTaxLabel": "<string>",
"clientSalesTaxLabel": "<string>",
"purchaseTaxExempt": true,
"listPriceIncludesPurchaseTax": true,
"useSameTaxRate": true
}
},
"inheritedTaxSettings": {
"sources": {},
"values": {
"purchaseTaxRate": "<string>",
"clientSalesTaxRate": "<string>",
"purchaseTaxLabel": "<string>",
"clientSalesTaxLabel": "<string>",
"purchaseTaxExempt": true,
"listPriceIncludesPurchaseTax": true,
"useSameTaxRate": true
}
},
"formulaResults": {},
"purchaseQuantityOverride": "<string>",
"purchasingUnit": "units",
"sourceMeta": {
"url": "<string>",
"selectors": {},
"title": "<string>",
"favicon": "<string>",
"ogImage": "<string>",
"clippedAt": "<string>"
},
"instructionLinks": [
{
"assigneeRoleGroupIds": [
"mfg_vendors"
],
"id": "<string>",
"kind": "instruction",
"text": "<string>",
"position": 123
}
],
"isPrimary": true,
"optionStatus": "active",
"catalogConnectionMode": "live",
"savedAt": "2023-11-07T05:31:56Z",
"selectedSource": {
"isDefault": true,
"companyName": {},
"officeName": {},
"currency": "<string>"
},
"collectionApplication": {
"collection": {
"id": "<string>",
"name": "<string>",
"brand": "<string>",
"regions": [
"<string>"
],
"generation": 123,
"version": 123,
"navigable": true
},
"entry": {
"id": "<string>",
"label": "<string>",
"productTypeLabel": "<string>",
"productTypeId": "<string>"
},
"reference": {
"label": "<string>",
"kind": "catalog_item",
"referenceCode": "<string>"
},
"application": {
"id": "<string>",
"createdAt": "<string>"
},
"content": {
"referenceNumber": "<string>",
"description": "<string>",
"notes": [
"<string>"
]
},
"governance": {
"mandatoryItem": true,
"designReviewRequired": true,
"optionalManufacturerNames": [
"<string>"
]
}
},
"categoryId": "<string>",
"productTypeId": "<string>",
"kind": "option",
"catalogFamilyStatus": "draft",
"catalogSourceLifecycle": {
"state": "archived",
"expiresAt": "2023-11-07T05:31:56Z",
"itemType": "default",
"restorable": true
},
"catalogFamilyItemType": "default",
"catalogDecisionEventIds": [
"<string>"
],
"refNumber": "<string>",
"affectedParentPiIds": [
"<string>"
],
"version": 123,
"createdAt": "<string>",
"updatedAt": "<string>",
"keptFromEstimate": [
"<string>"
],
"pricingSettings": {
"pricingMethod": "standard",
"listPriceIncludesPurchaseTax": true,
"purchaseTaxExempt": true,
"useSameTaxRate": true
},
"slotColumnsAttributes": {},
"catalogFamilyDiscontinued": true,
"coreChangePolicy": {},
"catalogFamilySourceId": "<string>",
"softCostOverrides": {},
"effectiveSoftCosts": [
{
"source": "category",
"mode": "percentage",
"inheritedRate": "<string>",
"rate": "<string>",
"amount": "<string>",
"id": "<string>",
"name": "<string>",
"typeId": "<string>",
"archived": true
}
],
"syncStateCache": {
"hasDiff": true,
"columnsDiff": true,
"partsDiff": {
"hasDiff": true,
"addedLocally": [
"<string>"
],
"removedLocally": [
"<string>"
],
"quantityChanged": [
{
"catalogItemId": "<string>",
"projectQty": "<string>",
"catalogQty": "<string>"
}
]
},
"selectionDiff": {
"familySourceMismatch": true,
"itemSourceMismatch": true
},
"orphanedRefs": {
"family": true,
"item": true,
"familySource": true,
"itemSource": true
},
"computedAt": "<string>",
"componentsDiverged": true
},
"affectedCatalogFamilyId": "<string>",
"componentBuildCostBreakdown": {
"parentUnitsPerPackage": "<string>",
"rows": [
{
"projectItemId": "<string>",
"quantity": "<string>",
"costPrice": "<string>",
"unitsPerPackage": "<string>",
"contribution": "<string>"
}
]
}
}Select Source
curl --request PATCH \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection \
--header 'Content-Type: application/json' \
--data '
{
"version": 123,
"estimateColumnsAttributes": {},
"catalogFamilySourceId": "<string>"
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection"
payload = {
"version": 123,
"estimateColumnsAttributes": {},
"catalogFamilySourceId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({version: 123, estimateColumnsAttributes: {}, catalogFamilySourceId: '<string>'})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection', 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}/items/{id}/source-selection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'version' => 123,
'estimateColumnsAttributes' => [
],
'catalogFamilySourceId' => '<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}/items/{id}/source-selection"
payload := strings.NewReader("{\n \"version\": 123,\n \"estimateColumnsAttributes\": {},\n \"catalogFamilySourceId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection")
.header("Content-Type", "application/json")
.body("{\n \"version\": 123,\n \"estimateColumnsAttributes\": {},\n \"catalogFamilySourceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/items/{id}/source-selection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 123,\n \"estimateColumnsAttributes\": {},\n \"catalogFamilySourceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"notes": "<string>",
"id": "<string>",
"projectId": "<string>",
"projectItemSlotId": "<string>",
"name": "<string>",
"catalogFamilyId": "<string>",
"catalogItemId": "<string>",
"materialFinish": {
"id": "<string>",
"name": "<string>",
"isBaseMaterial": true
},
"columnsAttributes": {},
"formulaAssignments": {},
"effectiveFormulaAssignments": {},
"effectiveTaxSettings": {
"sources": {},
"values": {
"purchaseTaxRate": "<string>",
"clientSalesTaxRate": "<string>",
"purchaseTaxLabel": "<string>",
"clientSalesTaxLabel": "<string>",
"purchaseTaxExempt": true,
"listPriceIncludesPurchaseTax": true,
"useSameTaxRate": true
}
},
"inheritedTaxSettings": {
"sources": {},
"values": {
"purchaseTaxRate": "<string>",
"clientSalesTaxRate": "<string>",
"purchaseTaxLabel": "<string>",
"clientSalesTaxLabel": "<string>",
"purchaseTaxExempt": true,
"listPriceIncludesPurchaseTax": true,
"useSameTaxRate": true
}
},
"formulaResults": {},
"purchaseQuantityOverride": "<string>",
"purchasingUnit": "units",
"sourceMeta": {
"url": "<string>",
"selectors": {},
"title": "<string>",
"favicon": "<string>",
"ogImage": "<string>",
"clippedAt": "<string>"
},
"instructionLinks": [
{
"assigneeRoleGroupIds": [
"mfg_vendors"
],
"id": "<string>",
"kind": "instruction",
"text": "<string>",
"position": 123
}
],
"isPrimary": true,
"optionStatus": "active",
"catalogConnectionMode": "live",
"savedAt": "2023-11-07T05:31:56Z",
"selectedSource": {
"isDefault": true,
"companyName": {},
"officeName": {},
"currency": "<string>"
},
"collectionApplication": {
"collection": {
"id": "<string>",
"name": "<string>",
"brand": "<string>",
"regions": [
"<string>"
],
"generation": 123,
"version": 123,
"navigable": true
},
"entry": {
"id": "<string>",
"label": "<string>",
"productTypeLabel": "<string>",
"productTypeId": "<string>"
},
"reference": {
"label": "<string>",
"kind": "catalog_item",
"referenceCode": "<string>"
},
"application": {
"id": "<string>",
"createdAt": "<string>"
},
"content": {
"referenceNumber": "<string>",
"description": "<string>",
"notes": [
"<string>"
]
},
"governance": {
"mandatoryItem": true,
"designReviewRequired": true,
"optionalManufacturerNames": [
"<string>"
]
}
},
"categoryId": "<string>",
"productTypeId": "<string>",
"kind": "option",
"catalogFamilyStatus": "draft",
"catalogSourceLifecycle": {
"state": "archived",
"expiresAt": "2023-11-07T05:31:56Z",
"itemType": "default",
"restorable": true
},
"catalogFamilyItemType": "default",
"catalogDecisionEventIds": [
"<string>"
],
"refNumber": "<string>",
"affectedParentPiIds": [
"<string>"
],
"version": 123,
"createdAt": "<string>",
"updatedAt": "<string>",
"keptFromEstimate": [
"<string>"
],
"pricingSettings": {
"pricingMethod": "standard",
"listPriceIncludesPurchaseTax": true,
"purchaseTaxExempt": true,
"useSameTaxRate": true
},
"slotColumnsAttributes": {},
"catalogFamilyDiscontinued": true,
"coreChangePolicy": {},
"catalogFamilySourceId": "<string>",
"softCostOverrides": {},
"effectiveSoftCosts": [
{
"source": "category",
"mode": "percentage",
"inheritedRate": "<string>",
"rate": "<string>",
"amount": "<string>",
"id": "<string>",
"name": "<string>",
"typeId": "<string>",
"archived": true
}
],
"syncStateCache": {
"hasDiff": true,
"columnsDiff": true,
"partsDiff": {
"hasDiff": true,
"addedLocally": [
"<string>"
],
"removedLocally": [
"<string>"
],
"quantityChanged": [
{
"catalogItemId": "<string>",
"projectQty": "<string>",
"catalogQty": "<string>"
}
]
},
"selectionDiff": {
"familySourceMismatch": true,
"itemSourceMismatch": true
},
"orphanedRefs": {
"family": true,
"item": true,
"familySource": true,
"itemSource": true
},
"computedAt": "<string>",
"componentsDiverged": true
},
"affectedCatalogFamilyId": "<string>",
"componentBuildCostBreakdown": {
"parentUnitsPerPackage": "<string>",
"rows": [
{
"projectItemId": "<string>",
"quantity": "<string>",
"costPrice": "<string>",
"unitsPerPackage": "<string>",
"contribution": "<string>"
}
]
}
}Body
Supplier (source-owned) column values typed on the Estimate and not saved yet, by column slug. When the line leaves its Estimate for this vendor, a field the vendor leaves empty takes this value instead of the saved estimate, and it is handled like the kept estimate (written to a New from project vendor, staged or proposed on a Ready to use one); a field the vendor fills keeps the vendor value. Ignored by every other choice: vendor to vendor, back to the Estimate, or the source the line already stands on (which writes nothing). Validated as a PATCH …/items/{id} of those columns is; a value it would refuse answers 400 INVALID_COLUMNS_ATTRIBUTES and nothing is written.
Response
Supplier (source-owned) column slugs the chosen vendor left empty when the line left its Estimate (its current Offer names no supplier, the chosen one does), so the line kept its estimate there. A field is listed whether or not the line held an estimate value in it. Empty for every other choice: vendor to vendor, back to the Estimate, or the source the line already stands on.