apimatic-sticky-apis-sdk
v0.0.1
Published
This is a test SDK generated by APIMatic
Downloads
24
Readme
Getting Started with sticky.io Restful API v2025.7.31
Introduction
sticky.io Restful API offers some new functionality as well as fully restful routes. All request with a payload should be sent as JSON. The authorization used is Basic Authentication
Requests
API requests that call for a request body are expected to be in JSON Format.
Responses
The v2 standard JSON responses will usually contain at least the following:
| Field | Data Type | Description | | --- | --- | --- | | status | String | Status of the API call. "SUCCESS" or "FAILURE" are possible values. | | data | Mixed | Data returned by API call. It could be an object or an array of objects. |
List Responses
GET requests that return a list of entities will usually contain the following:
| Field | Data Type | Description |
| --- | --- | --- |
| status | String | Status of the API call. "SUCCESS" or "FAILURE" are possible values. |
| data | Mixed | Data returned by API call. It could be an object or an array of objects. |
| current_page | Integer | Current page associated with the dataset returned in data. |
| first_page_url | String | URL that maps to the first paginated list of a given entity. |
| last_page | Integer | Number of pages in a given dataset. |
| last_page_url | String | URL that maps to the last paginated list of a given entity. |
| next_page_url | String | URL that maps to the next paginated list of a given entity. |
| path | String | URL that maps to the index page of a given entity. |
| per_page | Mixed | Data returned by API call. It could be an object or an array of objects. |
| prev_page_url | Mixed | Data returned by API call. It could be an object or an array of objects. |
| from | Integer | Offset record number lower bound. |
| to | Mixed | Offset record number upper bound. |
| total | Integer | Total amount of records that exist for a given entity. |
Install the Package
Run the following command from your project directory to install the package from npm:
npm install [email protected]For additional package details, see the Npm page for the [email protected] npm.
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
| --- | --- | --- |
| environment | Environment | The API environment. Default: Environment.Production |
| timeout | number | Timeout for API calls.Default: 0 |
| httpClientOptions | Partial<HttpClientOptions> | Stable configurable http client options. |
| unstableHttpClientOptions | any | Unstable configurable http client options. |
| logging | PartialLoggingOptions | Logging Configuration to enable logging |
| basicCredentials | BasicCredentials | The credential object for basic |
| bearerCredentials | BearerCredentials | The credential object for bearer |
The API client can be initialized as follows:
Code-Based Client Initialization
import { Client, Environment, LogLevel } from 'apimatic-sticky-apis-sdk';
const client = new Client({
basicCredentials: {
username: 'username',
password: 'password'
},
bearerCredentials: {
accessToken: 'AccessToken'
},
timeout: 0,
environment: Environment.Production,
logging: {
logLevel: LogLevel.Info,
logRequest: {
logBody: true
},
logResponse: {
logHeaders: true
}
},
});Configuration-Based Client Initialization
import * as path from 'path';
import * as fs from 'fs';
import { Client } from 'apimatic-sticky-apis-sdk';
// Provide absolute path for the configuration file
const absolutePath = path.resolve('./config.json');
// Read the configuration file content
const fileContent = fs.readFileSync(absolutePath, 'utf-8');
// Initialize client from JSON configuration content
const client = Client.fromJsonConfig(fileContent);See the Configuration-Based Client Initialization section for details.
Environment-Based Client Initialization
import * as dotenv from 'dotenv';
import * as path from 'path';
import * as fs from 'fs';
import { Client } from 'apimatic-sticky-apis-sdk';
// Optional - Provide absolute path for the .env file
const absolutePath = path.resolve('./.env');
if (fs.existsSync(absolutePath)) {
// Load environment variables from .env file
dotenv.config({ path: absolutePath, override: true });
}
// Initialize client using environment variables
const client = Client.fromEnvironment(process.env);See the Environment-Based Client Initialization section for details.
Environments
The SDK can be configured to use a different environment for making API calls. Available environments are:
Fields
| Name | Description | | --- | --- | | Production | Default |
Authorization
This API uses the following authentication schemes.
List of APIs
- Billing Models
- Campaigns
- Payment Types Methods
- Promo Codes
- Custom Fields
- Start Stop Reset
- Line Item Custom Options
- Line Item Management
- Trial Workflows
- Payment Router
- Volume Discounts
- Permissions
- Affiliates
- Meta
- Addresses
- Wallet
- Interests
- Communications
- Contacts
- Coupons
- Customers
- Gateways
- Images
- Types
- Templates
- Notes
- Products
- Discount
- Credits
- Overrides
- Subscriptions
- Orders
- Configurations
- Offers
- Attributes
- Categories
- Variants
- Prospects
- Shipping
- Tokenization
- Users
- Chargeback
- Inventories
- Warehouse
- Order
- Subscription
- Misc
SDK Infrastructure
Configuration
- HttpClientOptions
- RetryConfiguration
- ProxySettings
- Configuration-Based Client Initialization
- Environment-Based Client Initialization
- PartialLoggingOptions
- PartialRequestLoggingOptions
- PartialResponseLoggingOptions
- LoggerInterface
