Add New
Add new sales contract
HTTP Request
[POST] /api/v6/sale_contracts
Body Parameters
Parameter | Type | Default | Nullable | Require | Description |
---|---|---|---|---|---|
effective_date | string | yes | Effective date | ||
expiration_date | string | yes | Expiration date | ||
contract_date | string | yes | Creation date | ||
contract_terms | array | List of terms | |||
new_contract | integer | yes | Contract renewal type | ||
contract_used | integer | yes | Contract usage code | ||
use_workflow | integer | yes | Use workflow? (Y-m-d) | ||
discount | float | Discount (%) | |||
discount_amount | float | Discount amount ($) | |||
transport | float | Shipping fee percentage | |||
transport_amount | float | Shipping fee cash | |||
installation_amount | float | Installation fee cash | |||
installation | float | Installation fee percentage | |||
vat | float | VAT percentage | |||
vat_amount | float | VAT cash | |||
contract_name | string | yes | Contract name | ||
number_of_contract | integer | Number of contracts | |||
contract_code | string | Contract code | |||
vendor_account_id | integer | yes | Customer identifier | ||
vendor_account_name | string | Customer name | |||
vendor_account_address | string | Customer address | |||
vendor_account_phone | string | Customer phone number | |||
vendor_account_fax | string | Customer fax number | |||
vendor_contact_name | string | Representative name (Party A) | |||
vendor_contact_id | integer | Representative identifier (Party A) | |||
vendor_positions | string | Representative position (Party A) | |||
vendor_bank_address | string | Bank address (Party A) | |||
vendor_bank_account_number | string | Bank account number (Party A) | |||
vendor_sic_code | string | Customer tax code | |||
buyers_account_id | integer | yes | Company identifier | ||
buyers_account_name | string | Company name | |||
buyers_account_address | string | Company address | |||
buyers_account_phone | string | Company phone number | |||
buyers_account_fax | string | Company fax number | |||
buyers_contact_name | string | Representative name (Party B) | |||
buyers_positions | string | Representative position (Party B) | |||
buyers_bank_address | string | Bank address (Party B) | |||
buyers_bank_account_number | string | Bank account number (Party B) | |||
buyers_sic_code | string | Company tax code | |||
service_charge_after_vat | integer | Apply shipping fee after VAT? | |||
quote_id | integer | Quote identifier | |||
payment_methods | integer | yes | Contract payment method | ||
start_actual_time | string | Actual contract effective date | |||
end_actual_time | string | Actual contract expiration date | |||
actual_value | float | Actual value | |||
project_name | string | Project | |||
project_address | string | Project location | |||
performed | string | Performed | |||
contract_parent_id | integer | Related contract identifier | |||
contract_details | array | yes | Product list | ||
payment_periods | array | List of payment periods | |||
custom_fields | array | Data definition |
Example
HTTP Request
POST api/v6/sale_contracts HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"effective_date": 1734627600,
"expiration_date": 1734627600,
"contract_date": 1735525970,
"contract_terms": [
{
"id": 1491,
"term_name": "",
"term_des": "<p><span>Contract terms</span></p>"
}
],
"new_contract": 1,
"contract_used": 1,
"use_workflow": 0,
"discount": 0,
"discount_amount": 0,
"transport": 0,
"transport_amount": 0,
"installation_amount": 0,
"installation": 0,
"vat": 0,
"vat_amount": 0,
"contract_name": "HD14912",
"number_of_contract": "1",
"contract_code": "HD14912",
"vendor_account_id": 532,
"vendor_account_name": "Thanh Nguyen",
"vendor_account_address": "Address",
"vendor_account_phone": "09871717231",
"vendor_account_fax": "Fax",
"vendor_contact_name": "Thanh Nguyen",
"vendor_contact_id": 686,
"vendor_positions": "Position",
"vendor_bank_address": "Bank",
"vendor_bank_account_number": "Account number",
"vendor_sic_code": "Tax code",
"buyers_account_id": 1,
"buyers_account_name": "Getfly",
"buyers_account_address": "7th Floor, Hoa Cuong Building, No. 18, Alley 11, Thai Ha, Dong Da, Hanoi",
"buyers_account_phone": "09730943891",
"buyers_account_fax": "faxx",
"buyers_contact_name": "",
"buyers_positions": "Position",
"buyers_bank_address": "Bank",
"service_charge_after_vat": 0,
"quote_id": 36,
"payment_methods": 1,
"start_actual_time": 1735491600,
"end_actual_time": 1735578000,
"actual_value": 1.2,
"project_name": "Project",
"project_address": "Location",
"performed": "Performed",
"contract_parent_id": 1491,
"buyers_bank_account_number": "Account number",
"buyers_sic_code": "Tax code",
"attachment_uploads": [],
"contract_details": [
{
"product_id": 216,
"product_code": "Code 1",
"description": "",
"unit_id": 2,
"unit_name": "sheet",
"quantity": 1,
"price": 0,
"discount": 0,
"vat": 0,
"amount": 0,
"variants": []
}
],
"payment_periods": []
}
Status
200 OK
Response
{
"message": "Successfully added",
"id": 4
}
Add new purchase contract
HTTP Request
[POST] /api/v6/purchase_contracts
Body Parameters
Parameter | Type | Default | Nullable | Require | Description |
---|---|---|---|---|---|
effective_date | string | yes | Effective date | ||
expiration_date | string | yes | Expiration date | ||
contract_date | string | yes | Creation date | ||
contract_terms | array | List of terms | |||
new_contract | integer | yes | Contract renewal type | ||
contract_used | integer | yes | Contract usage code | ||
use_workflow | integer | yes | Use workflow? (Y-m-d) | ||
discount | float | Discount (%) | |||
discount_amount | float | Discount amount ($) | |||
transport | float | Shipping fee percentage | |||
transport_amount | float | Shipping fee cash | |||
installation_amount | float | Installation fee cash | |||
installation | float | Installation fee percentage | |||
vat | float | VAT percentage | |||
vat_amount | float | VAT cash | |||
contract_name | string | yes | Contract name | ||
number_of_contract | integer | Number of contracts | |||
contract_code | string | Contract code | |||
vendor_account_id | integer | yes | Customer identifier | ||
vendor_account_name | string | Customer name | |||
vendor_account_address | string | Customer address | |||
vendor_account_phone | string | Customer phone number | |||
vendor_account_fax | string | Customer fax number | |||
vendor_contact_name | string | Representative name (Party A) | |||
vendor_contact_id | integer | Representative identifier (Party A) | |||
vendor_positions | string | Representative position (Party A) | |||
vendor_bank_address | string | Bank address (Party A) | |||
vendor_bank_account_number | string | Bank account number (Party A) | |||
vendor_sic_code | string | Customer tax code | |||
buyers_account_id | integer | yes | Company identifier | ||
buyers_account_name | string | Company name | |||
buyers_account_address | string | Company address | |||
buyers_account_phone | string | Company phone number | |||
buyers_account_fax | string | Company fax number | |||
buyers_contact_name | string | Representative name (Party B) | |||
buyers_positions | string | Representative position (Party B) | |||
buyers_bank_address | string | Bank address (Party B) | |||
buyers_bank_account_number | string | Bank account number (Party B) | |||
buyers_sic_code | string | Company tax code | |||
service_charge_after_vat | integer | Apply shipping fee after VAT? | |||
quote_id | integer | Quote identifier | |||
payment_methods | integer | yes | Contract payment method | ||
start_actual_time | string | Actual contract effective date | |||
end_actual_time | string | Actual contract expiration date | |||
actual_value | float | Actual value | |||
project_name | string | Project | |||
project_address | string | Project location | |||
performed | string | Performed | |||
contract_parent_id | integer | Related contract identifier | |||
contract_details | array | yes | Product list | ||
payment_periods | array | List of payment periods | |||
custom_fields | array | Data definition |
Example
HTTP Request
POST api/v6/purchase_contracts HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"effective_date": 1734627600,
"expiration_date": 1734627600,
"contract_date": 1735525970,
"contract_terms": [
{
"id": 1491,
"term_name": "",
"term_des": "<p><span>Contract terms</span></p>"
}
],
"new_contract": 1,
"contract_used": 1,
"use_workflow": 0,
"discount": 0,
"discount_amount": 0,
"transport": 0,
"transport_amount": 0,
"installation_amount": 0,
"installation": 0,
"vat": 0,
"vat_amount": 0,
"contract_name": "HD14912",
"number_of_contract": "1",
"contract_code": "HD14912",
"vendor_account_id": 532,
"vendor_account_name": "Thanh Nguyen",
"vendor_account_address": "Address",
"vendor_account_phone": "09871717231",
"vendor_account_fax": "Fax",
"vendor_contact_name": "Thanh Nguyen",
"vendor_contact_id": 686,
"vendor_positions": "Position",
"vendor_bank_address": "Bank",
"vendor_bank_account_number": "Account number",
"vendor_sic_code": "Tax code",
"buyers_account_id": 1,
"buyers_account_name": "Getfly",
"buyers_account_address": "7th Floor, Hoa Cuong Building, No. 18, Alley 11, Thai Ha, Dong Da, Hanoi",
"buyers_account_phone": "09730943891",
"buyers_account_fax": "faxx",
"buyers_contact_name": "",
"buyers_positions": "Position",
"buyers_bank_address": "Bank",
"service_charge_after_vat": 0,
"quote_id": 36,
"payment_methods": 1,
"start_actual_time": 1735491600,
"end_actual_time": 1735578000,
"actual_value": 1.2,
"project_name": "Project",
"project_address": "Location",
"performed": "Performed",
"contract_parent_id": 1491,
"buyers_bank_account_number": "Account number",
"buyers_sic_code": "Tax code",
"attachment_uploads": [],
"contract_details": [
{
"product_id": 216,
"product_code": "Code 1",
"description": "",
"unit_id": 2,
"unit_name": "sheet",
"quantity": 1,
"price": 0,
"discount": 0,
"vat": 0,
"amount": 0,
"variants": []
}
],
"payment_periods": []
}
Status
200 OK
Response
{
"message": "Successfully added",
"id": 4
}
Add new purchase contract
HTTP Request
[POST] /api/v6/purchase_contracts
Body Parameters
Parameter | Type | Default | Nullable | Require | Description |
---|---|---|---|---|---|
effective_date | string | yes | Effective date | ||
expiration_date | string | yes | Expiration date | ||
contract_date | string | yes | Creation date | ||
contract_terms | array | List of terms | |||
new_contract | integer | yes | Contract renewal type | ||
contract_used | integer | yes | Contract usage code | ||
use_workflow | integer | yes | Use workflow? (Y-m-d) | ||
discount | float | Discount (%) | |||
discount_amount | float | Discount amount ($) | |||
transport | float | Shipping fee percentage | |||
transport_amount | float | Shipping fee cash | |||
installation_amount | float | Installation fee cash | |||
installation | float | Installation fee percentage | |||
vat | float | VAT percentage | |||
vat_amount | float | VAT cash | |||
contract_name | string | yes | Contract name | ||
number_of_contract | integer | Number of contracts | |||
contract_code | string | Contract code | |||
vendor_account_id | integer | yes | Customer identifier | ||
vendor_account_name | string | Customer name | |||
vendor_account_address | string | Customer address | |||
vendor_account_phone | string | Customer phone number | |||
vendor_account_fax | string | Customer fax number | |||
vendor_contact_name | string | Representative name (Party A) | |||
vendor_contact_id | integer | Representative identifier (Party A) | |||
vendor_positions | string | Representative position (Party A) | |||
vendor_bank_address | string | Bank address (Party A) | |||
vendor_bank_account_number | string | Bank account number (Party A) | |||
vendor_sic_code | string | Customer tax code | |||
buyers_account_id | integer | yes | Company identifier | ||
buyers_account_name | string | Company name | |||
buyers_account_address | string | Company address | |||
buyers_account_phone | string | Company phone number | |||
buyers_account_fax | string | Company fax number | |||
buyers_contact_name | string | Representative name (Party B) | |||
buyers_positions | string | Representative position (Party B) | |||
buyers_bank_address | string | Bank address (Party B) | |||
buyers_bank_account_number | string | Bank account number (Party B) | |||
buyers_sic_code | string | Company tax code | |||
service_charge_after_vat | integer | Apply shipping fee after VAT? | |||
quote_id | integer | Quote identifier | |||
payment_methods | integer | yes | Contract payment method | ||
start_actual_time | string | Actual contract effective date | |||
end_actual_time | string | Actual contract expiration date | |||
actual_value | float | Actual value | |||
project_name | string | Project | |||
project_address | string | Project location | |||
performed | string | Performed | |||
contract_parent_id | integer | Related contract identifier | |||
contract_details | array | yes | Product list | ||
payment_periods | array | List of payment periods | |||
custom_fields | array | Data definition |
Example
HTTP Request
POST api/v6/purchase_contracts HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"effective_date": 1734627600,
"expiration_date": 1734627600,
"contract_date": 1735525970,
"contract_terms": [
{
"id": 1491,
"term_name": "",
"term_des": "<p><span>Contract terms</span></p>"
}
],
"new_contract": 1,
"contract_used": 1,
"use_workflow": 0,
"discount": 0,
"discount_amount": 0,
"transport": 0,
"transport_amount": 0,
"installation_amount": 0,
"installation": 0,
"vat": 0,
"vat_amount": 0,
"contract_name": "HD14912",
"number_of_contract": "1",
"contract_code": "HD14912",
"vendor_account_id": 532,
"vendor_account_name": "Thanh Nguyen",
"vendor_account_address": "Address",
"vendor_account_phone": "09871717231",
"vendor_account_fax": "Fax",
"vendor_contact_name": "Thanh Nguyen",
"vendor_contact_id": 686,
"vendor_positions": "Position",
"vendor_bank_address": "Bank",
"vendor_bank_account_number": "Account number",
"vendor_sic_code": "Tax code",
"buyers_account_id": 1,
"buyers_account_name": "Getfly",
"buyers_account_address": "7th Floor, Hoa Cuong Building, No. 18, Alley 11, Thai Ha, Dong Da, Hanoi",
"buyers_account_phone": "09730943891",
"buyers_account_fax": "faxx",
"buyers_contact_name": "",
"buyers_positions": "Position",
"buyers_bank_address": "Bank",
"service_charge_after_vat": 0,
"quote_id": 36,
"payment_methods": 1,
"start_actual_time": 1735491600,
"end_actual_time": 1735578000,
"actual_value": 1.2,
"project_name": "Project",
"project_address": "Location",
"performed": "Performed",
"contract_parent_id": 1491,
"buyers_bank_account_number": "Account number",
"buyers_sic_code": "Tax code",
"attachment_uploads": [],
"contract_details": [
{
"product_id": 216,
"product_code": "Code 1",
"description": "",
"unit_id": 2,
"unit_name": "sheet",
"quantity": 1,
"price": 0,
"discount": 0,
"vat": 0,
"amount": 0,
"variants": []
}
],
"payment_periods": []
}
Status
200 OK
Response
{
"message": "Successfully added",
"id": 4
}
Add new purchase contract
HTTP Request
[POST] /api/v6/purchase_contracts
Body Parameters
Parameter | Type | Default | Nullable | Require | Description |
---|---|---|---|---|---|
effective_date | string | yes | Effective date | ||
expiration_date | string | yes | Expiration date | ||
contract_date | string | yes | Creation date | ||
contract_terms | array | List of terms | |||
new_contract | integer | yes | Contract renewal type | ||
contract_used | integer | yes | Contract usage code | ||
use_workflow | integer | yes | Use workflow? (Y-m-d) | ||
discount | float | Discount (%) | |||
discount_amount | float | Discount amount ($) | |||
transport | float | Shipping fee percentage | |||
transport_amount | float | Shipping fee cash | |||
installation_amount | float | Installation fee cash | |||
installation | float | Installation fee percentage | |||
vat | float | VAT percentage | |||
vat_amount | float | VAT cash | |||
contract_name | string | yes | Contract name | ||
number_of_contract | integer | Number of contracts | |||
contract_code | string | Contract code | |||
vendor_account_id | integer | yes | Customer identifier | ||
vendor_account_name | string | Customer name | |||
vendor_account_address | string | Customer address | |||
vendor_account_phone | string | Customer phone number | |||
vendor_account_fax | string | Customer fax number | |||
vendor_contact_name | string | Representative name (Party A) | |||
vendor_contact_id | integer | Representative identifier (Party A) | |||
vendor_positions | string | Representative position (Party A) | |||
vendor_bank_address | string | Bank address (Party A) | |||
vendor_bank_account_number | string | Bank account number (Party A) | |||
vendor_sic_code | string | Customer tax code | |||
buyers_account_id | integer | yes | Company identifier | ||
buyers_account_name | string | Company name | |||
buyers_account_address | string | Company address | |||
buyers_account_phone | string | Company phone number | |||
buyers_account_fax | string | Company fax number | |||
buyers_contact_name | string | Representative name (Party B) | |||
buyers_positions | string | Representative position (Party B) | |||
buyers_bank_address | string | Bank address (Party B) | |||
buyers_bank_account_number | string | Bank account number (Party B) | |||
buyers_sic_code | string | Company tax code | |||
service_charge_after_vat | integer | Apply shipping fee after VAT? | |||
quote_id | integer | Quote identifier | |||
payment_methods | integer | yes | Contract payment method | ||
start_actual_time | string | Actual contract effective date | |||
end_actual_time | string | Actual contract expiration date | |||
actual_value | float | Actual value | |||
project_name | string | Project | |||
project_address | string | Project location | |||
performed | string | Performed | |||
contract_parent_id | integer | Related contract identifier | |||
contract_details | array | yes | Product list | ||
payment_periods | array | List of payment periods | |||
custom_fields | array | Data definition |
Example
HTTP Request
POST api/v6/purchase_contracts HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"effective_date": 1734627600,
"expiration_date": 1734627600,
"contract_date": 1735525970,
"contract_terms": [
{
"id": 1491,
"term_name": "",
"term_des": "<p><span>Contract terms</span></p>"
}
],
"new_contract": 1,
"contract_used": 1,
"use_workflow": 0,
"discount": 0,
"discount_amount": 0,
"transport": 0,
"transport_amount": 0,
"installation_amount": 0,
"installation": 0,
"vat": 0,
"vat_amount": 0,
"contract_name": "HD14912",
"number_of_contract": "1",
"contract_code": "HD14912",
"vendor_account_id": 532,
"vendor_account_name": "Thanh Nguyen",
"vendor_account_address": "Address",
"vendor_account_phone": "09871717231",
"vendor_account_fax": "Fax",
"vendor_contact_name": "Thanh Nguyen",
"vendor_contact_id": 686,
"vendor_positions": "Position",
"vendor_bank_address": "Bank",
"vendor_bank_account_number": "Account number",
"vendor_sic_code": "Tax code",
"buyers_account_id": 1,
"buyers_account_name": "Getfly",
"buyers_account_address": "7th Floor, Hoa Cuong Building, No. 18, Alley 11, Thai Ha, Dong Da, Hanoi",
"buyers_account_phone": "09730943891",
"buyers_account_fax": "faxx",
"buyers_contact_name": "",
"buyers_positions": "Position",
"buyers_bank_address": "Bank",
"service_charge_after_vat": 0,
"quote_id": 36,
"payment_methods": 1,
"start_actual_time": 1735491600,
"end_actual_time": 1735578000,
"actual_value": 1.2,
"project_name": "Project",
"project_address": "Location",
"performed": "Performed",
"contract_parent_id": 1491,
"buyers_bank_account_number": "Account number",
"buyers_sic_code": "Tax code",
"attachment_uploads": [],
"contract_details": [
{
"product_id": 216,
"product_code": "Code 1",
"description": "",
"unit_id": 2,
"unit_name": "sheet",
"quantity": 1,
"price": 0,
"discount": 0,
"vat": 0,
"amount": 0,
"variants": []
}
],
"payment_periods": []
}
Status
200 OK
Response
{
"message": "Successfully added",
"id": 4
}