Ordway Webhooks API

Manage webhook configurations

OpenAPI Specification

ordway-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Ordway REST Billing Runs Webhooks API
  description: RESTful API for bidirectional integration with the Ordway billing and revenue automation platform. Enables managing customers, subscriptions, invoices, payments, usage data, and revenue recognition schedules. Supports usage-based billing, ASC 606 compliant revenue recognition, accounts receivable automation, and SaaS metrics reporting.
  version: v1
  contact:
    name: Ordway Support
    url: https://support.ordwaylabs.com
  termsOfService: https://ordwaylabs.com/
servers:
- url: https://api.ordwaylabs.com/api/v1
  description: Production
- url: https://staging.ordwaylabs.com/api/v1
  description: Staging
security:
- ApiKeyAuth: []
  UserTokenAuth: []
  UserEmailAuth: []
  CompanyAuth: []
tags:
- name: Webhooks
  description: Manage webhook configurations
paths:
  /webhooks:
    get:
      summary: List webhooks
      operationId: listWebhooks
      tags:
      - Webhooks
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/size'
      responses:
        '200':
          description: List of webhooks
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Webhook'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      summary: Create a webhook
      operationId: createWebhook
      tags:
      - Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookInput'
      responses:
        '201':
          description: Webhook created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /webhooks/{id}:
    get:
      summary: Retrieve a webhook
      operationId: getWebhook
      tags:
      - Webhooks
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Webhook details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      summary: Update a webhook
      operationId: updateWebhook
      tags:
      - Webhooks
      parameters:
      - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookInput'
      responses:
        '200':
          description: Webhook updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      summary: Delete a webhook
      operationId: deleteWebhook
      tags:
      - Webhooks
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: Webhook deleted
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    id:
      name: id
      in: path
      required: true
      description: Resource identifier
      schema:
        type: string
    size:
      name: size
      in: query
      description: Number of records per page
      schema:
        type: integer
        minimum: 1
        maximum: 500
        default: 50
    page:
      name: page
      in: query
      description: Page number for pagination (1-based)
      schema:
        type: integer
        minimum: 1
        default: 1
  schemas:
    WebhookInput:
      type: object
      properties:
        name:
          type: string
        url:
          type: string
          format: uri
        status:
          type: string
        events:
          type: object
          additionalProperties: true
        headers:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              value:
                type: string
    Webhook:
      type: object
      required:
      - company_id
      - name
      properties:
        company_id:
          type: string
        name:
          type: string
        url:
          type: string
          format: uri
        status:
          type: string
          nullable: true
        events:
          type: object
          nullable: true
          additionalProperties: true
        headers:
          type: array
          nullable: true
          items:
            type: object
            properties:
              key:
                type: string
                nullable: true
              value:
                type: string
                nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: object
          additionalProperties: true
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication credentials missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Ordway API key
    UserTokenAuth:
      type: apiKey
      in: header
      name: X-User-Token
      description: Ordway user authentication token
    UserEmailAuth:
      type: apiKey
      in: header
      name: X-User-Email
      description: Ordway user email address
    CompanyAuth:
      type: apiKey
      in: header
      name: X-User-Company
      description: Ordway company identifier
externalDocs:
  description: Ordway API Documentation
  url: https://ordwaylabs.stoplight.io/docs/ordway/ZG9jOjQ4OTgxNg-overview