Chilkat Online Tools

DataFlex / New FreshBooks / Create Single Proposal w/ Sections, Logos, and E-signature

Back to Collection Items

Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vJson
    Handle hoJson
    Variant vResp
    Handle hoResp
    String sTemp1
    Integer iTemp1
    Boolean bTemp1

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    // Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "estimate": {
    //     "rich_proposal": true,
    //     "require_client_signature": true,
    //     "create_date": "2019-07-16",
    //     "currency_code": "CAD",
    //     "discount_value": 0,
    //     "estimate_number": "0000044",
    //     "template": "clean-grouped",
    //     "terms": "Cupcake ipsum dolor sit amet. Pudding candy cupcake wafer. Apple pie pie candy canes soufflé gummies muffin icing sweet roll. Fruitcake gummies croissant chocolate cake sugar plum chocolate bar. Bonbon jelly-o lemon drops candy jujubes chupa chups gingerbread. Powder jelly tart cotton candy chocolate bar fruitcake cotton candy dragée. Tart sugar plum bear claw sesame snaps. Dragée jelly beans candy canes. Powder pie gingerbread jelly croissant sesame snaps icing gummies jelly beans. Cotton candy jelly beans gummi bears sweet sesame snaps jujubes sesame snaps carrot cake. Pastry lemon drops muffin halvah cake dessert gummies tootsie roll soufflé. Cotton candy sesame snaps dessert ice cream. Topping jujubes oat cake bear claw liquorice bear claw chocolate bar ice cream sesame snaps. Cake pudding tiramisu topping sesame snaps croissant candy sesame snaps tootsie roll. Danish lemon drops tart muffin. Chocolate bar toffee icing tiramisu danish ice cream sweet roll pastry.",
    //     "payment_details": null,
    //     "vat_name": null,
    //     "vat_number": null,
    //     "attachments": [
    //     ],
    //     "lines": [
    //       {
    //         "compounded_tax": false,
    //         "taskno": null,
    //         "amount": {
    //           "amount": "100",
    //           "code": "CAD"
    //         },
    //         "description": "",
    //         "expenseid": null,
    //         "taxName1": "HST",
    //         "taxAmount1": 13,
    //         "name": "Item One",
    //         "qty": 1,
    //         "taxName2": null,
    //         "taxAmount2": null,
    //         "type": null,
    //         "unit_cost": {
    //           "amount": "100",
    //           "code": "CAD"
    //         },
    //         "estimateid": null
    //       },
    //       {
    //         "compounded_tax": false,
    //         "amount": {
    //           "amount": "200",
    //           "code": "CAD"
    //         },
    //         "description": "",
    //         "expenseid": null,
    //         "taxName1": "HST",
    //         "taxAmount1": 13,
    //         "name": "Item Two",
    //         "qty": 1,
    //         "taxName2": null,
    //         "taxAmount2": null,
    //         "unit_cost": {
    //           "amount": "200",
    //           "code": "CAD"
    //         },
    //         "estimateid": null
    //       },
    //       {
    //         "compounded_tax": false,
    //         "amount": {
    //           "amount": "300",
    //           "code": "CAD"
    //         },
    //         "description": "",
    //         "expenseid": null,
    //         "taxName1": null,
    //         "taxAmount1": null,
    //         "name": "Item Three",
    //         "qty": 1,
    //         "taxName2": null,
    //         "taxAmount2": null,
    //         "unit_cost": {
    //           "amount": "300",
    //           "code": "CAD"
    //         },
    //         "estimateid": null
    //       }
    //     ],
    //     "presentation": {
    //       "theme_font_name": "classic",
    //       "theme_primary_color": "#1460aa",
    //       "theme_layout": "simple",
    //       "date_format": "mm/dd/yyyy",
    //       "image_banner_position_y": -83,
    //       "image_logo_src": "/service/uploads/images/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjozMTg1OTUwLCJvcmlnaW5hbF9maWxlbmFtZSI6ImdhdmVscGljLmpwZWciLCJidWNrZXQiOiJ1cGxvYWRzIiwiZmlsZW5hbWUiOiJ1cGxvYWQtYTZmNzY3M2VhN2VjMmYwYjEzODNlOTg5MTc1NDFjMGIyOWE0MmUyOCIsImxlbmd0aCI6MzIzNiwia2V5IjoiJ2RvY3MtJy0zMTg1OTUwL3VwbG9hZC1hNmY3NjczZWE3ZWMyZjBiMTM4M2U5ODkxNzU0MWMwYjI5YTQyZTI4In0._GITi9SFuSJdGyba0tlOptyAyDA5BIQsGIa4WeGm36c"
    //     },
    //     "sections": [
    //       {
    //         "body": "Squiffy Jack Ketch coxswain plunder fire in the hole bucko trysail topgallant mizzenmast sheet. Nelsons folly hogshead Jack Tar Davy Jones' Locker grog blossom scourge of the seven seas tackle mizzen to go on account deadlights. Jib bilged on her anchor crack Jennys tea cup cog reef matey spike Jack Ketch scurvy landlubber or just lubber. Pinnace shrouds Yellow Jack hands yardarm rutters Arr hearties piracy lookout. Doubloon ye Corsair warp cutlass brigantine reef sails aft hands haul wind. Snow spyglass measured fer yer chains barkadeer no",
    //         "group_name": "top",
    //         "title": "Overview",
    //         "type": "overview"
    //       },
    //       {
    //         "body": "prey, no pay bowsprit pressgang swing the lead squiffy plunder. Six pounders poop deck doubloon driver topmast broadside American Main mutiny Corsair scurvy. Grog blossom lateen sail spike Sail ho man-of-war case shot maroon Nelsons folly quarterdeck Cat o'nine tails. Hogshead overhaul aye prow barkadeer rope's end stern belay code of conduct topgallant. Pieces of Eight American Main dance the hempen jig port rope's end barkadeer bilged on her anchor league Admiral of the Black Brethren of the Coast.",
    //         "group_name": "top",
    //         "title": "Scope of Work",
    //         "type": "scope_of_work"
    //       },
    //       {
    //         "body": "Squiffy trysail lad log boom rigging walk the plank scourge of the seven seas swab. Arr Blimey smartly gangway prow schooner bounty run a rig hardtack. Chandler rope's end rutters heave down jib fire in the hole Plate Fleet cackle fruit squiffy.<br>",
    //         "group_name": "top",
    //         "title": "Timeline",
    //         "type": "timeline"
    //       },
    //       {
    //         "body": "Mizzen capstan trysail sloop execution dock lookout gangway Cat o'nine tails hang the jib bucko. Gun lad salmagundi aye Jolly Roger Brethren of the Coast chase guns smartly plunder galleon. League rutters tender topmast brig hang the jib yardarm plunder shrouds sloop. Jack bucko Sink me quarterdeck lugsail marooned tack reef keel Blimey. Haul wind yardarm blow the man down flogging scuppers aft run a shot across the bow bilge rat Cat o'nine tails lugger. Sheet chandler run a shot across the bow Sail ho aft carouser spanker cutlass crack Jennys tea cup parrel. Pieces of Eight belaying pin Yellow Jack rigging boatswain cutlass loaded to the gunwalls yardarm bounty grog blossom. Hempen halter bilged on her anchor splice the main brace line parrel bilge water lad cable scuppers shrouds. Killick ho lee take a caulk wench line coxswain coffer heave down keel. Line Jack Ketch booty pirate black spot six pounders gibbet yardarm aft lateen sail.",
    //         "group_name": "top",
    //         "title": "Custom Heading",
    //         "type": "custom"
    //       }
    //     ],
    //     "customerid": 123
    //   }
    // }

    Get Create (RefClass(cComChilkatJsonObject)) To hoJson
    If (Not(IsComObjectCreated(hoJson))) Begin
        Send CreateComObject of hoJson
    End
    Get ComUpdateBool Of hoJson "estimate.rich_proposal" True To iSuccess
    Get ComUpdateBool Of hoJson "estimate.require_client_signature" True To iSuccess
    Get ComUpdateString Of hoJson "estimate.create_date" "2019-07-16" To iSuccess
    Get ComUpdateString Of hoJson "estimate.currency_code" "CAD" To iSuccess
    Get ComUpdateInt Of hoJson "estimate.discount_value" 0 To iSuccess
    Get ComUpdateString Of hoJson "estimate.estimate_number" "0000044" To iSuccess
    Get ComUpdateString Of hoJson "estimate.template" "clean-grouped" To iSuccess
    Get ComUpdateString Of hoJson "estimate.terms" "Cupcake ipsum dolor sit amet. Pudding candy cupcake wafer. Apple pie pie candy canes soufflé gummies muffin icing sweet roll. Fruitcake gummies croissant chocolate cake sugar plum chocolate bar. Bonbon jelly-o lemon drops candy jujubes chupa chups gingerbread. Powder jelly tart cotton candy chocolate bar fruitcake cotton candy dragée. Tart sugar plum bear claw sesame snaps. Dragée jelly beans candy canes. Powder pie gingerbread jelly croissant sesame snaps icing gummies jelly beans. Cotton candy jelly beans gummi bears sweet sesame snaps jujubes sesame snaps carrot cake. Pastry lemon drops muffin halvah cake dessert gummies tootsie roll soufflé. Cotton candy sesame snaps dessert ice cream. Topping jujubes oat cake bear claw liquorice bear claw chocolate bar ice cream sesame snaps. Cake pudding tiramisu topping sesame snaps croissant candy sesame snaps tootsie roll. Danish lemon drops tart muffin. Chocolate bar toffee icing tiramisu danish ice cream sweet roll pastry." To iSuccess
    Get ComUpdateNull Of hoJson "estimate.payment_details" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.vat_name" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.vat_number" To iSuccess
    Get ComUpdateNewArray Of hoJson "estimate.attachments" To iSuccess
    Get ComUpdateBool Of hoJson "estimate.lines[0].compounded_tax" False To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[0].taskno" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[0].amount.amount" "100" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[0].amount.code" "CAD" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[0].description" "" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[0].expenseid" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[0].taxName1" "HST" To iSuccess
    Get ComUpdateInt Of hoJson "estimate.lines[0].taxAmount1" 13 To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[0].name" "Item One" To iSuccess
    Get ComUpdateInt Of hoJson "estimate.lines[0].qty" 1 To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[0].taxName2" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[0].taxAmount2" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[0].type" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[0].unit_cost.amount" "100" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[0].unit_cost.code" "CAD" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[0].estimateid" To iSuccess
    Get ComUpdateBool Of hoJson "estimate.lines[1].compounded_tax" False To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[1].amount.amount" "200" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[1].amount.code" "CAD" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[1].description" "" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[1].expenseid" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[1].taxName1" "HST" To iSuccess
    Get ComUpdateInt Of hoJson "estimate.lines[1].taxAmount1" 13 To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[1].name" "Item Two" To iSuccess
    Get ComUpdateInt Of hoJson "estimate.lines[1].qty" 1 To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[1].taxName2" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[1].taxAmount2" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[1].unit_cost.amount" "200" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[1].unit_cost.code" "CAD" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[1].estimateid" To iSuccess
    Get ComUpdateBool Of hoJson "estimate.lines[2].compounded_tax" False To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[2].amount.amount" "300" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[2].amount.code" "CAD" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[2].description" "" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[2].expenseid" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[2].taxName1" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[2].taxAmount1" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[2].name" "Item Three" To iSuccess
    Get ComUpdateInt Of hoJson "estimate.lines[2].qty" 1 To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[2].taxName2" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[2].taxAmount2" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[2].unit_cost.amount" "300" To iSuccess
    Get ComUpdateString Of hoJson "estimate.lines[2].unit_cost.code" "CAD" To iSuccess
    Get ComUpdateNull Of hoJson "estimate.lines[2].estimateid" To iSuccess
    Get ComUpdateString Of hoJson "estimate.presentation.theme_font_name" "classic" To iSuccess
    Get ComUpdateString Of hoJson "estimate.presentation.theme_primary_color" "#1460aa" To iSuccess
    Get ComUpdateString Of hoJson "estimate.presentation.theme_layout" "simple" To iSuccess
    Get ComUpdateString Of hoJson "estimate.presentation.date_format" "mm/dd/yyyy" To iSuccess
    Get ComUpdateInt Of hoJson "estimate.presentation.image_banner_position_y" -83 To iSuccess
    Get ComUpdateString Of hoJson "estimate.presentation.image_logo_src" "/service/uploads/images/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjozMTg1OTUwLCJvcmlnaW5hbF9maWxlbmFtZSI6ImdhdmVscGljLmpwZWciLCJidWNrZXQiOiJ1cGxvYWRzIiwiZmlsZW5hbWUiOiJ1cGxvYWQtYTZmNzY3M2VhN2VjMmYwYjEzODNlOTg5MTc1NDFjMGIyOWE0MmUyOCIsImxlbmd0aCI6MzIzNiwia2V5IjoiJ2RvY3MtJy0zMTg1OTUwL3VwbG9hZC1hNmY3NjczZWE3ZWMyZjBiMTM4M2U5ODkxNzU0MWMwYjI5YTQyZTI4In0._GITi9SFuSJdGyba0tlOptyAyDA5BIQsGIa4WeGm36c" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[0].body" "Squiffy Jack Ketch coxswain plunder fire in the hole bucko trysail topgallant mizzenmast sheet. Nelsons folly hogshead Jack Tar Davy Jones' Locker grog blossom scourge of the seven seas tackle mizzen to go on account deadlights. Jib bilged on her anchor crack Jennys tea cup cog reef matey spike Jack Ketch scurvy landlubber or just lubber. Pinnace shrouds Yellow Jack hands yardarm rutters Arr hearties piracy lookout. Doubloon ye Corsair warp cutlass brigantine reef sails aft hands haul wind. Snow spyglass measured fer yer chains barkadeer no" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[0].group_name" "top" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[0].title" "Overview" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[0].type" "overview" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[1].body" "prey, no pay bowsprit pressgang swing the lead squiffy plunder. Six pounders poop deck doubloon driver topmast broadside American Main mutiny Corsair scurvy. Grog blossom lateen sail spike Sail ho man-of-war case shot maroon Nelsons folly quarterdeck Cat o'nine tails. Hogshead overhaul aye prow barkadeer rope's end stern belay code of conduct topgallant. Pieces of Eight American Main dance the hempen jig port rope's end barkadeer bilged on her anchor league Admiral of the Black Brethren of the Coast." To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[1].group_name" "top" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[1].title" "Scope of Work" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[1].type" "scope_of_work" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[2].body" "Squiffy trysail lad log boom rigging walk the plank scourge of the seven seas swab. Arr Blimey smartly gangway prow schooner bounty run a rig hardtack. Chandler rope's end rutters heave down jib fire in the hole Plate Fleet cackle fruit squiffy.<br>" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[2].group_name" "top" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[2].title" "Timeline" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[2].type" "timeline" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[3].body" "Mizzen capstan trysail sloop execution dock lookout gangway Cat o'nine tails hang the jib bucko. Gun lad salmagundi aye Jolly Roger Brethren of the Coast chase guns smartly plunder galleon. League rutters tender topmast brig hang the jib yardarm plunder shrouds sloop. Jack bucko Sink me quarterdeck lugsail marooned tack reef keel Blimey. Haul wind yardarm blow the man down flogging scuppers aft run a shot across the bow bilge rat Cat o'nine tails lugger. Sheet chandler run a shot across the bow Sail ho aft carouser spanker cutlass crack Jennys tea cup parrel. Pieces of Eight belaying pin Yellow Jack rigging boatswain cutlass loaded to the gunwalls yardarm bounty grog blossom. Hempen halter bilged on her anchor splice the main brace line parrel bilge water lad cable scuppers shrouds. Killick ho lee take a caulk wench line coxswain coffer heave down keel. Line Jack Ketch booty pirate black spot six pounders gibbet yardarm aft lateen sail." To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[3].group_name" "top" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[3].title" "Custom Heading" To iSuccess
    Get ComUpdateString Of hoJson "estimate.sections[3].type" "custom" To iSuccess
    Get ComUpdateInt Of hoJson "estimate.customerid" 123 To iSuccess

    // Adds the "Authorization: Bearer <access_token>" header.
    Set ComAuthToken Of hoHttp To "<access_token>"
    Send ComSetRequestHeader To hoHttp "Content-Type" "application/json"

    Get pvComObject of hoJson to vJson
    Get ComPostJson3 Of hoHttp "https://api.freshbooks.com/accounting/account/{{accountid}}/estimates/estimates" "application/json" vJson To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComStatusCode Of hoResp To iTemp1
    Showln iTemp1
    Get ComBodyStr Of hoResp To sTemp1
    Showln sTemp1
    Send Destroy of hoResp


