Xentral Webhook API

Manage webhooks.

OpenAPI Specification

xentral-webhook-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Xentral Account Webhook API
  version: v0.1
  description: Xentral is an ERP platform.
  contact:
    name: Xentral
    url: https://xentral.com
    email: api@xentral.com
servers:
- url: https://{xentralId}.xentral.biz
  description: Your Xentral Instance
  variables:
    xentralId:
      default: xentral
- url: https://{domain}
  description: Xentral at a custom domain
  variables:
    domain:
      default: xentral.com
security:
- BearerAuth: []
tags:
- name: Webhook
  description: Manage webhooks.
paths:
  /api/v1/webhooks:
    post:
      tags:
      - Webhook
      operationId: webhook.create
      summary: Create webhook
      description: Creates a new webhook.
      requestBody:
        description: Webhook create request payload
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - name
              - url
              - signatureKey
              - events
              properties:
                name:
                  type: string
                  example: My example application
                url:
                  type: string
                  format: uri
                  example: https://example.com/receive-xentral-webhook-endpoint
                signatureKey:
                  type: string
                  example: rf5ecjtvnWQ4mTDfzOTZXgQuuCSFfR66
                events:
                  type: array
                  description: The webhookEventType resource.
                  items:
                    type: object
                    additionalProperties: false
                    required:
                    - id
                    properties:
                      id:
                        description: The unique identifier of the event type.
                        type: string
                        example: com.xentral.salesOrder.created.v1
                  example:
                  - id: com.xentral.salesOrder.created.v1
                  - id: com.xentral.salesOrder.updated.v1
            examples:
              Create new webhook:
                value:
                  name: My example application
                  url: https://example.com/receive-xentral-webhook-endpoint
                  signatureKey: rf5ecjtvnWQ4mTDfzOTZXgQuuCSFfR66
                  events:
                  - id: com.xentral.salesOrder.created.v1
                  - id: com.xentral.salesOrder.updated.v1
      responses:
        '201':
          description: Resource successfully created response
          headers:
            Location:
              schema:
                type: string
                example: https://example.xentral.biz/api/users/17
              description: URI of the created resource
          content:
            text/html:
              schema:
                type: string
                enum:
                - ''
                nullable: true
        '400':
          description: IETF RFC 9457 Problem API compliant response
          content:
            application/problem+json:
              schema:
                oneOf:
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - violations
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/request-validation
                    title:
                      type: string
                      minLength: 1
                      example: Request payload validation failed.
                    violations:
                      oneOf:
                      - type: array
                        items:
                          type: object
                          example:
                            username:
                            - This value should not be blank.
                            email:
                            - This value is not a valid email address.
                        description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
                      - type: object
                        example:
                          _:
                          - This value should contain at most `9` elements.
                        description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/generic-validation
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/conflict
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - items
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/conflictItems
                    title:
                      type: string
                      minLength: 1
                    items:
                      type: array
                      items:
                        type: object
                        additionalProperties: false
                        required:
                        - id
                        - title
                        - messages
                        properties:
                          id:
                            type: integer
                          title:
                            type: string
                            minLength: 1
                          messages:
                            type: array
                            items:
                              type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - scopes
                  properties:
                    type:
                      type: string
                      enum:
                      - https://developer.xentral.com/reference/problems#token-scopes
                    title:
                      type: string
                      minLength: 1
                    scopes:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/generic-validation
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: object
                      additionalProperties:
                        type: array
                        items:
                          type: string
        '401':
          description: Unable to authenticate the client
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message explaining why the request failed.
                    example: 'Missing required scopes: customer:create.'
              example:
                message: 'Missing required scopes: customer:create.'
            text/html:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Unable to authorize the client
        '415':
          description: Resource representation send in the request is not supported.
        '429':
          description: Too many API calls made.
    get:
      tags:
      - Webhook
      operationId: webhook.list
      summary: List webhooks
      description: List webhooks.
      responses:
        '200':
          description: Webhook list.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                - data
                properties:
                  data:
                    description: The webhook resource list.
                    x-example-ignore: true
                    type: array
                    items:
                      description: The webhook resource.
                      example:
                        id: '1234'
                        name: My example application
                        url: https://example.com/receive-xentral-webhook-endpoint
                        events:
                        - id: com.xentral.salesOrder.created.v1
                        - id: com.xentral.salesOrder.updated.v1
                      type: object
                      additionalProperties: false
                      required:
                      - id
                      - name
                      - url
                      - events
                      properties:
                        id:
                          type: string
                          pattern: \d+
                          example: '17'
                          description: Resource identifier.
                        name:
                          description: The name of the webhook.
                          type: string
                          example: My example application
                        url:
                          description: The URL of the application which should receive the webhook request.
                          type: string
                          format: uri
                          example: https://example.com/receive-xentral-webhook-endpoint
                        events:
                          type: array
                          description: The webhookEventType resource.
                          items:
                            type: object
                            additionalProperties: false
                            required:
                            - id
                            properties:
                              id:
                                description: The unique identifier of the event type.
                                type: string
                                example: com.xentral.salesOrder.created.v1
                          example:
                          - id: com.xentral.salesOrder.created.v1
                          - id: com.xentral.salesOrder.updated.v1
        '401':
          description: Unable to authenticate the client
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message explaining why the request failed.
                    example: 'Missing required scopes: customer:create.'
              example:
                message: 'Missing required scopes: customer:create.'
            text/html:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Unable to authorize the client
        '406':
          description: Requested resource representation does not exist.
        '429':
          description: Too many API calls made.
  /api/v1/webhooks/{id}:
    get:
      tags:
      - Webhook
      operationId: webhook.view
      summary: View webhook
      description: View a webhook.
      parameters:
      - in: path
        name: id
        required: true
        description: The resource's identifier.
        schema:
          type: string
          pattern: \d+
          example: '17'
          description: Resource identifier.
      responses:
        '200':
          description: Webhook view.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                - data
                properties:
                  data:
                    description: The webhook resource.
                    example:
                      id: '1234'
                      name: My example application
                      url: https://example.com/receive-xentral-webhook-endpoint
                      events:
                      - id: com.xentral.salesOrder.created.v1
                      - id: com.xentral.salesOrder.updated.v1
                    type: object
                    additionalProperties: false
                    required:
                    - id
                    - name
                    - url
                    - events
                    properties:
                      id:
                        type: string
                        pattern: \d+
                        example: '17'
                        description: Resource identifier.
                      name:
                        description: The name of the webhook.
                        type: string
                        example: My example application
                      url:
                        description: The URL of the application which should receive the webhook request.
                        type: string
                        format: uri
                        example: https://example.com/receive-xentral-webhook-endpoint
                      events:
                        type: array
                        description: The webhookEventType resource.
                        items:
                          type: object
                          additionalProperties: false
                          required:
                          - id
                          properties:
                            id:
                              description: The unique identifier of the event type.
                              type: string
                              example: com.xentral.salesOrder.created.v1
                        example:
                        - id: com.xentral.salesOrder.created.v1
                        - id: com.xentral.salesOrder.updated.v1
        '400':
          description: IETF RFC 9457 Problem API compliant response
          content:
            application/problem+json:
              schema:
                oneOf:
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - violations
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/request-validation
                    title:
                      type: string
                      minLength: 1
                      example: Request payload validation failed.
                    violations:
                      oneOf:
                      - type: array
                        items:
                          type: object
                          example:
                            username:
                            - This value should not be blank.
                            email:
                            - This value is not a valid email address.
                        description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
                      - type: object
                        example:
                          _:
                          - This value should contain at most `9` elements.
                        description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/generic-validation
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/conflict
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - items
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/conflictItems
                    title:
                      type: string
                      minLength: 1
                    items:
                      type: array
                      items:
                        type: object
                        additionalProperties: false
                        required:
                        - id
                        - title
                        - messages
                        properties:
                          id:
                            type: integer
                          title:
                            type: string
                            minLength: 1
                          messages:
                            type: array
                            items:
                              type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - scopes
                  properties:
                    type:
                      type: string
                      enum:
                      - https://developer.xentral.com/reference/problems#token-scopes
                    title:
                      type: string
                      minLength: 1
                    scopes:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/generic-validation
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: object
                      additionalProperties:
                        type: array
                        items:
                          type: string
        '401':
          description: Unable to authenticate the client
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message explaining why the request failed.
                    example: 'Missing required scopes: customer:create.'
              example:
                message: 'Missing required scopes: customer:create.'
            text/html:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Unable to authorize the client
        '404':
          description: Resource was not found or not enough access privileges
        '406':
          description: Requested resource representation does not exist.
        '429':
          description: Too many API calls made.
    patch:
      tags:
      - Webhook
      operationId: webhook.update
      summary: Update webhook
      description: Update a webhook.
      parameters:
      - in: path
        name: id
        required: true
        description: The resource's identifier.
        schema:
          type: string
          pattern: \d+
          example: '17'
          description: Resource identifier.
      requestBody:
        description: Webhook update request payload
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - name
              - url
              - events
              properties:
                name:
                  type: string
                  example: My example application
                url:
                  type: string
                  format: uri
                  example: https://example.com/receive-xentral-webhook-endpoint
                signatureKey:
                  type: string
                  minLength: 20
                  example: rf5ecjtvnWQ4mTDfzOTZXgQuuCSFfR66
                events:
                  type: array
                  description: The webhookEventType resource
                  items:
                    type: object
                    additionalProperties: false
                    required:
                    - id
                    properties:
                      id:
                        description: The unique identifier of the event type.
                        type: string
                        example: com.xentral.salesOrder.created.v1
                  example:
                  - id: com.xentral.salesOrder.created.v1
                  - id: com.xentral.salesOrder.updated.v1
            examples:
              Update webhook:
                value:
                  name: My example application
                  url: https://example.com/receive-xentral-webhook-endpoint
                  signatureKey: rf5ecjtvnWQ4mTDfzOTZXgQuuCSFfR66
                  events:
                  - id: com.xentral.salesOrder.created.v1
      responses:
        '204':
          description: Operation completed successfully, no response body
        '400':
          description: IETF RFC 9457 Problem API compliant response
          content:
            application/problem+json:
              schema:
                oneOf:
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - violations
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/request-validation
                    title:
                      type: string
                      minLength: 1
                      example: Request payload validation failed.
                    violations:
                      oneOf:
                      - type: array
                        items:
                          type: object
                          example:
                            username:
                            - This value should not be blank.
                            email:
                            - This value is not a valid email address.
                        description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
                      - type: object
                        example:
                          _:
                          - This value should contain at most `9` elements.
                        description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/generic-validation
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/conflict
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - items
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/conflictItems
                    title:
                      type: string
                      minLength: 1
                    items:
                      type: array
                      items:
                        type: object
                        additionalProperties: false
                        required:
                        - id
                        - title
                        - messages
                        properties:
                          id:
                            type: integer
                          title:
                            type: string
                            minLength: 1
                          messages:
                            type: array
                            items:
                              type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - scopes
                  properties:
                    type:
                      type: string
                      enum:
                      - https://developer.xentral.com/reference/problems#token-scopes
                    title:
                      type: string
                      minLength: 1
                    scopes:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/generic-validation
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: object
                      additionalProperties:
                        type: array
                        items:
                          type: string
        '401':
          description: Unable to authenticate the client
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message explaining why the request failed.
                    example: 'Missing required scopes: customer:create.'
              example:
                message: 'Missing required scopes: customer:create.'
            text/html:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Unable to authorize the client
        '404':
          description: Resource was not found or not enough access privileges
        '415':
          description: Resource representation send in the request is not supported.
        '429':
          description: Too many API calls made.
    delete:
      tags:
      - Webhook
      operationId: webhook.delete
      summary: Delete webhook
      description: Delete a webhook
      parameters:
      - in: path
        name: id
        required: true
        description: The resource's identifier.
        schema:
          type: string
          pattern: \d+
          example: '17'
          description: Resource identifier.
      responses:
        '204':
          description: Operation completed successfully, no response body
        '401':
          description: Unable to authenticate the client
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message explaining why the request failed.
                    example: 'Missing required scopes: customer:create.'
              example:
                message: 'Missing required scopes: customer:create.'
            text/html:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Unable to authorize the client
        '404':
          description: Resource was not found or not enough access privileges
        '429':
          description: Too many API calls made.
  /api/v1/webhookEventTypes:
    get:
      tags:
      - Webhook
      operationId: webhookEventTypes.list
      summary: List webhook event types
      description: List webhooks event types.
      parameters:
      - name: xentralVersion
        in: query
        example: 24.11.0
        schema:
          type: string
          default: latest
        description: Xentral version to request the available event types for.
      responses:
        '200':
          description: Webhook event type list.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                - data
                properties:
                  data:
                    description: List of webhook event types.
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      required:
                      - id
                      - group
                      properties:
                        id:
                          description: The unique identifier of the event type.
                          type: string
        

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