Reports

Report Types

Get a list of available report types that can be passed to the reports endpoint.

Request

curl "https://snapbooksapi.com/api/v1/report-types" \
     -H 'X-Api-Key: xxx'

Response

{
  "success": true,
  "message": null,
  "details": [],
  "types": [
    {
      "title": "Profit And Loss",
      "type": "PROFITANDLOSS"
    },
    {
      "title": "Balance Sheet",
      "type": "BALANCESHEET"
    },
    {
      "title": "Cash Flow",
      "type": "CASHFLOW"
    },
    {
      "title": "Customer Income",
      "type": "CUSTOMERINCOME"
    },
    {
      "title": "Aged Receivables",
      "type": "AGEDRECEIVABLES"
    },
    {
      "title": "Aged Payables",
      "type": "AGEDPAYABLES"
    },
    {
      "title": "Customer Balance",
      "type": "CUSTOMERBALANCE"
    },
    {
      "title": "Customer Sales",
      "type": "CUSTOMERSALES"
    },
    {
      "title": "Item Sales",
      "type": "ITEMSALES"
    },
    {
      "title": "Department Sales",
      "type": "DEPARTMENTSALES"
    },
    {
      "title": "Class Sales",
      "type": "CLASSSALES"
    },
    {
      "title": "Trial Balance",
      "type": "TRIALBALANCE"
    },
    {
      "title": "Vendor Balance",
      "type": "VENDORBALANCE"
    },
    {
      "title": "Vendor Expenses",
      "type": "VENDOREXPENSES"
    },
    {
      "title": "Inventory Valuation Summary",
      "type": "INVENTORYVALUATIONSUMMARY"
    },
    {
      "title": "BAS",
      "type": "BAS"
    },
    {
      "title": "Vendor Balance Detail",
      "type": "VENDORBALANCEDETAIL"
    },
    {
      "title": "General Ledger",
      "type": "GENERALLEDGER"
    },
    {
      "title": "Aged Payable Detail",
      "type": "AGEDPAYABLEDETAIL"
    }
  ]
}

Reports

Request

Pass a type based off of the report types that you get from the report-types endpoint.

Reports Attributes: * required * conditionally required

Parameter Data Type Description
* Type string Type of report name
* end_date string End Date for report
* start_date string Start Date for report
curl -X "POST" "https://snapbooksapi.com/api/v1/reports" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "type": "CUSTOMERSALES",
  "params": {
    "end_date": "2019-07-01",
    "start_date": "2019-01-01"
  }
}'

Response

{
  "success": true,
  "message": null,
  "details": [],
  "report": {
    "Header": {
      "Time": "2019-10-01T02:54:00-07:00",
      "ReportName": "CustomerSales",
      "ReportBasis": "Accrual",
      "StartPeriod": "2019-01-01",
      "EndPeriod": "2019-07-01",
      "SummarizeColumnsBy": "Total",
      "Currency": "USD",
      "Option": [
        {
          "Name": "NoReportData",
          "Value": "false"
        }
      ]
    },
    "Columns": {
      "Column": [
        {
          "ColTitle": "",
          "ColType": "Customer"
        },
        {
          "ColTitle": "Total",
          "ColType": "Money"
        }
      ]
    },
    "Rows": {
      "Row": [
        {
          "ColData": [
            {
              "value": "Amy's Bird Sanctuary",
              "id": "1"
            },
            {
              "value": "17272.11"
            }
          ]
        },
        {
          "ColData": [
            {
              "value": "Company 1",
              "id": "66"
            },
            {
              "value": "44.87"
            }
          ]
        },
        {
          "ColData": [
            {
              "value": "Company 2",
              "id": "63"
            },
            {
              "value": "3993.06"
            }
          ]
        },
        {
          "ColData": [
            {
              "value": "Company 3",
              "id": "61"
            },
            {
              "value": "66.76"
            }
          ]
        },
        {
          "ColData": [
            {
              "value": "Deckard Mutual",
              "id": "62"
            },
            {
              "value": "-22886.85"
            }
          ]
        },
        {
          "ColData": [
            {
              "value": "my sweet company",
              "id": "60"
            },
            {
              "value": "1844.16"
            }
          ]
        },
        {
          "Summary": {
            "ColData": [
              {
                "value": "TOTAL"
              },
              {
                "value": "334.11"
              }
            ]
          },
          "type": "Section",
          "group": "GrandTotal"
        }
      ]
    }
  }
}