Bloq.it Ticketing API (1.0.0)

Download OpenAPI specification:

The Bloq.it Ticketing API lets partners open and follow support tickets for their Bloq.it lockers, and subscribe to webhooks that fire when those tickets change.

Each request is routed to the ticketing platform configured for your partner account (Freshservice or Odoo). The request and response shapes are the same for both.

Authentication

Send your partner API key in the x-api-key header on every request. Backoffice users can authenticate with a Authorization: Bearer <JWT> header instead.

Sending ticket payloads

Endpoints that accept file uploads read the JSON payload from a data field:

  • application/json: wrap the payload in a data object, e.g. { "data": { "subject": "..." } }.
  • multipart/form-data: send the payload as a JSON string in the data field and attach files under files (repeat the field for several files).

Receiving webhooks

Register a URL with Create a webhook and choose the events you want. When one of those events happens on one of your tickets, we POST a JSON payload to your URL. The payloads are listed under Webhook events in the sidebar.

Available events

Event Platform Sent when
ticket.created Freshservice A ticket is opened for one of your lockers
ticket.updated Freshservice A ticket changes status (including to resolved or closed)
ticket.commented Freshservice The support team replies publicly on a ticket
odoo.ticket.created Odoo A ticket is opened for one of your lockers
odoo.ticket.updated Odoo A ticket changes status (including to resolved or closed)
odoo.ticket.commented Odoo The support team replies publicly on a ticket
ticket.deleted Freshservice Not sent today
ticket.closed Freshservice Not sent today; use ticket.updated

Use these names in enabledEvents when you create a webhook.

  • One payload per event, no event name. The body does not say which event fired. If you subscribe to several events, register a separate URL (or a query string such as ?event=ticket.updated) for each one so you can tell them apart.
  • Pick your platform's events. ticket.* events fire for tickets on Freshservice and odoo.ticket.* events for tickets on Odoo. The payloads are the same.
  • Respond with any 2xx. Failed deliveries are not retried, so use Retrieve a ticket to catch up if your endpoint was down.

Webhook signatures

Every delivery carries two headers:

  • timestamp: milliseconds since epoch at signing time.
  • signature: an HS256 JWT signed with your webhook secret, whose payload is the string <timestamp>.<JSON body>.

Verify the JWT with your secret and check that its payload matches the request before trusting a delivery. For example, in Node.js:

const jwt = require('jsonwebtoken');

const signed = jwt.verify(req.headers.signature, WEBHOOK_SECRET, { algorithms: ['HS256'] });
const expected = `${req.headers.timestamp}.${JSON.stringify(req.body)}`;
if (signed !== expected) throw new Error('Invalid webhook signature');

Tickets

Create, read and update support tickets.

Create a ticket

Opens a ticket for one of your lockers. Identify the locker with either asset (Bloq.it bloq ID) or external_id (your own identifier for the locker). At least one is required.

If a matching ticket was recently resolved, it may be reopened instead of a new one being created; the response then has isReopen: true.

Authorizations:
ApiKeyBearerAuth
Request Body schema:
required
required
CreateTicketRequest (object) or CreateTicketRequest (object) (CreateTicketRequest)

Responses

Request samples

Content type
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "id": "101369",
  • "subject": "string",
  • "description": "string",
  • "status": "open",
  • "priority": "low",
  • "reason": "string",
  • "category": "string",
  • "subCategory": "string",
  • "files": [
    ],
  • "ccEmails": [
    ],
  • "bloqId": "string",
  • "bloqName": "string",
  • "partner": "string",
  • "isReopen": true,
  • "numberOfReports": 0,
  • "hasMaintenance": true,
  • "createdAt": "2019-08-24T14:15:22Z"
}

List tickets

Returns a page of your tickets, newest first. Results are capped at 10,000 tickets.

Authorizations:
ApiKeyBearerAuth
query Parameters
page
integer >= 1
Default: 1
limit
integer >= 1
Default: 50
reason
string

Filter by reporting reason.

category
string
subCategory
string
priority
string (Priority)
Enum: "low" "medium" "high" "urgent"
bloqId
string

Only tickets for this bloq.

createdFrom
string <date>

Only tickets created on or after this date (YYYY-MM-DD).

createdTo
string <date>

Only tickets created on or before this date (YYYY-MM-DD).

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "limit": 0,
  • "count": 0,
  • "nextPage": 0,
  • "tickets": [
    ]
}

Create a generic ticket

Opens a ticket that is not tied to a specific locker. Only available for partners on Freshservice. To link the ticket to a bloq anyway, set customFields.firmware_id.

