Skip to content

Latest commit

 

History

History
738 lines (554 loc) · 25.5 KB

File metadata and controls

738 lines (554 loc) · 25.5 KB

Flowaccount.OpenAPITools.Api.PurchaseOrderApi

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 list all purchase order documents.
PurchasesOrdersIdAttachmentPost POST /purchases-orders/{id}/attachment Add Attachment to purchase order document.
PurchasesOrdersIdDelete DELETE /purchases-orders/{id} Get purchase order document.
PurchasesOrdersIdGet GET /purchases-orders/{id} Get purchase order document.
PurchasesOrdersIdStatusKeyStatusIdPost POST /purchases-orders/{id}/status-key/{statusId} Change status of purchase order document.
PurchasesOrdersInlinePost POST /purchases-orders/inline Create purchase order document with discount and tax inline.
PurchasesOrdersPost POST /purchases-orders Create purchase order document.
PurchasesOrdersSharedocumentPost POST /purchases-orders/sharedocument Share link purchase order document.

PurchasesOrdersEmailDocumentPost

SendEmailResponse PurchasesOrdersEmailDocumentPost (string authorization, SendEmailCoppies sendEmailCoppies)

Send email purchase order document.

ส่งเอกสารใบสั่งซื้อ ผ่านทางอีเมล ตามเลขที่เอกสารที่ต้องการ

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class PurchasesOrdersEmailDocumentPostExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new PurchaseOrderApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var sendEmailCoppies = new SendEmailCoppies(); // SendEmailCoppies | 

            try
            {
                // Send email purchase order document.
                SendEmailResponse result = apiInstance.PurchasesOrdersEmailDocumentPost(authorization, sendEmailCoppies);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling PurchaseOrderApi.PurchasesOrdersEmailDocumentPost: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authorization string [default to "Bearer accessToken"]
sendEmailCoppies SendEmailCoppies

Return type

SendEmailResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

PurchasesOrdersGet

InlineDocumentResponse PurchasesOrdersGet (int currentPage, int pageSize, string authorization, string sortBy = null, string filter = null)

Get list all purchase order documents.

เรียกดูข้อมูลเอกสารใบสั่งซื้อทั้งหมดในระบบ

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class PurchasesOrdersGetExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new PurchaseOrderApi(Configuration.Default);
            var currentPage = 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>
            var pageSize = 56;  // int | Query document purchase orders list amount per page. <br>Example Pattern: <ex> /purchases-orders?pageSize=20 </ex>
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var sortBy = sortBy_example;  // string |  (optional) 
            var filter = filter_example;  // string |  (optional) 

            try
            {
                // Get list all purchase order documents.
                InlineDocumentResponse result = apiInstance.PurchasesOrdersGet(currentPage, pageSize, authorization, sortBy, filter);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling PurchaseOrderApi.PurchasesOrdersGet: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
currentPage int Query current page document purchase orders. <br>Example Pattern: <ex>/purchases-orders?currentPage=1 </ex><ex>/purchases-orders?currentPage=1&pageSize=20</ex>
pageSize int Query document purchase orders list amount per page. <br>Example Pattern: <ex> /purchases-orders?pageSize=20 </ex>
authorization string [default to "Bearer accessToken"]
sortBy string [optional]
filter string [optional]

Return type

InlineDocumentResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

PurchasesOrdersIdAttachmentPost

AttachmentResponse PurchasesOrdersIdAttachmentPost (string authorization, string id, System.IO.Stream file = null)

Add Attachment to purchase order document.

แนบไฟล์ รูปภาพ หรือ เอกสารที่เกี่ยวข้อง ในเอกสารใบสั่งซื้อตามเลขที่เอกสารที่ต้องการ

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class PurchasesOrdersIdAttachmentPostExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new PurchaseOrderApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var id = id_example;  // string | documentId หรือ recordId ของเอกสารที่ต้องการแนบ
            var file = BINARY_DATA_HERE;  // System.IO.Stream | รูปแบบ file ที่ใช้แนบในเอกสารเป็นแบบ Binary (optional) 

            try
            {
                // Add Attachment to purchase order document.
                AttachmentResponse result = apiInstance.PurchasesOrdersIdAttachmentPost(authorization, id, file);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling PurchaseOrderApi.PurchasesOrdersIdAttachmentPost: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authorization string [default to "Bearer accessToken"]
id string documentId หรือ recordId ของเอกสารที่ต้องการแนบ
file System.IO.Stream รูปแบบ file ที่ใช้แนบในเอกสารเป็นแบบ Binary [optional]

Return type

AttachmentResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

PurchasesOrdersIdDelete

DeleteResponse PurchasesOrdersIdDelete (string authorization, string id)

Get purchase order document.

ลบ เอกสารใบสั่งซื้อ ตามเลขที่เอกสารที่ต้องการ
** การลบเอกสาร เอกสารต้องอยู่ในสถานะ รออนุมัติ

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class PurchasesOrdersIdDeleteExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new PurchaseOrderApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var id = id_example;  // string | ID เอกสารใช้ recordId

            try
            {
                // Get purchase order document.
                DeleteResponse result = apiInstance.PurchasesOrdersIdDelete(authorization, id);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling PurchaseOrderApi.PurchasesOrdersIdDelete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authorization string [default to "Bearer accessToken"]
id string ID เอกสารใช้ recordId

Return type

DeleteResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

PurchasesOrdersIdGet

InlineDocumentResponse PurchasesOrdersIdGet (string authorization, string id)

Get purchase order document.

เรียกดูข้อมูลเอกสารใบสั่งซื้อตามเลขที่เอกสารที่ต้องการ

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class PurchasesOrdersIdGetExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new PurchaseOrderApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var id = id_example;  // string | ID เอกสารใช้ recordId

            try
            {
                // Get purchase order document.
                InlineDocumentResponse result = apiInstance.PurchasesOrdersIdGet(authorization, id);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling PurchaseOrderApi.PurchasesOrdersIdGet: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authorization string [default to "Bearer accessToken"]
id string ID เอกสารใช้ recordId

Return type

InlineDocumentResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

PurchasesOrdersIdStatusKeyStatusIdPost

InlineDocumentResponse PurchasesOrdersIdStatusKeyStatusIdPost (string authorization, string id, string statusId)

Change status of purchase order document.

เปลี่ยนสถานะของเอกสารใบสั่งซื้อ สร้างเอกสารใหม่ครั้งแรกจะได้รับสถานะ รออนุมัติ (awaiting)

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class PurchasesOrdersIdStatusKeyStatusIdPostExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new PurchaseOrderApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var id = id_example;  // string | ID เอกสารใช้ recordId
            var statusId = statusId_example;  // string | เปลี่ยนสถานะเอกสารได้ 4 สถานะ <br> awaiting = รออนุมัติ <br> approved = อนุมัติ <br> approvedandprocessed = ดำเนินการแล้ว <br> void = ยกเลิก

            try
            {
                // Change status of purchase order document.
                InlineDocumentResponse result = apiInstance.PurchasesOrdersIdStatusKeyStatusIdPost(authorization, id, statusId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling PurchaseOrderApi.PurchasesOrdersIdStatusKeyStatusIdPost: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authorization string [default to "Bearer accessToken"]
id string ID เอกสารใช้ recordId
statusId string เปลี่ยนสถานะเอกสารได้ 4 สถานะ <br> awaiting = รออนุมัติ <br> approved = อนุมัติ <br> approvedandprocessed = ดำเนินการแล้ว <br> void = ยกเลิก

Return type

InlineDocumentResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

PurchasesOrdersInlinePost

InlineDocumentResponse PurchasesOrdersInlinePost (string authorization, InlineDocument inlineDocument)

Create purchase order document with discount and tax inline.

สร้างเอกสารใบสั่งซื้อ แบบส่วนลด หรือ ภาษี แยกตามรายการสินค้า เมื่อสร้างสำเร็จสถานะเอกสารจะอยู่ในสถานะ รออนุมัติ (awaiting)

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class PurchasesOrdersInlinePostExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new PurchaseOrderApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var inlineDocument = new InlineDocument(); // InlineDocument | 

            try
            {
                // Create purchase order document with discount and tax inline.
                InlineDocumentResponse result = apiInstance.PurchasesOrdersInlinePost(authorization, inlineDocument);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling PurchaseOrderApi.PurchasesOrdersInlinePost: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authorization string [default to "Bearer accessToken"]
inlineDocument InlineDocument

Return type

InlineDocumentResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

PurchasesOrdersPost

SimpleDocumentResponse PurchasesOrdersPost (string authorization, SimpleDocument simpleDocument)

Create purchase order document.

สร้างเอกสารใบสั่งซื้อ เมื่อสร้างสำเร็จสถานะเอกสารจะอยู่ในสถานะ รออนุมัติ (awaiting)

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class PurchasesOrdersPostExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new PurchaseOrderApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var simpleDocument = new SimpleDocument(); // SimpleDocument | 

            try
            {
                // Create purchase order document.
                SimpleDocumentResponse result = apiInstance.PurchasesOrdersPost(authorization, simpleDocument);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling PurchaseOrderApi.PurchasesOrdersPost: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authorization string [default to "Bearer accessToken"]
simpleDocument SimpleDocument

Return type

SimpleDocumentResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

PurchasesOrdersSharedocumentPost

ShareDocumentResponse PurchasesOrdersSharedocumentPost (string authorization, ShareDocument shareDocument)

Share link purchase order document.

แชร์ลิงค์ เอกสารใบสั่งซื้อที่ต้องการ จะได้รับลิงค์สำหรับแชร์และเรียกดูเอกสาร

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class PurchasesOrdersSharedocumentPostExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new PurchaseOrderApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var shareDocument = new ShareDocument(); // ShareDocument | 

            try
            {
                // Share link purchase order document.
                ShareDocumentResponse result = apiInstance.PurchasesOrdersSharedocumentPost(authorization, shareDocument);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling PurchaseOrderApi.PurchasesOrdersSharedocumentPost: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authorization string [default to "Bearer accessToken"]
shareDocument ShareDocument

Return type

ShareDocumentResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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