Ankorstore Webhooks API

ℹ️ This section describes the API endpoints which can be used for managing webhook subscriptions. ## 💡 Overview In order to be able to manage Webhook Subscriptions via API you should understand the relationship model around webhook notifications system. In general, a Webhook Subscription always contains a list of chosen events and always belongs to an application. More on this later. ### Application Application is a representation of a single private integration. Whenever you create a new set of credentials for accessing API in your account, under the hood you create an Application entity. Once created, the entity allows you to attach as many Webhook Subscriptions as needed. It means, there's no way to manage Webhook Subscriptions outside of Application context and this restriction is also reflected in the current API architecture. ### Webhook Subscription Webhook Subscription is an entity representing "an intent of receiving HTTP requests to the specified URL whenever one of the chosen Webhook Subscription Events is triggered on the platform". For every new URL you should create a separate Webhook Subscription. ### Webhook Subscription Events Webhook Subscription Event is a name of the corresponding event fired on certain conditions on the platform. There are a list of only valid and supported events which can be used in the Webhook Subscription management. You can fetch this list using a corresponding [endpoint](#tag/Webhooks/operation/get-available-webhook-events) ## 💡 How to create a new webhook subscription? ### 1. Find ApplicationID As it was mentioned above, Webhook Subscription always belong to some application. Hence, you should start from finding out the ID of the target Application in order to link the new Webhook Subscription to it. For this purpose you should use [List Applications](#tag/Applications/operation/list-applications) endpoint. This endpoint returns a list of all available Applications in your account, so you could identify the needed one by `name`, `developerEmail` or `clientId` in the Application resource body: `GET https://ankorstore.com/api/v1/applications` ```json { "data": { "id": "43efbfbd-bfbd-1eef-1e6a-6200efbfbdef", "type": "application", "attributes": { "name": "My Application", "developerEmail": "dev@acme.com", "clientId": "k322k7frs87e8w7hri3jkke7ry7", "clientSecret": null } } } ``` **NOTE**: The client secret in the response is always `null` due to security reasons. The actual client secret can be seen only via UI and only once - during the creation of the application. ### 2. Find valid webhook events to subscribe to Next step should be to find the valid names of the webhook events which you could use in the create webhook request payload: `GET https://ankorstore.com/api/v1/webhook-subscriptions/events` ```json { "data": [ { "type": "webhook-subscriptions/events", "id": "order.brand_created" }, { "type": "webhook-subscriptions/events", "id": "order.brand_accepted" } ] } ``` You can find detailed description of each event in the [dedicated section](#tag/Webhook-Subscription) of the docs. ### 3. Create webhook subscription Now you are all set for creating actual webhook subscription. The prerequisites for this step are: - The Application ID from step 1 (`43efbfbd-bfbd-1eef-1e6a-6200efbfbdef` in this example) - The chosen events from step 2 (e.g. `order.brand_created` and `order.brand_accepted`) With this setup the final request should look like: `POST https://ankorstore.com/api/v1/webhook-subscriptions` ```json { "data": { "type": "webhook-subscriptions", "attributes": { "url": "https://my-app.com/webhook-listener", "events": [ "order.brand_created", "order.brand_accepted" ] }, "relationships": { "application": { "data": { "type": "applications", "id": "43efbfbd-bfbd-1eef-1e6a-6200efbfbdef" } } } } } ``` After this request is succeeded, you will start receiving notification about chosen events on the chosen URL. ## 💡 How to manage existing Webhook Subscriptions? For most of the operations with an existing Webhook Subscription you need to fetch its ID first. It can be achieved by using [List Applications](#tag/Applications/operation/list-applications) endpoint and explicit including the Webhook Subscription resource into the response. `GET /api/v1/applications?include=webhookSubscriptions` ```json { "data": { "id": "`43efbfbd-bfbd-1eef-1e6a-6200efbfbdef", "type": "applications", "attributes": {}, "relationships": { "webhookSubscriptions": { "data": [ { "type": "webhook-subscriptions", "id": "a863e15d-3d20-4af2-b92b-d9590a4a9606" } ] } } }, "includes": [ { "type": "webhook-subscriptions", "id": "a863e15d-3d20-4af2-b92b-d9590a4a9606", "attributes": { "url": "https://my-app.com/webhook-listener", "events": [ "order.brand_created", "order.brand_accepted" ], "signingSecret": "LQxZs6kiSyNr45hjT32OsntYddzH4BvToLIQcgSL" } } ] } ``` The data in this response gives you an idea about the current Webhook Subscription state and also lets you update or delete Webhook Subscriptions, whenever needed. For updating or deleting Webhook Subscription you need to use the Webhook Subscription ID received in the response (`a863e15d-3d20-4af2-b92b-d9590a4a9606` in this particular case). Please refer to the [Update webhook subscription](#tag/Webhooks/operation/update-application-webhook-subscription) and [Delete webhook subscription](#tag/Webhooks/operation/delete-application-webhook-subscription) endpoints for detailed information.

