All URIs are relative to https://api.pocketsmith.com/v2, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
categoriesIdCategoryRulesPost() | POST /categories/{id}/category_rules | Create category rule in category |
usersIdCategoryRulesGet() | GET /users/{id}/category_rules | List category rules in user |
categoriesIdCategoryRulesPost($id, $categories_id_category_rules_post_request): \OpenAPI\Client\Model\CategoryRule
Create category rule in category
Creates a rule to allocate a category to transactions.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: developerKey
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Developer-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Developer-Key', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\CategoryRulesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 42; // int | The unique identifier of the category.
$categories_id_category_rules_post_request = new \OpenAPI\Client\Model\CategoriesIdCategoryRulesPostRequest(); // \OpenAPI\Client\Model\CategoriesIdCategoryRulesPostRequest
try {
$result = $apiInstance->categoriesIdCategoryRulesPost($id, $categories_id_category_rules_post_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoryRulesApi->categoriesIdCategoryRulesPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The unique identifier of the category. | |
categories_id_category_rules_post_request | \OpenAPI\Client\Model\CategoriesIdCategoryRulesPostRequest | [optional] |
\OpenAPI\Client\Model\CategoryRule
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
usersIdCategoryRulesGet($id): \OpenAPI\Client\Model\CategoryRule[]
List category rules in user
Lists all category rules belonging to a user by their ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: developerKey
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Developer-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Developer-Key', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\CategoryRulesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 42; // int | The unique identifier of the user.
try {
$result = $apiInstance->usersIdCategoryRulesGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoryRulesApi->usersIdCategoryRulesGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The unique identifier of the user. |
\OpenAPI\Client\Model\CategoryRule[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]