All URIs are relative to https://{customerId}.billabear.cloud/api/v1
| Method | HTTP request | Description |
|---|---|---|
| createPrice | POST /product/{productId}/price | Create |
| listPrice | GET /product/{productId}/price | List |
createPrice(body, productId)
Create
Create a price
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.PricesApi();
let body = new BillaBear.Price(); // Price |
let productId = "productId_example"; // String | The id of the product to retrieve
apiInstance.createPrice(body, productId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| body | Price | ||
| productId | String | The id of the product to retrieve |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
InlineResponse20011 listPrice(productId, opts)
List
List all prices
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.PricesApi();
let productId = "productId_example"; // String | The id of the product to retrieve
let opts = {
'limit': 56, // Number | How many items to return at one time (max 100)
'lastKey': "lastKey_example" // String | The key to be used in pagination to say what the last key of the previous page was
};
apiInstance.listPrice(productId, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| productId | String | The id of the product to retrieve | |
| limit | Number | How many items to return at one time (max 100) | [optional] |
| lastKey | String | The key to be used in pagination to say what the last key of the previous page was | [optional] |
- Content-Type: Not defined
- Accept: application/json