Create modular source module credential
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/modules/{moduleInstanceId}/credentials/{credentialKind} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auth": {}
}'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/modules/{moduleInstanceId}/credentials/{credentialKind}"
payload = { "auth": {} }
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({auth: {}})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/modules/{moduleInstanceId}/credentials/{credentialKind}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"credentialId": "<string>",
"moduleInstanceId": "<string>",
"credentialKind": "API_KEY",
"status": "PENDING",
"scopes": [
"<string>"
],
"expiresAt": "2023-11-07T05:31:56Z",
"lastRefreshedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"revokedAt": "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": {}
}
}Storefront
Create modular source module credential
Store a storefront-scoped provider credential for one private modular source module. Raw auth is written to secret storage and never returned.
POST
/
inventory-sources
/
{sourceId}
/
modular
/
modules
/
{moduleInstanceId}
/
credentials
/
{credentialKind}
Create modular source module credential
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/modules/{moduleInstanceId}/credentials/{credentialKind} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auth": {}
}'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/modules/{moduleInstanceId}/credentials/{credentialKind}"
payload = { "auth": {} }
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({auth: {}})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/modules/{moduleInstanceId}/credentials/{credentialKind}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"credentialId": "<string>",
"moduleInstanceId": "<string>",
"credentialKind": "API_KEY",
"status": "PENDING",
"scopes": [
"<string>"
],
"expiresAt": "2023-11-07T05:31:56Z",
"lastRefreshedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"revokedAt": "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
Minimum string length:
1Seller-local module instance id
Minimum string length:
1Module credential kind
Available options:
API_KEY, BEARER, OAUTH Body
application/json
Create or rotate a storefront-scoped credential for one private inventory-source module.
Provider credential material. Stored only in the configured secret manager and never returned.
Show child attributes
Show child attributes
Minimum string length:
1Pattern:
^(?:(?:\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))$Pattern:
^(?:(?:\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))$Show child attributes
Show child attributes
Response
Create modular source module credential
Non-secret lifecycle metadata for one inventory-source module credential.
Show child attributes
Show child attributes