Endpoints
Browse endpoints available
Authorizations
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
GET /api/c1/accounts HTTP/1.1
Host: api.plock.io
Authorization: Bearer JWT
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": "accounts",
"id": "2002",
"attributes": {
"primaryKey": "a443322",
"name": "Some Company AB",
"orgNumber": "554433-3344",
"crmId": "hs321",
"erpId": "fn432",
"country": "Sweden",
"parentAccountId": 1,
"createdAt": "2025-09-09T07:51:55.928Z",
"updatedAt": "2025-09-09T07:51:55.928Z",
"isGroup": true,
"belongsToGroup": true,
"isArchived": true,
"stats": {
"mrr_committed_fees": [
100.5,
200.3,
300.2
],
"mrr_usage_fees": [
0,
0,
0
],
"mrr_one_time_fees": [
0,
0,
200
],
"billings_committed_fees": [
0,
0,
601
],
"billings_usage_fees": [
0,
0,
0
],
"billings_one_time_fees": [
0,
0,
200
]
}
},
"relationships": {
"subscriptions": "text",
"invoices": "text"
},
"links": {
"self": "text"
}
}
]
}
Authorizations
Path parameters
accountIdintegerRequired
Plock account 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
GET /api/c1/accounts/{accountId} HTTP/1.1
Host: api.plock.io
Authorization: Bearer JWT
Accept: application/vnd.api+json
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "text"
},
"data": {
"type": "accounts",
"id": "2002",
"attributes": {
"primaryKey": "a443322",
"name": "Some Company AB",
"orgNumber": "554433-3344",
"crmId": "hs321",
"erpId": "fn432",
"country": "Sweden",
"parentAccountId": 1,
"createdAt": "2025-09-09T07:51:55.928Z",
"updatedAt": "2025-09-09T07:51:55.928Z",
"isGroup": true,
"belongsToGroup": true,
"isArchived": true,
"stats": {
"mrr_committed_fees": [
100.5,
200.3,
300.2
],
"mrr_usage_fees": [
0,
0,
0
],
"mrr_one_time_fees": [
0,
0,
200
],
"billings_committed_fees": [
0,
0,
601
],
"billings_usage_fees": [
0,
0,
0
],
"billings_one_time_fees": [
0,
0,
200
]
}
},
"relationships": {
"subscriptions": "text",
"invoices": "text"
},
"links": {
"self": "text"
}
}
}
Authorizations
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
GET /api/c1/subscriptions HTTP/1.1
Host: api.plock.io
Authorization: Bearer JWT
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",
"name": "My annual subscription",
"billingInterval": "month",
"billingIntervalName": "Monthly in arrears",
"billingPractice": "in_arrears",
"state": "Ended",
"billingIntervalCount": 12,
"isActive": true,
"billingCycleAnchor": "2025-09-09T07:51:55.928Z",
"renewalDate": "2025-06-30",
"cancelEndDate": "2025-05-30",
"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",
"createdAt": "2025-09-09T07:51:55.928Z",
"updatedAt": "2025-09-09T07:51:55.928Z"
},
"relationships": {
"accounts": "text",
"invoices": "text",
"subscription-items": "text"
},
"links": {
"self": "text"
}
}
]
}
Authorizations
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
GET /api/c1/subscriptions/{subscriptionId} HTTP/1.1
Host: api.plock.io
Authorization: Bearer JWT
Accept: application/vnd.api+json
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "text"
},
"data": {
"type": "subscriptions",
"id": "2002",
"attributes": {
"accountId": "2002",
"name": "My annual subscription",
"billingInterval": "month",
"billingIntervalName": "Monthly in arrears",
"billingPractice": "in_arrears",
"state": "Ended",
"billingIntervalCount": 12,
"isActive": true,
"billingCycleAnchor": "2025-09-09T07:51:55.928Z",
"renewalDate": "2025-06-30",
"cancelEndDate": "2025-05-30",
"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",
"createdAt": "2025-09-09T07:51:55.928Z",
"updatedAt": "2025-09-09T07:51:55.928Z"
},
"relationships": {
"accounts": "text",
"invoices": "text",
"subscription-items": "text"
},
"links": {
"self": "text"
}
}
}
Authorizations
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
GET /api/c1/invoices HTTP/1.1
Host: api.plock.io
Authorization: Bearer JWT
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": "invoices",
"id": "2002",
"attributes": {
"amount": "1000.00",
"accountId": "5001",
"erpId": "fn123",
"subscriptionId": "4342",
"currency": "EUR",
"invoiceType": "In arrears",
"periodStart": "2025-09-09",
"periodEnd": "2025-09-09",
"createdAt": "2025-09-09T07:51:55.928Z",
"updatedAt": "2025-09-09T07:51:55.928Z",
"dueAt": "2025-09-09T07:51:55.928Z",
"paymentStatus": "Paid",
"parentInvoiceId": 1001,
"isParent": false
},
"relationships": {
"subscriptions": "text",
"accounts": "text"
},
"links": {
"self": "text"
}
}
]
}
Authorizations
Path parameters
invoiceIdintegerRequired
Plock invoice 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
GET /api/c1/invoices/{invoiceId} HTTP/1.1
Host: api.plock.io
Authorization: Bearer JWT
Accept: application/vnd.api+json
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "text"
},
"data": {
"type": "invoices",
"id": "2002",
"attributes": {
"amount": "1000.00",
"accountId": "5001",
"erpId": "fn123",
"subscriptionId": "4342",
"currency": "EUR",
"invoiceType": "In arrears",
"periodStart": "2025-09-09",
"periodEnd": "2025-09-09",
"createdAt": "2025-09-09T07:51:55.928Z",
"updatedAt": "2025-09-09T07:51:55.928Z",
"dueAt": "2025-09-09T07:51:55.928Z",
"paymentStatus": "Paid",
"parentInvoiceId": 1001,
"isParent": false
},
"relationships": {
"subscriptions": "text",
"accounts": "text"
},
"links": {
"self": "text"
}
}
}
Authorizations
Header parameters
Acceptstring Β· enumRequiredPossible values:
The client must specify an Accept header.
Content-Typestring Β· enumRequiredPossible values:
The client must specify a Content-Type header.
Body
tsintegerOptionalExample:
UNIX timestamp of value
1756582856
valuenumber Β· floatOptionalExample:
Value recorded at ts
10.5
crm_idstringOptionalExample:
CRM ID of the account
xx123
product_idintegerOptionalExample:
Product ID for the product
332
Responses
200
OK
application/json
401
Unauthorized
application/json
404
Not found
application/json
422
Unprocessable content
application/json
post
POST /api/c1/product-usage HTTP/1.1
Host: api.plock.io
Authorization: Bearer JWT
Accept: application/json
Content-Type: application/json
Content-Length: 64
{
"ts": 1756582856,
"value": 10.5,
"crm_id": "xx123",
"product_id": 332
}
{
"success": true
}
Last updated