OpenAPI Specification

ankorstore-webhooks-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: 1.2.2-oas3.1
  title: Ankorstore Stock Tracking and Logistics Applications Webhooks API
  summary: API specification for the Ankorstore Stock Tracking and Logistics system
  description: Ankorstore Stock Tracking and Logistics (ASTRAL) API specification
  contact:
    name: Ankorstore
    url: https://www.ankorstore.com
    email: api@ankorstore.com
  license:
    url: https://creativecommons.org/publicdomain/zero/1.0/
    name: CC0 1.0 Universal
servers:
- url: http://www.ankorlocal.com:8000
  description: Local Development Server
- url: https://www.preprod.ankorstore.com
  description: Staging Environment
- url: https://www.ankorstore.com
  description: Prod Environment
tags:
- name: Webhooks
  description: "ℹ️ This section describes the API endpoints which can be used for managing webhook subscriptions.\n\n## \U0001F4A1 Overview\nIn order to be able to manage Webhook Subscriptions via API you should understand the relationship model\naround webhook notifications system. In general, a Webhook Subscription always contains a list of chosen events\nand always belongs to an application. More on this later.\n\n### Application\nApplication is a representation of a single private integration. Whenever you create a new set of credentials for\naccessing API in your account, under the hood you create an Application entity. Once created, the entity allows you\nto attach as many Webhook Subscriptions as needed. It means, there's no way to manage Webhook Subscriptions outside of\nApplication context and this restriction is also reflected in the current API architecture.\n\n### Webhook Subscription\nWebhook Subscription is an entity representing \"an intent of receiving HTTP requests to the specified URL whenever\none of the chosen Webhook Subscription Events is triggered on the platform\". For every new URL you should create a\nseparate Webhook Subscription.\n\n### Webhook Subscription Events\nWebhook Subscription Event is a name of the corresponding event fired on certain conditions on the platform. There are\na list of only valid and supported events which can be used in the Webhook Subscription management. You can fetch this\nlist using a corresponding [endpoint](#tag/Webhooks/operation/get-available-webhook-events)\n\n## \U0001F4A1 How to create a new webhook subscription?\n\n### 1. Find ApplicationID\nAs it was mentioned above, Webhook Subscription always belong to some application. Hence, you should start from\nfinding out the ID of the target Application in order to link the new Webhook Subscription to it. For this purpose\nyou should use [List Applications](#tag/Applications/operation/list-applications) endpoint. This endpoint returns\na list of all available Applications in your account, so you could identify the needed one by `name`, `developerEmail`\nor `clientId` in the Application resource body:\n\n`GET https://ankorstore.com/api/v1/applications`\n```json\n{\n  \"data\": {\n    \"id\": \"43efbfbd-bfbd-1eef-1e6a-6200efbfbdef\",\n    \"type\": \"application\",\n    \"attributes\": {\n      \"name\": \"My Application\",\n      \"developerEmail\": \"dev@acme.com\",\n      \"clientId\": \"k322k7frs87e8w7hri3jkke7ry7\",\n      \"clientSecret\": null\n    }\n  }\n}\n```\n**NOTE**: The client secret in the response is always `null` due to security reasons. The actual client secret\ncan be seen only via UI and only once - during the creation of the application.\n\n### 2. Find valid webhook events to subscribe to\nNext step should be to find the valid names of the webhook events which you could use in the create webhook request\npayload:\n\n`GET https://ankorstore.com/api/v1/webhook-subscriptions/events`\n```json\n{\n  \"data\": [\n    {\n      \"type\": \"webhook-subscriptions/events\",\n      \"id\": \"order.brand_created\"\n    },\n    {\n      \"type\": \"webhook-subscriptions/events\",\n      \"id\": \"order.brand_accepted\"\n    }\n  ]\n}\n```\nYou can find detailed description of each event in the [dedicated section](#tag/Webhook-Subscription) of the docs.\n\n### 3. Create webhook subscription\nNow you are all set for creating actual webhook subscription. The prerequisites for this step are:\n- The Application ID from step 1 (`43efbfbd-bfbd-1eef-1e6a-6200efbfbdef` in this example)\n- The chosen events from step 2 (e.g. `order.brand_created` and `order.brand_accepted`)\nWith this setup the final request should look like:\n\n`POST https://ankorstore.com/api/v1/webhook-subscriptions`\n```json\n{\n  \"data\": {\n    \"type\": \"webhook-subscriptions\",\n    \"attributes\": {\n      \"url\": \"https://my-app.com/webhook-listener\",\n      \"events\": [\n        \"order.brand_created\",\n        \"order.brand_accepted\"\n      ]\n    },\n    \"relationships\": {\n      \"application\": {\n        \"data\": {\n          \"type\": \"applications\",\n          \"id\": \"43efbfbd-bfbd-1eef-1e6a-6200efbfbdef\"\n        }\n      }\n    }\n  }\n}\n```\nAfter this request is succeeded, you will start receiving notification about chosen events on the chosen URL.\n\n## \U0001F4A1 How to manage existing Webhook Subscriptions?\nFor most of the operations with an existing Webhook Subscription you need to fetch its ID first. It can be achieved by\nusing [List Applications](#tag/Applications/operation/list-applications) endpoint and explicit including\nthe Webhook Subscription resource into the response.\n\n`GET /api/v1/applications?include=webhookSubscriptions`\n```json\n{\n  \"data\": {\n    \"id\": \"`43efbfbd-bfbd-1eef-1e6a-6200efbfbdef\",\n    \"type\": \"applications\",\n    \"attributes\": {},\n    \"relationships\": {\n      \"webhookSubscriptions\": {\n        \"data\": [\n          {\n            \"type\": \"webhook-subscriptions\",\n            \"id\": \"a863e15d-3d20-4af2-b92b-d9590a4a9606\"\n          }\n        ]\n      }\n    }\n  },\n  \"includes\": [\n    {\n      \"type\": \"webhook-subscriptions\",\n      \"id\": \"a863e15d-3d20-4af2-b92b-d9590a4a9606\",\n      \"attributes\": {\n        \"url\": \"https://my-app.com/webhook-listener\",\n        \"events\": [\n          \"order.brand_created\",\n          \"order.brand_accepted\"\n        ],\n        \"signingSecret\": \"LQxZs6kiSyNr45hjT32OsntYddzH4BvToLIQcgSL\"\n      }\n    }\n  ]\n}\n```\n\nThe data in this response gives you an idea about the current Webhook Subscription state and also lets you update\nor delete Webhook Subscriptions, whenever needed. For updating or deleting Webhook Subscription you need to use the\nWebhook Subscription ID received in the response (`a863e15d-3d20-4af2-b92b-d9590a4a9606` in this particular case). Please\nrefer to the [Update webhook subscription](#tag/Webhooks/operation/update-application-webhook-subscription)\nand [Delete webhook subscription](#tag/Webhooks/operation/delete-application-webhook-subscription) endpoints\nfor detailed information.\n"
