All URIs are relative to https://openapi.flowaccount.com/v1
Method | HTTP request | Description |
---|---|---|
withholdingTaxesEmailDocumentPost | POST /withholding-taxes/email-document | Send email withholding tax. |
withholdingTaxesGet | GET /withholding-taxes | Get all withholding tax documents. |
withholdingTaxesIdAttachmentPost | POST /withholding-taxes/{id}/attachment | Attachment withholding tax. |
withholdingTaxesIdDelete | DELETE /withholding-taxes/{id} | Delete withholding tax document. |
withholdingTaxesIdGet | GET /withholding-taxes/{id} | Get withholding tax document. |
withholdingTaxesIdPut | PUT /withholding-taxes/{id} | Edit withholding tax document. |
withholdingTaxesIdStatusStatusIdPost | POST /withholding-taxes/{id}/status/{statusId} | Change status withholding tax document. |
withholdingTaxesPost | POST /withholding-taxes | Create withholding tax document. |
withholdingTaxesSharedocumentPost | POST /withholding-taxes/sharedocument | Share link withholding tax. |
\OpenAPI\Client\Model\SendEmailResponse withholdingTaxesEmailDocumentPost($authorization, $send_email_simple)
Send email withholding tax.
ส่งเอกสารใบหัก ณ ที่จ่าย ผ่านทางอีเมล ตามเลขที่เอกสารที่ต้องการ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\WithholdingTaxApi(
// 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()
);
$authorization = 'Bearer accessToken'; // string |
$send_email_simple = new \OpenAPI\Client\Model\SendEmailSimple(); // \OpenAPI\Client\Model\SendEmailSimple |
try {
$result = $apiInstance->withholdingTaxesEmailDocumentPost($authorization, $send_email_simple);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WithholdingTaxApi->withholdingTaxesEmailDocumentPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
send_email_simple | \OpenAPI\Client\Model\SendEmailSimple |
\OpenAPI\Client\Model\SendEmailResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\AllWithholidingTaxDocumentResponse withholdingTaxesGet($current_page, $page_size, $authorization, $sort_by, $filter)
Get all withholding tax documents.
เรียกดูข้อมูลเอกสารใบหัก ณ ที่จ่ายทั้งหมดในระบบ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\WithholdingTaxApi(
// 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()
);
$current_page = 56; // int | Query current page document withholding tax. <br>Example Pattern: <ex>/withholding-taxes?currentPage=1 </ex><ex>/withholding-taxes?currentPage=1&pageSize=20</ex>
$page_size = 56; // int | Query document withholding tax list amount per page. <br>Example Pattern: <ex> /withholding-taxes?pageSize=20 </ex>
$authorization = 'Bearer accessToken'; // string |
$sort_by = 'sort_by_example'; // string | Query sort by withholding tax. <br>Example Pattern: <ex> /withholding-taxes?sortBy=[{'name':'publishedOn','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}] </ex><ex>/withholding-taxes?sortBy=[{'name':'Contact.NameLocal','sortOrder':'desc'},{'name':'documentSerial','sortOrder':'desc'}]</ex><ex>/withholding-taxes?sortBy=[{'name':'entity','sortOrder':'asc'}]</ex><ex>/withholding-taxes?sortBy=[{'name':'Value','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]</ex><ex>/withholding-taxes?sortBy=[{'name':'Status','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]</ex>
$filter = 'filter_example'; // string | Query filter withholding tax. <br>Example Pattern: <ex> /withholding-taxes?filter=[{'columnName':'Contact.NameLocal','columnValue':'Contact Name','columnPredicateOperator':'And'}] </ex>
try {
$result = $apiInstance->withholdingTaxesGet($current_page, $page_size, $authorization, $sort_by, $filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WithholdingTaxApi->withholdingTaxesGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
current_page | int | Query current page document withholding tax. <br>Example Pattern: <ex>/withholding-taxes?currentPage=1 </ex><ex>/withholding-taxes?currentPage=1&pageSize=20</ex> | |
page_size | int | Query document withholding tax list amount per page. <br>Example Pattern: <ex> /withholding-taxes?pageSize=20 </ex> | |
authorization | string | [default to 'Bearer accessToken'] | |
sort_by | string | Query sort by withholding tax. <br>Example Pattern: <ex> /withholding-taxes?sortBy=[{'name':'publishedOn','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}] </ex><ex>/withholding-taxes?sortBy=[{'name':'Contact.NameLocal','sortOrder':'desc'},{'name':'documentSerial','sortOrder':'desc'}]</ex><ex>/withholding-taxes?sortBy=[{'name':'entity','sortOrder':'asc'}]</ex><ex>/withholding-taxes?sortBy=[{'name':'Value','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]</ex><ex>/withholding-taxes?sortBy=[{'name':'Status','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]</ex> | [optional] |
filter | string | Query filter withholding tax. <br>Example Pattern: <ex> /withholding-taxes?filter=[{'columnName':'Contact.NameLocal','columnValue':'Contact Name','columnPredicateOperator':'And'}] </ex> | [optional] |
\OpenAPI\Client\Model\AllWithholidingTaxDocumentResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\AttachmentResponse withholdingTaxesIdAttachmentPost($authorization, $id, $file)
Attachment withholding tax.
แนบไฟล์ รูปภาพ หรือ เอกสารที่เกี่ยวข้อง ในเอกสารใบหัก ณ ที่จ่าย ตามเลขที่เอกสารที่ต้องการ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\WithholdingTaxApi(
// 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()
);
$authorization = 'Bearer accessToken'; // string |
$id = 'id_example'; // string |
$file = "/path/to/file.txt"; // \SplFileObject |
try {
$result = $apiInstance->withholdingTaxesIdAttachmentPost($authorization, $id, $file);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WithholdingTaxApi->withholdingTaxesIdAttachmentPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | ||
file | \SplFileObject**\SplFileObject** | [optional] |
\OpenAPI\Client\Model\AttachmentResponse
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\DeleteResponse withholdingTaxesIdDelete($authorization, $id)
Delete withholding tax document.
ลบ เอกสารใบหัก ณ ที่จ่าย ตามเลขที่เอกสารที่ต้องการ
** การลบเอกสาร เอกสารต้องอยู่ในสถานะ รอดำเนินการ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\WithholdingTaxApi(
// 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()
);
$authorization = 'Bearer accessToken'; // string |
$id = 'id_example'; // string | ID เอกสารใช้ recordId
try {
$result = $apiInstance->withholdingTaxesIdDelete($authorization, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WithholdingTaxApi->withholdingTaxesIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | ID เอกสารใช้ recordId |
\OpenAPI\Client\Model\DeleteResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\WithholidingTaxDocumentResponse withholdingTaxesIdGet($authorization, $id)
Get withholding tax document.
เรียกดูข้อมูลเอกสารใบหัก ณ ที่จ่าย ตามเลขที่เอกสารที่ต้องการ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\WithholdingTaxApi(
// 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()
);
$authorization = 'Bearer accessToken'; // string |
$id = 'id_example'; // string | ID เอกสารใช้ recordId หรือ documentId
try {
$result = $apiInstance->withholdingTaxesIdGet($authorization, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WithholdingTaxApi->withholdingTaxesIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | ID เอกสารใช้ recordId หรือ documentId |
\OpenAPI\Client\Model\WithholidingTaxDocumentResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\WithholidingTaxDocumentResponse withholdingTaxesIdPut($authorization, $id, $update_withholiding_tax_document)
Edit withholding tax document.
แก้ไขข้อมูลเอกสารใบหัก ณ ที่จ่าย ตามเลขที่เอกสารที่ต้องการเอกสารต้องเป็นสถานะ รอดำเนินการ (Awaiting)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\WithholdingTaxApi(
// 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()
);
$authorization = 'Bearer accessToken'; // string |
$id = 'id_example'; // string | ID เอกสารใช้ recordId
$update_withholiding_tax_document = new \OpenAPI\Client\Model\UpdateWithholidingTaxDocument(); // \OpenAPI\Client\Model\UpdateWithholidingTaxDocument |
try {
$result = $apiInstance->withholdingTaxesIdPut($authorization, $id, $update_withholiding_tax_document);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WithholdingTaxApi->withholdingTaxesIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | ID เอกสารใช้ recordId | |
update_withholiding_tax_document | \OpenAPI\Client\Model\UpdateWithholidingTaxDocument |
\OpenAPI\Client\Model\WithholidingTaxDocumentResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\WithholidingTaxDocumentResponse withholdingTaxesIdStatusStatusIdPost($authorization, $id, $status_id)
Change status withholding tax document.
เปลี่ยนสถานะของเอกสารใบหัก ณ ที่จ่าย สร้างเอกสารใหม่ครั้งแรกจะได้รับสถานะ ดำเนินการแล้ว (processed)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\WithholdingTaxApi(
// 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()
);
$authorization = 'Bearer accessToken'; // string |
$id = 'id_example'; // string | ID เอกสารใช้ recordId
$status_id = 'status_id_example'; // string | เปลี่ยนสถานะเอกสารได้ 3 สถานะ <br> awaiting = รอดำเนินการ <br> processed = ดำเนินการแล้ว <br> void = ยกเลิก
try {
$result = $apiInstance->withholdingTaxesIdStatusStatusIdPost($authorization, $id, $status_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WithholdingTaxApi->withholdingTaxesIdStatusStatusIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | ID เอกสารใช้ recordId | |
status_id | string | เปลี่ยนสถานะเอกสารได้ 3 สถานะ <br> awaiting = รอดำเนินการ <br> processed = ดำเนินการแล้ว <br> void = ยกเลิก |
\OpenAPI\Client\Model\WithholidingTaxDocumentResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\WithholidingTaxDocumentResponse withholdingTaxesPost($authorization, $withholiding_tax_document)
Create withholding tax document.
สร้างเอกสารใบหัก ณ ที่จ่าย เมื่อสร้างสำเร็จสถานะเอกสารจะอยู่ในสถานะ ดำเนินการแล้ว (issued)
ข้อมูลการออกเอกสาร หัก ณ ที่จ่าย : https://flowaccount.com/blog/ภาษีเงินได้-หัก-ณ-ที่จ่า
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\WithholdingTaxApi(
// 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()
);
$authorization = 'Bearer accessToken'; // string |
$withholiding_tax_document = new \OpenAPI\Client\Model\WithholidingTaxDocument(); // \OpenAPI\Client\Model\WithholidingTaxDocument |
try {
$result = $apiInstance->withholdingTaxesPost($authorization, $withholiding_tax_document);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WithholdingTaxApi->withholdingTaxesPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
withholiding_tax_document | \OpenAPI\Client\Model\WithholidingTaxDocument |
\OpenAPI\Client\Model\WithholidingTaxDocumentResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\ShareDocumentResponse withholdingTaxesSharedocumentPost($authorization, $share_document)
Share link withholding tax.
แชร์ลิงค์ เอกสารใบหัก ณ ที่จ่าย ที่ต้องการ จะได้รับลิงค์สำหรับแชร์และเรียกดูเอกสาร
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\WithholdingTaxApi(
// 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()
);
$authorization = 'Bearer accessToken'; // string |
$share_document = new \OpenAPI\Client\Model\ShareDocument(); // \OpenAPI\Client\Model\ShareDocument |
try {
$result = $apiInstance->withholdingTaxesSharedocumentPost($authorization, $share_document);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WithholdingTaxApi->withholdingTaxesSharedocumentPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
share_document | \OpenAPI\Client\Model\ShareDocument |
\OpenAPI\Client\Model\ShareDocumentResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]