This SDK covers the functionality provided by team Atlas' (aka Distributed Commerce) APIs, namely, Checkout, Guest Checkout, and Catalog APIs.
Those APIs, and in turn this SDK, provide our partners a more streamlined access the Zalando shopping platform to enable our customers to purchase wherever they are.
The purpose of this project is to provide low-level calls to API backend and response models for Zalando Checkout, Guest Checkout, and Catalog APIs in order to allow easily integrate and run Zalando Сheckout in minutes using your own UI solution.
If you want to access the APIs directly we recommend that you take a look at their documentation.
We use Promises a lot :)
npm install --save atlas-sdk-core es6-promise
On install we're transpiling the code for your convenience. You have access to two files under a lib/
folder, one for using in node and another for browser usages.
Because we are using Promises you must bring your own ES6 Promise compatible polyfill, e.g. es6-promise.
You need to configure Atlas JavaScript SDK Core first and use configured instance variable to interact with AtlasSDK.
In order to configure AtlasSDK manually provide an object with 2 mandatory parameters client_id and sales_channel:
import AtlasSDK from 'atlas-sdk-core';
AtlasSDK.configure({
client_id: 'CLIENT_ID',
sales_channel: 'SALES_CHANNEL',
is_sandbox: true
}).then((sdk) => {
// sdk instance is ready to use
sdk.getArticle('AD112B0F6-A11').then((article) => {
console.log(`Article name: ${article.name}`);
});
}).catch((error) => {
console.error(`${error}`);
});
Since we are using Promises you can benefit from await/async:
import AtlasSDK from 'atlas-sdk-core';
const sdk = await AtlasSDK.configure({
client_id: 'CLIENT_ID',
sales_channel: 'SALES_CHANNEL'
});
const article = await sdk.getArticle('AD112B0F6-A11');
console.log(`Article name: ${article.name}`);
If you want to contribute, please, read our Contributing guidelines first.
In order to start SDK development simply run
npm run tdd
Check existing codebase tests for test examples.
AtlasSDK Reference Documentation is generated automatically during the production build.
For any inquiry, please contact Team Atlas via [email protected]
The MIT License (MIT) Copyright © 2016 Zalando SE, https://tech.zalando.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.