Organization API: Org Staff Billing
Every Organization API operation tagged Org Staff Billing.
Base URL: https://api.coritan.com/api/v1. Paths below are complete.
To try these requests in the browser, open the interactive Organization API reference.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/staff/disputes |
Staff disputes |
| GET | /api/v1/orgs/{org_slug}/staff/dunning |
Staff dunning |
| GET | /api/v1/orgs/{org_slug}/staff/dunning/stats |
How many invoices the retry job holds in each state, and what they still owe |
| GET | /api/v1/orgs/{org_slug}/staff/transactions |
Every payment, refund and wallet movement the brand has recorded |
| GET | /api/v1/orgs/{org_slug}/staff/transactions/export.csv |
Staff transactions export |
| GET | /api/v1/orgs/{org_slug}/staff/transactions/stats |
Counts and totals per type over the last days, for the strip above the list |
Staff disputes
Section titled Staff disputesGET /api/v1/orgs/{org_slug}/staff/disputes
Chargebacks against this brand's customers, with the customer and the
invoice named: customer_name (first and last name, else null),
customer_email and customer for the person, invoice_number
beside org_invoice_id for the invoice the payment was on. It costs two
outer joins on the one statement, and nothing per row; a customer or an
invoice that is not this brand's names nothing.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
limit |
query | integer | no | Default: 50. |
offset |
query | integer | no | Default: 0. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff dunning
Section titled Staff dunningGET /api/v1/orgs/{org_slug}/staff/dunning
Invoices the retry job is working, with the stage, the next attempt and
the last error, so failing payments are a list rather than a surprise.
A row's status is exhausted for a schedule the job gave up on,
whichever word it was stored under.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
status |
query | string or null | no | active, exhausted (every retry failed; gave_up is the same state), paused or all. |
limit |
query | integer | no | Default: 50. |
offset |
query | integer | no | Default: 0. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
How many invoices the retry job holds in each state, and what they still owe
Section titled How many invoices the retry job holds in each state, and what they still oweGET /api/v1/orgs/{org_slug}/staff/dunning/stats
How many invoices the retry job holds in each state, and what they
still owe. owed_by_currency is that balance per invoice currency
({"USD": "32.97", "EUR": "12.99"}, decimal strings in the currency's
own units like every amount here); owed stays as the sum across
currencies for older clients, and is only a real figure when the queue is
in one currency. exhausted counts the schedules the job gave up on,
under either word it stored.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Every payment, refund and wallet movement the brand has recorded
Section titled Every payment, refund and wallet movement the brand has recordedGET /api/v1/orgs/{org_slug}/staff/transactions
Every payment, refund and wallet movement the brand has recorded.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
type |
query | string or null | no | |
gateway |
query | string or null | no | |
customer_id |
query | integer or null | no | |
q |
query | string or null | no | A gateway reference or note holding the words, or a transaction or invoice number. |
since |
query | string (date) or null | no | |
until |
query | string (date) or null | no | |
limit |
query | integer | no | Default: 50. |
offset |
query | integer | no | Default: 0. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff transactions export
Section titled Staff transactions exportGET /api/v1/orgs/{org_slug}/staff/transactions/export.csv
The transactions list as it is filtered, as a CSV, for the books: the
same type, gateway, customer, search and days as GET staff/transactions, oldest first, at most EXPORT_CAP rows.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
type |
query | string or null | no | |
gateway |
query | string or null | no | |
customer_id |
query | integer or null | no | |
q |
query | string or null | no | A gateway reference or note holding the words, or a transaction or invoice number. |
since |
query | string (date) or null | no | |
until |
query | string (date) or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Counts and totals per type over the last days, for the strip above the list
Section titled Counts and totals per type over the last days, for the strip above the listGET /api/v1/orgs/{org_slug}/staff/transactions/stats
Counts and totals per type over the last days, for the strip above
the list.
Every row is in its own currency: payments, refunds and chargebacks in
USD, the ledger payouts are cut from; wallet movements in the wallet's.
So each by_type[type] is {count, total, currency, by_currency}:
count is every row of the type, by_currency the count and total in
each currency it moved in ({"USD": {"count": 3, "total": "18.42"}}),
and total with currency is that one currency's figure, or both are
null when the type moved in more than one, since a sum of dollars and
euros is no amount. A type with no rows answers a count of 0, a total of
"0" and no currency. currencies lists every currency in the window.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
days |
query | integer | no | Default: 30. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |