The PocketSmith API
PHP 7.4 and later. Should also work with PHP 8.0.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/thursdaybw/pocketsmith-php.git"
}
],
"require": {
"thursdaybw/pocketsmith-api": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?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\AccountsApi(
// 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 account.
try {
$apiInstance->accountsIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->accountsIdDelete: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://api.pocketsmith.com/v2
Class | Method | HTTP request | Description |
---|---|---|---|
AccountsApi | accountsIdDelete | DELETE /accounts/{id} | Delete account |
AccountsApi | accountsIdGet | GET /accounts/{id} | Get account |
AccountsApi | accountsIdPut | PUT /accounts/{id} | Update account |
AccountsApi | institutionsIdAccountsGet | GET /institutions/{id}/accounts | List accounts in institution |
AccountsApi | usersIdAccountsGet | GET /users/{id}/accounts | List accounts in user |
AccountsApi | usersIdAccountsPost | POST /users/{id}/accounts | Create an account in user |
AccountsApi | usersIdAccountsPut | PUT /users/{id}/accounts | Update the display order of accounts in user |
AttachmentsApi | attachmentsIdDelete | DELETE /attachments/{id} | Delete attachment |
AttachmentsApi | attachmentsIdGet | GET /attachments/{id} | Get attachment |
AttachmentsApi | attachmentsIdPut | PUT /attachments/{id} | Update attachment |
AttachmentsApi | transactionsIdAttachmentsGet | GET /transactions/{id}/attachments | List attachments in transaction |
AttachmentsApi | transactionsIdAttachmentsPost | POST /transactions/{id}/attachments | Assigns attachment to transaction |
AttachmentsApi | transactionsTransactionIdAttachmentsAttachmentIdDelete | DELETE /transactions/{transaction_id}/attachments/{attachment_id} | Unassigns attachment in transaction |
AttachmentsApi | usersIdAttachmentsGet | GET /users/{id}/attachments | Lists attachments in user |
AttachmentsApi | usersIdAttachmentsPost | POST /users/{id}/attachments | Create attachment in user |
BudgetingApi | usersIdBudgetGet | GET /users/{id}/budget | List budget for user |
BudgetingApi | usersIdBudgetSummaryGet | GET /users/{id}/budget_summary | Get budget summary for user |
BudgetingApi | usersIdForecastCacheDelete | DELETE /users/{id}/forecast_cache | Delete forecast cache for user |
BudgetingApi | usersIdTrendAnalysisGet | GET /users/{id}/trend_analysis | Get trend analysis for user |
CategoriesApi | categoriesIdDelete | DELETE /categories/{id} | Delete category |
CategoriesApi | categoriesIdGet | GET /categories/{id} | Get category |
CategoriesApi | categoriesIdPut | PUT /categories/{id} | Update category |
CategoriesApi | usersIdCategoriesGet | GET /users/{id}/categories | List categories in user |
CategoriesApi | usersIdCategoriesPost | POST /users/{id}/categories | Create category in user |
CategoryRulesApi | categoriesIdCategoryRulesPost | POST /categories/{id}/category_rules | Create category rule in category |
CategoryRulesApi | usersIdCategoryRulesGet | GET /users/{id}/category_rules | List category rules in user |
CurrenciesApi | currenciesGet | GET /currencies | List currencies |
CurrenciesApi | currenciesIdGet | GET /currencies/{id} | Get currency |
EventsApi | eventsIdDelete | DELETE /events/{id} | Delete event |
EventsApi | eventsIdGet | GET /events/{id} | Get event |
EventsApi | eventsIdPut | PUT /events/{id} | Update event |
EventsApi | scenariosIdEventsGet | GET /scenarios/{id}/events | List events in scenario. |
EventsApi | scenariosIdEventsPost | POST /scenarios/{id}/events | Create event in scenario |
EventsApi | usersIdEventsGet | GET /users/{id}/events | List events in user. |
InstitutionsApi | institutionsIdDelete | DELETE /institutions/{id} | Delete institution |
InstitutionsApi | institutionsIdGet | GET /institutions/{id} | Get institution |
InstitutionsApi | institutionsIdPut | PUT /institutions/{id} | Update institution |
InstitutionsApi | usersIdInstitutionsGet | GET /users/{id}/institutions | List institutions in user |
InstitutionsApi | usersIdInstitutionsPost | POST /users/{id}/institutions | Create institution in user |
LabelsApi | usersIdLabelsGet | GET /users/{id}/labels | List labels in user |
SavedSearchesApi | usersIdSavedSearchesGet | GET /users/{id}/saved_searches | List saved searches in user |
TimeZonesApi | timeZonesGet | GET /time_zones | List time zones |
TransactionAccountsApi | transactionAccountsIdGet | GET /transaction_accounts/{id} | Get transaction account |
TransactionAccountsApi | transactionAccountsIdPut | PUT /transaction_accounts/{id} | Update transaction account |
TransactionAccountsApi | usersIdTransactionAccountsGet | GET /users/{id}/transaction_accounts | List transaction accounts in user |
TransactionsApi | accountsIdTransactionsGet | GET /accounts/{id}/transactions | List transactions in account |
TransactionsApi | categoriesIdTransactionsGet | GET /categories/{id}/transactions | List transactions in categories |
TransactionsApi | transactionAccountsIdTransactionsGet | GET /transaction_accounts/{id}/transactions | List transactions in transaction account |
TransactionsApi | transactionAccountsIdTransactionsPost | POST /transaction_accounts/{id}/transactions | Create a transaction in transaction account |
TransactionsApi | transactionsIdDelete | DELETE /transactions/{id} | Delete transaction |
TransactionsApi | transactionsIdGet | GET /transactions/{id} | Get a transaction |
TransactionsApi | transactionsIdPut | PUT /transactions/{id} | Update a transaction |
TransactionsApi | usersIdTransactionsGet | GET /users/{id}/transactions | List transactions in user |
UsersApi | meGet | GET /me | Get the authorised user |
UsersApi | usersIdGet | GET /users/{id} | Get user |
UsersApi | usersIdPut | PUT /users/{id} | Update user |
- Account
- AccountsIdPutRequest
- Attachment
- AttachmentContentTypeMeta
- AttachmentVariants
- AttachmentsIdPutRequest
- BudgetAnalysis
- BudgetAnalysisPackage
- CategoriesIdCategoryRulesPostRequest
- CategoriesIdPutRequest
- Category
- CategoryRule
- Currency
- CurrencySeparators
- Error
- Event
- EventsIdPutRequest
- Institution
- InstitutionsIdPutRequest
- Period
- SavedSearch
- Scenario
- ScenariosIdEventsPostRequest
- TimeZone
- Transaction
- TransactionAccount
- TransactionAccountsIdPutRequest
- TransactionAccountsIdTransactionsPostRequest
- TransactionsIdAttachmentsPostRequest
- TransactionsIdPutRequest
- User
- UsersIdAccountsPostRequest
- UsersIdAccountsPutRequest
- UsersIdAttachmentsPostRequest
- UsersIdCategoriesPostRequest
- UsersIdInstitutionsPostRequest
- UsersIdPutRequest
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-Developer-Key
- Location: HTTP header
- Type:
OAuth
- Flow:
accessCode
- Authorization URL:
https://my.pocketsmith.com/oauth/authorize
- Scopes:
- user.read: Access the user's details and preferences
- user.write: Access to change the user's details and preferences
- accounts.read: Access to list and view transaction accounts
- accounts.write: Access to update and delete transaction accounts
- transactions.read: Access to list and view accounts and transactions
- transactions.write: Access to create, update and delete transactions
- categories.read: Access to view categories
- categories.write: Ability to edit and delete categories
- attachments.read: Access to view attachments
- attachments.write: Ability to create, update and delete attachments
- events.read: Access to view events
- events.write: Ability to create, update and delete events
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
2.0
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen