Skip to content

authentic.network API documentation v2.4.0

Documentation for the REST api access of authentic.api


Producer

Create Hook

Back to top

This endpoint adds a hook to a producer entity. Producer is identified by transmitted token.

POST /api/v2/producers/hooks

Headers - Header

Name Type Description
content-type String

Request content type

an-api-key-owner String

API producer key

Parameters examples

json - Request-Example:

{
  "events": "itemScanned",
  "url": "https://wh-echo.dev.authentic.network/webhook-endpoint",
  "data": {
    "key": "value"
  }
}

Success response example

Success response example - Success-Response:

{ "id": hookid, "data": { hook data }}

Error response

Error response - Errors

Name Type Description
400

Bad Request - The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).

403

Forbidden - The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource or needing an account of some sort, or attempting a prohibited action (e.g. creating a duplicate record where only one is allowed). This code is also typically used if the request provided authentication via the an-api-token header field, but the server did not accept that authentication. The request should not be repeated.

404

NotFound - The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.

500

Internal server error - A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Delete Hook

Back to top

This endpoint delete an existing hook on a producer entity. Producer is identified by transmitted token.

DELETE /api/v2/producers/hooks/:idwebhook

Headers - Header

Name Type Description
content-type String

Request content type, musst set to application/json

an-api-token String

API token

Parameters - Parameter

Name Type Description
id String

The item id

idwebhook String

The hook id

Success response example

Success response example - Response:

HTTP/1.1 200 OK

Error response

Error response - Errors

Name Type Description
403

Forbidden - The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource or needing an account of some sort, or attempting a prohibited action (e.g. creating a duplicate record where only one is allowed). This code is also typically used if the request provided authentication via the an-api-token header field, but the server did not accept that authentication. The request should not be repeated.

404

NotFound - The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.

500

Internal server error - A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Get Hooks

Back to top

Get a list of configured hooks for given producer. Producer is identified by transmitted token.

GET /api/v2/producers/hooks

Headers - Header

Name Type Description
content-type String

Request content type, musst set to application/json

an-api-token String

API token

Success response example

Success response example - Success-Response:

{
  "id": "0001",
  "type": "item",
  "hooks": [
    {
      "id": "Fgs4kG0bORWyfiI71hkV",
      "data": {
        "_updated": 1592991983387,
        "url": "https://wh-echo.dev.authentic.network/webhook-endpoint",
        "_created": 1592991983387,
        "type": "httprequest",
        "events": "itemScanned",
        "executed": 0,
        "data": {
          "key": "value"
        }
      }
    }
  ]
}

Error response

Error response - Errors

Name Type Description
403

Forbidden - The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource or needing an account of some sort, or attempting a prohibited action (e.g. creating a duplicate record where only one is allowed). This code is also typically used if the request provided authentication via the an-api-token header field, but the server did not accept that authentication. The request should not be repeated.

404

NotFound - The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.

500

Internal server error - A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.