Sheet Structure

What is a Sheet Structure?

APIs with volumetric data will either require or respond back in the form of a sheet structure. A sheet structure mimics an excel or google spreadsheet. This allows API users to send/receive more data in a smaller JSON format. The sheet will be divided into multiple blocks, which will have data either in a table or list format.

Example

Let us use the below Google Sheet as a reference data

In this case, there are four separate sheets, each containing different types of data. If an API fetches this data and presents it in a sheet structure, the response would look like this.

{
    "sheets": [
        {
            "name": "Payer",
            "blocks": [
                {
                    "name": "Payer",
                    "@entity": "list",
                    "items": [
                        [
                            "name",
                            "Acme Pvt Ltd"
                        ],
                        [
                            "tan",
                            "MUMR09719B"
                        ],
                        [
                            "pan",
                            "CKLPB3485H"
                        ],
                        [
                            "gstin",
                            "24ABACQ3770E1ZP"
                        ],
                        [
                            "street",
                            "A-901, Stark Tower"
                        ],
                        [
                            "area",
                            "Relief Road"
                        ],
                        [
                            "city",
                            "Ahmedabad"
                        ],
                        [
                            "state",
                            "Gujarat"
                        ],
                        [
                            "postal_code",
                            "380001"
                        ],
                        [
                            "email",
                            "[email protected]"
                        ],
                        [
                            "mobile",
                            "9876543210"
                        ]
                    ]
                },
                {
                    "name": "Responsible Person",
                    "@entity": "list",
                    "items": [
                        [
                            "designation",
                            "Finance Manager"
                        ],
                        [
                            "name",
                            "Tony Stark"
                        ],
                        [
                            "pan",
                            "AAAPA1111A"
                        ],
                        [
                            "street",
                            "A-901, Stark Tower"
                        ],
                        [
                            "area",
                            "Relief Road"
                        ],
                        [
                            "city",
                            "Ahmedabad"
                        ],
                        [
                            "state",
                            "Gujarat"
                        ],
                        [
                            "postal_code",
                            "380001"
                        ],
                        [
                            "email",
                            "[email protected]"
                        ],
                        [
                            "mobile",
                            "9876543210"
                        ]
                    ]
                }
            ]
        },
        {
            "name": "Payee",
            "blocks": [
                {
                    "name": "Payee",
                    "@entity": "table",
                    "header": [
                        "sr_no",
                        "pan",
                        "name"
                    ],
                    "rows": [
                        [
                            1,
                            "COWPR1618C",
                            "Aarya Stark"
                        ],
                        [
                            2,
                            "PANNOTAVBL",
                            "Marya Stark"
                        ],
                        [
                            3,
                            "PANAPPLIED",
                            "Karya Stark"
                        ],
                        [
                            4,
                            "PANINVALID",
                            "Barya Stark"
                        ],
                        [
                            5,
                            "PANNOTREQD",
                            "Sarya Stark"
                        ]
                    ]
                }
            ]
        },
        {
            "name": "Challan",
            "blocks": [
                {
                    "name": "Challan",
                    "@entity": "table",
                    "header": [
                        "challan_serial",
                        "bsr_code",
                        "paid_date",
                        "minor_head",
                        "tds_amount",
                        "surcharge",
                        "education_cess",
                        "interest",
                        "late_filing_fees",
                        "other_penalty"
                    ],
                    "rows": [
                        [
                            "12345",
                            "1234567",
                            1657152000000,
                            "(200) TDS Payable by Tax Payer",
                            20000,
                            0,
                            800,
                            80,
                            0,
                            0
                        ]
                    ]
                }
            ]
        },
        {
            "name": "Payment",
            "blocks": [
                {
                    "name": "Payment",
                    "@entity": "table",
                    "header": [
                        "payee_sr_no",
                        "challan_serial",
                        "bsr_code",
                        "section",
                        "credit_amount",
                        "credit_date",
                        "tds_amount",
                        "surcharge",
                        "education_cess",
                        "deduction_date",
                        "reason_for_lower_deduction",
                        "certificate_number"
                    ],
                    "rows": [
                        [
                            1,
                            "12345",
                            "1234567",
                            "194 - Dividend",
                            20000,
                            1657152000000,
                            900,
                            0,
                            36,
                            1656547200000
                        ]
                    ]
                }
            ]
        }
    ]
}