All URIs are relative to https://api.facestore.local/v1
Method | HTTP request | Description |
---|---|---|
addBrands | POST /brands | |
deleteBrandById | DELETE /brands/{id}/ | |
getBrandById | GET /brands/{id}/ | |
getBrands | GET /brands | |
updateCategoryById | PUT /brands/{id}/ | |
updateCategoryById_0 | PATCH /brands/{id}/ |
InlineResponse201 addBrands(brand)
Creates a new brand in the store.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BrandsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: APIKeyHeader
ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
APIKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.setApiKeyPrefix("Token");
BrandsApi apiInstance = new BrandsApi();
Brand brand = new Brand(); // Brand | Brand to add to the store
try {
InlineResponse201 result = apiInstance.addBrands(brand);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BrandsApi#addBrands");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
brand | Brand | Brand to add to the store |
- Content-Type: application/json
- Accept: application/json
deleteBrandById(id)
Deletes a single brand based on the ID supplied
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BrandsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: APIKeyHeader
ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
APIKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.setApiKeyPrefix("Token");
BrandsApi apiInstance = new BrandsApi();
Long id = 789L; // Long | ID of brand to delete
try {
apiInstance.deleteBrandById(id);
} catch (ApiException e) {
System.err.println("Exception when calling BrandsApi#deleteBrandById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | ID of brand to delete |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
InlineResponse201 getBrandById(id, includes, limit)
Returns a brand based on a single ID ### Includes You can give the following values on includea parameter: `routes, products`
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BrandsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: APIKeyHeader
ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
APIKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.setApiKeyPrefix("Token");
BrandsApi apiInstance = new BrandsApi();
Long id = 789L; // Long | ID of brand to fetch
List<String> includes = Arrays.asList("includes_example"); // List<String> | Include associated objects within response
Integer limit = 56; // Integer | max records to return
try {
InlineResponse201 result = apiInstance.getBrandById(id, includes, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BrandsApi#getBrandById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | ID of brand to fetch | |
includes | List<String> | Include associated objects within response | [optional] |
limit | Integer | max records to return | [optional] |
- Content-Type: application/json
- Accept: application/json
InlineResponse200 getBrands(includes, limit, orderBy)
Returns all brands from the system that the user has access to ### Includes You can give the following values on includes parameter: `routes, products`
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BrandsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: APIKeyHeader
ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
APIKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.setApiKeyPrefix("Token");
BrandsApi apiInstance = new BrandsApi();
List<String> includes = Arrays.asList("includes_example"); // List<String> | Include associated objects within response
Integer limit = 56; // Integer | max records to return
List<String> orderBy = Arrays.asList("orderBy_example"); // List<String> | Specify the field to be sorted, examples: - `?order_by=id|desc` - `?order_by=updated_at|desc,position|asc`
try {
InlineResponse200 result = apiInstance.getBrands(includes, limit, orderBy);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BrandsApi#getBrands");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
includes | List<String> | Include associated objects within response | [optional] |
limit | Integer | max records to return | [optional] |
orderBy | List<String> | Specify the field to be sorted, examples: - `?order_by=id | desc` - `?order_by=updated_at |
- Content-Type: application/json
- Accept: application/json
updateCategoryById(id, brand)
Update a single brand based on the ID supplied
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BrandsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: APIKeyHeader
ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
APIKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.setApiKeyPrefix("Token");
BrandsApi apiInstance = new BrandsApi();
Long id = 789L; // Long | ID of brand to update
Object brand = null; // Object | Brand to update in store
try {
apiInstance.updateCategoryById(id, brand);
} catch (ApiException e) {
System.err.println("Exception when calling BrandsApi#updateCategoryById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | ID of brand to update | |
brand | Object | Brand to update in store |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
updateCategoryById_0(id, brand)
Update a single brand based on the ID supplied
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BrandsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: APIKeyHeader
ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
APIKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.setApiKeyPrefix("Token");
BrandsApi apiInstance = new BrandsApi();
Long id = 789L; // Long | ID of brand to update
Object brand = null; // Object | Brand to update in store
try {
apiInstance.updateCategoryById_0(id, brand);
} catch (ApiException e) {
System.err.println("Exception when calling BrandsApi#updateCategoryById_0");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | ID of brand to update | |
brand | Object | Brand to update in store |
null (empty response body)
- Content-Type: application/json
- Accept: application/json