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-06-26T07:35:49.748Z",
"updatedAt": "2025-06-26T07:35:49.748Z",
"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-06-26T07:35:49.748Z",
"updatedAt": "2025-06-26T07:35:49.748Z",
"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-06-26T07:35:49.748Z",
"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-06-26T07:35:49.748Z",
"updatedAt": "2025-06-26T07:35:49.748Z"
},
"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-06-26T07:35:49.748Z",
"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-06-26T07:35:49.748Z",
"updatedAt": "2025-06-26T07:35:49.748Z"
},
"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/subscription-items 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": {
"planName": "Annual price",
"productName": "Send SMS",
"quantity": 100,
"rebateAmount": 10,
"rebateType": "percent",
"rebateEndDate": "2025-06-26T07:35:49.748Z",
"createdAt": "2025-06-26T07:35:49.748Z",
"updatedAt": "2025-06-26T07:35:49.748Z"
},
"relationships": {
"subscriptions": "text"
},
"links": {
"self": "text"
}
}
]
}
Authorizations
Path parameters
subscriptionItemIdintegerRequired
Plock subscription item 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/subscription-items/{subscriptionItemId} 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": {
"planName": "Annual price",
"productName": "Send SMS",
"quantity": 100,
"rebateAmount": 10,
"rebateType": "percent",
"rebateEndDate": "2025-06-26T07:35:49.748Z",
"createdAt": "2025-06-26T07:35:49.748Z",
"updatedAt": "2025-06-26T07:35:49.748Z"
},
"relationships": {
"subscriptions": "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-06-26",
"periodEnd": "2025-06-26",
"createdAt": "2025-06-26T07:35:49.748Z",
"updatedAt": "2025-06-26T07:35:49.748Z",
"dueAt": "2025-06-26T07:35:49.748Z",
"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-06-26",
"periodEnd": "2025-06-26",
"createdAt": "2025-06-26T07:35:49.748Z",
"updatedAt": "2025-06-26T07:35:49.748Z",
"dueAt": "2025-06-26T07:35:49.748Z",
"paymentStatus": "Paid",
"parentInvoiceId": 1001,
"isParent": false
},
"relationships": {
"subscriptions": "text",
"accounts": "text"
},
"links": {
"self": "text"
}
}
}
Authorizations
Path parameters
tsintegerRequired
UNIX timestamp of value
valuefloatRequired
Value recorded at ts
crm_idstringRequired
CRM ID of the account
product_idintegerRequired
Product ID for the product
Responses
200
OK
application/json
401
Unauthorized
application/json
404
Not found
application/json
post
POST /api/c1/product-usage HTTP/1.1
Host: api.plock.io
Authorization: Bearer JWT
Accept: */*
{
"success": true
}
Last updated