All URIs are relative to https://api.facestore.local/v1
Method | HTTP request | Description |
---|---|---|
addCategories | POST /categories | |
deleteCategoryById | DELETE /categories/{id}/ | |
getCategories | GET /categories | |
getCategoryById | GET /categories/{id}/ | |
updateCategoryById | PUT /categories/{id}/ |
InlineResponse2011 addCategories(category)
Creates a new category in the store.
import FacestoreApi from 'facestore_api';
let defaultClient = FacestoreApi.ApiClient.instance;
// Configure API key authorization: APIKeyHeader
let APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';
let apiInstance = new FacestoreApi.CategoriesApi();
let category = new FacestoreApi.Category(); // Category | Category to add to the store
apiInstance.addCategories(category, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
category | Category | Category to add to the store |
- Content-Type: application/json
- Accept: application/json
deleteCategoryById(id)
deletes a single category based on the ID supplied
import FacestoreApi from 'facestore_api';
let defaultClient = FacestoreApi.ApiClient.instance;
// Configure API key authorization: APIKeyHeader
let APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';
let apiInstance = new FacestoreApi.CategoriesApi();
let id = 789; // Number | ID of category to delete
apiInstance.deleteCategoryById(id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of category to delete |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
InlineResponse2001 getCategories(opts)
Returns all categories from the system that the user has access to ### Includes You can give the following values on includes parameter: `routes, products`
import FacestoreApi from 'facestore_api';
let defaultClient = FacestoreApi.ApiClient.instance;
// Configure API key authorization: APIKeyHeader
let APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';
let apiInstance = new FacestoreApi.CategoriesApi();
let opts = {
'includes': ["includes_example"], // [String] | Include associated objects within response
'limit': 56 // Number | max records to return
'orderBy': ["orderBy_example"] // [String] | Specify the field to be sorted, examples: - `?order_by=id|desc` - `?order_by=updated_at|desc,position|asc`
};
apiInstance.getCategories(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
includes | [String] | Include associated objects within response | [optional] |
limit | Number | max records to return | [optional] |
orderBy | [String] | Specify the field to be sorted, examples: - `?order_by=id | desc` - `?order_by=updated_at |
- Content-Type: application/json
- Accept: application/json
InlineResponse2011 getCategoryById(id, opts)
Returns a category based on a single ID ### Includes You can give the following values on includes parameter: `routes, products`
import FacestoreApi from 'facestore_api';
let defaultClient = FacestoreApi.ApiClient.instance;
// Configure API key authorization: APIKeyHeader
let APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';
let apiInstance = new FacestoreApi.CategoriesApi();
let id = 789; // Number | ID of category to fetch
let opts = {
'includes': ["includes_example"], // [String] | Include associated objects within response
'limit': 56 // Number | max records to return
};
apiInstance.getCategoryById(id, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of category to fetch | |
includes | [String] | Include associated objects within response | [optional] |
limit | Number | max records to return | [optional] |
- Content-Type: application/json
- Accept: application/json
updateCategoryById(id, category)
update a single category based on the ID supplied
import FacestoreApi from 'facestore_api';
let defaultClient = FacestoreApi.ApiClient.instance;
// Configure API key authorization: APIKeyHeader
let APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';
let apiInstance = new FacestoreApi.CategoriesApi();
let id = 789; // Number | ID of category to update
let category = null; // Object | Category to update in store
apiInstance.updateCategoryById(id, category, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of category to update | |
category | Object | Category to update in store |
null (empty response body)
- Content-Type: application/json
- Accept: application/json