Fiscal Periods
Fiscal Periods endpoints for the Accounting API
Key terms for this page
- Unified API
- A common interface and data model for a category of services, such as accounting.
- Consumer
- An Apideck record representing the customer or isolated customer account whose integrations you access.
- Connector
- Apideck’s integration with a downstream service, such as QuickBooks, Xero or NetSuite.
A Fiscal Period is a posting period of the company's fiscal calendar, with its start and end dates and whether it is open for posting.
The Fiscal Periods model
A unique identifier for an object.
Name of the fiscal period as shown in the accounting system.
The calendar year in which the period's fiscal year ends, as four digits (Jul 2025 to Jun 2026 is 2026). Derived from the fiscal year's end date; the accounting system's own label is in name.
Position of the period within its fiscal year, starting at 1.
First day of the period (inclusive).
Last day of the period (inclusive).
{}List Fiscal Periods
List the fiscal (accounting) periods of the company, with their dates and whether they are open for posting.
Header parameters
ID of the consumer which you want to get or push data from
The ID of your Unify application
Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.
Query parameters
Include raw response. Mostly used for debugging purposes
Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
Number of results to return. Minimum 1, Maximum 200, Default 20
Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads
The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.
Example: fields=name,email,addresses.city
In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
Responses
Mapping coverage per connector
Request example
package main
import(
"context"
"os"
sdkgo "github.com/apideck-libraries/sdk-go"
"github.com/apideck-libraries/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithConsumerID("test-consumer"),
sdkgo.WithAppID("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"),
sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
)
res, err := s.Accounting.FiscalPeriods.List(ctx, operations.AccountingFiscalPeriodsAllRequest{
ServiceID: sdkgo.Pointer("quickbooks"),
CompanyID: sdkgo.Pointer("12345"),
PassThrough: map[string]any{
"search": "San Francisco",
},
Fields: sdkgo.Pointer("id,updated_at"),
})
if err != nil {
log.Fatal(err)
}
if res.GetFiscalPeriodsResponse != nil {
for {
// handle items
res, err = res.Next()
if err != nil {
// handle error
}
if res == nil {
break
}
}
}
}Response example
{
"status_code": 200,
"status": "OK",
"service": "netsuite",
"resource": "fiscal-periods",
"operation": "all",
"data": [
{
"id": "12345",
"name": "Jan 2026",
"fiscal_year": "2026",
"period_number": 1,
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"status": "open",
"locked_through": "2026-09-30",
"type": "period",
"is_adjustment": false,
"created_at": "2020-09-30T07:43:32.000Z",
"updated_at": "2020-09-30T07:43:32.000Z",
"custom_mappings": {}
}
],
"meta": {
"items_on_page": 50,
"cursors": {
"previous": "em9oby1jcm06OnBhZ2U6OjE=",
"current": "em9oby1jcm06OnBhZ2U6OjI=",
"next": "em9oby1jcm06OnBhZ2U6OjM="
},
"total_count": 1,
"warnings": [
{
"type": "downstream_request_failed",
"status_code": 429,
"error": "string",
"operation": "getManager",
"message": "string"
}
]
},
"links": {
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"
},
"_raw": {}
}Get Fiscal Period
Get Fiscal Period
Path parameters
ID of the record you are acting upon.
Header parameters
ID of the consumer which you want to get or push data from
The ID of your Unify application
Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.
Query parameters
Include raw response. Mostly used for debugging purposes
The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.
Example: fields=name,email,addresses.city
In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
Responses
Mapping coverage per connector
Request example
package main
import(
"context"
"os"
sdkgo "github.com/apideck-libraries/sdk-go"
"github.com/apideck-libraries/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithConsumerID("test-consumer"),
sdkgo.WithAppID("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"),
sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
)
res, err := s.Accounting.FiscalPeriods.Get(ctx, operations.AccountingFiscalPeriodsOneRequest{
ID: "<id>",
ServiceID: sdkgo.Pointer("quickbooks"),
CompanyID: sdkgo.Pointer("12345"),
Fields: sdkgo.Pointer("id,updated_at"),
})
if err != nil {
log.Fatal(err)
}
if res.GetFiscalPeriodResponse != nil {
// handle response
}
}Response example
{
"status_code": 200,
"status": "OK",
"service": "netsuite",
"resource": "fiscal-periods",
"operation": "one",
"data": {
"id": "12345",
"name": "Jan 2026",
"fiscal_year": "2026",
"period_number": 1,
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"status": "open",
"locked_through": "2026-09-30",
"type": "period",
"is_adjustment": false,
"created_at": "2020-09-30T07:43:32.000Z",
"updated_at": "2020-09-30T07:43:32.000Z",
"custom_mappings": {}
},
"meta": {
"items_on_page": 50,
"cursors": {
"previous": "em9oby1jcm06OnBhZ2U6OjE=",
"current": "em9oby1jcm06OnBhZ2U6OjI=",
"next": "em9oby1jcm06OnBhZ2U6OjM="
},
"total_count": 1,
"warnings": [
{
"type": "downstream_request_failed",
"status_code": 429,
"error": "string",
"operation": "getManager",
"message": "string"
}
]
},
"_raw": {}
}