paths:
  /api/v1/applications:
    get:
      summary: List Applications
      operationId: list-applications
      responses:
        '200':
          description: Collection of application resources
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    title: ApplicationResource
                    type: object
                    example:
                      id: 43efbfbd-bfbd-1eef-1e6a-6200efbfbdef
                      type: application
                      attributes:
                        name: My sandbox
                        developerEmail: dev@my-app.com
                        clientId: k322k7frs87e8w7hri3jkke7ry7
                        clientSecret: null
                    properties:
                      type:
                        type: string
                        const: application
                      id:
                        type: string
                        description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
                        format: uuid
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                            description: Application given name
                          developerEmail:
                            type: string
                            description: Email of the developer to contact
                            format: email
                            example: developer@application.com
                          clientId:
                            type: string
                            description: Client ID generated for this application
                            readOnly: true
                          clientSecret:
                            type:
                            - 'null'
                            description: Secret to be used for access token issuance. Can be invoked only once on application creation
                        required:
                        - name
                        - developerEmail
                        - clientId
                        - clientSecret
                      relationships:
                        type: object
                        description: Only presented if asked explicitly in the request
                        properties:
                          webhookSubscriptions:
                            type: object
                            properties:
                              data:
                                description: An array of objects each containing `type` and `id` members for to-many relationships.
                                type: array
                                items:
                                  description: Resource identification present in Resource Objects and Resource Identifier Objects.
                                  type: object
                                  required:
                                  - id
                                  - type
                                  properties:
                                    id:
                                      type: string
                                      description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
                                      format: uuid
                                    type:
                                      type: string
                                      description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
                                    meta:
                                      description: Non-standard meta-information that can not be represented as an attribute or relationship.
                                      type: object
                                      additionalProperties: true
                                  additionalProperties: false
                                uniqueItems: true
                    required:
                    - id
                    - type
                    - attributes
                  included:
                    type: array
                    items:
                      anyOf:
                      - title: ApplicationWebhookSubscriptionResource
                        type: object
                        description: Application webhook subscription resource
                        properties:
                          type:
                            type: string
                            default: webhook-subscriptions
                          id:
                            type: string
                            description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
                            format: uuid
                          attributes:
                            type: object
                            properties:
                              webhookUrl:
                                type: string
                                description: URL of the service where webhook request will be sent when one of the events from the list occurs
                                format: uri
                                example: https://my.app/webhook/listener
                              events:
                                type: array
                                description: 'List of subscribed event types:

                                  - `order.brand_created` — A new order has been created and is pending brand confirmation

                                  - `order.brand_accepted` — The brand has accepted the order

                                  - `order.brand_rejected` — The brand has rejected the order

                                  - `order.shipping_labels_generated` — Shipping labels have been generated for the order

                                  - `order.shipped` — The order has been shipped

                                  - `order.shipment_received` — The retailer has confirmed receipt of the order

                                  - `order.shipment_refused` — The retailer has refused the shipment

                                  - `order.brand_paid` — Payment has been transferred to the brand

                                  - `order.cancelled` — The order has been cancelled

                                  '
                                uniqueItems: true
                                items:
                                  type: string
                                  enum:
                                  - order.brand_created
                                  - order.brand_accepted
                                  - order.brand_rejected
                                  - order.shipping_labels_generated
                                  - order.shipped
                                  - order.shipment_received
                                  - order.shipment_refused
                                  - order.brand_paid
                                  - order.cancelled
                              signingSecret:
                                type: string
                            required:
                            - webhookUrl
                            - events
                            - signingSecret
                        required:
                        - id
                        - type
                        - attributes
                  jsonapi:
                    description: An object describing the server's implementation
                    type: object
                    properties: &id001
                      version:
                        type: string
                      meta:
                        description: Non-standard meta-information that can not be represented as an attribute or relationship.
                        type: object
                        additionalProperties: true
                    additionalProperties: false
                required:
                - data
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: &id002
                  errors:
                    type: array
                    uniqueItems: true
                    items:
                      type: object
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value.
                          type: string
                        detail:
                          description: A human-readable explanation specific to this occurrence of the problem.
                          type: string
                        status:
                          description: The HTTP status code applicable to this problem, expressed as a string value.
                          type: string
                        title:
                          description: The HTTP status code description applicable to this problem
                          type: string
                        source:
                          type: object
                          description: Optional object pointing towards the problematic field
                          properties:
                            pointer:
                              type: string
                              description: The field key
                        meta:
                          description: Non-standard meta-information that can not be represented as an attribute or relationship.
                          type: object
                          additionalProperties: true
                      additionalProperties: false
                  jsonapi:
                    description: An object describing the server's implementation
                    type: object
                    properties: *id001
                    additionalProperties: false
                required: &id003
                - errors
              example:
                jsonapi:
                  version: '1.0'
                errors:
                - detail: Unauthorized
                  status: '401'
        '403':
          description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: *id002
                required: *id003
              example:
                jsonapi:
                  version: '1.0'
                errors:
                - detail: Forbidden
                  status: '403'
        '406':
          description: Not Acceptable
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: *id002
                required: *id003
              example:
                jsonapi:
                  version: '1.0'
                errors:
                - detail: Not Acceptable
                  status: '406'
        '415':
          description: Unsupported Media Type
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: *id002
                required: *id003
              example:
                jsonapi:
                  version: '1.0'
                errors:
                - detail: Unsupported Media Type
                  status: '415'
        '500':
          description: '[Server Error](https://jsonapi.org/format/#errors)'
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: *id002
                required: *id003
              example:
                jsonapi:
                  version: '1.0'
                errors:
                - detail: Server Error
                  status: '500'
      description: List existing application for the current authenticated user
      parameters:
      - schema:
          type: string
        in: header
        name: Accept
        description: application/vnd.api+json
      - schema:
          type: string
          enum:
          - webhookSubscriptions
        name: include
        in: query
        description: 'A comma-separated list of resources to include (e.g: webhookSubscriptions)'
      tags:
      - Webhooks
  /api/v1/webhook-subscriptions/events:
    get:
      summary: List Webhook Subscription Events
      operationId: get-available-webhook-events
      description: Returns a list of webhook events available in the system
      tags:
      - Webhooks
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                      - id
                      - type
                      properties:
                        type:
                          type: string
                          default: webhook-events
                        id:
                          type: string
                          description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
                          format: uuid
              examples:
                example:
                  value:
                    data:
                    - type: order.brand_created
                      id: 1ef27156-618d-6b1e-996c-0ef14cd127ec
                    - type: order.brand_accepted
                      id: 1ef27156-618d-6b1e-996c-0ef14cd127ec
                    - type: order.shipping_labels_generated
                      id: 1ef27156-618d-6b1e-996c-0ef14cd127ec
                    - type: order.shipped
                      id: 1ef27156-618d-6b1e-996c-0ef14cd127ec
                    - type: order.shipment_received
                      id: 1ef27156-618d-6b1e-996c-0ef14cd127ec
                    - type: order.shipment_refused
                      id: 1ef27156-618d-6b1e-996c-0ef14cd127ec
                    - type: order.brand_paid
                      id: 1ef27156-618d-6b1e-996c-0ef14cd127ec
                    - type: order.cancelled
                      id: 1ef27156-618d-6b1e-996c-0ef14cd127ec
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: &id004
                  errors:
                    type: array
                    uniqueItems: true
                    items:
                      type: object
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value.
                          type: string
                        detail:
                          description: A human-readable explanation specific to this occurrence of the problem.
                          type: string
                        status:
                          description: The HTTP status code applicable to this problem, expressed as a string value.
                          type: string
                        title:
                          description: The HTTP status code description applicable to this problem
                          type: string
                        source:
                          type: object
                          description: Optional object pointing towards the problematic field
                          properties:
                            pointer:
                              type: string
                              description: The field key
                        meta:
                          description: Non-standard meta-information that can not be represented as an attribute or relationship.
                          type: object
                          additionalProperties: true
                      additionalProperties: false
                  jsonapi:
                    description: An object describing the server's implementation
                    type: object
                    properties:
                      version:
                        type: string
                      meta:
                        description: Non-standard meta-information that can not be represented as an attribute or relationship.
                        type: object
                        additionalProperties: true
                    additionalProperties: false
                required: &id005
                - errors
              example:
                jsonapi:
                  version: '1.0'
                errors:
                - detail: Unauthorized
                  status: '401'
        '406':
          description: Not Acceptable
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: *id004
                required: *id005
              example:
                jsonapi:
                  version: '1.0'
                errors:
                - detail: Not Acceptable
                  status: '406'
        '415':
          description: Unsupported Media Type
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: *id004
                required: *id005
              example:
                jsonapi:
                  version: '1.0'
                errors:
                - detail: Unsupported Media Type
                  status: '415'
        '500':
          description: '[Server Error](https://jsonapi.org/format/#errors)'
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: *id004
                required: *id005
              example:
                jsonapi:
                  version: '1.0'
                errors:
                - detail: Server Error
                  status: '500'
  /api/v1/webhook-subscriptions:
    post:
      summary: Add Webhook Subscription to Application
      operationId: add-application-webhook-subscription
      tags:
      - Webhooks
      responses:
        '201':
          description: Single application webhook subscription resource response
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: ApplicationWebhookSubscriptionResource object
                    items:
                      title: ApplicationWebhookSubscriptionResource
                      type: object
                      description: Application webhook subscription resource
                      properties:
                        type:
                          type: string
                          default: webhook-subscriptions
                        id:
                          type: string
                          description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
                          format: uuid
                        attributes:
                          type: object
                          properties:
                            webhookUrl:
                              type: string
                              description: URL of the service where webhook request will be sent when one of the events from the list occurs
                              format: uri
                              example: https://my.app/webhook/listener
                            events:
                              type: array
                              description: 'List of subscribed event types:

                                - `order.brand_created` — A new order has been created and is pending brand confirmation

                                - `order.brand_accepted` — The brand has accepted the order

                                - `order.brand_rejected` — The brand has rejected the order

                                - `order.shipping_labels_generated` — Shipping labels have been generated for the order

                                - `order.shipped` — The order has been shipped

                                - `order.shipment_received` — The retailer has confirmed receipt of the order

                                - `order.shipment_refused` — The retailer has refused the shipment

                                - `order.brand_paid` — Payment has been transferred to the brand

                                - `order.cancelled` — The order has been cancelled

                                '
                              uniqueItems: true
                              items:
                                type: string
                                enum:
                                - order.brand_created
                                - order.brand_accepted
                                - order.brand_rejected
                                - order.shipping_labels_generated
                                - order.shipped
                                - order.shipment_received
                                - order.shipment_refused
                                - order.brand_paid
                                - order.cancelled
                            signingSecret:
                              type: string
                          required:
                          - webhookUrl
                          - events
                          - signingSecret
                      required:
                      - id
                      - type
                      - attributes
                  jsonapi:
                    description: An object describing the server's implementation
                    type: object
                    properties: &id006
                      version:
                        type: string
                      meta:
                        description: Non-standard meta-information that can not be represented as an attribute or relationship.
                        type: object
                        additionalProperties: true
                    additionalProperties: false
                required:
                - data
              examples:
                example:
                  value:
                    jsonapi:
                      version: '1.0'
                    data:
                    - type: webhook-subscription
                      id: 1ef27156-618d-6b1e-996c-0ef14cd127ec
                      attributes:
                        webhookUrl: https://my.app/webhook/listener
                        events:
                        - order.brand_created
                        - order.shipped
                        - order.brand_paid
                        signingSecret: whsec_abc123def456
        '400':
          description: Bad request
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties: &id007
                  errors:
                    type: array
                    uniqueItems: true
                    items:
                      type: object
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value.
                          type: string
                        detail:
                          description: A human-readable explanation specific to this occurrence of the problem.
                          type: string
                        status:
                          description: The HTTP status code applicable to this problem, expressed as a string value.
                          type: string
                        title:
                          description: The HTTP status code description applicable to this problem
                          type: string
                        source:
                          type: object
                          description: Optional object pointing towards the problematic field
                          properties:
                            pointer:
                              type: string
                              description: The field key
                        meta:
                          description: Non-standard meta-information that can not be represented as an attribute or relationship.
                          type: object
                          additionalProperties: true
                      additionalProperties: false
                  jsonapi:
                    description: An object describing the server's implementation
                    t

# --- truncated at 32 KB (55 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ankorstore/refs/heads/main/openapi/ankorstore-webhooks-api-openapi.yml