SeoclerksDevelopers

Subscriptions

Recurring orders.

GET /subscriptions

Subscriptions

Scope: orders:read, or the broad read. Newest first, by id.

Parameters

NameWhereDescription
cursorquerymeta.next_cursor from the previous page. Up to 1024 characters.
limitqueryPage size. Above 100 is treated as 100. At least 1. Default 25.
rolequeryOne of buyer, seller. Default buyer.
statusqueryOne of 0, 1.
If-None-MatchheaderAn ETag from an earlier response.

Example request

curl "https://www.seoclerk.com/api/v1/subscriptions" \
  -H "Authorization: Bearer $SEOCLERKS_API_KEY"

Response 200

A page of these in data, with meta.limit and meta.next_cursor.

FieldTypeDescription
idinteger
buyer_idinteger
seller_idinteger or null
service_idinteger
order_idinteger or null
amountmoney
interval_daysinteger
payment_countinteger
statusinteger1 active, 0 cancelled.
starts_attimestamp or null
renewed_attimestamp or null
created_attimestamp or null
{
    "data": [
        {
            "id": 1024,
            "buyer_id": 1024,
            "seller_id": 1024,
            "service_id": 1024,
            "order_id": 1024,
            "amount": {
                "amount": "12.50",
                "currency": "USD"
            },
            "interval_days": 1,
            "payment_count": 1,
            "status": 1,
            "starts_at": "2026-10-10T14:03:22Z",
            "renewed_at": "2026-10-10T14:03:22Z",
            "created_at": "2026-10-10T14:03:22Z"
        }
    ],
    "meta": {
        "limit": 1,
        "next_cursor": "string",
        "request_id": "9f2c4e1ab07d3351"
    }
}

Errors

GET /subscriptions/gateway

Older gateway-managed subscriptions

Scope: orders:read, or the broad read. Newest first, by id.

Parameters

NameWhereDescription
cursorquerymeta.next_cursor from the previous page. Up to 1024 characters.
limitqueryPage size. Above 100 is treated as 100. At least 1. Default 25.
rolequeryOne of buyer, seller. Default buyer.
statusqueryOne of 0, 1.
If-None-MatchheaderAn ETag from an earlier response.

Example request

curl "https://www.seoclerk.com/api/v1/subscriptions/gateway" \
  -H "Authorization: Bearer $SEOCLERKS_API_KEY"

Response 200

A page of these in data, with meta.limit and meta.next_cursor.

FieldTypeDescription
idinteger
activeboolean
last_payment_amountmoney
payment_attimestamp or null
{
    "data": [
        {
            "id": 1024,
            "active": true,
            "last_payment_amount": {
                "amount": "12.50",
                "currency": "USD"
            },
            "payment_at": "2026-10-10T14:03:22Z"
        }
    ],
    "meta": {
        "limit": 1,
        "next_cursor": "string",
        "request_id": "9f2c4e1ab07d3351"
    }
}

Errors

GET /subscriptions/gateway/{id}

An older gateway-managed subscription

Scope: orders:read, or the broad read.

Parameters

NameWhereDescription
id requiredpathAt least 1.
If-None-MatchheaderAn ETag from an earlier response.

Example request

curl "https://www.seoclerk.com/api/v1/subscriptions/gateway/1024" \
  -H "Authorization: Bearer $SEOCLERKS_API_KEY"

Response 200

FieldTypeDescription
idinteger
activeboolean
last_payment_amountmoney
payment_attimestamp or null
{
    "data": {
        "id": 1024,
        "active": true,
        "last_payment_amount": {
            "amount": "12.50",
            "currency": "USD"
        },
        "payment_at": "2026-10-10T14:03:22Z"
    },
    "meta": {
        "request_id": "9f2c4e1ab07d3351"
    }
}

Errors

GET /subscriptions/{id}

A subscription

Scope: orders:read, or the broad read. Its subscriber or its seller.

Parameters

NameWhereDescription
id requiredpathAt least 1.
If-None-MatchheaderAn ETag from an earlier response.

Example request

curl "https://www.seoclerk.com/api/v1/subscriptions/1024" \
  -H "Authorization: Bearer $SEOCLERKS_API_KEY"

Response 200

FieldTypeDescription
idinteger
buyer_idinteger
seller_idinteger or null
service_idinteger
order_idinteger or null
amountmoney
interval_daysinteger
payment_countinteger
statusinteger1 active, 0 cancelled.
starts_attimestamp or null
renewed_attimestamp or null
created_attimestamp or null
{
    "data": {
        "id": 1024,
        "buyer_id": 1024,
        "seller_id": 1024,
        "service_id": 1024,
        "order_id": 1024,
        "amount": {
            "amount": "12.50",
            "currency": "USD"
        },
        "interval_days": 1,
        "payment_count": 1,
        "status": 1,
        "starts_at": "2026-10-10T14:03:22Z",
        "renewed_at": "2026-10-10T14:03:22Z",
        "created_at": "2026-10-10T14:03:22Z"
    },
    "meta": {
        "request_id": "9f2c4e1ab07d3351"
    }
}

Errors

POST /subscriptions/{id}/cancel

Cancel a subscription

Scope: subscriptions:write, or the broad write. Its subscriber, or the seller of the service. Idempotency-Key is required.

Orders already placed are untouched. The other party is emailed.

Parameters

NameWhereDescription
id requiredpathAt least 1.
Idempotency-Key requiredheaderMakes a retry safe. Required on every POST. Must match ^[A-Za-z0-9_.-]{1,64}$.

Example request

curl -X POST "https://www.seoclerk.com/api/v1/subscriptions/1024/cancel" \
  -H "Authorization: Bearer $SEOCLERKS_API_KEY" \
  -H "Idempotency-Key: cancelsubscription-1"

Response 200

FieldTypeDescription
idinteger
statusintegerAlways 0.
cancelled_bystring
cancelled_attimestamp or null
{
    "data": {
        "id": 1024,
        "status": 1,
        "cancelled_by": "subscriber",
        "cancelled_at": "2026-10-10T14:03:22Z"
    },
    "meta": {
        "request_id": "9f2c4e1ab07d3351"
    }
}

Errors