Authorizations:
ApiKeyBearerAuth
Request Body schema:
required
required
object (CreateGenericTicketRequest)

Responses

Request samples

Content type
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "id": "101369",
  • "subject": "string",
  • "description": "string",
  • "status": "open",
  • "priority": "low",
  • "reason": "string",
  • "category": "string",
  • "subCategory": "string",
  • "files": [
    ],
  • "ccEmails": [
    ],
  • "bloqId": "string",
  • "bloqName": "string",
  • "partner": "string",
  • "isReopen": true,
  • "numberOfReports": 0,
  • "hasMaintenance": true,
  • "createdAt": "2019-08-24T14:15:22Z"
}

Retrieve a ticket

Authorizations:
ApiKeyBearerAuth
path Parameters
ticketId
required
string
Example: 101369

Responses

Response samples

Content type
application/json
{
  • "id": "101369",
  • "subject": "string",
  • "description": "string",
  • "status": "open",
  • "priority": "low",
  • "reason": "string",
  • "category": "string",
  • "subCategory": "string",
  • "files": [
    ],
  • "ccEmails": [
    ],
  • "bloqId": "string",
  • "bloqName": "string",
  • "partner": "string",
  • "isReopen": true,
  • "numberOfReports": 0,
  • "hasMaintenance": true,
  • "createdAt": "2019-08-24T14:15:22Z"
}

Update a ticket

Partners authenticating with an API key may only change status, and only to open, resolved or closed. Sending any other field returns 403 Field not allowed.

Authorizations:
ApiKeyBearerAuth
path Parameters
ticketId
required
string
Example: 101369
Request Body schema: application/json
required
status
string
Enum: "open" "pending" "resolved" "closed" "waiting_reply" "in_progress" "maintenance" "received_from_mx_fr" "maintenance_3rd_party" "follow_up" "pending_se"

API-key partners may only use open, resolved or closed.

subject
string
description
string
priority
string (Priority)
Enum: "low" "medium" "high" "urgent"
category
string
subCategory
string
object
tags
Array of strings

Responses

Request samples

Content type
application/json
{
  • "status": "resolved"
}

Response samples

Content type
application/json
{
  • "id": "101369",
  • "subject": "string",
  • "description": "string",
  • "status": "open",
  • "priority": "low",
  • "reason": "string",
  • "category": "string",
  • "subCategory": "string",
  • "files": [
    ],
  • "ccEmails": [
    ],
  • "bloqId": "string",
  • "bloqName": "string",
  • "partner": "string",
  • "isReopen": true,
  • "numberOfReports": 0,
  • "hasMaintenance": true,
  • "createdAt": "2019-08-24T14:15:22Z"
}

Add attachments to a ticket

Authorizations:
ApiKeyBearerAuth
path Parameters
ticketId
required
string
Example: 101369
Request Body schema: multipart/form-data
required
files
required
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "id": "101369",
  • "subject": "string",
  • "description": "string",
  • "status": "open",
  • "priority": "low",
  • "reason": "string",
  • "category": "string",
  • "subCategory": "string",
  • "files": [
    ],
  • "ccEmails": [
    ],
  • "bloqId": "string",
  • "bloqName": "string",
  • "partner": "string",
  • "isReopen": true,
  • "numberOfReports": 0,
  • "hasMaintenance": true,
  • "createdAt": "2019-08-24T14:15:22Z"
}

Comment on a ticket

Adds a public comment. Attachments are ignored for partners on Odoo.

Authorizations:
ApiKeyBearerAuth
path Parameters
ticketId
required
string
Example: 101369
Request Body schema:
required
required
object (CommentRequest)

Responses

Request samples

Content type
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "id": "101369",
  • "subject": "string",
  • "description": "string",
  • "status": "open",
  • "priority": "low",
  • "reason": "string",
  • "category": "string",
  • "subCategory": "string",
  • "files": [
    ],
  • "ccEmails": [
    ],
  • "bloqId": "string",
  • "bloqName": "string",
  • "partner": "string",
  • "isReopen": true,
  • "numberOfReports": 0,
  • "hasMaintenance": true,
  • "createdAt": "2019-08-24T14:15:22Z"
}

Webhooks

Manage webhook subscriptions for ticket events.

List webhooks

Authorizations:
ApiKeyBearerAuth
query Parameters
events
string
Example: events=ticket.updated,ticket.commented

Comma-separated list of events; returns webhooks subscribed to any of them.

q
string

Full-text search over webhook fields.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a webhook

url must be a public http or https URL; private and internal addresses are rejected.

Authorizations:
ApiKeyBearerAuth
Request Body schema: application/json
required
url
required
string <uri>
description
required
string
secret
required
string

