Skip to content
Coritan Docs

Organization API: Billing & Payouts: Statements

The 7 Organization API operations for statements.

View as Markdown

Part of Billing & Payouts.

Method Path Summary
GET /api/v1/orgs/{org_slug}/statements Org list statements
POST /api/v1/orgs/{org_slug}/statements/generate Freeze a revenue statement for the period
GET /api/v1/orgs/{org_slug}/statements/options-catalog Org statements options catalog
GET /api/v1/orgs/{org_slug}/statements/{statement_id} Org get statement
DELETE /api/v1/orgs/{org_slug}/statements/{statement_id} Org delete statement
GET /api/v1/orgs/{org_slug}/statements/{statement_id}/csv Org statement CSV
GET /api/v1/orgs/{org_slug}/statements/{statement_id}/pdf Org statement pdf

GET /api/v1/orgs/{org_slug}/statements

Name In Type Required Description
org_slug path string yes
limit query integer no Default: 50.
offset query integer no Default: 0.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Freeze a revenue statement for the period

Section titled Freeze a revenue statement for the period

POST /api/v1/orgs/{org_slug}/statements/generate

Freeze a revenue statement for the period. Its number is claimed from a counter locked until the statement is saved, so a second request at the same moment can be turned away by the database (a deadlock, or a row changed since its snapshot); it is then run again in a fresh transaction, where it numbers its own statement or, without force, finds the first.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
period_start string (date-time) yes
period_end string (date-time) yes
force boolean no
notes string or null no
options StatementGenerateOptions or null no
options.include StatementIncludeOptions or null no
options.presentation StatementPresentationOptions or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Org statements options catalog

Section titled Org statements options catalog

GET /api/v1/orgs/{org_slug}/statements/options-catalog

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/statements/{statement_id}

Name In Type Required
statement_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

DELETE /api/v1/orgs/{org_slug}/statements/{statement_id}

Name In Type Required
statement_id path integer yes
org_slug path string yes
Status Meaning
204 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/statements/{statement_id}/csv

Name In Type Required
statement_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/statements/{statement_id}/pdf

Name In Type Required
statement_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.