Subscriptions
Subscriptions
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
Header parameters
Acceptstring · enumRequiredPossible values:
The client must specify an Accept header.
Responses
200
OK
application/vnd.api+json
401
Unauthorized
application/vnd.api+json
get/api/c1/subscriptions
GET /api/c1/subscriptions HTTP/1.1
Host: api.plock.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/vnd.api+json
{
"meta": {
"page": {
"currentPage": 1,
"from": 1,
"lastPage": 1,
"perPage": 1,
"to": 1,
"total": 1
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"first": "text",
"last": "text",
"next": "text"
},
"data": [
{
"type": "subscriptions",
"id": "2002",
"attributes": {
"accountId": "2002",
"crmDealId": "40048111",
"name": "My annual subscription",
"billingInterval": "month",
"billingIntervalName": "Monthly in arrears",
"billingPractice": "in_arrears",
"state": "Ended",
"billingIntervalCount": 12,
"isActive": true,
"billingCycleAnchor": "2026-01-01T00:00:00.000Z",
"renewalDate": "2025-06-30",
"renewalTerm": 12,
"cancelEndDate": "2025-05-30",
"cancelPeriod": 3,
"rebateEndDate": "2024-07-01",
"rebateAmount": 2000,
"rebateType": "percent",
"currency": "SEK",
"minimumCommitment": 2000,
"currentBillingPeriod": "2024-03-01 - 2024-03-31",
"autoSendToAccounting": true,
"endDate": "2024-07-01",
"signedAt": "2024-01-15",
"endDateNoticedAt": "2024-06-01",
"metaData": null,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"nextIndexationDate": "2026-01-01",
"indexationPercentage": "4.5",
"stats": {
"mrr_committed_fees": [
100.5,
200.3,
300.2
],
"mrr_usage_fees": [
0,
0,
0
],
"historical_cmrr": [
300.2,
300.2,
450
]
},
"projectedStats": {
"projected_mrr_committed_fees": [
300.2,
300.2,
300.2
],
"projected_cmrr": [
450,
450,
450
]
}
},
"relationships": {
"accounts": "text",
"invoices": "text",
"subscription-items": "text"
},
"links": {
"self": "text"
}
}
]
}Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
subscriptionIdintegerRequired
Plock subscription ID
Query parameters
Header parameters
Acceptstring · enumRequiredPossible values:
The client must specify an Accept header.
Responses
200
OK
application/vnd.api+json
401
Unauthorized
application/vnd.api+json
404
Not found
application/vnd.api+json
get/api/c1/subscriptions/{subscriptionId}
GET /api/c1/subscriptions/{subscriptionId} HTTP/1.1
Host: api.plock.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/vnd.api+json
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "text"
},
"data": {
"type": "subscriptions",
"id": "2002",
"attributes": {
"accountId": "2002",
"crmDealId": "40048111",
"name": "My annual subscription",
"billingInterval": "month",
"billingIntervalName": "Monthly in arrears",
"billingPractice": "in_arrears",
"state": "Ended",
"billingIntervalCount": 12,
"isActive": true,
"billingCycleAnchor": "2026-01-01T00:00:00.000Z",
"renewalDate": "2025-06-30",
"renewalTerm": 12,
"cancelEndDate": "2025-05-30",
"cancelPeriod": 3,
"rebateEndDate": "2024-07-01",
"rebateAmount": 2000,
"rebateType": "percent",
"currency": "SEK",
"minimumCommitment": 2000,
"currentBillingPeriod": "2024-03-01 - 2024-03-31",
"autoSendToAccounting": true,
"endDate": "2024-07-01",
"signedAt": "2024-01-15",
"endDateNoticedAt": "2024-06-01",
"metaData": null,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"nextIndexationDate": "2026-01-01",
"indexationPercentage": "4.5",
"stats": {
"mrr_committed_fees": [
100.5,
200.3,
300.2
],
"mrr_usage_fees": [
0,
0,
0
],
"historical_cmrr": [
300.2,
300.2,
450
]
},
"projectedStats": {
"projected_mrr_committed_fees": [
300.2,
300.2,
300.2
],
"projected_cmrr": [
450,
450,
450
]
}
},
"relationships": {
"accounts": "text",
"invoices": "text",
"subscription-items": "text"
},
"links": {
"self": "text"
}
}
}Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
subscriptionIdintegerRequired
Plock subscription ID
Query parameters
Header parameters
Acceptstring · enumRequiredPossible values:
The client must specify an Accept header.
Responses
200
OK
application/vnd.api+json
401
Unauthorized
application/vnd.api+json
404
Not found
application/vnd.api+json
get/api/c1/subscriptions/{subscriptionId}/subscription-items
GET /api/c1/subscriptions/{subscriptionId}/subscription-items HTTP/1.1
Host: api.plock.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/vnd.api+json
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "text"
},
"data": [
{
"type": "subscription-items",
"id": "2002",
"attributes": {
"subscriptionId": "1001",
"planName": "Annual price",
"productName": "Send SMS",
"quantity": 100,
"rebateAmount": 10,
"rebateType": "percent",
"description": "Custom line item description",
"costCenter": "CC-001",
"project": "Project Alpha",
"contractedUsage": 1000,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"relationships": {
"subscriptions": "text"
},
"links": {
"self": "text"
}
}
]
}Last updated