Estimates table

Column Type

Id

String

Url

URI

Contact_Id

String

Contact

URI

Project_Id

String

Project

URI

Dated_On

String

Status

String

Estimate_Type

String

Created_At

Timestamp

Include_Sales_Tax_On_Total_Value

Boolean

Total_Value

Decimal

Currency

String

Reference

String

Involves_Sales_Tax

Boolean

Net_Value

Decimal

Is_Interim_Uk_Vat

Boolean

Contact_Name

String

Updated_At

Timestamp

Second_Sales_Tax_Value

Decimal

Sales_Tax_Value

Decimal

Notes

String

Estimate_Items

Array

Examples

SELECT
    *
FROM
    Estimates
WHERE
    Estimate_Type = 'Quote'

INSERT INTO
    Estimates (
        Contact,
        Dated_On,
        [Status],
        Estimate_Type,
        Currency,
        Reference,
        Estimate_Items
    )
VALUES
    (
        'https://api.freeagent.com/v2/contacts/18494140',
        '2024-11-27',
        'Draft',
        'Quote',
        'USD',
        'Customer Ref 2',
        '[{"item_type":"Days","quantity":"2","price":"999.99","description":"Consultancy Days"}]'
    )

UPDATE Estimates
SET
    Estimate_Items = '[{"item_type":"Days","quantity":"4","price":"999.99","description":"Consultancy Days"},{"item_type":"Hours","quantity":"32","price":"172.22","description":"Developer Hours"}]'
WHERE
    Id = '5771094'

DELETE FROM Estimates
WHERE
    Id = '5771094'