curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/feed/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previewBaseline": {
"previewToken": "<string>",
"revisionId": "<string>",
"customerId": 4503599627370496,
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"payloadDigest": "<string>",
"activeRevisionId": "<string>",
"activeCursor": "<string>",
"activeSnapshot": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"staleErrorCode": "STALE_PREVIEW_BASELINE"
},
"revision": {
"schemaVersion": "1.0.0",
"revisionId": "<string>",
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"idempotencyKey": "<string>",
"contentDigest": "<string>",
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"facts": [
{
"factId": "<string>",
"sourceId": "<string>",
"scope": {
"scopeType": "component",
"sourceId": "<string>",
"externalId": "<string>"
},
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"observedAt": "2023-11-07T05:31:56Z",
"poolId": "<string>",
"availability": {
"quantity": {
"unit": "<string>",
"amount": 1
},
"reservable": true
},
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"dimensions": {},
"pricingOptions": [],
"formatOptions": [],
"sourceMetadata": {}
}
],
"diagnostics": [
{
"code": "<string>",
"message": "<string>",
"rowIndex": 4503599627370495,
"factId": "<string>",
"field": "<string>",
"details": {}
}
],
"snapshot": "<string>",
"cursor": "<string>",
"observedThrough": "2023-11-07T05:31:56Z",
"catalogRevision": "<string>",
"correction": {
"correctionId": "<string>",
"targetType": "REVISION",
"targetRevisionId": "<string>",
"mode": "REPLACEMENT",
"reason": "<string>"
}
}
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/feed/commit"
payload = {
"feedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previewBaseline": {
"previewToken": "<string>",
"revisionId": "<string>",
"customerId": 4503599627370496,
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"payloadDigest": "<string>",
"activeRevisionId": "<string>",
"activeCursor": "<string>",
"activeSnapshot": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"staleErrorCode": "STALE_PREVIEW_BASELINE"
},
"revision": {
"schemaVersion": "1.0.0",
"revisionId": "<string>",
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"idempotencyKey": "<string>",
"contentDigest": "<string>",
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"facts": [
{
"factId": "<string>",
"sourceId": "<string>",
"scope": {
"scopeType": "component",
"sourceId": "<string>",
"externalId": "<string>"
},
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"observedAt": "2023-11-07T05:31:56Z",
"poolId": "<string>",
"availability": {
"quantity": {
"unit": "<string>",
"amount": 1
},
"reservable": True
},
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"dimensions": {},
"pricingOptions": [],
"formatOptions": [],
"sourceMetadata": {}
}
],
"diagnostics": [
{
"code": "<string>",
"message": "<string>",
"rowIndex": 4503599627370495,
"factId": "<string>",
"field": "<string>",
"details": {}
}
],
"snapshot": "<string>",
"cursor": "<string>",
"observedThrough": "2023-11-07T05:31:56Z",
"catalogRevision": "<string>",
"correction": {
"correctionId": "<string>",
"targetType": "REVISION",
"targetRevisionId": "<string>",
"mode": "REPLACEMENT",
"reason": "<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({
feedId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
previewBaseline: {
previewToken: '<string>',
revisionId: '<string>',
customerId: 4503599627370496,
sourceId: '<string>',
profileId: '<string>',
profileVersion: '<string>',
payloadDigest: '<string>',
activeRevisionId: '<string>',
activeCursor: '<string>',
activeSnapshot: '<string>',
createdAt: '2023-11-07T05:31:56Z',
expiresAt: '2023-11-07T05:31:56Z',
staleErrorCode: 'STALE_PREVIEW_BASELINE'
},
revision: {
schemaVersion: '1.0.0',
revisionId: '<string>',
sourceId: '<string>',
profileId: '<string>',
profileVersion: '<string>',
idempotencyKey: '<string>',
contentDigest: '<string>',
provenance: {
submittedAt: '2023-11-07T05:31:56Z',
contentDigest: '<string>',
actorId: '<string>',
adapterId: '<string>',
fileName: '<string>',
requestId: '<string>'
},
facts: [
{
factId: '<string>',
sourceId: '<string>',
scope: {scopeType: 'component', sourceId: '<string>', externalId: '<string>'},
period: {start: '2023-11-07T05:31:56Z', end: '2023-11-07T05:31:56Z'},
observedAt: '2023-11-07T05:31:56Z',
poolId: '<string>',
availability: {quantity: {unit: '<string>', amount: 1}, reservable: true},
provenance: {
submittedAt: '2023-11-07T05:31:56Z',
contentDigest: '<string>',
actorId: '<string>',
adapterId: '<string>',
fileName: '<string>',
requestId: '<string>'
},
dimensions: {},
pricingOptions: [],
formatOptions: [],
sourceMetadata: {}
}
],
diagnostics: [
{
code: '<string>',
message: '<string>',
rowIndex: 4503599627370495,
factId: '<string>',
field: '<string>',
details: {}
}
],
snapshot: '<string>',
cursor: '<string>',
observedThrough: '2023-11-07T05:31:56Z',
catalogRevision: '<string>',
correction: {
correctionId: '<string>',
targetType: 'REVISION',
targetRevisionId: '<string>',
mode: 'REPLACEMENT',
reason: '<string>'
}
}
})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/feed/commit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"feedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceId": "<string>",
"revision": {
"schemaVersion": "1.0.0",
"revisionId": "<string>",
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"idempotencyKey": "<string>",
"contentDigest": "<string>",
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"facts": [
{
"factId": "<string>",
"sourceId": "<string>",
"scope": {
"scopeType": "component",
"sourceId": "<string>",
"externalId": "<string>"
},
"dimensions": {},
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"observedAt": "2023-11-07T05:31:56Z",
"poolId": "<string>",
"availability": {
"quantity": {
"unit": "<string>",
"amount": 1
},
"reservable": true,
"upstreamBooked": {
"unit": "<string>",
"amount": 1
},
"temporalJoinFence": {
"grossFactId": "<string>",
"bookingFactId": "<string>",
"sourceId": "<string>",
"poolId": "<string>",
"unit": "<string>",
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"grossSnapshot": "<string>",
"bookingSnapshot": "<string>",
"grossObservedThrough": "2023-11-07T05:31:56Z",
"bookingObservedThrough": "2023-11-07T05:31:56Z",
"observedSkewSeconds": 1,
"diagnosticCode": "<string>"
}
},
"pricingOptions": [],
"formatOptions": [],
"sourceMetadata": {},
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
}
}
],
"diagnostics": [
{
"code": "<string>",
"message": "<string>",
"rowIndex": 4503599627370495,
"factId": "<string>",
"field": "<string>",
"details": {}
}
],
"snapshot": "<string>",
"cursor": "<string>",
"observedThrough": "2023-11-07T05:31:56Z",
"coveredPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"catalogRevision": "<string>",
"correction": {
"correctionId": "<string>",
"targetType": "REVISION",
"targetRevisionId": "<string>",
"mode": "REPLACEMENT",
"reason": "<string>"
}
},
"revisionRecord": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"feedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contentDigest": "<string>",
"replayed": true
}
}{
"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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Commit a previewed feed revision (HITL)
Atomically promote a signed PREVIEW baseline to a COMMITTED revision. The previewBaseline encodes the expected active_revision_id — if another commit advanced the head since the preview, this call returns 422 STALE_PREVIEW_BASELINE. Pass feedId, previewBaseline, and revision exactly as returned by POST /feed/preview or POST /feed/upload.
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/feed/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previewBaseline": {
"previewToken": "<string>",
"revisionId": "<string>",
"customerId": 4503599627370496,
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"payloadDigest": "<string>",
"activeRevisionId": "<string>",
"activeCursor": "<string>",
"activeSnapshot": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"staleErrorCode": "STALE_PREVIEW_BASELINE"
},
"revision": {
"schemaVersion": "1.0.0",
"revisionId": "<string>",
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"idempotencyKey": "<string>",
"contentDigest": "<string>",
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"facts": [
{
"factId": "<string>",
"sourceId": "<string>",
"scope": {
"scopeType": "component",
"sourceId": "<string>",
"externalId": "<string>"
},
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"observedAt": "2023-11-07T05:31:56Z",
"poolId": "<string>",
"availability": {
"quantity": {
"unit": "<string>",
"amount": 1
},
"reservable": true
},
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"dimensions": {},
"pricingOptions": [],
"formatOptions": [],
"sourceMetadata": {}
}
],
"diagnostics": [
{
"code": "<string>",
"message": "<string>",
"rowIndex": 4503599627370495,
"factId": "<string>",
"field": "<string>",
"details": {}
}
],
"snapshot": "<string>",
"cursor": "<string>",
"observedThrough": "2023-11-07T05:31:56Z",
"catalogRevision": "<string>",
"correction": {
"correctionId": "<string>",
"targetType": "REVISION",
"targetRevisionId": "<string>",
"mode": "REPLACEMENT",
"reason": "<string>"
}
}
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/feed/commit"
payload = {
"feedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previewBaseline": {
"previewToken": "<string>",
"revisionId": "<string>",
"customerId": 4503599627370496,
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"payloadDigest": "<string>",
"activeRevisionId": "<string>",
"activeCursor": "<string>",
"activeSnapshot": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"staleErrorCode": "STALE_PREVIEW_BASELINE"
},
"revision": {
"schemaVersion": "1.0.0",
"revisionId": "<string>",
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"idempotencyKey": "<string>",
"contentDigest": "<string>",
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"facts": [
{
"factId": "<string>",
"sourceId": "<string>",
"scope": {
"scopeType": "component",
"sourceId": "<string>",
"externalId": "<string>"
},
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"observedAt": "2023-11-07T05:31:56Z",
"poolId": "<string>",
"availability": {
"quantity": {
"unit": "<string>",
"amount": 1
},
"reservable": True
},
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"dimensions": {},
"pricingOptions": [],
"formatOptions": [],
"sourceMetadata": {}
}
],
"diagnostics": [
{
"code": "<string>",
"message": "<string>",
"rowIndex": 4503599627370495,
"factId": "<string>",
"field": "<string>",
"details": {}
}
],
"snapshot": "<string>",
"cursor": "<string>",
"observedThrough": "2023-11-07T05:31:56Z",
"catalogRevision": "<string>",
"correction": {
"correctionId": "<string>",
"targetType": "REVISION",
"targetRevisionId": "<string>",
"mode": "REPLACEMENT",
"reason": "<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({
feedId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
previewBaseline: {
previewToken: '<string>',
revisionId: '<string>',
customerId: 4503599627370496,
sourceId: '<string>',
profileId: '<string>',
profileVersion: '<string>',
payloadDigest: '<string>',
activeRevisionId: '<string>',
activeCursor: '<string>',
activeSnapshot: '<string>',
createdAt: '2023-11-07T05:31:56Z',
expiresAt: '2023-11-07T05:31:56Z',
staleErrorCode: 'STALE_PREVIEW_BASELINE'
},
revision: {
schemaVersion: '1.0.0',
revisionId: '<string>',
sourceId: '<string>',
profileId: '<string>',
profileVersion: '<string>',
idempotencyKey: '<string>',
contentDigest: '<string>',
provenance: {
submittedAt: '2023-11-07T05:31:56Z',
contentDigest: '<string>',
actorId: '<string>',
adapterId: '<string>',
fileName: '<string>',
requestId: '<string>'
},
facts: [
{
factId: '<string>',
sourceId: '<string>',
scope: {scopeType: 'component', sourceId: '<string>', externalId: '<string>'},
period: {start: '2023-11-07T05:31:56Z', end: '2023-11-07T05:31:56Z'},
observedAt: '2023-11-07T05:31:56Z',
poolId: '<string>',
availability: {quantity: {unit: '<string>', amount: 1}, reservable: true},
provenance: {
submittedAt: '2023-11-07T05:31:56Z',
contentDigest: '<string>',
actorId: '<string>',
adapterId: '<string>',
fileName: '<string>',
requestId: '<string>'
},
dimensions: {},
pricingOptions: [],
formatOptions: [],
sourceMetadata: {}
}
],
diagnostics: [
{
code: '<string>',
message: '<string>',
rowIndex: 4503599627370495,
factId: '<string>',
field: '<string>',
details: {}
}
],
snapshot: '<string>',
cursor: '<string>',
observedThrough: '2023-11-07T05:31:56Z',
catalogRevision: '<string>',
correction: {
correctionId: '<string>',
targetType: 'REVISION',
targetRevisionId: '<string>',
mode: 'REPLACEMENT',
reason: '<string>'
}
}
})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/feed/commit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"feedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceId": "<string>",
"revision": {
"schemaVersion": "1.0.0",
"revisionId": "<string>",
"sourceId": "<string>",
"profileId": "<string>",
"profileVersion": "<string>",
"idempotencyKey": "<string>",
"contentDigest": "<string>",
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
},
"facts": [
{
"factId": "<string>",
"sourceId": "<string>",
"scope": {
"scopeType": "component",
"sourceId": "<string>",
"externalId": "<string>"
},
"dimensions": {},
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"observedAt": "2023-11-07T05:31:56Z",
"poolId": "<string>",
"availability": {
"quantity": {
"unit": "<string>",
"amount": 1
},
"reservable": true,
"upstreamBooked": {
"unit": "<string>",
"amount": 1
},
"temporalJoinFence": {
"grossFactId": "<string>",
"bookingFactId": "<string>",
"sourceId": "<string>",
"poolId": "<string>",
"unit": "<string>",
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"grossSnapshot": "<string>",
"bookingSnapshot": "<string>",
"grossObservedThrough": "2023-11-07T05:31:56Z",
"bookingObservedThrough": "2023-11-07T05:31:56Z",
"observedSkewSeconds": 1,
"diagnosticCode": "<string>"
}
},
"pricingOptions": [],
"formatOptions": [],
"sourceMetadata": {},
"provenance": {
"submittedAt": "2023-11-07T05:31:56Z",
"contentDigest": "<string>",
"actorId": "<string>",
"adapterId": "<string>",
"fileName": "<string>",
"requestId": "<string>"
}
}
],
"diagnostics": [
{
"code": "<string>",
"message": "<string>",
"rowIndex": 4503599627370495,
"factId": "<string>",
"field": "<string>",
"details": {}
}
],
"snapshot": "<string>",
"cursor": "<string>",
"observedThrough": "2023-11-07T05:31:56Z",
"coveredPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"catalogRevision": "<string>",
"correction": {
"correctionId": "<string>",
"targetType": "REVISION",
"targetRevisionId": "<string>",
"mode": "REPLACEMENT",
"reason": "<string>"
}
},
"revisionRecord": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"feedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contentDigest": "<string>",
"replayed": true
}
}{
"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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Inventory source ID
1Body
Request body for POST /inventory-sources/:sourceId/feed/commit.
Feed id returned by the preview call.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Signed baseline object returned by the preview call. Pass it back unchanged.
Show child attributes
Show child attributes
Full revision object returned by the preview call. Pass it back unchanged.
Show child attributes
Show child attributes
Response
Commit a previewed feed revision (HITL)
Response from POST /feed/commit. The revision is now COMMITTED and the feed head has advanced.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Inventory feed revision envelope returned by preview, upload, commit, and push endpoints. Matches the InventoryFeedRevisionSchema contract.
Show child attributes
Show child attributes
Show child attributes
Show child attributes