Get inventory source diagnostics
curl --request GET \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/diagnostics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/diagnostics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/diagnostics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"source": {
"id": "<string>",
"sourceId": "<string>",
"name": "<string>",
"agentId": "<string>",
"endpointUrl": "<string>",
"auth": {
"type": "<string>",
"required": true,
"configured": true
},
"capabilities": {
"tools": [
"<string>"
]
},
"health": {
"lastError": "<string>",
"lastErrorCode": "<string>",
"lastErrorAt": "<string>",
"lastSuccessAt": "<string>",
"lastCheckedAt": "<string>"
},
"capabilityHealth": {
"inventory": {
"lastError": "<string>",
"lastErrorCode": "<string>",
"lastErrorAt": "<string>",
"lastSuccessAt": "<string>",
"lastCheckedAt": "<string>"
},
"reporting": {
"lastError": "<string>",
"lastErrorCode": "<string>",
"lastErrorAt": "<string>",
"lastSuccessAt": "<string>",
"lastCheckedAt": "<string>"
}
}
},
"window": {
"hours": 4503599627370496,
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"sampledActivityCount": 4503599627370495,
"activityTruncated": true,
"sampledTestRunCount": 4503599627370495
},
"performance": {
"requestCount": 4503599627370495,
"responseCount": 4503599627370495,
"exchangeCount": 4503599627370495,
"completedCount": 4503599627370495,
"failedCount": 4503599627370495,
"inputRequiredCount": 4503599627370495,
"pendingCount": 4503599627370495,
"rejectedCount": 4503599627370495,
"timeoutCount": 4503599627370495,
"timeoutRate": 0.5,
"errorRate": 0.5,
"inputRequiredRate": 0.5,
"completedRate": 0.5,
"latencyThresholdMs": 4503599627370496,
"overThresholdCount": 4503599627370495,
"staleAsyncResponseCount": 4503599627370495,
"p50LatencyMs": 4503599627370495,
"p95LatencyMs": 4503599627370495,
"p99LatencyMs": 4503599627370495,
"unknownLatencyCount": 4503599627370495
},
"comparison": {
"previousWindow": {
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"exchangeCount": 4503599627370495,
"issueCount": 4503599627370495,
"timeoutCount": 4503599627370495,
"errorRate": 0.5,
"p95LatencyMs": 4503599627370495,
"sampledActivityCount": 4503599627370495,
"activityTruncated": true
},
"issueDelta": 0,
"timeoutDelta": 0,
"errorRateDelta": 123,
"p95LatencyDeltaMs": 0,
"summary": "<string>"
},
"timeline": [
{
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"exchangeCount": 4503599627370495,
"issueCount": 4503599627370495,
"failedCount": 4503599627370495,
"rejectedCount": 4503599627370495,
"timeoutCount": 4503599627370495,
"errorRate": 0.5,
"p95LatencyMs": 4503599627370495
}
],
"toolBreakdown": [
{
"tool": "<string>",
"exchangeCount": 4503599627370495,
"completedCount": 4503599627370495,
"failedCount": 4503599627370495,
"inputRequiredCount": 4503599627370495,
"rejectedCount": 4503599627370495,
"timeoutCount": 4503599627370495,
"p95LatencyMs": 4503599627370495
}
],
"discoveryParticipation": {
"calledCount": 4503599627370495,
"skippedCount": 4503599627370495,
"excludedCount": 4503599627370495,
"timedOutCount": 4503599627370495,
"skipReasons": [
{
"reason": "<string>",
"count": 4503599627370496
}
]
},
"outcomeMix": {
"returnedProductsCount": 4503599627370495,
"returnedNoProductsCount": 4503599627370495,
"failedCount": 4503599627370495,
"businessRejectedCount": 4503599627370495,
"pendingCount": 4503599627370495,
"inputRequiredCount": 4503599627370495,
"timedOutCount": 4503599627370495,
"skippedCount": 4503599627370495
},
"demandImpact": {
"buyerRequestsAffected": 4503599627370495,
"missedProductOpportunityCount": 4503599627370495,
"notes": [
"<string>"
]
},
"recentActivity": [
{
"id": 0,
"timestamp": "2023-11-07T05:31:56Z",
"tool": "<string>",
"taskStatus": "<string>",
"activityType": "<string>",
"taskId": "<string>",
"operationId": "<string>",
"contextId": "<string>",
"idempotencyKey": "<string>",
"debugId": "<string>",
"traceparent": "<string>",
"requestId": "<string>",
"correlationId": "<string>",
"initiatorEmail": "<string>",
"origin": {
"testRunUid": "<string>",
"testRunToolName": "<string>",
"testRunCreatedAt": "2023-11-07T05:31:56Z"
},
"isIssue": true,
"summary": "<string>",
"details": {
"payload": {},
"relatedRequest": {
"timestamp": "2023-11-07T05:31:56Z",
"payload": {}
}
}
}
],
"diagnosis": {
"topCause": "<string>",
"issues": [
{
"count": 4503599627370496,
"summary": "<string>"
}
],
"nextSteps": [
"<string>"
],
"developerHandoff": {
"sourceId": "<string>",
"sourceName": "<string>",
"agentId": "<string>",
"endpointUrl": "<string>",
"latestTaskId": "<string>",
"latestOperationId": "<string>",
"latestContextId": "<string>",
"latestIdempotencyKey": "<string>",
"latestDebugId": "<string>",
"latestCorrelationId": "<string>",
"correlationHeaders": {},
"latestError": "<string>"
}
},
"docs": [
{
"label": "<string>",
"url": "<string>"
}
]
}{
"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": {}
}
}Storefront
Get inventory source diagnostics
Get recent call health, latency, timeout, failure, and prior-window movement diagnostics for a storefront inventory source.
GET
/
inventory-sources
/
{sourceId}
/
diagnostics
Get inventory source diagnostics
curl --request GET \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/diagnostics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/diagnostics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/diagnostics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"source": {
"id": "<string>",
"sourceId": "<string>",
"name": "<string>",
"agentId": "<string>",
"endpointUrl": "<string>",
"auth": {
"type": "<string>",
"required": true,
"configured": true
},
"capabilities": {
"tools": [
"<string>"
]
},
"health": {
"lastError": "<string>",
"lastErrorCode": "<string>",
"lastErrorAt": "<string>",
"lastSuccessAt": "<string>",
"lastCheckedAt": "<string>"
},
"capabilityHealth": {
"inventory": {
"lastError": "<string>",
"lastErrorCode": "<string>",
"lastErrorAt": "<string>",
"lastSuccessAt": "<string>",
"lastCheckedAt": "<string>"
},
"reporting": {
"lastError": "<string>",
"lastErrorCode": "<string>",
"lastErrorAt": "<string>",
"lastSuccessAt": "<string>",
"lastCheckedAt": "<string>"
}
}
},
"window": {
"hours": 4503599627370496,
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"sampledActivityCount": 4503599627370495,
"activityTruncated": true,
"sampledTestRunCount": 4503599627370495
},
"performance": {
"requestCount": 4503599627370495,
"responseCount": 4503599627370495,
"exchangeCount": 4503599627370495,
"completedCount": 4503599627370495,
"failedCount": 4503599627370495,
"inputRequiredCount": 4503599627370495,
"pendingCount": 4503599627370495,
"rejectedCount": 4503599627370495,
"timeoutCount": 4503599627370495,
"timeoutRate": 0.5,
"errorRate": 0.5,
"inputRequiredRate": 0.5,
"completedRate": 0.5,
"latencyThresholdMs": 4503599627370496,
"overThresholdCount": 4503599627370495,
"staleAsyncResponseCount": 4503599627370495,
"p50LatencyMs": 4503599627370495,
"p95LatencyMs": 4503599627370495,
"p99LatencyMs": 4503599627370495,
"unknownLatencyCount": 4503599627370495
},
"comparison": {
"previousWindow": {
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"exchangeCount": 4503599627370495,
"issueCount": 4503599627370495,
"timeoutCount": 4503599627370495,
"errorRate": 0.5,
"p95LatencyMs": 4503599627370495,
"sampledActivityCount": 4503599627370495,
"activityTruncated": true
},
"issueDelta": 0,
"timeoutDelta": 0,
"errorRateDelta": 123,
"p95LatencyDeltaMs": 0,
"summary": "<string>"
},
"timeline": [
{
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"exchangeCount": 4503599627370495,
"issueCount": 4503599627370495,
"failedCount": 4503599627370495,
"rejectedCount": 4503599627370495,
"timeoutCount": 4503599627370495,
"errorRate": 0.5,
"p95LatencyMs": 4503599627370495
}
],
"toolBreakdown": [
{
"tool": "<string>",
"exchangeCount": 4503599627370495,
"completedCount": 4503599627370495,
"failedCount": 4503599627370495,
"inputRequiredCount": 4503599627370495,
"rejectedCount": 4503599627370495,
"timeoutCount": 4503599627370495,
"p95LatencyMs": 4503599627370495
}
],
"discoveryParticipation": {
"calledCount": 4503599627370495,
"skippedCount": 4503599627370495,
"excludedCount": 4503599627370495,
"timedOutCount": 4503599627370495,
"skipReasons": [
{
"reason": "<string>",
"count": 4503599627370496
}
]
},
"outcomeMix": {
"returnedProductsCount": 4503599627370495,
"returnedNoProductsCount": 4503599627370495,
"failedCount": 4503599627370495,
"businessRejectedCount": 4503599627370495,
"pendingCount": 4503599627370495,
"inputRequiredCount": 4503599627370495,
"timedOutCount": 4503599627370495,
"skippedCount": 4503599627370495
},
"demandImpact": {
"buyerRequestsAffected": 4503599627370495,
"missedProductOpportunityCount": 4503599627370495,
"notes": [
"<string>"
]
},
"recentActivity": [
{
"id": 0,
"timestamp": "2023-11-07T05:31:56Z",
"tool": "<string>",
"taskStatus": "<string>",
"activityType": "<string>",
"taskId": "<string>",
"operationId": "<string>",
"contextId": "<string>",
"idempotencyKey": "<string>",
"debugId": "<string>",
"traceparent": "<string>",
"requestId": "<string>",
"correlationId": "<string>",
"initiatorEmail": "<string>",
"origin": {
"testRunUid": "<string>",
"testRunToolName": "<string>",
"testRunCreatedAt": "2023-11-07T05:31:56Z"
},
"isIssue": true,
"summary": "<string>",
"details": {
"payload": {},
"relatedRequest": {
"timestamp": "2023-11-07T05:31:56Z",
"payload": {}
}
}
}
],
"diagnosis": {
"topCause": "<string>",
"issues": [
{
"count": 4503599627370496,
"summary": "<string>"
}
],
"nextSteps": [
"<string>"
],
"developerHandoff": {
"sourceId": "<string>",
"sourceName": "<string>",
"agentId": "<string>",
"endpointUrl": "<string>",
"latestTaskId": "<string>",
"latestOperationId": "<string>",
"latestContextId": "<string>",
"latestIdempotencyKey": "<string>",
"latestDebugId": "<string>",
"latestCorrelationId": "<string>",
"correlationHeaders": {},
"latestError": "<string>"
}
},
"docs": [
{
"label": "<string>",
"url": "<string>"
}
]
}{
"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
Minimum string length:
1Query Parameters
Number of trailing hours to analyze for the current diagnostics window. The previous comparison window uses the same duration immediately before it.
Required range:
1 <= x <= 720Response
Get inventory source diagnostics
Seller-facing diagnostics for a single third-party sales-agent or modular inventory source.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I