Gofive OpenAPI
empeoVenioeTaxGo
empeoVenioeTaxGo
  1. Expense
  • Introduction
  • Activity
    • Get a Activity
      GET
    • Activities Enquiry
      POST
  • Authentication API
    • Authorization
      POST
  • Customer
    • Create or Update customer
      POST
    • Get a Customer By CustomerCode
      GET
    • Customers Enquiry
      POST
    • Get a Customer By CustomerName
      GET
    • Create Customer Satisfaction
      POST
    • Add Customer Event
      POST
    • Get Customer Events by Customer Code
      GET
    • Edit Customer Event
      PUT
    • Delete Customer Event
      DELETE
    • Get Customer Event Types
      GET
  • Case
    • Add Case
      POST
    • Edit Case by CaseNo
      PUT
    • Get Case by CaseNo
      GET
    • Get Case Categories
      GET
  • Deal
    • Create Deal
      POST
    • Update Deal
      PUT
    • Deal Enquiry
      POST
    • Get Deal
      GET
    • Get Deal Board
      GET
    • Get Deal Stage
      GET
    • Get Deal Interest
      GET
    • Get DealLabel
      GET
    • Get Deal Missed Reason Categories
      GET
  • Employee
    • Employees Enquiry
    • Get a Employee
  • Expense
    • Create Expense
      POST
    • Update Expense
      PUT
    • Expense Enquiry
      POST
    • Get a Expense
      GET
  • Product
    • Create Or Update Products
    • Get a Product Ticket
    • Get Products With Take & Status
    • Get a Product by ProductCode
    • Get Product Groups
    • Get Product Properties
    • Get Products By Filter
    • Verify Serial Number
    • /v3/Products/serials/status
    • Create or Update Codeguard Products
    • Update Product Stock
    • /v1/products/units
    • /v1/products/units Copy
  • Quotation
    • Create Update Quotation
    • Convert Quotation To SalesOrder
    • Quotation Enquiry
    • Get a Quotation By QuotationNo
    • Cancel Quotation
  • SalesOrder
    • Create Or Update SalesOrder
    • Get a SalesOrders By Id
    • Get a SalesOrder By SalesOrderNo
    • Get Sale Order Attachment
    • Reject SaleOrder
    • Approve Sale Order
    • Update SalesOrder Payment
    • Update SalesOrder Tracking Number
  • Webhooks
    • Webhook Payload
  • Task
    • CreateTask
  • Setting
    • Get HeaderTemplate
  1. Expense

Update Expense