Shared secret used to sign deliveries.

enabledEvents
required
Array of strings (WebhookEvent)
Items Enum: "ticket.created" "ticket.updated" "ticket.deleted" "ticket.closed" "ticket.commented" "odoo.ticket.created" "odoo.ticket.updated" "odoo.ticket.commented"

Responses

Request samples

Content type
application/json
{
  • "secret": "a-long-random-string",
  • "description": "Ticket updates for our ops dashboard",
  • "enabledEvents": [
    ]
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "secret": "string",
  • "enabledEvents": [
    ]
}

Retrieve a webhook

Authorizations:
ApiKeyBearerAuth
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "enabledEvents": [
    ]
}

Update a webhook

Authorizations:
ApiKeyBearerAuth
path Parameters
id
required
string
Request Body schema: application/json
required
url
string <uri>
description
string
secret
string

Shared secret used to sign deliveries.

enabledEvents
Array of strings (WebhookEvent)
Items Enum: "ticket.created" "ticket.updated" "ticket.deleted" "ticket.closed" "ticket.commented" "odoo.ticket.created" "odoo.ticket.updated" "odoo.ticket.commented"

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "secret": "string",
  • "enabledEvents": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "enabledEvents": [
    ]
}

Delete a webhook

Authorizations:
ApiKeyBearerAuth
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "enabledEvents": [
    ]
}

Webhook events

Payloads we send to your webhook URLs. See Receiving webhooks.

ticket.created Webhook

A ticket was opened for one of your lockers on Freshservice.

Authorizations:
ApiKeyBearerAuth
header Parameters
signature
required
string

HS256 JWT signed with your webhook secret. Its payload is the string <timestamp>.<JSON body>. See Webhook signatures.

timestamp
required
string
Example: 1758635880000

Milliseconds since epoch when the delivery was signed.

Request Body schema: application/json
required
ticketId
required
string or integer (WebhookTicketId)

ID of the ticket, as returned by Retrieve a ticket.

bloqId
required
string

Bloq.it bloq ID of the locker. Empty when the ticket has no locker.

status
required
string (WebhookTicketStatus)
Enum: "new" "open" "waiting_reply" "in_progress" "maintenance_done" "follow_up" "follow_up_required" "pending_se" "sla_exclusion" "resolved" "closed"

Ticket status at the time of the event.

required
Priority (string) or string

Usually one of the listed values; empty when not set.

subject
required
string
description
required
string

May contain HTML.

requester
required
string

Email of the person who reported the issue.

required
Array of Array of items or objects or strings (WebhookFile)

Responses

Request samples

Content type
application/json
{
  • "ticketId": "101369",
  • "bloqId": "6756bb4743a42cd090838fa2",
  • "status": "open",
  • "priority": "medium",
  • "subject": "door_does_not_open",
  • "description": "<p>Compartment 12 does not open.</p>",
  • "requester": "ops@example.com",
  • "files": [ ]
}

ticket.updated Webhook

A Freshservice ticket changed status.

Authorizations:
ApiKeyBearerAuth
header Parameters
signature
required
string

HS256 JWT signed with your webhook secret. Its payload is the string <timestamp>.<JSON body>. See Webhook signatures.

timestamp
required
string
Example: 1758635880000

Milliseconds since epoch when the delivery was signed.

Request Body schema: application/json
required
ticketId
required
string or integer (WebhookTicketId)

ID of the ticket, as returned by Retrieve a ticket.

bloqId
required
string

Bloq.it bloq ID of the locker. Empty when the ticket has no locker.

status
required
string (WebhookTicketStatus)
Enum: "new" "open" "waiting_reply" "in_progress" "maintenance_done" "follow_up" "follow_up_required" "pending_se" "sla_exclusion" "resolved" "closed"

Ticket status at the time of the event.

Responses

Request samples

Content type
application/json
{
  • "ticketId": "101369",
  • "bloqId": "6756bb4743a42cd090838fa2",
  • "status": "resolved"
}

ticket.commented Webhook

The support team replied publicly on a Freshservice ticket.

Authorizations:
ApiKeyBearerAuth
header Parameters
signature
required
string

HS256 JWT signed with your webhook secret. Its payload is the string <timestamp>.<JSON body>. See Webhook signatures.

timestamp
required
string
Example: 1758635880000

Milliseconds since epoch when the delivery was signed.

Request Body schema: application/json
required
ticketId
required
string or integer (WebhookTicketId)

ID of the ticket, as returned by Retrieve a ticket.

bloqId
required
string

