Create Account Closings

post/das-rest/api/v1/admin/closings

Closings will stop upon first failure. Each will be handled in a separate DB transaction to minimize account locks. Closings will execute closing by closing, in order, for each period, in order.

Request Body

closings array[object] required
Description of a closing request, without a period specified
from object required
the account we are closing
to object required
the account we are closing to (closedTo)
reason string required
notation as to why we are closing (could be system generated)
period object required
Loosely describes a range of one or more monthly accounting periods.
start string <date-time>required
ISO 8601 string representation of some date in the first period in the range; mid-month is safest
Example: 2019-05-12T15:27:35.773Z
end string <date-time>required
ISO 8601 string representation of some date in the last period in the range (inclusive); mid-month is safest
Example: 2019-06-12T15:28:35.773Z
summary_only boolean
Set to true if no closing entries should be generated for these closings, only summaries will be generated
entity string
the standard identifier for one of the BitGo entities: "BitGo Inc", "BitGo Trust"
Example: BitGo Trust

200 Response

closings array[object] required
Details of a single executed Closing (1 account, 1 period, w/entries); entries list may be empty for summary_only closings
period object required
Specifically represents a single monthly accounting period
account object required
Account descriptor for DAS
entries array[object] required
General accounting entry representation
failure object
status integer required
HTTP status code of the encountered service failure, defaulting to 500
message string required
text representation of the encountered error