- Introduction
- Activity
- Authentication API
- Customer
- Case
- Contract
- Deal
- Employee
- 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
- SalesOrder
- Webhooks
- Task
- Setting
- Chat
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
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
dateStart
string
required
dateEnd
string
required
description
string
optional
owner
string
required
contractService
object | null
optional
frequency
integer
required
Yearly = 260001
Quarterly = 260002
Monthly = 260003
Weekly = 260004
Custom = 260005
subject
string
required
numberOfTimes
integer
required
agreementNote
string | null
optional
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",
"description": null,
"owner": "UAT007",
"contractService": {
"subject": "test frequency open api",
"frequency": 260001,
"numberOfTimes": 1,
"agreementNote": null
}
}
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",
"description": null,
"owner": "UAT007",
"contractService": {
"subject": "test frequency open api",
"frequency": 260001,
"numberOfTimes": 1,
"agreementNote": null
}
}'
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
attachments
array[object (AttachmentDto) {24}]
required
customerCode
string
required
customerName
string
required
customerType
integer
required
Prospect = 11200
Customer = 11300
Lead = 11100
statusCode
integer
required
httpStatusCode
integer
required
Example
{
"data": {
"value": {
"activityId": 1,
"teamId": 1,
"activityNo": "string",
"subject": "string",
"groupId": 1,
"activityTypeId": 1,
"customerId": 1,
"customerState": 1,
"latitude": 0,
"longitude": 0,
"location": "string",
"locationName": "string",
"dateCheckin": "2020-11-17T18:30:09+0700",
"dateCheckout": "2020-11-17T18:31:07+0700",
"isActive": true,
"statusId": 1,
"isAdHoc": false,
"assignToUserId": "string",
"dateAppointmentStart": "2020-11-17T18:00:46+0700",
"dateAppointmentEnd": "2020-11-17T20:00:46+0700",
"startLatitude": 0,
"startLongitude": 0,
"startLocation": "string",
"startLocationName": "string",
"startPlaceId": "string",
"visitLatitude": 0,
"visitLongitude": 0,
"visitLocation": "string",
"visitLocationName": "string",
"visitPlaceId": "string",
"totalDistance": 0,
"dateAppointmented": "2020-11-17T17:56:59+0700",
"appointmentedByUserId": "string",
"dateApproved": "2020-11-17T17:56:59+0700",
"approvedByUserId": "string",
"userRoleId": "string",
"userOrgString": "string",
"userOrgLevel": 1,
"checkoutLatitude": 0,
"checkoutLongitude": 0,
"checkoutLocation": "string",
"checkoutLocationName": "string",
"activityReport": "string",
"addressId": 1,
"refActivityId": 1,
"dateCreated": "2020-11-17T17:56:59+0700",
"createdByUserId": "string",
"dateModified": "2022-11-21T18:48:18+0700",
"modifiedByUserId": "string",
"customer": {
"customerId": 1,
"companyId": 1,
"customerCode": "string",
"customerName": "string",
"type": 1,
"customerType": 1,
"branch": "string",
"addressPart1": "string",
"phone": "string",
"mobile": "string",
"fax": "string",
"notes": "string",
"isActive": true,
"dateChangeToCustomer": "2022-07-06T16:26:21+0700",
"createdByUserId": "string",
"dateCreated": "2020-07-18T12:30:57+0700",
"modifiedByUserId": "string",
"dateModified": "2022-09-08T17:38:21+0700",
"customerGroupId": 1,
"leadStatus": 1,
"email": "string",
"customerStateId": 1,
"hasOwner": true,
"dateAcquired": "2022-07-06T16:26:21+0700",
"uniqueName": "string",
"isRequireSoundex": true,
"status": 1,
"dateFollowUp": "2022-05-17T09:00:00+0700",
"dateLatestUpdated": "2022-12-10T21:00:00+0700",
"pictureUrl": "string"
},
"activityStates": [
{
"activityStateId": 1,
"activityId": 1,
"statusId": 1,
"createdByUserId": "string",
"dateCreated": "2020-11-17T18:30:09+0700",
"approveLevel": 1,
"seq": 0
},
{
"activityStateId": 1,
"activityId": 1,
"statusId": 1,
"createdByUserId": "string",
"dateCreated": "2020-11-17T17:56:59+0700",
"approveLevel": 1,
"seq": 0
}
],
"activitySubtypes": [
{
"activityTypeId": 1,
"typeName": "string"
}
],
"createType": 3,
"isVisibleCustomerDetail": true,
"staffName": "string",
"detailActivities": [
0
],
"detailActivity": "string",
"detailActivityModels": [
{
"activityTypeId": 1,
"activityTypeName": "string"
}
],
"assignToUser": {
"userId": "string",
"username": "string",
"companyId": 1,
"companyName": "string",
"teamId": 1,
"teamName": "string",
"staffCode": "string",
"title": "",
"firstname": "string",
"lastname": "string",
"fullname": "string",
"position": "string",
"email": "string",
"phoneNumber": "string",
"orgString": "string",
"orgLevel": 1,
"latitude": 0,
"longitude": 0,
"location": "string",
"locationName": "string",
"isActive": true,
"createdByUserId": "string",
"dateCreated": "2018-11-05T10:13:59+0700",
"modifiedByUserId": "string",
"dateModified": "2023-01-13T10:26:26+0700",
"hasPicture": true,
"role": "string",
"roleId": "string",
"siteId": 1,
"isAgreementPdpa": true,
"dateAgreementPdpa": "2020-08-26T07:13:22+0700",
"emailSubscription": 1,
"identityUserId": "string",
"uniqueName": "string",
"inAppSubscription": 1,
"userType": 1,
"platformId": 0,
"isActiveEmpeo": true,
"refCompanyId": 1,
"refClientId": 1,
"signatureUrl": "string",
"emailSupscriptionFlag": 1,
"inAppSupscriptionFlag": 1,
"pictureUrl": "string"
},
"assignToUsers": [
{
"userId": "string",
"fullname": "string",
"dateModified": "2021-11-17T18:05:16+0700",
"pictureUrl": "string",
"statusUser": 601
}
],
"contact": "",
"contacts": [
{
"contactId": 1,
"contactName": "string",
"position": "string"
}
],
"keyActivity": "string",
"assignTo": "string",
"statusName": "string",
"assignedBy": "string",
"attachments": [
{
"attachmentId": 1,
"refId": 1,
"type": 1,
"dateCreated": "2023-01-25T15:26:54+0700",
"url": "string",
"urlResponseUpload": "string",
"thumbnail": "string"
}
],
"customerName": "string",
"pictureUrl": "string",
"canAddMember": true
},
"statusCode": 200
},
"statusCode": 1000,
"httpStatusCode": 200
}
🟠400Bad Request
Modified at 2025-06-24 14:05:15