Adobe Decisioning Service API client for NodeJS/Javascript
A robust, straightforward API client for building applications on top of the Decisioning Service in Javascript/NodeJS. This client can be used both server & client side.
This package is build upon adobe-fetch which handles the low level API call, JWT authentication, token caching and storage.
npm install --save @adobe/api-client-decisioning
This package exposes 2 separate clients:
- Offers - CRUD operations on the Offer object modules. This client calls APIs under /data/core/xcore.
- ODE - Offer Decisioning Engine. This client calls APIs under /data/core/ode.
- Option A - Provide an adobefetch instance:
const { Offers, ODE } = require('@adobe/api-client-decisioning');
const config = {
auth: { ... See adobe/fetch documentation for details ... }
};
const adobefetch = require('@adobe/fetch').config(config);
const ode = new ODE(adobefetch, { containerId: MY_CONTAINER_ID });
const offers = new Offers(adobefetch, { containerId: MY_CONTAINER_ID });
const allActivities = await offers.getActivities();
- Option B - Provide the auth configuration, adobefetch will be instantiated automatically:
const { Offers, ODE } = require('@adobe/api-client-decisioning');
const ode = new ODE(adobefetch, {
auth: { ... See adobe/fetch documentation for details ... },
containerId: MY_CONTAINER_ID
});
const offers = new Offers(adobefetch, {
auth: { ... See adobe/fetch documentation for details ... },
containerId: MY_CONTAINER_ID
});
const allActivities = await offers.getActivities(); - Manage Decisioning Objects
- Using the Decisioning Service runtime
- ODE API Spec
- Offers Core Objects API Spec
Contributions are welcomed! Read the Contributing Guide for more information.
This project is licensed under the Apache V2 License. See LICENSE for more information.