Answers

Working days in a date range: weekends and public holidays applied, next working day

post/v1/answers/working-days

Request

  • Base URL: https://mearef.dev
  • URL: https://mearef.dev/v1/answers/working-days
  • Auth: one of:
    • API key in header PAYMENT-SIGNATURE
    • API key in header X-PAYMENT
    • API key in header X-API-Key

Headers

X-Free-Trial'1'

Opt in to the free trial (3 calls/day/IP).

Request body

country'ae' | 'bh' | 'il' | 'iq' | 'jo' | 'kw' | 'om' | 'qa' | 'sa' required
fromstring date required
tostring date required

Max 366 days after from

subdivisionstring

Optional ISO 3166-2 code (e.g. 'DE-BY'). Computes the count on that region's statutory calendar — (national minus the region's exclusions) plus the region's own days — instead of national-only. Omit for national. Which countries offer regions, and the valid codes, are on GET /v1/{country}/public-holidays under subdivisions. An unrecognised code is refused FREE (422) with available_subdivisions listed; we never fall back to national, because that would silently return the wrong count.

receiptboolean

Optional. Default false. When true, a paid HTTP 200 embeds an Ed25519-signed receipt (kind answer_receipt) the caller can file and later verify at /certified/public-key. Included in this answer's existing price — no extra charge. The field is omitted on unpaid 402 and on free 4xx refusals. This is not a series certified extract: GET /v1/certified/{country}/{series} is a different artifact, with its own price.

Example request

{
  "subdivision": "DE-BY"
}

Response

Counts, holidays hit, next working day, country weekend convention (Egypt Fri–Sat). Optional property receipt (schema AnswerReceipt, kind answer_receipt) is present only when the request set receipt:true and this response is a paid HTTP 200. Unpaid 402 and free 4xx refusals do not include receipt. Not a series certified extract (GET /v1/certified/{country}/{series}).

confidence_label'high' | 'medium' | 'low'

Derived from source type, verification age, stale. Rules: /label-rules

coverage_label'ready' | 'partial' | 'gap'

ready=complete, partial=limited, gap=no number. Rules: /label-rules

label_basisobject

Inputs and rule ids behind both labels

Example response

{
  "receipt": {
    "kind": "answer_receipt",
    "receipt_id": "0123456789abcdef01234567",
    "answer": "vat",
    "request": {
      "country": "za",
      "amount": 100,
      "mode": "add",
      "receipt": true
    },
    "result": {
      "status": "ok"
    },
    "cited_series": [
      {
        "country": "za",
        "series_id": "vat",
        "value": null,
        "last_confirmed": "2026-04-01",
        "source_url": null,
        "source_sha256": null
      }
    ],
    "issued_at": "2026-09-25T15:45:00.000Z",
    "limitations": [
      "This receipt is not a series certified extract (GET /v1/certified/{country}/{series}).",
      "This receipt is not legal advice. It only covers the computation over the cited series as of each series' last_confirmed."
    ],
    "signature": {
      "alg": "Ed25519",
      "key_id": "<same key_id as /certified/public-key>",
      "public_key": "https://example.invalid/certified/public-key",
      "signed_payload": "canonical JSON of answer_receipt: keys sorted recursively, no whitespace (see /certified/public-key)",
      "value": "<base64>"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.