PUT
https://api.gofive.co.th/v1/Expenses/{id}
แก้ไขข้อมูล expense

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
id
string 
required
รหัสค่าใช้จ่าย expenseId
Header Params
Content-Type
string 
required
Example:
application/json
Ocp-Apim-Subscription-Key
string 
required
รหัสsubscription keyลูกค้า
Example:
<Your-Subscription-Key>
Body Params application/json
ExpenseDetails
object 
required
ExpenseDetails
array [object {15}] 
required
รายละเอียค่าใช้จ่าย
subject
string 
required
เรื่อง
activityId
string  | null 
optional
รหัสกิจกรรม
dateTransaction
string  | null 
optional
เวลาธุรกรรม
remark
string  | null 
optional
หมายเหตุ
attachments
array [object {15}]  | null 
optional
รายการเอกสารแนบ
subject
string 
required
เรื่อง
activityId
string 
optional
รหัสกิจกรรม
dateTransaction
string  | null 
optional
เวลาธุรกรรม
remark
string  | null 
optional
หมายเหตุ
attachments
array [object {15}]  | null 
optional
รายการเอกสารแนบ
attachmentId
integer 
required
รหัสfileแนบ
refId
integer 
required
รหัสอ้างอิงจากตาราง activity, feedback, inventory,purchaseRequisition
type
integer 
required
ประเภท file:
1 = activity
2 = expense
3 = customer
filename
string 
required
ไฟล์แนบ
extension
string 
required
นามสกุลไฟล์
fileSize
integer 
required
ขนาดไฟล์
isActive
string 
required
ใช้งานอยู่หรือไม่
true = ใช้งานอยู่
false = ไม่ได้ใช้งานอยู่
createdByUserId
string 
required
รหัส userid ผู้สร้าง
dateCreated
string 
required
เวลาสร้าง
resourceUrl
string 
required
urlที่มา
companyId
integer 
required
รหัสบริษัท
isProcessed
boolean 
required
ดำเนินการแล้วหรือยัง
true = ดำเนินการแล้ว
false = ยังไม่ดำเนินการ
url
string 
required
url
urlResponseUpload
string 
required
urlResponseUpload
thumbnail
string 
required
thumbnail
Example
{
  "expenseDetails": [
    {
      "expenseDetailId": 0,
      "expenseTypeId": 1001,
      "amount": 0,
      "night": 0,
      "milesStart": 0,
      "milesEnd": 0,
      "trainingTitle": "string",
      "hours": 0,
      "minutes": 0,
      "taxi": 0,
      "tollway": 0,
      "parking": 0,
      "person": 0,
      "note": "string",
      "usedFuelCard": true
    }
  ],
  "subject": "string",
  "activityId": "string",
  "dateTransaction": "2021-09-17T08:47:23.771Z",
  "remark": "string",
  "attachments": [
    {
      "attachmentId": 0,
      "refId": 0,
      "type": 0,
      "filename": "string",
      "extension": "string",
      "fileSize": 0,
      "isActive": true,
      "createdByUserId": "string",
      "dateCreated": "2021-09-17T08:47:23.771Z",
      "resourceUrl": "string",
      "companyId": 0,
      "isProcessed": true,
      "url": "string",
      "urlResponseUpload": "string",
      "thumbnail": "string"
    }
  ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.gofive.co.th/v1/Expenses/' \
--header 'Ocp-Apim-Subscription-Key: <Your-Subscription-Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "expenseDetails": [
        {
            "expenseDetailId": 0,
            "expenseTypeId": 1001,
            "amount": 0,
            "night": 0,
            "milesStart": 0,
            "milesEnd": 0,
            "trainingTitle": "string",
            "hours": 0,
            "minutes": 0,
            "taxi": 0,
            "tollway": 0,
            "parking": 0,
            "person": 0,
            "note": "string",
            "usedFuelCard": true
        }
    ],
    "subject": "string",
    "activityId": "string",
    "dateTransaction": "2021-09-17T08:47:23.771Z",
    "remark": "string",
    "attachments": [
        {
            "attachmentId": 0,
            "refId": 0,
            "type": 0,
            "filename": "string",
            "extension": "string",
            "fileSize": 0,
            "isActive": true,
            "createdByUserId": "string",
            "dateCreated": "2021-09-17T08:47:23.771Z",
            "resourceUrl": "string",
            "companyId": 0,
            "isProcessed": true,
            "url": "string",
            "urlResponseUpload": "string",
            "thumbnail": "string"
        }
    ]
}'

Responses

🟢200OK
application/json
Body
statusCode
integer 
required

สถานะของ Business Code ถ้า
Success = 1000
Error 1 ตัว = 4001
Error มากกว่า 1 ตัว = 4002    
หรือเป็น Subcode ที่ต้องการจะแสดงเพื่อสื่อความหมายของ Error โดย subcode จะเป็นตัวเดียวกับ business error code หรือไม่ก็ได้ เพื่อความสะดวกในการแสดงผล

httpStatusCode
integer 
required
สถานะ ของ  httpเช่น
200 Ok
201 Created
400 BadRequest
401 Unauthorized
404 Record not found
500 Internal Server Error
data
object 
required
value
object 
required
statusCode
integer 
required
สถานะ statusCode ของ httpเช่น
200 Ok
201 Created
400 BadRequest
401 Unauthorized
404 Record not found
500 Internal Server Error
Example
{
  "data": {
    "value": {
      "expenseId": 1,
      "teamId": 1,
      "expenseNo": "string",
      "statusId": 302,
      "dateTransaction": "2023-01-27T15:47:23+0700",
      "createdByUserId": "string",
      "dateCreated": "2023-01-23T11:29:03+0700",
      "updatedByUserId": "string",
      "dateUpdated": "2023-01-23T11:30:44+0700",
      "remark": "string",
      "subject": "string",
      "totalBaht": 3,
      "activityExpenses": [],
      "expenseDetails": [
        {
          "expenseDetailId": 1,
          "expenseId": 1,
          "expenseTypeId": 1001,
          "categoryId": 1,
          "quantity": 5,
          "amount1": 3
        }
      ],
      "expenseStates": [],
      "total": 3,
      "attachments": [],
      "pictureUrl": "string"
    },
    "statusCode": 200
  },
  "statusCode": 1000,
  "httpStatusCode": 200
}
🟠401Unauthorized
🟠400Bad Request
🟠403Forbidden
Previous
Create Expense
Next
Expense Enquiry
Built with