End_Procedure

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: application/json"
	-d '{
    "estimate": {
        "rich_proposal": true,
        "require_client_signature": true,
        "create_date": "2019-07-16",
        "currency_code": "CAD",
        "discount_value": 0,
        "estimate_number": "0000044",
        "template": "clean-grouped",
        "terms": "Cupcake ipsum dolor sit amet. Pudding candy cupcake wafer. Apple pie pie candy canes soufflé gummies muffin icing sweet roll. Fruitcake gummies croissant chocolate cake sugar plum chocolate bar. Bonbon jelly-o lemon drops candy jujubes chupa chups gingerbread. Powder jelly tart cotton candy chocolate bar fruitcake cotton candy dragée. Tart sugar plum bear claw sesame snaps. Dragée jelly beans candy canes. Powder pie gingerbread jelly croissant sesame snaps icing gummies jelly beans. Cotton candy jelly beans gummi bears sweet sesame snaps jujubes sesame snaps carrot cake. Pastry lemon drops muffin halvah cake dessert gummies tootsie roll soufflé. Cotton candy sesame snaps dessert ice cream. Topping jujubes oat cake bear claw liquorice bear claw chocolate bar ice cream sesame snaps. Cake pudding tiramisu topping sesame snaps croissant candy sesame snaps tootsie roll. Danish lemon drops tart muffin. Chocolate bar toffee icing tiramisu danish ice cream sweet roll pastry.",
        "payment_details": null,
        "vat_name": null,
        "vat_number": null,
        "attachments": [],
        "lines": [
            {
                "compounded_tax": false,
                "taskno": null,
                "amount": {
                    "amount": "100",
                    "code": "CAD"
                },
                "description": "",
                "expenseid": null,
                "taxName1": "HST",
                "taxAmount1": 13,
                "name": "Item One",
                "qty": 1,
                "taxName2": null,
                "taxAmount2": null,
                "type": null,
                "unit_cost": {
                    "amount": "100",
                    "code": "CAD"
                },
                "estimateid": null
            },
            {
                "compounded_tax": false,
                "amount": {
                    "amount": "200",
                    "code": "CAD"
                },
                "description": "",
                "expenseid": null,
                "taxName1": "HST",
                "taxAmount1": 13,
                "name": "Item Two",
                "qty": 1,
                "taxName2": null,
                "taxAmount2": null,
                "unit_cost": {
                    "amount": "200",
                    "code": "CAD"
                },
                "estimateid": null
            },
            {
                "compounded_tax": false,
                "amount": {
                    "amount": "300",
                    "code": "CAD"
                },
                "description": "",
                "expenseid": null,
                "taxName1": null,
                "taxAmount1": null,
                "name": "Item Three",
                "qty": 1,
                "taxName2": null,
                "taxAmount2": null,
                "unit_cost": {
                    "amount": "300",
                    "code": "CAD"
                },
                "estimateid": null
            }
        ],
        "presentation": {
            "theme_font_name": "classic",
            "theme_primary_color": "#1460aa",
            "theme_layout": "simple",
            "date_format": "mm/dd/yyyy",
            "image_banner_position_y": -83,
            "image_logo_src": "/service/uploads/images/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjozMTg1OTUwLCJvcmlnaW5hbF9maWxlbmFtZSI6ImdhdmVscGljLmpwZWciLCJidWNrZXQiOiJ1cGxvYWRzIiwiZmlsZW5hbWUiOiJ1cGxvYWQtYTZmNzY3M2VhN2VjMmYwYjEzODNlOTg5MTc1NDFjMGIyOWE0MmUyOCIsImxlbmd0aCI6MzIzNiwia2V5IjoiJ2RvY3MtJy0zMTg1OTUwL3VwbG9hZC1hNmY3NjczZWE3ZWMyZjBiMTM4M2U5ODkxNzU0MWMwYjI5YTQyZTI4In0._GITi9SFuSJdGyba0tlOptyAyDA5BIQsGIa4WeGm36c"
        },
        "sections": [
            {
                "body": "Squiffy Jack Ketch coxswain plunder fire in the hole bucko trysail topgallant mizzenmast sheet. Nelsons folly hogshead Jack Tar Davy Jones\' Locker grog blossom scourge of the seven seas tackle mizzen to go on account deadlights. Jib bilged on her anchor crack Jennys tea cup cog reef matey spike Jack Ketch scurvy landlubber or just lubber. Pinnace shrouds Yellow Jack hands yardarm rutters Arr hearties piracy lookout. Doubloon ye Corsair warp cutlass brigantine reef sails aft hands haul wind. Snow spyglass measured fer yer chains barkadeer no",
                "group_name": "top",
                "title": "Overview",
                "type": "overview"
            },
            {
                "body": "prey, no pay bowsprit pressgang swing the lead squiffy plunder. Six pounders poop deck doubloon driver topmast broadside American Main mutiny Corsair scurvy. Grog blossom lateen sail spike Sail ho man-of-war case shot maroon Nelsons folly quarterdeck Cat o\'nine tails. Hogshead overhaul aye prow barkadeer rope\'s end stern belay code of conduct topgallant. Pieces of Eight American Main dance the hempen jig port rope\'s end barkadeer bilged on her anchor league Admiral of the Black Brethren of the Coast.",
                "group_name": "top",
                "title": "Scope of Work",
                "type": "scope_of_work"
            },
            {
                "body": "Squiffy trysail lad log boom rigging walk the plank scourge of the seven seas swab. Arr Blimey smartly gangway prow schooner bounty run a rig hardtack. Chandler rope\'s end rutters heave down jib fire in the hole Plate Fleet cackle fruit squiffy.<br>",
                "group_name": "top",
                "title": "Timeline",
                "type": "timeline"
            },
            {
                "body": "Mizzen capstan trysail sloop execution dock lookout gangway Cat o\'nine tails hang the jib bucko. Gun lad salmagundi aye Jolly Roger Brethren of the Coast chase guns smartly plunder galleon. League rutters tender topmast brig hang the jib yardarm plunder shrouds sloop. Jack bucko Sink me quarterdeck lugsail marooned tack reef keel Blimey. Haul wind yardarm blow the man down flogging scuppers aft run a shot across the bow bilge rat Cat o\'nine tails lugger. Sheet chandler run a shot across the bow Sail ho aft carouser spanker cutlass crack Jennys tea cup parrel. Pieces of Eight belaying pin Yellow Jack rigging boatswain cutlass loaded to the gunwalls yardarm bounty grog blossom. Hempen halter bilged on her anchor splice the main brace line parrel bilge water lad cable scuppers shrouds. Killick ho lee take a caulk wench line coxswain coffer heave down keel. Line Jack Ketch booty pirate black spot six pounders gibbet yardarm aft lateen sail.",
                "group_name": "top",
                "title": "Custom Heading",
                "type": "custom"
            }
        ],
        "customerid": {{customerid}}
    }
}'
https://api.freshbooks.com/accounting/account/{{accountid}}/estimates/estimates

