Gofive OpenAPI
empeoVenioeTaxGo
empeoVenioeTaxGo
  1. Contract
  • Introduction
  • Activity
    • Activities Enquiry
      POST
    • Get a Activity By Id
      GET
    • Get a Activity By No
      GET
    • Get Key Activities
      GET
    • Create or Update Activity
      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
    • Get file categories
      GET
    • Attach files category
      POST
  • Case
    • Add Case
      POST
    • Edit Case by CaseNo
      PUT
    • Get Case by CaseNo
      GET
    • Get Case Categories
      GET
  • Contract
    • Get Contract By No
      GET
    • Get Contract Types
      GET
    • Get Contract Templates
      GET
    • Create or Update Contract
      POST
    • Create or Update Contract Service Agreement
      POST
    • Send Contract Document
      POST
  • Deal
    • Create Deal
    • Update Deal
    • Deal Enquiry
    • Get Deal
    • Get Deal Board
    • Get Deal Stage
    • Get Deal Interest
    • Get DealLabel
    • Get Deal Missed Reason Categories
  • Employee
    • Employees Enquiry
    • Get a Employee
  • Expense
    • Create Expense
    • Update Expense
    • Expense Enquiry
    • Get a Expense
  • 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
  • Chat
    • Post Send message
  • Storage
    • Upload files attachments
    • Get file attachments
    • Delete file attachments
  1. Contract

Create or Update Contract

Developing
POST
https://api.gofive.co.th/v1/contract

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params
Content-Type
string 
required
Example:
application/json
Ocp-Apim-Subscription-Key
string 
required
รหัส subscriptionของลูกค้า
Example:
<Your-Subscription-Key>
Body Params application/json
contractNo
string  | null 
optional
หมายเลขสัญญา (ใช้ในการแก้ไขสัญญา)
contractName
string 
required
ชื่อสัญญา
contractType
string 
required
ประเภทสัญญา
contractValue
integer  | null 
optional
มูลค่าสัญญา
customerCode
string 
required
รหัสลูกค้า
dealNo
string  | null 
optional
รหัสดีล
dateStart
string 
required
วันที่เริ่ม
dateEnd
string 
required
วันที่สิ้นสุด
note
string 
optional
รายละเอียด
owner
string 
required
ผู้รับผิดชอบ
contractService
object  | null 
optional
Service Agreement
subject
string 
required
หัวข้อ Service Agreement
frequency
integer 
required
ประเภทความถี่
Yearly = 260001
Quarterly = 260002
Monthly = 260003
Weekly = 26000
numberOfTimes
integer 
required
จำนวนครั้ง
agreementNote
string  | null 
optional
บันทึก
attachmentIds
array[integer]
required
ลิส id ของ attahment ประเภท Contract
Example
{
    "contractNo": "CONT250600006",
    "contractName": "test contract open api 3",
    "customerCode": "L000308",
    "contractType": "MA",
    "contractValue": 2000,
    "dateStart": "2025-06-18 00:00:00",
    "dateEnd": "2026-06-18 21:37:51",
    "dealNo": "string",
    "note": null,
    "owner": "UAT007",
    "contractService": {
        "subject": "test frequency open api",
        "frequency": 260001,
        "numberOfTimes": 1,
        "agreementNote": null
    },
    "attachmentIds": []
}

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 POST 'https://api.gofive.co.th/v1/contract' \
--header 'Ocp-Apim-Subscription-Key: <Your-Subscription-Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "contractNo": "CONT250600006",
    "contractName": "test contract open api 3",
    "customerCode": "L000308",
    "contractType": "MA",
    "contractValue": 2000,
    "dateStart": "2025-06-18 00:00:00",
    "dateEnd": "2026-06-18 21:37:51",
    "dealNo": "string",
    "note": null,
    "owner": "UAT007",
    "contractService": {
        "subject": "test frequency open api",
        "frequency": 260001,
        "numberOfTimes": 1,
        "agreementNote": null
    },
    "attachmentIds": []
}'

Responses

🟢200Success
application/json
Body
data
object (ContractDto) 
required
contractNo
string 
required
หมายเลขสัญญา
contractType
string 
required
ประเภทสัญญา
statusId
integer 
required
สถานะสัญญา
Open = 1601
Active = 1602
Completed = 1603
Cancel = 1604
contractName
string 
required
ชื่อสัญญา
owner
string 
required
ผู้รับผิดชอบ
dateStart
string 
required
วันที่เริ่ม
dateEnd
string 
required
วันที่สิ้นสุด
contractValue
integer 
required
มูลค่าสัญญา
contractServices
array [object {5}] 
required
Service Agreement
attachments
array[object (AttachmentDto) {24}] 
required
ไฟล์แนบ
customerCode
string 
required
รหัสลูกค้า
customerName
string 
required
ชื่อลูกค้า
customerType
integer 
required
ประเภทลูกค้า
Individual = 13001
Business = 13002
dealNo
string 
optional
รหัสดีล
statusCode
integer 
required
httpStatusCode
integer 
required
Example
{
    "status": {
        "code": "1000",
        "description": "Success"
    },
    "data": {
        "contractNo": "string",
        "contractType": 3204,
        "statusId": 1602,
        "contractName": "string",
        "owner": "string",
        "dateStart": "2025-06-18T00:00:00+0700",
        "dateEnd": "2026-06-18T00:00:00+0700",
        "contractValue": 2000.00,
        "contractServices": [
            {
                "contractServiceId": 37881,
                "frequency": 260001,
                "subject": "string",
                "numberOfTimes": 1,
                "isActive": true
            },
            {
                "contractServiceId": 37902,
                "frequency": 260001,
                "subject": "string",
                "numberOfTimes": 1,
                "isActive": true
            },
            {
                "contractServiceId": 37903,
                "frequency": 260001,
                "subject": "string",
                "numberOfTimes": 1,
                "isActive": true
            }
        ],
        "attachments": [],
        "contractTypeName": "string",
        "customerCode": "string",
        "customerName": "string",
        "statusTypeId": 1,
        "customerType": 0,
        "dealNo": "string"
    }
}
🟠400Bad Request
Modified at 2025-07-10 04:24:08
Previous
Get Contract Templates
Next
Create or Update Contract Service Agreement
Built with