Bloq.it bloq ID of the locker. Empty when the ticket has no locker.

comment
required
string

The reply text. May contain HTML.

email
required
string

Email of the person who wrote the reply. May be empty.

Array of Array of items or objects or strings (WebhookFile)

Attachments on the reply. Only present when the reply had files.

Responses

Request samples

Content type
application/json
{
  • "ticketId": "101369",
  • "bloqId": "6756bb4743a42cd090838fa2",
  • "comment": "A technician is on the way.",
  • "email": "support@bloq.it"
}

odoo.ticket.created Webhook

A ticket was opened for one of your lockers on Odoo.

Authorizations:
ApiKeyBearerAuth
header Parameters
signature
required
string

HS256 JWT signed with your webhook secret. Its payload is the string <timestamp>.<JSON body>. See Webhook signatures.

timestamp
required
string
Example: 1758635880000

Milliseconds since epoch when the delivery was signed.

Request Body schema: application/json
required
ticketId
required
string or integer (WebhookTicketId)

ID of the ticket, as returned by Retrieve a ticket.

bloqId
required
string

Bloq.it bloq ID of the locker. Empty when the ticket has no locker.

status
required
string (WebhookTicketStatus)
Enum: "new" "open" "waiting_reply" "in_progress" "maintenance_done" "follow_up" "follow_up_required" "pending_se" "sla_exclusion" "resolved" "closed"

Ticket status at the time of the event.

required
Priority (string) or string

Usually one of the listed values; empty when not set.

subject
required
string
description
required
string

May contain HTML.

requester
required
string

Email of the person who reported the issue.

required
Array of Array of items or objects or strings (WebhookFile)

Responses

Request samples

Content type
application/json
{
  • "ticketId": "101369",
  • "bloqId": "6756bb4743a42cd090838fa2",
  • "status": "open",
  • "priority": "medium",
  • "subject": "door_does_not_open",
  • "description": "<p>Compartment 12 does not open.</p>",
  • "requester": "ops@example.com",
  • "files": [ ]
}

odoo.ticket.updated Webhook

An Odoo ticket changed status.

Authorizations:
ApiKeyBearerAuth
header Parameters
signature
required
string

HS256 JWT signed with your webhook secret. Its payload is the string <timestamp>.<JSON body>. See Webhook signatures.

timestamp
required
string
Example: 1758635880000

Milliseconds since epoch when the delivery was signed.

Request Body schema: application/json
required
ticketId
required
string or integer (WebhookTicketId)

ID of the ticket, as returned by Retrieve a ticket.

bloqId
required
string

Bloq.it bloq ID of the locker. Empty when the ticket has no locker.

status
required
string (WebhookTicketStatus)
Enum: "new" "open" "waiting_reply" "in_progress" "maintenance_done" "follow_up" "follow_up_required" "pending_se" "sla_exclusion" "resolved" "closed"

Ticket status at the time of the event.

Responses

Request samples

Content type
application/json
{
  • "ticketId": "101369",
  • "bloqId": "6756bb4743a42cd090838fa2",
  • "status": "resolved"
}

odoo.ticket.commented Webhook

The support team replied publicly on an Odoo ticket.

Authorizations:
ApiKeyBearerAuth
header Parameters
signature
required
string

HS256 JWT signed with your webhook secret. Its payload is the string <timestamp>.<JSON body>. See Webhook signatures.

timestamp
required
string
Example: 1758635880000

Milliseconds since epoch when the delivery was signed.

Request Body schema: application/json
required
ticketId
required
string or integer (WebhookTicketId)

ID of the ticket, as returned by Retrieve a ticket.

bloqId
required
string

Bloq.it bloq ID of the locker. Empty when the ticket has no locker.

comment
required
string

The reply text. May contain HTML.

email
required
string

Email of the person who wrote the reply. May be empty.

Array of Array of items or objects or strings (WebhookFile)

Attachments on the reply. Only present when the reply had files.

Responses

Request samples

Content type
application/json
{
  • "ticketId": "101369",
  • "bloqId": "6756bb4743a42cd090838fa2",
  • "comment": "A technician is on the way.",
  • "email": "support@bloq.it"
}

Categories

Ticket categories and subcategories.

List categories

Authorizations:
ApiKeyBearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a category

Authorizations:
ApiKeyBearerAuth
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "name": "Locker",
  • "subCategories": [
    ]
}

Partner

Information about the authenticated partner.

Get your external ticketing portal

Returns the URL of the external support portal for your account, if you have one. externalUrl is null when there is no external portal.

Authorizations:
ApiKeyBearerAuth

Responses

Response samples

Content type
application/json
{}