200Successful Response
Schema: SuccessEnvelope_AccountingPeriodSettings_
successbooleanmessagestringcodestringdataAccountingPeriodSettings
/api/v1/accounting-periods/settingsTurn automatic period creation on or off. When on, the daily job opens the period of the month that just ended and of the current month if they are missing. auto_close_prep_enabled / auto_close_prep_day opt the business in to automatic close preparation: the daily job dry-runs Regent's close checks and files the close as a pending change; nothing closes without approval. agent_close_business_day (1-23, -1 = last; null or 0 = off) is the business day the Agent window starts the close of the month that just ended.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: AccountingPeriodSettings
auto_create_periodsbooleanrequiredWhen true, a nightly job opens the period for the month that just ended and the current month (UTC), with its checklist and blockers initialised, and emits accounting_period.created.
auto_close_prep_enabledbooleanWhen true, a daily job prepares the month-end close on auto_close_prep_day: it dry-runs Regent's close checks for the month that just ended, files the close as a pending change for a person to approve, and notifies the owner/admins. Nothing is closed without that approval. Omit on update to leave unchanged.
auto_close_prep_dayintegerDay of the month (1-28, UTC) the close preparation runs. Omit on update to leave unchanged.
agent_close_business_dayintegerBusiness day of the month (1-23, -1 = the last one) on which the Agent window starts closing the month that just ended: DayZero sends close.window_opened that day (Fed bank-holiday calendar, New York date). null = off. On update: omit to leave unchanged, send null or 0 to turn it off.
Schema: SuccessEnvelope_AccountingPeriodSettings_
successbooleanmessagestringcodestringdataAccountingPeriodSettingsSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.