Skip to main content
GET
/
merchant-status
Get merchant status
curl --request GET \
  --url https://cool.jobmojito.com/functions/v1/merchant-status \
  --header 'Authorization: Bearer <token>'
{
  "profile_id": "9b2c1e54-7a3d-4f8e-9c10-2b6a4d5e7f01",
  "default_merchant_id": "28106cba-1c27-4e53-b149-32113e5e8e31",
  "merchant_id": "28106cba-1c27-4e53-b149-32113e5e8e31",
  "credits_interview_monthly": 8,
  "credits_interview_monthly_limit": 10,
  "credits_interview_extra": 25,
  "credits_interview_single": 0,
  "definitions_active": 4,
  "interviews_without_credits": 2,
  "interviews_undecided": 3,
  "interviews_ongoing": 1,
  "interview_results": 137,
  "candidates": 212,
  "candidates_history": [
    3,
    5,
    0,
    2,
    8,
    1,
    0,
    4,
    6,
    2,
    1,
    0,
    3,
    5
  ],
  "interview_result_history": [
    1,
    2,
    0,
    1,
    3,
    0,
    0,
    2,
    1,
    1,
    0,
    0,
    1,
    2
  ],
  "subscription_type": "Growth",
  "subscription_status": "active",
  "invitations_sent": 18,
  "invitations_limit": 40,
  "invitations_available": 22
}

Authorizations

Authorization
string
header
required

Supabase JWT access token, passed as Authorization: Bearer <token>.

Query Parameters

merchant_id
string<uuid>

Optional merchant to scope the results to. Honoured only when the caller is an admin or a sub-merchant operator; otherwise the merchant from the JWT is always used.

Example:

"28106cba-1c27-4e53-b149-32113e5e8e31"

Response

The merchant status snapshot.

profile_id
string
required

The calling user's profile id (auth user id), taken from the JWT.

Example:

"9b2c1e54-7a3d-4f8e-9c10-2b6a4d5e7f01"

default_merchant_id
string | null
required

The caller's home merchant id pinned in the JWT (app_metadata.merchant_id). Null if the token carries no merchant.

Example:

"28106cba-1c27-4e53-b149-32113e5e8e31"

merchant_id
string
required

The merchant this status is scoped to — the default_merchant_id unless an admin / sub-merchant operator overrode it via the merchant_id query param.

Example:

"28106cba-1c27-4e53-b149-32113e5e8e31"

credits_interview_monthly
number | null
required

Remaining monthly interview credits.

Example:

8

credits_interview_monthly_limit
number | null
required

Monthly interview-credit allowance for the current plan.

Example:

10

credits_interview_extra
number | null
required

Extra (top-up) interview credits available on top of the monthly allowance.

Example:

25

credits_interview_single
number | null
required

Single-position interview credits available.

Example:

0

definitions_active
number | null
required

Count of active interview + position definitions.

Example:

4

interviews_without_credits
number
required

Completed interviews that have not yet consumed a credit.

Example:

2

interviews_undecided
number
required

Completed interviews awaiting a recruiter decision.

Example:

3

interviews_ongoing
number
required

Interviews currently in progress (coach_status = started).

Example:

1

interview_results
number
required

Total non-archived interview results for the merchant.

Example:

137

candidates
number
required

Total candidates (non-archived profile_interview rows) for the merchant.

Example:

212

candidates_history
number[]
required

Daily new-candidate counts for the last 14 days, most recent first.

Example:
[3, 5, 0, 2, 8, 1, 0, 4, 6, 2, 1, 0, 3, 5]
interview_result_history
number[]
required

Daily new-interview-result counts for the last 14 days, most recent first.

Example:
[1, 2, 0, 1, 3, 0, 0, 2, 1, 1, 0, 0, 1, 2]
subscription_type
string | null
required

Subscription plan name (e.g. Free, Starter, Growth, Special).

Example:

"Growth"

subscription_status
string | null
required

Subscription status (e.g. active, past_due, canceled). Null when no subscription.

Example:

"active"

invitations_sent
number
required

Interview invitations sent during the current subscription period.

Example:

18

invitations_limit
number | null
required

Maximum invitations allowed this period (4x available credits). Null for unlimited (Special) plans.

Example:

40

invitations_available
number | null
required

Remaining invitations this period. Null for unlimited (Special) plans.

Example:

22

{key}
unknown