Postman Collection Item JSON

{
  "name": "Create Single Proposal w/ Sections, Logos, and E-signature",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "name": "Content-Type",
        "value": "application/json",
        "type": "text"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"estimate\": {\n        \"rich_proposal\": true,\n        \"require_client_signature\": true,\n        \"create_date\": \"2019-07-16\",\n        \"currency_code\": \"CAD\",\n        \"discount_value\": 0,\n        \"estimate_number\": \"0000044\",\n        \"template\": \"clean-grouped\",\n        \"terms\": \"Cupcake ipsum dolor sit amet. Pudding candy cupcake wafer. Apple pie pie candy canes soufflé gummies muffin icing sweet roll. Fruitcake gummies croissant chocolate cake sugar plum chocolate bar. Bonbon jelly-o lemon drops candy jujubes chupa chups gingerbread. Powder jelly tart cotton candy chocolate bar fruitcake cotton candy dragée. Tart sugar plum bear claw sesame snaps. Dragée jelly beans candy canes. Powder pie gingerbread jelly croissant sesame snaps icing gummies jelly beans. Cotton candy jelly beans gummi bears sweet sesame snaps jujubes sesame snaps carrot cake. Pastry lemon drops muffin halvah cake dessert gummies tootsie roll soufflé. Cotton candy sesame snaps dessert ice cream. Topping jujubes oat cake bear claw liquorice bear claw chocolate bar ice cream sesame snaps. Cake pudding tiramisu topping sesame snaps croissant candy sesame snaps tootsie roll. Danish lemon drops tart muffin. Chocolate bar toffee icing tiramisu danish ice cream sweet roll pastry.\",\n        \"payment_details\": null,\n        \"vat_name\": null,\n        \"vat_number\": null,\n        \"attachments\": [],\n        \"lines\": [\n            {\n                \"compounded_tax\": false,\n                \"taskno\": null,\n                \"amount\": {\n                    \"amount\": \"100\",\n                    \"code\": \"CAD\"\n                },\n                \"description\": \"\",\n                \"expenseid\": null,\n                \"taxName1\": \"HST\",\n                \"taxAmount1\": 13,\n                \"name\": \"Item One\",\n                \"qty\": 1,\n                \"taxName2\": null,\n                \"taxAmount2\": null,\n                \"type\": null,\n                \"unit_cost\": {\n                    \"amount\": \"100\",\n                    \"code\": \"CAD\"\n                },\n                \"estimateid\": null\n            },\n            {\n                \"compounded_tax\": false,\n                \"amount\": {\n                    \"amount\": \"200\",\n                    \"code\": \"CAD\"\n                },\n                \"description\": \"\",\n                \"expenseid\": null,\n                \"taxName1\": \"HST\",\n                \"taxAmount1\": 13,\n                \"name\": \"Item Two\",\n                \"qty\": 1,\n                \"taxName2\": null,\n                \"taxAmount2\": null,\n                \"unit_cost\": {\n                    \"amount\": \"200\",\n                    \"code\": \"CAD\"\n                },\n                \"estimateid\": null\n            },\n            {\n                \"compounded_tax\": false,\n                \"amount\": {\n                    \"amount\": \"300\",\n                    \"code\": \"CAD\"\n                },\n                \"description\": \"\",\n                \"expenseid\": null,\n                \"taxName1\": null,\n                \"taxAmount1\": null,\n                \"name\": \"Item Three\",\n                \"qty\": 1,\n                \"taxName2\": null,\n                \"taxAmount2\": null,\n                \"unit_cost\": {\n                    \"amount\": \"300\",\n                    \"code\": \"CAD\"\n                },\n                \"estimateid\": null\n            }\n        ],\n        \"presentation\": {\n            \"theme_font_name\": \"classic\",\n            \"theme_primary_color\": \"#1460aa\",\n            \"theme_layout\": \"simple\",\n            \"date_format\": \"mm/dd/yyyy\",\n            \"image_banner_position_y\": -83,\n            \"image_logo_src\": \"/service/uploads/images/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjozMTg1OTUwLCJvcmlnaW5hbF9maWxlbmFtZSI6ImdhdmVscGljLmpwZWciLCJidWNrZXQiOiJ1cGxvYWRzIiwiZmlsZW5hbWUiOiJ1cGxvYWQtYTZmNzY3M2VhN2VjMmYwYjEzODNlOTg5MTc1NDFjMGIyOWE0MmUyOCIsImxlbmd0aCI6MzIzNiwia2V5IjoiJ2RvY3MtJy0zMTg1OTUwL3VwbG9hZC1hNmY3NjczZWE3ZWMyZjBiMTM4M2U5ODkxNzU0MWMwYjI5YTQyZTI4In0._GITi9SFuSJdGyba0tlOptyAyDA5BIQsGIa4WeGm36c\"\n        },\n        \"sections\": [\n            {\n                \"body\": \"Squiffy Jack Ketch coxswain plunder fire in the hole bucko trysail topgallant mizzenmast sheet. Nelsons folly hogshead Jack Tar Davy Jones' Locker grog blossom scourge of the seven seas tackle mizzen to go on account deadlights. Jib bilged on her anchor crack Jennys tea cup cog reef matey spike Jack Ketch scurvy landlubber or just lubber. Pinnace shrouds Yellow Jack hands yardarm rutters Arr hearties piracy lookout. Doubloon ye Corsair warp cutlass brigantine reef sails aft hands haul wind. Snow spyglass measured fer yer chains barkadeer no\",\n                \"group_name\": \"top\",\n                \"title\": \"Overview\",\n                \"type\": \"overview\"\n            },\n            {\n                \"body\": \"prey, no pay bowsprit pressgang swing the lead squiffy plunder. Six pounders poop deck doubloon driver topmast broadside American Main mutiny Corsair scurvy. Grog blossom lateen sail spike Sail ho man-of-war case shot maroon Nelsons folly quarterdeck Cat o'nine tails. Hogshead overhaul aye prow barkadeer rope's end stern belay code of conduct topgallant. Pieces of Eight American Main dance the hempen jig port rope's end barkadeer bilged on her anchor league Admiral of the Black Brethren of the Coast.\",\n                \"group_name\": \"top\",\n                \"title\": \"Scope of Work\",\n                \"type\": \"scope_of_work\"\n            },\n            {\n                \"body\": \"Squiffy trysail lad log boom rigging walk the plank scourge of the seven seas swab. Arr Blimey smartly gangway prow schooner bounty run a rig hardtack. Chandler rope's end rutters heave down jib fire in the hole Plate Fleet cackle fruit squiffy.<br>\",\n                \"group_name\": \"top\",\n                \"title\": \"Timeline\",\n                \"type\": \"timeline\"\n            },\n            {\n                \"body\": \"Mizzen capstan trysail sloop execution dock lookout gangway Cat o'nine tails hang the jib bucko. Gun lad salmagundi aye Jolly Roger Brethren of the Coast chase guns smartly plunder galleon. League rutters tender topmast brig hang the jib yardarm plunder shrouds sloop. Jack bucko Sink me quarterdeck lugsail marooned tack reef keel Blimey. Haul wind yardarm blow the man down flogging scuppers aft run a shot across the bow bilge rat Cat o'nine tails lugger. Sheet chandler run a shot across the bow Sail ho aft carouser spanker cutlass crack Jennys tea cup parrel. Pieces of Eight belaying pin Yellow Jack rigging boatswain cutlass loaded to the gunwalls yardarm bounty grog blossom. Hempen halter bilged on her anchor splice the main brace line parrel bilge water lad cable scuppers shrouds. Killick ho lee take a caulk wench line coxswain coffer heave down keel. Line Jack Ketch booty pirate black spot six pounders gibbet yardarm aft lateen sail.\",\n                \"group_name\": \"top\",\n                \"title\": \"Custom Heading\",\n                \"type\": \"custom\"\n            }\n        ],\n        \"customerid\": {{customerid}}\n    }\n}"
    },
    "url": {
      "raw": "https://api.freshbooks.com/accounting/account/{{accountid}}/estimates/estimates",
      "protocol": "https",
      "host": [
        "api",
        "freshbooks",
        "com"
      ],
      "path": [
        "accounting",
        "account",
        "{{accountid}}",
        "estimates",
        "estimates"
      ],
      "query": [
        {
          "key": "include%5B%5D",
          "value": "audit_logs",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "attachments",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "client",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "contacts",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "lines",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "owner",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "presentation",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "signature",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "sections",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "signature",
          "disabled": true
        },
        {
          "key": "include%5B%5D",
          "value": "system",
          "disabled": true
        }
      ]
    },
    "description": "Create a single proposal that has sections, logos, and requires an e-signature from the customer"
  },
  "response": [
  ]
}