Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Latest commit

 

History

History
378 lines (261 loc) · 11.9 KB

PartnersApi.md

File metadata and controls

378 lines (261 loc) · 11.9 KB

Freee\Accounting\PartnersApi

All URIs are relative to https://api.freee.co.jp.

Method HTTP request Description
createPartner() POST /api/1/partners 取引先の作成
destroyPartner() DELETE /api/1/partners/{id} 取引先の削除
getPartner() GET /api/1/partners/{id} 取引先の取得
getPartners() GET /api/1/partners 取引先一覧の取得
updatePartner() PUT /api/1/partners/{id} 取引先の更新
updatePartnerByCode() PUT /api/1/partners/code/{code} 取引先の更新

createPartner()

createPartner($partner_create_params): \Freee\Accounting\Model\PartnerResponse

取引先の作成

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\PartnersApi(
    // 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
);
$partner_create_params = new \Freee\Accounting\Model\PartnerCreateParams(); // \Freee\Accounting\Model\PartnerCreateParams | 取引先の作成

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

Parameters

Name Type Description Notes
partner_create_params \Freee\Accounting\Model\PartnerCreateParams 取引先の作成

Return type

\Freee\Accounting\Model\PartnerResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

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

destroyPartner()

destroyPartner($id, $company_id)

取引先の削除

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\PartnersApi(
    // 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 = 56; // int | 取引先ID
$company_id = 56; // int | 事業所ID

try {
    $apiInstance->destroyPartner($id, $company_id);
} catch (Exception $e) {
    echo 'Exception when calling PartnersApi->destroyPartner: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int 取引先ID
company_id int 事業所ID

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

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

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

getPartner()

getPartner($id, $company_id): \Freee\Accounting\Model\PartnerResponse

取引先の取得

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\PartnersApi(
    // 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 = 56; // int | 取引先ID
$company_id = 56; // int | 事業所ID

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

Parameters

Name Type Description Notes
id int 取引先ID
company_id int 事業所ID

Return type

\Freee\Accounting\Model\PartnerResponse

Authorization

oauth2

HTTP request headers

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

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

getPartners()

getPartners($company_id, $start_update_date, $end_update_date, $offset, $limit, $keyword): \Freee\Accounting\Model\PartnersResponse

取引先一覧の取得

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\PartnersApi(
    // 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
);
$company_id = 56; // int | 事業所ID
$start_update_date = 'start_update_date_example'; // string | 更新日で絞り込み:開始日(yyyy-mm-dd)
$end_update_date = 'end_update_date_example'; // string | 更新日で絞り込み:終了日(yyyy-mm-dd)
$offset = 56; // int | 取得レコードのオフセット (デフォルト: 0)
$limit = 56; // int | 取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)
$keyword = 'keyword_example'; // string | 検索キーワード<br> 取引先コード・取引先名・正式名称・カナ名称・ショートカットキー1・2のいずれかに対する部分一致。<br> 以下のいずれかで区切って複数キーワードを指定した場合はAND検索となります。 <ul> <li>半角スペース</li> <li>全角スペース</li> <li>タブ</li> </ul>

try {
    $result = $apiInstance->getPartners($company_id, $start_update_date, $end_update_date, $offset, $limit, $keyword);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PartnersApi->getPartners: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id int 事業所ID
start_update_date string 更新日で絞り込み:開始日(yyyy-mm-dd) [optional]
end_update_date string 更新日で絞り込み:終了日(yyyy-mm-dd) [optional]
offset int 取得レコードのオフセット (デフォルト: 0) [optional]
limit int 取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000) [optional]
keyword string 検索キーワード<br> 取引先コード・取引先名・正式名称・カナ名称・ショートカットキー1・2のいずれかに対する部分一致。<br> 以下のいずれかで区切って複数キーワードを指定した場合はAND検索となります。 <ul> <li>半角スペース</li> <li>全角スペース</li> <li>タブ</li> </ul> [optional]

Return type

\Freee\Accounting\Model\PartnersResponse

Authorization

oauth2

HTTP request headers

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

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

updatePartner()

updatePartner($id, $partner_update_params): \Freee\Accounting\Model\PartnerResponse

取引先の更新

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\PartnersApi(
    // 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 = 56; // int | 取引先ID
$partner_update_params = new \Freee\Accounting\Model\PartnerUpdateParams(); // \Freee\Accounting\Model\PartnerUpdateParams | 取引先の更新

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

Parameters

Name Type Description Notes
id int 取引先ID
partner_update_params \Freee\Accounting\Model\PartnerUpdateParams 取引先の更新

Return type

\Freee\Accounting\Model\PartnerResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

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

updatePartnerByCode()

updatePartnerByCode($code, $partner_update_params): \Freee\Accounting\Model\PartnerResponse

取引先の更新

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\PartnersApi(
    // 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
);
$code = 'code_example'; // string | 取引先コード
$partner_update_params = new \Freee\Accounting\Model\PartnerUpdateParams(); // \Freee\Accounting\Model\PartnerUpdateParams | 取引先の更新

try {
    $result = $apiInstance->updatePartnerByCode($code, $partner_update_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PartnersApi->updatePartnerByCode: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
code string 取引先コード
partner_update_params \Freee\Accounting\Model\PartnerUpdateParams 取引先の更新

Return type

\Freee\Accounting\Model\PartnerResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

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