Webhook API

Manage outgoing webhook messages — retrieve and manage the status of integration event notifications

Base URL

https://{tenant}.logzi.com/api/integration_webhook/

Every request returns a JSON response. On success result.code == 1, on error result.code == 0. Webhook entries store the event notifications to be sent to the integration (e.g. new order, invoice issued). The sended field indicates whether the webhook has already been sent.

GET /api/integration_webhook/get

Retrieve a single webhook entry by identifier.

Query parameters

ParameterTypeRequiredDescription
idintWebhook entry identifier

Example request

GET /api/integration_webhook/get?id=200
X-API-KEY: {your_api_key}
GET /api/integration_webhook/list

Retrieve a paginated list of webhook entries.

Query parameters

ParameterTypeRequiredDescription
list_offsetintPagination offset (default: 0)
list_conditionobjectFilter criteria object

Example request

GET /api/integration_webhook/list?list_offset=0
X-API-KEY: {your_api_key}
POST /api/integration_webhook/save

Create or modify a webhook entry. On update, only the sended field can be updated. For a new entry use data[id] = 0.

POST fields — data object

FieldTypeRequiredDescription
idint0 = new entry, >0 = update (sended update)
integration_idintIntegration identifier
integration_webhook_type_idintWebhook event type
receipt_idintRelated document identifier
receipt_type_idintDocument type
product_idintRelated product identifier
requeststringContent of the request sent (JSON)
request_urlstringRequest URL
responsestringContent of the response received
sendedint1 = sent (on update)

Example request

POST /api/integration_webhook/save
X-API-KEY: {your_api_key}
Content-Type: application/json

{
  "data": {
    "id": 0,
    "integration_id": 1,
    "integration_webhook_type_id": 3,
    "receipt_id": 150,
    "receipt_type_id": 2
  }
}
POST /api/integration_webhook/delete

Delete a webhook entry by identifier.

POST fields — data object

FieldTypeRequiredDescription
idintIdentifier of the webhook to delete

Example request

POST /api/integration_webhook/delete
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "id": 200 } }
POST /api/integration_webhook/close

Close a webhook entry — mark it as sent and record the response data.

POST fields — data object

FieldTypeRequiredDescription
idintIdentifier of the webhook to close
responsestringContent of the response received
response_http_codestringHTTP status code

Example request

POST /api/integration_webhook/close
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "id": 200, "response_http_code": "200" } }

Get in touch with us

Interested in our software? Feel free to write to us!

Need help?

If you can't find the answer and need assistance

Create your account now,
pay later!

Try it free for 3 days, no risk, no obligation!