Talk with Archie
API reference › Utility
Skills › Utility

Derive Canonical Period Bounds + Matching Prior-Period Bounds

POST/api/v1/skills/derive.period/invoke
Works out the start, end and label of an accounting period, and of the period before it, from a kind and an anchor_date. The kinds cover Australian BAS months, quarters and years, with the financial year running July to June. It is a pure calculation that reads no client data, so the same input always gives the same answer.
Body parameters
kindRequired
Which period rule to apply: bas_au_monthly, bas_au_quarterly or bas_au_annual (Australian BAS periods).
anchor_datestring · dateRequired
Any ISO 8601 date inside the period you want, for example 2026-02-14.
Returns

Skill executed successfully

skillstringRequired
Example derive_period
outputobjectRequired
Skill output — period bounds + matching prior-period bounds.

All date fields are ISO strings so they substitute cleanly into Jinja2 templates in WDL ({{ outputs.derive_period.period_start }}) without date repr surprises.

Prior period: the unique period of the same kind immediately preceding the current one — useful for comparatives. For BAS this is the prior month / prior FY quarter / prior FY.

output.kindRequired
output.anchor_datestringRequired
output.period_startstringRequired
output.period_endstringRequired
output.period_labelstringRequired
output.prior_period_startstringRequired
output.prior_period_endstringRequired
output.prior_period_labelstringRequired
output.stub_fieldsarray of strings
output.warningsarray of strings
correlation_idstringRequired
Errors
StatusTypeWhen
401AUTH.TOKEN_INVALIDAuthentication required
403PERMISSION.CAPABILITY_DENIEDInsufficient permissions
404SKILL.NOT_FOUNDSkill not found
422VALIDATION.INVALID_FORMATValidation error
429RATE_LIMIT.USERRate limit exceeded
5XXINTERNAL.UNKNOWNInternal server error
curl https://uk.heyarchie.com/api/v1/skills/derive.period/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "kind": null,
       "anchor_date": "string"
     }'
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "derive.period",
    kind=None,
    anchor_date="string",
)
print(result)
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("derive.period", {
  "kind": null,
  "anchor_date": "string"
});
console.log(result);
Response
{
  "skill": "derive_period",
  "output": {
    "anchor_date": "2026-02-14",
    "kind": "bas_au_quarterly",
    "period_end": "2026-03-31",
    "period_label": "Q3 FY26",
    "period_start": "2026-01-01",
    "prior_period_end": "2025-12-31",
    "prior_period_label": "Q2 FY26",
    "prior_period_start": "2025-10-01"
  },
  "correlation_id": "<string>"
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}

Every response also carries X-Request-ID. Quote it if you write to us about a call.