Get Access Information Copy

GET https://api.ecartapi.com/accesses/me/{{shop_id}}

Retrive a new integrated store's information.

Use the shop_id returned in the redirect_url and your client_id as an authorization header to collect the information.

This is a time sensitive request after a user has completed the integration flow and has been redirected to your app. You have 1 minute to fetch the store information. If you fail to fetch the information in the time limit the user will have to do the integration process again.

Verify requests being done to your application

On your redirect URL you will receive a key parameter.

The key parameter contains the integrated_at as an ISO 8601 String parameter encrypted as a Hash with a sha256 algorithm encoded to base64.

Javascript example using the crypto library.

const crypto = require('crypto');
let secretKey = client_id;
//eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJOV1poWkRWaVkyVmlNV0U1WkRBd01EQTBZMk5tTm1KaCIsImlhdCI6MTYzMjE3MDY4MjAzOX0.tOEUetiN-fJ-iIYoUVIB2Rj5c2LZdZ62bBfBvP0n9Rw
let integrated_at = store.integrated_at;
//2022-01-31T19:38:24.409Z
let hash = crypto.createHmac('sha256', secretKey).update(String(new Date(integrated_at).toISOString()), 'utf8').digest('base64')
console.log(hash)
//7cu2wjG5+tghmdKQta8Rncp03YleO48N4pTRyETUpS4=

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

{"active":true,"deleted":false,"requests":0,"error_counter":0,"spam_counter":0,"unauthorized":false,"too_many_requests":false,"error_date":null,"integrated_at":"2022-01-31T19:38:24.409Z","blocked_til":null,"_id":"6091d513c3abe80004f901c8","app_id":"5fad5f31b1a9d00004ccf6bd","user_id":"5fad5bceb1a9d00004ccf6ba","access_token":"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ2UVpKeGtYWHB4Vm12bGRNZXp2VG5LcERkcGJXdXkxWCIsImlhdCI6MTYyMDE3MDAwMzY4NH0.1pj00dDVSQ9OOsdgURKNPcvMeoX7l7YG6ko4LgUbr9B0QJ0EyV2wTZGmuaHi4GsIqvaExWhhXjzQQ-zQNAdSIQ","access":{"ecommerce":"Prestashop","url":"https://prestashop.envia.com","token":"test-for-development"},"ecartapi":false,"created_at":"2021-05-04T23:13:23.685Z","updated_at":"2022-01-31T19:38:24.835Z","__v":0,"error":true}