curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/tests/discovery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brief": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/tests/discovery"
payload = { "brief": "<string>" }
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({brief: '<string>'})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/tests/discovery', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"source": {
"sourceId": "<string>",
"name": "<string>"
},
"operation": "get_products",
"outcome": "passed",
"message": "<string>",
"productCount": 4503599627370495,
"products": [
{
"productId": "<string>",
"name": "<string>"
}
],
"checkedAt": "2023-11-07T05:31:56Z",
"durationMs": 4503599627370495,
"trace": {
"operationId": "<string>",
"taskId": "<string>",
"contextId": "<string>",
"debugId": "<string>",
"requestId": "<string>",
"traceparent": "<string>"
},
"steps": [
{
"key": "<string>",
"label": "<string>",
"status": "completed",
"operation": "<string>",
"httpStatus": 0,
"endpoint": "<string>",
"message": "<string>"
}
],
"run": {
"runUid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "passed",
"createdAt": "2023-11-07T05:31:56Z"
},
"readiness": {
"status": "ready",
"canTransact": true,
"refreshedAt": "2023-11-07T05:31:56Z"
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Run an inventory source discovery test
Call the selected external sales agent’s get_products operation with a read-only diagnostic brief. This test creates no media buy, spends nothing, and records a durable result with available trace identifiers.
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/tests/discovery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brief": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/tests/discovery"
payload = { "brief": "<string>" }
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({brief: '<string>'})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/tests/discovery', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"source": {
"sourceId": "<string>",
"name": "<string>"
},
"operation": "get_products",
"outcome": "passed",
"message": "<string>",
"productCount": 4503599627370495,
"products": [
{
"productId": "<string>",
"name": "<string>"
}
],
"checkedAt": "2023-11-07T05:31:56Z",
"durationMs": 4503599627370495,
"trace": {
"operationId": "<string>",
"taskId": "<string>",
"contextId": "<string>",
"debugId": "<string>",
"requestId": "<string>",
"traceparent": "<string>"
},
"steps": [
{
"key": "<string>",
"label": "<string>",
"status": "completed",
"operation": "<string>",
"httpStatus": 0,
"endpoint": "<string>",
"message": "<string>"
}
],
"run": {
"runUid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "passed",
"createdAt": "2023-11-07T05:31:56Z"
},
"readiness": {
"status": "ready",
"canTransact": true,
"refreshedAt": "2023-11-07T05:31:56Z"
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Inventory source ID
1Body
Input for a read-only, no-spend get_products diagnostic against one external sales-agent source.
Optional bounded buyer brief sent directly to this source with get_products. A deterministic diagnostic brief is used when omitted.
1 - 2000Response
Run an inventory source discovery test
Normalized result of a direct, read-only get_products diagnostic against one third-party sales-agent source.
Show child attributes
Show child attributes
get_products passed, empty, failed, not_reached 0 <= x <= 9007199254740991Representative matching products (id and name) from the source, capped at 20 items. products.length is at most productCount: items the source returned without a resolvable id are still counted in productCount but omitted from this list.
20Show child attributes
Show child attributes
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$0 <= x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes