All URIs are relative to https://openapi.flowaccount.com/v1
Method | HTTP request | Description |
---|---|---|
purchasesOrdersEmailDocumentPost | POST /purchases-orders/email-document | Send email purchase order document. |
purchasesOrdersGet | GET /purchases-orders | Get all purchase order documents. |
purchasesOrdersIdAttachmentPost | POST /purchases-orders/{id}/attachment | Attachment purchase order document. |
purchasesOrdersIdDelete | DELETE /purchases-orders/{id} | Delete purchase order document. |
purchasesOrdersIdGet | GET /purchases-orders/{id} | Get purchase order document. |
purchasesOrdersIdPut | PUT /purchases-orders/{id} | Edit purchase order document. |
purchasesOrdersIdStatusStatusIdPost | POST /purchases-orders/{id}/status/{statusId} | Change status purchase order document. |
purchasesOrdersInlinePost | POST /purchases-orders/inline | Create purchase order document inline discount or inline vat. |
purchasesOrdersPost | POST /purchases-orders | Create purchase order document. |
purchasesOrdersSharedocumentPost | POST /purchases-orders/sharedocument | Share link purchase order document. |
\OpenAPI\Client\Model\SendEmailResponse purchasesOrdersEmailDocumentPost($authorization, $send_email_coppies)
Send email purchase order document.
ส่งเอกสารใบสั่งซื้อ ผ่านทางอีเมล ตามเลขที่เอกสารที่ต้องการ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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_coppies = new \OpenAPI\Client\Model\SendEmailCoppies(); // \OpenAPI\Client\Model\SendEmailCoppies |
try {
$result = $apiInstance->purchasesOrdersEmailDocumentPost($authorization, $send_email_coppies);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersEmailDocumentPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
send_email_coppies | \OpenAPI\Client\Model\SendEmailCoppies |
\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\AllDocumentResponse purchasesOrdersGet($current_page, $page_size, $authorization, $sort_by, $filter)
Get all purchase order documents.
เรียกดูข้อมูลเอกสารใบสั่งซื้อทั้งหมดในระบบ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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 purchase orders. <br>Example Pattern: <ex>/purchases-orders?currentPage=1 </ex><ex>/purchases-orders?currentPage=1&pageSize=20</ex>
$page_size = 56; // int | Query document purchase orders list amount per page. <br>Example Pattern: <ex> /purchases-orders?pageSize=20 </ex>
$authorization = 'Bearer accessToken'; // string |
$sort_by = 'sort_by_example'; // string | Query document purchase orders list amount per page. <br>Example Pattern: <ex> /purchases-orders?sortBy=[{'name':'publishedOn','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}] </ex><ex>/purchases-orders?sortBy=[{'name':'Contact.NameLocal','sortOrder':'desc'},{'name':'documentSerial','sortOrder':'desc'}]</ex><ex>/purchases-orders?sortBy=[{'name':'Value','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]</ex><ex>/purchases-orders?sortBy=[{'name':'Status','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]</ex>
$filter = 'filter_example'; // string | Query filter purchases-orders. <br>Example Pattern: <ex> /purchases-orders?filter=[{'columnName':'Contact.NameLocal','columnValue':'Contact Name','columnPredicateOperator':'And'}] </ex>
try {
$result = $apiInstance->purchasesOrdersGet($current_page, $page_size, $authorization, $sort_by, $filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
current_page | int | Query current page document purchase orders. <br>Example Pattern: <ex>/purchases-orders?currentPage=1 </ex><ex>/purchases-orders?currentPage=1&pageSize=20</ex> | |
page_size | int | Query document purchase orders list amount per page. <br>Example Pattern: <ex> /purchases-orders?pageSize=20 </ex> | |
authorization | string | [default to 'Bearer accessToken'] | |
sort_by | string | Query document purchase orders list amount per page. <br>Example Pattern: <ex> /purchases-orders?sortBy=[{'name':'publishedOn','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}] </ex><ex>/purchases-orders?sortBy=[{'name':'Contact.NameLocal','sortOrder':'desc'},{'name':'documentSerial','sortOrder':'desc'}]</ex><ex>/purchases-orders?sortBy=[{'name':'Value','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]</ex><ex>/purchases-orders?sortBy=[{'name':'Status','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]</ex> | [optional] |
filter | string | Query filter purchases-orders. <br>Example Pattern: <ex> /purchases-orders?filter=[{'columnName':'Contact.NameLocal','columnValue':'Contact Name','columnPredicateOperator':'And'}] </ex> | [optional] |
\OpenAPI\Client\Model\AllDocumentResponse
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 purchasesOrdersIdAttachmentPost($authorization, $id, $file)
Attachment purchase order document.
แนบไฟล์ รูปภาพ หรือ เอกสารที่เกี่ยวข้อง ในเอกสารใบสั่งซื้อตามเลขที่เอกสารที่ต้องการ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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 | documentId หรือ recordId ของเอกสารที่ต้องการแนบ
$file = "/path/to/file.txt"; // \SplFileObject | รูปแบบ file ที่ใช้แนบในเอกสารเป็นแบบ Binary
try {
$result = $apiInstance->purchasesOrdersIdAttachmentPost($authorization, $id, $file);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersIdAttachmentPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | documentId หรือ recordId ของเอกสารที่ต้องการแนบ | |
file | \SplFileObject**\SplFileObject** | รูปแบบ file ที่ใช้แนบในเอกสารเป็นแบบ Binary | [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 purchasesOrdersIdDelete($authorization, $id)
Delete purchase order document.
ลบ เอกสารใบสั่งซื้อ ตามเลขที่เอกสารที่ต้องการ
** การลบเอกสาร เอกสารต้องอยู่ในสถานะ รออนุมัติ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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->purchasesOrdersIdDelete($authorization, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersIdDelete: ', $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\InlineDocumentResponse purchasesOrdersIdGet($authorization, $id)
Get purchase order document.
เรียกดูข้อมูลเอกสารใบสั่งซื้อตามเลขที่เอกสารที่ต้องการ
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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->purchasesOrdersIdGet($authorization, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | ID เอกสารใช้ recordId |
\OpenAPI\Client\Model\InlineDocumentResponse
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\InlineDocumentResponse purchasesOrdersIdPut($authorization, $id, $update_inline_document)
Edit purchase order document.
แก้ไขข้อมูลเอกสารใบสั่งซื้อ ตามเลขที่เอกสารที่ต้องการเอกสารต้องเป็นสถานะ รออนุมัติ (Awaiting)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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_inline_document = new \OpenAPI\Client\Model\UpdateInlineDocument(); // \OpenAPI\Client\Model\UpdateInlineDocument |
try {
$result = $apiInstance->purchasesOrdersIdPut($authorization, $id, $update_inline_document);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | ID เอกสารใช้ recordId | |
update_inline_document | \OpenAPI\Client\Model\UpdateInlineDocument |
\OpenAPI\Client\Model\InlineDocumentResponse
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\InlineDocumentResponse purchasesOrdersIdStatusStatusIdPost($authorization, $id, $status_id)
Change status purchase order document.
เปลี่ยนสถานะของเอกสารใบสั่งซื้อ สร้างเอกสารใหม่ครั้งแรกจะได้รับสถานะ รออนุมัติ (awaiting)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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 | เปลี่ยนสถานะเอกสารได้ 4 สถานะ <br> awaiting = รออนุมัติ <br> approved = อนุมัติ <br> approvedandprocessed = ดำเนินการแล้ว <br> void = ยกเลิก
try {
$result = $apiInstance->purchasesOrdersIdStatusStatusIdPost($authorization, $id, $status_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersIdStatusStatusIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | ID เอกสารใช้ recordId | |
status_id | string | เปลี่ยนสถานะเอกสารได้ 4 สถานะ <br> awaiting = รออนุมัติ <br> approved = อนุมัติ <br> approvedandprocessed = ดำเนินการแล้ว <br> void = ยกเลิก |
\OpenAPI\Client\Model\InlineDocumentResponse
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\InlineDocumentResponse purchasesOrdersInlinePost($authorization, $inline_document)
Create purchase order document inline discount or inline vat.
สร้างเอกสารใบสั่งซื้อ แบบส่วนลด หรือ ภาษี แยกตามรายการสินค้า เมื่อสร้างสำเร็จสถานะเอกสารจะอยู่ในสถานะ รออนุมัติ (awaiting)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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 |
$inline_document = new \OpenAPI\Client\Model\InlineDocument(); // \OpenAPI\Client\Model\InlineDocument |
try {
$result = $apiInstance->purchasesOrdersInlinePost($authorization, $inline_document);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersInlinePost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
inline_document | \OpenAPI\Client\Model\InlineDocument |
\OpenAPI\Client\Model\InlineDocumentResponse
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\SimpleDocumentResponse purchasesOrdersPost($authorization, $simple_document)
Create purchase order document.
สร้างเอกสารใบสั่งซื้อ เมื่อสร้างสำเร็จสถานะเอกสารจะอยู่ในสถานะ รออนุมัติ (awaiting)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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 |
$simple_document = new \OpenAPI\Client\Model\SimpleDocument(); // \OpenAPI\Client\Model\SimpleDocument |
try {
$result = $apiInstance->purchasesOrdersPost($authorization, $simple_document);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
simple_document | \OpenAPI\Client\Model\SimpleDocument |
\OpenAPI\Client\Model\SimpleDocumentResponse
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 purchasesOrdersSharedocumentPost($authorization, $share_document)
Share link purchase order document.
แชร์ลิงค์ เอกสารใบสั่งซื้อที่ต้องการ จะได้รับลิงค์สำหรับแชร์และเรียกดูเอกสาร
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PurchaseOrderApi(
// 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->purchasesOrdersSharedocumentPost($authorization, $share_document);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseOrderApi->purchasesOrdersSharedocumentPost: ', $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]