Skip to main content

Add New

Add new sales contract

HTTP Request

[POST] /api/v6/sale_contracts

Body Parameters

ParameterTypeDefaultNullableRequireDescription
effective_datestringyesEffective date
expiration_datestringyesExpiration date
contract_datestringyesCreation date
contract_termsarrayList of terms
new_contractintegeryesContract renewal type
contract_usedintegeryesContract usage code
use_workflowintegeryesUse workflow? (Y-m-d)
discountfloatDiscount (%)
discount_amountfloatDiscount amount ($)
transportfloatShipping fee percentage
transport_amountfloatShipping fee cash
installation_amountfloatInstallation fee cash
installationfloatInstallation fee percentage
vatfloatVAT percentage
vat_amountfloatVAT cash
contract_namestringyesContract name
number_of_contractintegerNumber of contracts
contract_codestringContract code
vendor_account_idintegeryesCustomer identifier
vendor_account_namestringCustomer name
vendor_account_addressstringCustomer address
vendor_account_phonestringCustomer phone number
vendor_account_faxstringCustomer fax number
vendor_contact_namestringRepresentative name (Party A)
vendor_contact_idintegerRepresentative identifier (Party A)
vendor_positionsstringRepresentative position (Party A)
vendor_bank_addressstringBank address (Party A)
vendor_bank_account_numberstringBank account number (Party A)
vendor_sic_codestringCustomer tax code
buyers_account_idintegeryesCompany identifier
buyers_account_namestringCompany name
buyers_account_addressstringCompany address
buyers_account_phonestringCompany phone number
buyers_account_faxstringCompany fax number
buyers_contact_namestringRepresentative name (Party B)
buyers_positionsstringRepresentative position (Party B)
buyers_bank_addressstringBank address (Party B)
buyers_bank_account_numberstringBank account number (Party B)
buyers_sic_codestringCompany tax code
service_charge_after_vatintegerApply shipping fee after VAT?
quote_idintegerQuote identifier
payment_methodsintegeryesContract payment method
start_actual_timestringActual contract effective date
end_actual_timestringActual contract expiration date
actual_valuefloatActual value
project_namestringProject
project_addressstringProject location
performedstringPerformed
contract_parent_idintegerRelated contract identifier
contract_detailsarrayyesProduct list
payment_periodsarrayList of payment periods
custom_fieldsarrayData 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

ParameterTypeDefaultNullableRequireDescription
effective_datestringyesEffective date
expiration_datestringyesExpiration date
contract_datestringyesCreation date
contract_termsarrayList of terms
new_contractintegeryesContract renewal type
contract_usedintegeryesContract usage code
use_workflowintegeryesUse workflow? (Y-m-d)
discountfloatDiscount (%)
discount_amountfloatDiscount amount ($)
transportfloatShipping fee percentage
transport_amountfloatShipping fee cash
installation_amountfloatInstallation fee cash
installationfloatInstallation fee percentage
vatfloatVAT percentage
vat_amountfloatVAT cash
contract_namestringyesContract name
number_of_contractintegerNumber of contracts
contract_codestringContract code
vendor_account_idintegeryesCustomer identifier
vendor_account_namestringCustomer name
vendor_account_addressstringCustomer address
vendor_account_phonestringCustomer phone number
vendor_account_faxstringCustomer fax number
vendor_contact_namestringRepresentative name (Party A)
vendor_contact_idintegerRepresentative identifier (Party A)
vendor_positionsstringRepresentative position (Party A)
vendor_bank_addressstringBank address (Party A)
vendor_bank_account_numberstringBank account number (Party A)
vendor_sic_codestringCustomer tax code
buyers_account_idintegeryesCompany identifier
buyers_account_namestringCompany name
buyers_account_addressstringCompany address
buyers_account_phonestringCompany phone number
buyers_account_faxstringCompany fax number
buyers_contact_namestringRepresentative name (Party B)
buyers_positionsstringRepresentative position (Party B)
buyers_bank_addressstringBank address (Party B)
buyers_bank_account_numberstringBank account number (Party B)
buyers_sic_codestringCompany tax code
service_charge_after_vatintegerApply shipping fee after VAT?
quote_idintegerQuote identifier
payment_methodsintegeryesContract payment method
start_actual_timestringActual contract effective date
end_actual_timestringActual contract expiration date
actual_valuefloatActual value
project_namestringProject
project_addressstringProject location
performedstringPerformed
contract_parent_idintegerRelated contract identifier
contract_detailsarrayyesProduct list
payment_periodsarrayList of payment periods
custom_fieldsarrayData 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

