All URIs are relative to https://api.pocketsmith.com/v2, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
categoriesIdDelete() | DELETE /categories/{id} | Delete category |
categoriesIdGet() | GET /categories/{id} | Get category |
categoriesIdPut() | PUT /categories/{id} | Update category |
usersIdCategoriesGet() | GET /users/{id}/categories | List categories in user |
usersIdCategoriesPost() | POST /users/{id}/categories | Create category in user |
categoriesIdDelete($id)
Delete category
Deletes a particular category by its ID. This will delete all budgets within the category, and uncategorize all transactions assigned to the category.
<?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\CategoriesApi(
// 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.
try {
$apiInstance->categoriesIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->categoriesIdDelete: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The unique identifier of the category. |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
categoriesIdGet($id): \OpenAPI\Client\Model\Category
Get category
Gets a particular category by its 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\CategoriesApi(
// 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.
try {
$result = $apiInstance->categoriesIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->categoriesIdGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The unique identifier of the category. |
\OpenAPI\Client\Model\Category
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
categoriesIdPut($id, $categories_id_put_request): \OpenAPI\Client\Model\Category
Update category
Updates a category by its 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\CategoriesApi(
// 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_put_request = new \OpenAPI\Client\Model\CategoriesIdPutRequest(); // \OpenAPI\Client\Model\CategoriesIdPutRequest
try {
$result = $apiInstance->categoriesIdPut($id, $categories_id_put_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->categoriesIdPut: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The unique identifier of the category. | |
categories_id_put_request | \OpenAPI\Client\Model\CategoriesIdPutRequest | [optional] |
\OpenAPI\Client\Model\Category
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
usersIdCategoriesGet($id): \OpenAPI\Client\Model\Category[]
List categories in user
Lists all categories 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\CategoriesApi(
// 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->usersIdCategoriesGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->usersIdCategoriesGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The unique identifier of the user. |
\OpenAPI\Client\Model\Category[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
usersIdCategoriesPost($id, $users_id_categories_post_request): \OpenAPI\Client\Model\Category
Create category in user
Creates a category belonging to the 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\CategoriesApi(
// 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.
$users_id_categories_post_request = new \OpenAPI\Client\Model\UsersIdCategoriesPostRequest(); // \OpenAPI\Client\Model\UsersIdCategoriesPostRequest
try {
$result = $apiInstance->usersIdCategoriesPost($id, $users_id_categories_post_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->usersIdCategoriesPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The unique identifier of the user. | |
users_id_categories_post_request | \OpenAPI\Client\Model\UsersIdCategoriesPostRequest | [optional] |
\OpenAPI\Client\Model\Category
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]