Skip to content

Latest commit

 

History

History
453 lines (310 loc) · 13.7 KB

AccountsApi.md

File metadata and controls

453 lines (310 loc) · 13.7 KB

OpenAPI\Client\AccountsApi

All URIs are relative to https://api.pocketsmith.com/v2, except if the operation defines another base path.

Method HTTP request Description
accountsIdDelete() DELETE /accounts/{id} Delete account
accountsIdGet() GET /accounts/{id} Get account
accountsIdPut() PUT /accounts/{id} Update account
institutionsIdAccountsGet() GET /institutions/{id}/accounts List accounts in institution
usersIdAccountsGet() GET /users/{id}/accounts List accounts in user
usersIdAccountsPost() POST /users/{id}/accounts Create an account in user
usersIdAccountsPut() PUT /users/{id}/accounts Update the display order of accounts in user

accountsIdDelete()

accountsIdDelete($id)

Delete account

Deletes an account and all its data by ID, optionally merge scenarios into another account.

Example

<?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;
}

Parameters

Name Type Description Notes
id int The unique identifier of the account.

Return type

void (empty response body)

Authorization

developerKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsIdGet()

accountsIdGet($id): \OpenAPI\Client\Model\Account

Get account

Gets an account by its ID.

Example

<?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 {
    $result = $apiInstance->accountsIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The unique identifier of the account.

Return type

\OpenAPI\Client\Model\Account

Authorization

developerKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsIdPut()

accountsIdPut($id, $accounts_id_put_request): \OpenAPI\Client\Model\Account

Update account

Updates and returns an account by its ID.

Example

<?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.
$accounts_id_put_request = new \OpenAPI\Client\Model\AccountsIdPutRequest(); // \OpenAPI\Client\Model\AccountsIdPutRequest

try {
    $result = $apiInstance->accountsIdPut($id, $accounts_id_put_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsIdPut: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The unique identifier of the account.
accounts_id_put_request \OpenAPI\Client\Model\AccountsIdPutRequest [optional]

Return type

\OpenAPI\Client\Model\Account

Authorization

developerKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

institutionsIdAccountsGet()

institutionsIdAccountsGet($id): \OpenAPI\Client\Model\Account[]

List accounts in institution

Lists accounts belonging to an institution by its ID.

Example

<?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 institution.

try {
    $result = $apiInstance->institutionsIdAccountsGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->institutionsIdAccountsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The unique identifier of the institution.

Return type

\OpenAPI\Client\Model\Account[]

Authorization

developerKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

usersIdAccountsGet()

usersIdAccountsGet($id): \OpenAPI\Client\Model\Account[]

List accounts in user

Lists all accounts belonging to the user by their ID.

Example

<?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 user.

try {
    $result = $apiInstance->usersIdAccountsGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->usersIdAccountsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The unique identifier of the user.

Return type

\OpenAPI\Client\Model\Account[]

Authorization

developerKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

usersIdAccountsPost()

usersIdAccountsPost($id, $users_id_accounts_post_request): \OpenAPI\Client\Model\Account

Create an account in user

Creates and returns an account belonging to the user by their ID.

Example

<?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 user.
$users_id_accounts_post_request = new \OpenAPI\Client\Model\UsersIdAccountsPostRequest(); // \OpenAPI\Client\Model\UsersIdAccountsPostRequest

try {
    $result = $apiInstance->usersIdAccountsPost($id, $users_id_accounts_post_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->usersIdAccountsPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The unique identifier of the user.
users_id_accounts_post_request \OpenAPI\Client\Model\UsersIdAccountsPostRequest [optional]

Return type

\OpenAPI\Client\Model\Account

Authorization

developerKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

usersIdAccountsPut()

usersIdAccountsPut($id, $users_id_accounts_put_request): \OpenAPI\Client\Model\Account[]

Update the display order of accounts in user

Updates the display order of accounts belonging to the user, by accepting an array of accounts in their new display order.

Example

<?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 user.
$users_id_accounts_put_request = new \OpenAPI\Client\Model\UsersIdAccountsPutRequest(); // \OpenAPI\Client\Model\UsersIdAccountsPutRequest

try {
    $result = $apiInstance->usersIdAccountsPut($id, $users_id_accounts_put_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->usersIdAccountsPut: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The unique identifier of the user.
users_id_accounts_put_request \OpenAPI\Client\Model\UsersIdAccountsPutRequest [optional]

Return type

\OpenAPI\Client\Model\Account[]

Authorization

developerKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]