Accounting Period GET

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/accounting-service/accounting-period/{ID-SET}

Refer to our documentation on URI syntax for more information on how to construct URIs.

Description

This message allows you to retrieve accounting periods by ID. If you don't specify an ID it will retrieve all available accounting periods.

Detailed field description:

Field Name Field Description
ID The ID of the accounting period.
startDate The date the accounting period starts.
endDate The date the accounting period ends.
closedDate The date the accounting period was closed.
closedByUserId The ID of the user that closed the accounting period.

Example 1

Fetch all accounting periods.

Request URI

/accounting-period

Response

{
	"response": [
		{
			"id": 2,
			"startDate": "2014-01-01T00:00:00.000Z",
			"endDate": "2015-01-01T23:59:59:999Z"
		},
		{
			"id": 3,
			"startDate": "2015-01-02T00:00:00.000Z",
			"endDate": "2015-01-31T23:59:59:999Z"
		},
		{
			"id": 4,
			"startDate": "2015-02-01T00:00:00.000Z",
			"endDate": "2015-02-28T23:59:59:999Z"
		},
		{
			"id": 5,
			"startDate": "2013-12-01T00:00:00.000Z",
			"endDate": "2013-12-31T23:59:59:999Z",
			"closedDate": "2014-11-25T00:00:00.000Z",
			"closedByUserId": 4
		},
		{
			"id": 6,
			"startDate": "2013-11-01T00:00:00.000Z",
			"endDate": "2013-11-30T23:59:59:999Z"
		}
	]
}

Example 2

Fetch accounting periods using an ID set.

Request URI

/accounting-period/2,4-6

Response

{
	"response": [
		{
			"id": 2,
			"startDate": "2014-01-01T00:00:00.000Z",
			"endDate": "2015-01-01T00:00:00.000Z"
		},
		{
			"id": 4,
			"startDate": "2015-02-01T00:00:00.000Z",
			"endDate": "2015-02-28T00:00:00.000Z"
		},
		{
			"id": 5,
			"startDate": "2013-12-01T00:00:00.000Z",
			"endDate": "2013-12-31T00:00:00.000Z",
			"closedDate": "2014-11-25T00:00:00.000Z",
			"closedByUserId": 4
		},
		{
			"id": 6,
			"startDate": "2013-11-01T00:00:00.000Z",
			"endDate": "2013-11-30T00:00:00.000Z"
		}
	]
}