POST
/
v1
/
businesses
/
{businessId}
/
reports
/
profit-and-loss-comparison
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/profit-and-loss-comparison \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "periods": {
    "type": "Comparison_Months",
    "months": [
      {
        "year": 2024,
        "month": 12
      }
    ]
  },
  "tag_filters": [
    {
      "required_tags": [
        {
          "key": "Location",
          "value": "MainStreet"
        }
      ]
    }
  ],
  "reporting_basis": "ACCRUAL",
  "structure": "DEFAULT"
}'
[
  {
    "pnls": [
      {
        "period": {
          "type": "Comparison_Months",
          "months": [
            {
              "year": 2024,
              "month": 12
            }
          ]
        },
        "tag_filter": {
          "key": "<string>",
          "value": [
            "<string>"
          ]
        },
        "pnl": {
          "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "start_date": "2023-11-07T05:31:56Z",
          "end_date": "2023-11-07T05:31:56Z",
          "income": {
            "name": "<string>",
            "display_name": "<string>",
            "value": 123,
            "line_items": [
              {}
            ],
            "is_contra": true
          },
          "cost_of_goods_sold": {
            "name": "<string>",
            "display_name": "<string>",
            "value": 123,
            "line_items": [
              {}
            ],
            "is_contra": true
          },
          "gross_profit": 123,
          "expenses": {
            "name": "<string>",
            "display_name": "<string>",
            "value": 123,
            "line_items": [
              {}
            ],
            "is_contra": true
          },
          "profit_before_taxes": 123,
          "taxes": {
            "name": "<string>",
            "display_name": "<string>",
            "value": 123,
            "line_items": [
              {}
            ],
            "is_contra": true
          },
          "net_profit": 123,
          "other_outflows": {
            "name": "<string>",
            "display_name": "<string>",
            "value": 123,
            "line_items": [
              {}
            ],
            "is_contra": true
          },
          "personal_expenses": {
            "name": "<string>",
            "display_name": "<string>",
            "value": 123,
            "line_items": [
              {}
            ],
            "is_contra": true
          },
          "fully_categorized": true
        }
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json

Path Parameters

businessId
string
required

The UUID of the business to fetch the profit and loss for

Body

application/json

Response

200
application/json

The response is of type object[].