### POST /auth/token Source: https://developer.trychart.com/overview/quickstart Exchanges an authorization code for an access token. This is a crucial step in the OAuth 2.0 flow for authenticating users with Chart. ```APIDOC ## POST /auth/token ### Description Exchanges an authorization code obtained from Chart Connect for an access token. This endpoint is part of the authentication process to grant your application access to user data. ### Method POST ### Endpoint https://api.trychart.com/auth/token ### Parameters #### Query Parameters None #### Request Body - **client_id** (string) - Required - Your application's client ID. - **client_secret** (string) - Required - Your application's client secret. - **code** (string) - Required - The authorization code received after successful user login via Chart Connect. - **redirect_uri** (string) - Required - The redirect URI pre-registered with Chart. Must match the URI used during the authorization request. ### Request Example ```json { "client_id": "", "client_secret": "", "code": "", "redirect_uri": "https://example.com" } ``` ### Response #### Success Response (200) - **taxpayer_id** (string) - The unique identifier for the taxpayer. - **provider_id** (string) - The identifier for the data provider (e.g., 'turbotax'). - **access_token** (string) - The access token used for subsequent API requests. #### Response Example ```json { "taxpayer_id": "ac3a2af9-ce03-46c4-9142-81abe789c64d", "provider_id": "turbotax", "access_token": "7e965183-9332-423c-9259-3edafb332ad2" } ``` ``` -------------------------------- ### Exchange Authorization Code for Access Token using cURL Source: https://developer.trychart.com/overview/quickstart This snippet demonstrates how to exchange an authorization code for an access token by making a POST request to the Chart API. It requires your client ID, client secret, the authorization code, and your redirect URI. The response contains the taxpayer ID, provider ID, and the access token. ```shell curl https://api.trychart.com/auth/token \ -X POST \ -H "Content-Type: application/json" \ --data-raw '{ "client_id": "", "client_secret": "", "code": "", "redirect_uri": "https://example.com" }' ``` ```json { "taxpayer_id": "ac3a2af9-ce03-46c4-9142-81abe789c64d", "provider_id": "turbotax", "access_token": "7e965183-9332-423c-9259-3edafb332ad2" } ``` -------------------------------- ### OpenAPI GET /records Specification Source: https://developer.trychart.com/api-reference/records/get_all This OpenAPI specification defines the GET /records endpoint. It includes details on the server URL, authentication via bearer token, request headers such as Chart-API-Version, and the structure of the JSON response for successful retrieval of records. The response schema includes an array of Record objects, with examples provided for W2, W2G, and Schedule K-1 (1065) forms. ```yaml paths: path: /records method: get servers: - url: https://api.trychart.com request: security: - title: bearerAuth parameters: query: {} header: Authorization: type: http scheme: bearer description: >- Please use your access_token returned from the /auth/token endpoint. cookie: {} parameters: path: {} query: {} header: Chart-API-Version: schema: - type: string description: >- Header used to specify the version for a given API request. Current version is 2024-01-01. default: '2024-01-01' cookie: {} body: {} response: '200': application/json: schemaArray: - type: array items: allOf: - $ref: '#/components/schemas/Record' examples: example: value: - id: clt0szoxp0001p82z45ufj6t4 name: John Doe tax_year: '2022' provider_id: turbotax date: '2024-02-26T21:33:49.428Z' raw_file: forms: - type: WAID year: '2023' ssn: XXX-XX-1234 form_w2: - employer: name: META address: 1 HAC ein: XXXXX2001 employee: name: JOHN SMIT address: 123 WA ssn: XXX-XX-1234 submission_type: Original document wages_tips_other_compensation: 55738 federal_income_tax_withheld: 5490 social_security_wages: 55738 social_security_tax_withheld: 3455 medicare_wages_tips: 55738 medicare_tax_withheld: 808 social_security_tips: 0 allocated_tips: 0 dependent_care_benefits: 0 deferred_compensation: 0 nonqualified_plans: 0 code_q: 0 code_w: 0 code_y: 0 code_z: 0 code_r: 0 code_s: 0 code_t: 0 code_v: 0 code_aa: 0 code_bb: 0 code_dd: 2227 code_ee: 0 code_ff: 0 code_gg: 0 code_hh: 0 third_party_sick_pay_indicator: false retirement_plan_indicator: false statutory_employee: false w2_whc_ssn_validation_code: Correct SSN form_w2g: - payer: fin: name: address: winner: tin: name: address: submission_type: gross_winnings: 123 federal_income_tax_withheld: 123 type_of_wager: date_won: '2023-12-25' winnings_from_identical_wagers: 123 schedule_k1_1065: - partnership: ein: '123456789' name: Test, Inc. address: >- PO BOX 1234 SEATTLE, WA 94111-0000 partner: id: 123-45-6789 name: JOHN SMIT address: >- 123 HOME RESORT JOHN CITY, UT 1234-0000 submission_type: Original document partner_share_of_capital_beginning: 0.01 partner_share_of_capital_end: 0.01 ira_sep_keogh_indicator: N/A tax_period_beginning: '202301' tax_period_end: '202312' sch_k3: Box is not checked dividends: 0 interest: 636 royalties: 0 ordinary_income_k1: 0 real_estate: 0 other_rental: 0 ``` -------------------------------- ### Example JSON Response for Tax Records Source: https://developer.trychart.com/api-reference This example illustrates the structure of the JSON response when successfully fetching tax records. It includes a 'W-2' form with employee and employer details, a 'W-2G' form for gambling winnings, and 'Schedule K-1' forms for partnerships and S-corporations, showcasing various financial data points. ```json [ { "id": "clt0szoxp0001p82z45ufj6t4", "name": "John Doe", "tax_year": "2022", "provider_id": "turbotax", "date": "2024-02-26T21:33:49.428Z", "raw_file": "", "forms": [ { "type": "WAID", "year": "2023", "ssn": "XXX-XX-1234", "form_w2": [ { "employer": { "name": "META", "address": "1 HAC", "ein": "XXXXX2001" }, "employee": { "name": "JOHN SMIT", "address": "123 WA", "ssn": "XXX-XX-1234" }, "submission_type": "Original document", "wages_tips_other_compensation": 55738, "federal_income_tax_withheld": 5490, "social_security_wages": 55738, "social_security_tax_withheld": 3455, "medicare_wages_tips": 55738, "medicare_tax_withheld": 808, "social_security_tips": 0, "allocated_tips": 0, "dependent_care_benefits": 0, "deferred_compensation": 0, "nonqualified_plans": 0, "code_q": 0, "code_w": 0, "code_y": 0, "code_z": 0, "code_r": 0, "code_s": 0, "code_t": 0, "code_v": 0, "code_aa": 0, "code_bb": 0, "code_dd": 2227, "code_ee": 0, "code_ff": 0, "code_gg": 0, "code_hh": 0, "third_party_sick_pay_indicator": false, "retirement_plan_indicator": false, "statutory_employee": false, "w2_whc_ssn_validation_code": "Correct SSN" } ], "form_w2g": [ { "payer": { "fin": "", "name": "", "address": "" }, "winner": { "tin": "", "name": "", "address": "" }, "submission_type": "", "gross_winnings": 123, "federal_income_tax_withheld": 123, "type_of_wager": "", "date_won": "2023-12-25", "winnings_from_identical_wagers": 123 } ], "schedule_k1_1065": [ { "partnership": { "ein": "123456789", "name": "Test, Inc.", "address": "PO BOX 1234\nSEATTLE, WA 94111-0000" }, "partner": { "id": "123-45-6789", "name": "JOHN SMIT", "address": "123 HOME RESORT \nJOHN CITY, UT 1234-0000" }, "submission_type": "Original document", "partner_share_of_capital_beginning": 0.01, "partner_share_of_capital_end": 0.01, "ira_sep_keogh_indicator": "N/A", "tax_period_beginning": "202301", "tax_period_end": "202312", "sch_k3": "Box is not checked", "dividends": 0, "interest": 636, "royalties": 0, "ordinary_income_k1": 0, "real_estate": 0, "other_rental": 0, "total_guaranteed_payments": 0, "section_179_expenses": 0, "capital_gain_short": 0, "capital_gain_long": 0, "part_iii_other_income_loss": 0, "part_iii_other_deduction": 0, "nonrecourse_beginning": 0, "nonrecourse_end": 0, "qualified_nonrecourse_beginning": 0, "qualified_nonrecourse_end": 0, "recourse_beginning": 0, "recourse_end": 0, "dividend_equivalents": 0 } ], "schedule_k1_1120s": [ { "corporation": { "ein": "123456789", "name": "TEST LLC", "address": "1 MARKET ST\nSAN FRANCISCO, CA 80129-7382" }, "shareholder": { "id": "123-45-6789", "name": "JOHN SMIT", "address": "123 HOME\n SUN CITY, CA 91111-6623" }, "submission_type": "Original document", "dividends": 0, "interest": 12022, "royalties": 0, "ordinary_income_k1": 250000, "real_estate": 0, "other_rental": 0, "section_179_expenses": 14224, "short_term_capital_gain": 0, "long_term_capital_gain": 0, "credits": 0, "part_iii_other_income_loss": 0, "part_iii_other_deduction": 0, "credits_code_1": "Insignificant", "credits_code_2": "Insignificant", "shareholder_percentage_of_stock": "33.333%" } ] } ] } ] ``` -------------------------------- ### GET /records Source: https://developer.trychart.com/api-reference/records/get_all Retrieves a list of records from the API. This endpoint supports authentication via a bearer token and allows for versioning through a specific header. ```APIDOC ## GET /records ### Description Retrieves a list of records. This endpoint requires authentication using a Bearer token and supports API versioning. ### Method GET ### Endpoint https://api.trychart.com/records ### Parameters #### Path Parameters None #### Query Parameters None #### Header Parameters - **Authorization** (string) - Required - The access token obtained from the /auth/token endpoint. - **Chart-API-Version** (string) - Optional - Specifies the API version. Defaults to '2024-01-01'. ### Request Body None ### Request Example ```http GET /records HTTP/1.1 Host: api.trychart.com Authorization: Bearer Chart-API-Version: 2024-01-01 ``` ### Response #### Success Response (200) - **Array of Record objects** (array) - Contains the retrieved record data. #### Response Example ```json [ { "id": "clt0szoxp0001p82z45ufj6t4", "name": "John Doe", "tax_year": "2022", "provider_id": "turbotax", "date": "2024-02-26T21:33:49.428Z", "raw_file": "", "forms": [ { "type": "WAID", "year": "2023", "ssn": "XXX-XX-1234", "form_w2": { "employer": { "name": "META", "address": "1 HAC", "ein": "XXXXX2001" }, "employee": { "name": "JOHN SMIT", "address": "123 WA", "ssn": "XXX-XX-1234" }, "submission_type": "Original document", "wages_tips_other_compensation": 55738, "federal_income_tax_withheld": 5490, "social_security_wages": 55738, "social_security_tax_withheld": 3455, "medicare_wages_tips": 55738, "medicare_tax_withheld": 808, "social_security_tips": 0, "allocated_tips": 0, "dependent_care_benefits": 0, "deferred_compensation": 0, "nonqualified_plans": 0, "code_q": 0, "code_w": 0, "code_y": 0, "code_z": 0, "code_r": 0, "code_s": 0, "code_t": 0, "code_v": 0, "code_aa": 0, "code_bb": 0, "code_dd": 2227, "code_ee": 0, "code_ff": 0, "code_gg": 0, "code_hh": 0, "third_party_sick_pay_indicator": false, "retirement_plan_indicator": false, "statutory_employee": false, "w2_whc_ssn_validation_code": "Correct SSN" }, "form_w2g": { "payer": { "fin": "", "name": "", "address": "" }, "winner": { "tin": "", "name": "", "address": "" }, "submission_type": "", "gross_winnings": 123, "federal_income_tax_withheld": 123, "type_of_wager": "", "date_won": "2023-12-25", "winnings_from_identical_wagers": 123 }, "schedule_k1_1065": [ { "partnership": { "ein": "123456789", "name": "Test, Inc.", "address": "PO BOX 1234\nSEATTLE, WA 94111-0000" }, "partner": { "id": "123-45-6789", "name": "JOHN SMIT", "address": "123 HOME RESORT \nJOHN CITY, UT 1234-0000" }, "submission_type": "Original document", "partner_share_of_capital_beginning": 0.01, "partner_share_of_capital_end": 0.01, "ira_sep_keogh_indicator": "N/A", "tax_period_beginning": "202301", "tax_period_end": "202312", "sch_k3": "Box is not checked", "dividends": 0, "interest": 636, "royalties": 0, "ordinary_income_k1": 0, "real_estate": 0, "other_rental": 0 } ] } ] } ] ``` ``` -------------------------------- ### GET /records Source: https://developer.trychart.com/api-reference Retrieves a list of tax records. This endpoint requires authentication via an API token. ```APIDOC ## GET /records ### Description Retrieves a list of tax records. This endpoint requires authentication via an API token. ### Method GET ### Endpoint /records ### Parameters #### Header Parameters - **Authorization** (string) - Required - Bearer token for authentication. ### Request Example ```bash curl --request GET \ --url https://api.trychart.com/records \ --header 'Authorization: Bearer ' ``` ### Response #### Success Response (200) Returns a list of records, where each record may contain various tax forms. - **id** (string) - Unique identifier for the record. - **name** (string) - Name associated with the record. - **tax_year** (string) - The tax year for the record. - **provider_id** (string) - Identifier for the data provider. - **date** (string) - Timestamp of when the record was created. - **raw_file** (string) - Raw file content (if applicable). - **forms** (array) - An array of tax forms associated with the record. - **type** (string) - The type of tax form (e.g., WAID, W2, K1). - **year** (string) - The tax year for the form. - **ssn** (string) - Social Security Number (masked). - **form_w2** (array) - Details for Form W-2. - **form_w2g** (array) - Details for Form W-2G. - **schedule_k1_1065** (array) - Details for Schedule K-1 (Form 1065). - **schedule_k1_1120s** (array) - Details for Schedule K-1 (Form 1120S). #### Response Example ```json [ { "id": "clt0szoxp0001p82z45ufj6t4", "name": "John Doe", "tax_year": "2022", "provider_id": "turbotax", "date": "2024-02-26T21:33:49.428Z", "raw_file": "", "forms": [ { "type": "WAID", "year": "2023", "ssn": "XXX-XX-1234", "form_w2": [ { "employer": { "name": "META", "address": "1 HAC", "ein": "XXXXX2001" }, "employee": { "name": "JOHN SMIT", "address": "123 WA", "ssn": "XXX-XX-1234" }, "submission_type": "Original document", "wages_tips_other_compensation": 55738, "federal_income_tax_withheld": 5490, "social_security_wages": 55738, "social_security_tax_withheld": 3455, "medicare_wages_tips": 55738, "medicare_tax_withheld": 808, "social_security_tips": 0, "allocated_tips": 0, "dependent_care_benefits": 0, "deferred_compensation": 0, "nonqualified_plans": 0, "code_q": 0, "code_w": 0, "code_y": 0, "code_z": 0, "code_r": 0, "code_s": 0, "code_t": 0, "code_v": 0, "code_aa": 0, "code_bb": 0, "code_dd": 2227, "code_ee": 0, "code_ff": 0, "code_gg": 0, "code_hh": 0, "third_party_sick_pay_indicator": false, "retirement_plan_indicator": false, "statutory_employee": false, "w2_whc_ssn_validation_code": "Correct SSN" } ], "form_w2g": [ { "payer": { "fin": "", "name": "", "address": "" }, "winner": { "tin": "", "name": "", "address": "" }, "submission_type": "", "gross_winnings": 123, "federal_income_tax_withheld": 123, "type_of_wager": "", "date_won": "2023-12-25", "winnings_from_identical_wagers": 123 } ], "schedule_k1_1065": [ { "partnership": { "ein": "123456789", "name": "Test, Inc.", "address": "PO BOX 1234\nSEATTLE, WA 94111-0000" }, "partner": { "id": "123-45-6789", "name": "JOHN SMIT", "address": "123 HOME RESORT \nJOHN CITY, UT 1234-0000" }, "submission_type": "Original document", "partner_share_of_capital_beginning": 0.01, "partner_share_of_capital_end": 0.01, "ira_sep_keogh_indicator": "N/A", "tax_period_beginning": "202301", "tax_period_end": "202312", "sch_k3": "Box is not checked", "dividends": 0, "interest": 636, "royalties": 0, "ordinary_income_k1": 0, "real_estate": 0, "other_rental": 0, "total_guaranteed_payments": 0, "section_179_expenses": 0, "capital_gain_short": 0, "capital_gain_long": 0, "part_iii_other_income_loss": 0, "part_iii_other_deduction": 0, "nonrecourse_beginning": 0, "nonrecourse_end": 0, "qualified_nonrecourse_beginning": 0, "qualified_nonrecourse_end": 0, "recourse_beginning": 0, "recourse_end": 0, "dividend_equivalents": 0 } ], "schedule_k1_1120s": [ { "corporation": { "ein": "123456789", "name": "TEST LLC", "address": "1 MARKET ST\nSAN FRANCISCO, CA 80129-7382" }, "shareholder": { "id": "123-45-6789", "name": "JOHN SMIT", "address": "123 HOME\n SUN CITY, CA 91111-6623" }, "submission_type": "Original document", "dividends": 0, "interest": 12022, "royalties": 0, "ordinary_income_k1": 250000, "real_estate": 0, "other_rental": 0, "section_179_expenses": 14224, "short_term_capital_gain": 0, "long_term_capital_gain": 0, "credits": 0, "part_iii_other_income_loss": 0, "part_iii_other_deduction": 0, "credits_code_1": "Insignificant", "credits_code_2": "Insignificant", "shareholder_percentage_of_stock": "33.333%" } ] } ] } ] ``` ``` -------------------------------- ### Create Webhook Endpoint (Next.js) Source: https://developer.trychart.com/developer/webhooks Example of setting up a Next.js API route to receive webhook events. It expects a POST request with a 'chart-signature' header and processes the request body. It returns an HTTP 200 OK response upon successful receipt. ```javascript import type { NextApiRequest, NextApiResponse } from "next"; export default (req: NextApiRequest, res: NextApiResponse) => { if (req.method === "POST") { const payload = req.body; const sigHeader = req.headers["chart-signature"]; // Verify the signature and process the event res.status(200).end(); } }; ``` -------------------------------- ### GET /records Source: https://developer.trychart.com/api-reference Retrieves all tax records associated with a given access token. This endpoint allows users to fetch their complete tax history. ```APIDOC ## GET /records ### Description Returns all tax records associated with an `access_token`. ### Method GET ### Endpoint /records ### Parameters #### Query Parameters - **access_token** (string) - Required - The token used to authenticate and authorize the request. ### Request Example ```json { "Authorization": "Bearer " } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the record. - **name** (string) - Name associated with the record. - **tax_year** (string) - The tax year for which the record is relevant. - **provider_id** (string) - Identifier for the tax preparation service used. - **date** (string) - The date the record was created or last updated. - **raw_file** (string) - A string representation of the raw tax file. - **forms** (array) - An array of tax forms associated with the record. - **type** (string) - The type of the tax form (e.g., "WAID", "form_w2", "form_w2g"). - **year** (string) - The year the form pertains to. - **ssn** (string) - Social Security Number (masked). - **form_w2** (array) - Details for Form W-2. - **employer** (object) - Information about the employer. - **employee** (object) - Information about the employee. - **submission_type** (string) - The submission type of the form. - ... (other W-2 fields) - **form_w2g** (array) - Details for Form W-2G. - **payer** (object) - Information about the payer. - **winner** (object) - Information about the winner. - ... (other W-2G fields) - **schedule_k1_1065** (array) - Details for Schedule K-1 (Form 1065). - **partnership** (object) - Information about the partnership. - **partner** (object) - Information about the partner. - ... (other Schedule K-1 1065 fields) - **schedule_k1_1120s** (array) - Details for Schedule K-1 (Form 1120-S). - **corporation** (object) - Information about the corporation. - **shareholder** (object) - Information about the shareholder. - ... (other Schedule K-1 1120-S fields) #### Response Example ```json [ { "id": "clt0szoxp0001p82z45ufj6t4", "name": "John Doe", "tax_year": "2022", "provider_id": "turbotax", "date": "2024-02-26T21:33:49.428Z", "raw_file": "", "forms": [ { "type": "WAID", "year": "2023", "ssn": "XXX-XX-1234", "form_w2": [ { "employer": { "name": "META", "address": "1 HAC", "ein": "XXXXX2001" }, "employee": { "name": "JOHN SMIT", "address": "123 WA", "ssn": "XXX-XX-1234" }, "submission_type": "Original document", "wages_tips_other_compensation": 55738, "federal_income_tax_withheld": 5490, "social_security_wages": 55738, "social_security_tax_withheld": 3455, "medicare_wages_tips": 55738, "medicare_tax_withheld": 808, "social_security_tips": 0, "allocated_tips": 0, "dependent_care_benefits": 0, "deferred_compensation": 0, "nonqualified_plans": 0, "code_q": 0, "code_w": 0, "code_y": 0, "code_z": 0, "code_r": 0, "code_s": 0, "code_t": 0, "code_v": 0, "code_aa": 0, "code_bb": 0, "code_dd": 2227, "code_ee": 0, "code_ff": 0, "code_gg": 0, "code_hh": 0, "third_party_sick_pay_indicator": false, "retirement_plan_indicator": false, "statutory_employee": false, "w2_whc_ssn_validation_code": "Correct SSN" } ], "form_w2g": [ { "payer": { "fin": "", "name": "", "address": "" }, "winner": { "tin": "", "name": "", "address": "" }, "submission_type": "", "gross_winnings": 123, "federal_income_tax_withheld": 123, "type_of_wager": "", "date_won": "2023-12-25", "winnings_from_identical_wagers": 123 } ], "schedule_k1_1065": [ { "partnership": { "ein": "123456789", "name": "Test, Inc.", "address": "PO BOX 1234\nSEATTLE, WA 94111-0000" }, "partner": { "id": "123-45-6789", "name": "JOHN SMIT", "address": "123 HOME RESORT \nJOHN CITY, UT 1234-0000" }, "submission_type": "Original document", "partner_share_of_capital_beginning": 0.01, "partner_share_of_capital_end": 0.01, "ira_sep_keogh_indicator": "N/A", "tax_period_beginning": "202301", "tax_period_end": "202312", "sch_k3": "Box is not checked", "dividends": 0, "interest": 636, "royalties": 0, "ordinary_income_k1": 0, "real_estate": 0, "other_rental": 0, "total_guaranteed_payments": 0, "section_179_expenses": 0, "capital_gain_short": 0, "capital_gain_long": 0, "part_iii_other_income_loss": 0, "part_iii_other_deduction": 0, "nonrecourse_beginning": 0, "nonrecourse_end": 0, "qualified_nonrecourse_beginning": 0, "qualified_nonrecourse_end": 0, "recourse_beginning": 0, "recourse_end": 0, "dividend_equivalents": 0 } ], "schedule_k1_1120s": [ { "corporation": { "ein": "123456789", "name": "TEST LLC", "address": "1 MARKET ST\nSAN FRANCISCO, CA 80129-7382" }, "shareholder": { "id": "123-45-6789", "name": "JOHN SMIT", "address": "123 HOME\n SUN CITY, CA 91111-6623" }, "submission_type": "Original document", "dividends": 0, "interest": 12022, "royalties": 0, "ordinary_income_k1": 250000, "real_estate": 0, "other_rental": 0, "section_179_expenses": 14224, "short_term_capital_gain": 0, "long_term_capital_gain": 0, "credits": 0, "part_iii_other_income_loss": 0, "part_iii_other_deduction": 0, "credits_code_1": "Insignificant" } ] } ] } ] ``` ``` -------------------------------- ### Create Webhook Endpoint (Express) Source: https://developer.trychart.com/developer/webhooks Example of setting up an Express.js route to receive webhook events. It uses express.json() to parse the request body and expects a 'chart-signature' header. It returns a 200 status code to acknowledge successful delivery. ```javascript const express = require("express"); const app = express(); app.use(express.json()); app.post("/webhook", (req, res) => { const payload = req.body; const sigHeader = req.headers["chart-signature"]; // Verify the signature and process the event res.sendStatus(200); }); ``` -------------------------------- ### GET /websites/developer_trychart Source: https://developer.trychart.com/api-reference/records/get_all Retrieves a specific tax record based on its ID. This endpoint provides detailed information about a tax record, including parsed tax forms and metadata. ```APIDOC ## GET /websites/developer_trychart ### Description Retrieves a specific tax record by its Chart UUID. This endpoint provides access to the details of a tax record, including parsed forms and submission information. ### Method GET ### Endpoint `/websites/developer_trychart/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The unique Chart UUID assigned to the tax record. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **id** (string) - The Chart UUID assigned to this tax record. - **name** (string) - The account name retrieved from tax record provider. - **tax_year** (string) - The tax year of the record. - **provider_id** (string) - The tax record provider associated with the access_token. - **date** (string) - The date of the submission in ISO 8601 format in UTC. - **raw_file** (string) - A pre-signed URL pointing to the raw tax file (PDF). The URL expires after 12 hours. - **forms** (array) - The parsed tax form data associated with the tax record. #### Response Example ```json { "id": "clt0szoxp0001p82z45ufj6t4", "name": "John Doe", "tax_year": "2022", "provider_id": "turbotax", "date": "2024-02-26T21:33:49.428Z", "raw_file": "https://example.com/path/to/raw/file.pdf?expires=1234567890", "forms": [ { "type": "W2", "year": "2023", "forms": [ { "employer": { "ein": "XX-XXX4005", "name": "ACME INC.", "address": "123 Main St, Anytown, USA 12345" }, "employee": { "ssn": "XXX-XX-1234", "name": "JOHN DOE", "address": "" } } ] }, { "type": "VENF", "year": "2023" } ] } ``` ``` -------------------------------- ### Successful Token Exchange Response (JavaScript) Source: https://developer.trychart.com/implementation/connect/retrieve-access-token Example of a successful JSON response from the Chart API's /auth/token endpoint. It includes essential identifiers and the crucial access_token required for subsequent API requests. ```javascript { "taxpayer_id": "ac3a2af9-ce03-46c4-9142-81abe789c64d", "provider_id": "turbotax", "access_token": "7e965183-9332-423c-9259-3edafb332ad2" } ``` -------------------------------- ### Initiate Chart Connect Redirect Flow (Shell) Source: https://developer.trychart.com/implementation/connect/set-up-chart-connect This code snippet demonstrates how to initiate the Chart Connect redirect flow by constructing the URL with your client ID and redirect URI. Ensure the redirect URI is registered in the Chart Developer Dashboard. ```shell https://connect.trychart.com? client_id= &redirect_uri=https://example.com ``` -------------------------------- ### GET /introspect Source: https://developer.trychart.com/api-reference/management/introspect Retrieves account information associated with a given access token. ```APIDOC ## GET /introspect ### Description Reads account information associated with an `access_token`. ### Method GET ### Endpoint https://api.trychart.com/introspect ### Parameters #### Header Parameters - **Authorization** (string) - Required - Bearer token obtained from the `/auth/token` endpoint. - **Chart-API-Version** (string) - Optional - Specifies the API version. Defaults to '2024-01-01'. ### Request Example ```json { "Authorization": "Bearer YOUR_ACCESS_TOKEN" } ``` ### Response #### Success Response (200) - **taxpayer_id** (string) - The Chart UUID identifying the taxpayer. - **client_id** (string) - The client ID of the application associated with the `access_token`. - **name** (string) - The account name retrieved from the tax record provider. Can be null. - **provider_id** (string) - The tax record provider associated with the `access_token`. (e.g., turbotax, hr, taxact, etc.) #### Response Example ```json { "taxpayer_id": "clt0szoxp0001p82z45ufj6t4", "client_id": "23ca205dc62bbf3e3f940667020bbdcc", "name": "John Doe", "provider_id": "turbotax" } ``` ``` -------------------------------- ### Initialize Embedded Chart Connect (JavaScript) Source: https://developer.trychart.com/implementation/connect/set-up-chart-connect Initializes the Chart Connect SDK for use in a web application. This snippet shows how to set up the connection with a client ID and define event handlers for success, error, and closing the connection. ```javascript ```