Get stores by chain id
GET
/dr/v1/chains/{chainID}/stores
const url = 'https://sender.sandbox-api.kivra.com/dr/v1/chains/example/stores';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://sender.sandbox-api.kivra.com/dr/v1/chains/example/storesFetches information on stores connected to a chain.
Access scope
- PARTNER
Matching
Fetches stores based on partner token and chain id
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”chainID
required
string
Chain ID
Responses
Section titled “Responses”Successfully fetched stores
Media typeapplication/json
AllStoresResponse
Array<object>
GetStoreResponseobject
store_id
string
external_id
string
owner_id
string
partner_id
string
name
string
vat
string
phone
string
icon_url
string
logo_url
string
address
object
street1
string
street2
string
street3
string
postalcode
string
city
string
state
string
country
string
Example
[ { "store_id": "8a499ffa488cdce401488cf8c5d700cd", "external_id": "store-100", "owner_id": "8a499ffb488d9ca501488dc3fba0005b", "name": "Test Store 1", "vat": "SE123456789009", "address": { "street1": "Gatan 1", "postalcode": "13254", "city": "One Buying", "country": "SWE" }, "icon_url": "https://test.url.net/api/v1/resources/156257243392d65d706e044b56b168c452809d68f6", "logo_url": "https://test.url.net/api/v1/resources/156257243392d65d706e044b56b168c452809d68f6" }, { "store_id": "8a499ffa488cdce401488cf8c5d700cd", "external_id": "store-200", "owner_id": "8a499ffb488d9ca501488dc3fba0005b", "name": "Test Store 2", "vat": "SE987654321009", "address": { "street1": "Gatan 2", "postalcode": "23456", "city": "Two Buying", "country": "SWE" }, "icon_url": "https://test.url.net/api/v1/resources/156257243392d65d706e044b56b168c452809d68f6", "logo_url": "https://test.url.net/api/v1/resources/156257243392d65d706e044b56b168c452809d68f6" }]Unauthorized
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleunauthorized
{ "error_code": "40100", "short_message": "unauthorized", "long_message": "permission denied"}Not found
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleresource_not_found
{ "error_code": "40400", "short_message": "not found", "long_message": "the requested resource could not be found"}Internal server error
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Example
{ "error_code": "50000", "short_message": "internal server error", "long_message": "unknown error ocurred"}