ParameterTypeDefaultNullableRequireDescription
effective_datestringyesEffective date
expiration_datestringyesExpiration date
contract_datestringyesCreation date
contract_termsarrayList of terms
new_contractintegeryesContract renewal type
contract_usedintegeryesContract usage code
use_workflowintegeryesUse workflow? (Y-m-d)
discountfloatDiscount (%)
discount_amountfloatDiscount amount ($)
transportfloatShipping fee percentage
transport_amountfloatShipping fee cash
installation_amountfloatInstallation fee cash
installationfloatInstallation fee percentage
vatfloatVAT percentage
vat_amountfloatVAT cash
contract_namestringyesContract name
number_of_contractintegerNumber of contracts
contract_codestringContract code
vendor_account_idintegeryesCustomer identifier
vendor_account_namestringCustomer name
vendor_account_addressstringCustomer address
vendor_account_phonestringCustomer phone number
vendor_account_faxstringCustomer fax number
vendor_contact_namestringRepresentative name (Party A)
vendor_contact_idintegerRepresentative identifier (Party A)
vendor_positionsstringRepresentative position (Party A)
vendor_bank_addressstringBank address (Party A)
vendor_bank_account_numberstringBank account number (Party A)
vendor_sic_codestringCustomer tax code
buyers_account_idintegeryesCompany identifier
buyers_account_namestringCompany name
buyers_account_addressstringCompany address
buyers_account_phonestringCompany phone number
buyers_account_faxstringCompany fax number
buyers_contact_namestringRepresentative name (Party B)
buyers_positionsstringRepresentative position (Party B)
buyers_bank_addressstringBank address (Party B)
buyers_bank_account_numberstringBank account number (Party B)
buyers_sic_codestringCompany tax code
service_charge_after_vatintegerApply shipping fee after VAT?
quote_idintegerQuote identifier
payment_methodsintegeryesContract payment method
start_actual_timestringActual contract effective date
end_actual_timestringActual contract expiration date
actual_valuefloatActual value
project_namestringProject
project_addressstringProject location
performedstringPerformed
contract_parent_idintegerRelated contract identifier
contract_detailsarrayyesProduct list
payment_periodsarrayList of payment periods
custom_fieldsarrayData 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

ParameterTypeDefaultNullableRequireDescription
effective_datestringyesEffective date
expiration_datestringyesExpiration date
contract_datestringyesCreation date
contract_termsarrayList of terms
new_contractintegeryesContract renewal type
contract_usedintegeryesContract usage code
use_workflowintegeryesUse workflow? (Y-m-d)
discountfloatDiscount (%)
discount_amountfloatDiscount amount ($)
transportfloatShipping fee percentage
transport_amountfloatShipping fee cash
installation_amountfloatInstallation fee cash
installationfloatInstallation fee percentage
vatfloatVAT percentage
vat_amountfloatVAT cash
contract_namestringyesContract name
number_of_contractintegerNumber of contracts
contract_codestringContract code
vendor_account_idintegeryesCustomer identifier
vendor_account_namestringCustomer name
vendor_account_addressstringCustomer address
vendor_account_phonestringCustomer phone number
vendor_account_faxstringCustomer fax number
vendor_contact_namestringRepresentative name (Party A)
vendor_contact_idintegerRepresentative identifier (Party A)
vendor_positionsstringRepresentative position (Party A)
vendor_bank_addressstringBank address (Party A)
vendor_bank_account_numberstringBank account number (Party A)
vendor_sic_codestringCustomer tax code
buyers_account_idintegeryesCompany identifier
buyers_account_namestringCompany name
buyers_account_addressstringCompany address
buyers_account_phonestringCompany phone number
buyers_account_faxstringCompany fax number
buyers_contact_namestringRepresentative name (Party B)
buyers_positionsstringRepresentative position (Party B)
buyers_bank_addressstringBank address (Party B)
buyers_bank_account_numberstringBank account number (Party B)
buyers_sic_codestringCompany tax code
service_charge_after_vatintegerApply shipping fee after VAT?
quote_idintegerQuote identifier
payment_methodsintegeryesContract payment method
start_actual_timestringActual contract effective date
end_actual_timestringActual contract expiration date
actual_valuefloatActual value
project_namestringProject
project_addressstringProject location
performedstringPerformed
contract_parent_idintegerRelated contract identifier
contract_detailsarrayyesProduct list
payment_periodsarrayList of payment periods
custom_fieldsarrayData 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
}