Shoplazza Webhook API

The Webhook API from Shoplazza — 3 operation(s) for webhook.

OpenAPI Specification

shoplazza-webhook-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: SPZ Admin Access Webhook API
  version: '2022.01'
servers:
- url: https://{subdomain}.myshoplaza.com
  variables:
    subdomain:
      default: developer
security:
- sec0: []
tags:
- name: Webhook
  description: ''
paths:
  /openapi/2022-01/webhooks:
    get:
      tags:
      - Webhook
      summary: Webhook List
      description: ''
      operationId: webhook-list
      parameters:
      - name: address
        in: query
        description: Webhook notification URL, e.g. `https://example.com/webhook`
        schema:
          type: string
      - name: topic
        in: query
        description: The event name, e.g. `orders/cancelled,orders/create`
        schema:
          type: string
      - name: created_at_min
        in: query
        description: Filter webhook records created at after date, e.g. `2018-08-26T06:19:53Z`
        schema:
          type: string
      - name: created_at_max
        in: query
        description: Filter webhook records created at before date, e.g. `2018-08-26T06:19:53Z`
        schema:
          type: string
      - name: updated_at_min
        in: query
        description: Filter webhook records last update at after date, e.g. `2018-08-26T06:19:53Z`
        schema:
          type: string
      - name: updated_at_max
        in: query
        description: Filter webhook records last update at before date, e.g. `2018-08-26T06:19:53Z`
        schema:
          type: string
      - name: limit
        in: query
        description: 'Result per page, max: `250`'
        schema:
          type: integer
          format: int32
          default: 50
      - name: page
        in: query
        description: Page number
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"webhooks\": [\n    {\n      \"id\": \"ea88df20-525b-457b-beed-d49e546be683\",\n      \"address\": \"https://example.com/webhook\",\n      \"topic\": \"orders/create\",\n      \"created_at\": \"2018-08-26T06:30:55Z\",\n      \"updated_at\": \"2018-08-26T06:30:55Z\",\n      \"format\": \"json\"\n    },\n    {\n      \"id\": \"2c3772b4-8a92-4afd-bb7b-d89cd31844c2\",\n      \"address\": \"https://example.com/webhook\",\n      \"topic\": \"orders/delete\",\n      \"created_at\": \"2018-08-26T06:30:55Z\",\n      \"updated_at\": \"2018-08-26T06:30:55Z\",\n      \"format\": \"json\"\n    }\n  ]\n}"
              schema:
                type: object
                properties:
                  webhooks:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: ea88df20-525b-457b-beed-d49e546be683
                        address:
                          type: string
                          example: https://example.com/webhook
                        topic:
                          type: string
                          example: orders/create
                        created_at:
                          type: string
                          example: '2018-08-26T06:30:55Z'
                        updated_at:
                          type: string
                          example: '2018-08-26T06:30:55Z'
                        format:
                          type: string
                          example: json
        '422':
          description: '422'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"errors\": {\n    \"limit\": [\n      \"must be less than or equal to 250\"\n    ],\n    \"page\": [\n      \"must be greater than or equal to 1\"\n    ]\n  }\n}"
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      limit:
                        type: array
                        items:
                          type: string
                          example: must be less than or equal to 250
                      page:
                        type: array
                        items:
                          type: string
                          example: must be greater than or equal to 1
      deprecated: false
    post:
      tags:
      - Webhook
      summary: Create Webhook
      description: ''
      operationId: create-webhook
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - address
              - topic
              properties:
                address:
                  type: string
                  description: Webhook notification URL, e.g. `https://example.com/webhook`
                topic:
                  type: string
                  description: Event name, e.g. `orders/cancelled`
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"webhook\": {\n    \"id\": \"37593634-c272-4ed5-9096-1a4f1212125e\",\n    \"address\": \"https://abc.com\",\n    \"topic\": \"order/create\",\n    \"created_at\": \"2018-08-26T06:50:00Z\",\n    \"updated_at\": \"2018-08-26T06:50:00Z\",\n    \"format\": \"json\"\n  }\n}"
              schema:
                type: object
                properties:
                  webhook:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 37593634-c272-4ed5-9096-1a4f1212125e
                      address:
                        type: string
                        example: https://abc.com
                      topic:
                        type: string
                        example: order/create
                      created_at:
                        type: string
                        example: '2018-08-26T06:50:00Z'
                      updated_at:
                        type: string
                        example: '2018-08-26T06:50:00Z'
                      format:
                        type: string
                        example: json
        '422':
          description: '422'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"errors\": {\n    \"address\": [\n      \"can't be blank\",\n      \"is invalid\"\n    ],\n    \"topic\": [\n      \"can't be blank\"\n    ]\n  }\n}"
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      address:
                        type: array
                        items:
                          type: string
                          example: can't be blank
                      topic:
                        type: array
                        items:
                          type: string
                          example: can't be blank
      deprecated: false
  /openapi/2022-01/webhooks/count:
    get:
      tags:
      - Webhook
      summary: Webhook Count
      description: ''
      operationId: webhook-count
      parameters:
      - name: address
        in: query
        description: Webhook notification URL, e.g. `https://example.com/webhook`
        schema:
          type: string
      - name: topic
        in: query
        description: Event name, e.g. `orders/cancelled,orders/create`
        schema:
          type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"count\": 5\n}"
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    example: 5
                    default: 0
      deprecated: false
  /openapi/2022-01/webhooks/{id}:
    get:
      tags:
      - Webhook
      summary: Webhook Details
      description: ''
      operationId: webhook-details
      parameters:
      - name: id
        in: path
        description: Webhook record ID
        schema:
          type: string
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"webhook\": {\n    \"id\": \"37593634-c272-4ed5-9096-1a4f1212125e\",\n    \"address\": \"https://abc.com\",\n    \"topic\": \"order/create\",\n    \"created_at\": \"2018-08-26T06:50:00Z\",\n    \"updated_at\": \"2018-08-26T06:50:00Z\",\n    \"format\": \"json\"\n  }\n}"
              schema:
                type: object
                properties:
                  webhook:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 37593634-c272-4ed5-9096-1a4f1212125e
                      address:
                        type: string
                        example: https://abc.com
                      topic:
                        type: string
                        example: order/create
                      created_at:
                        type: string
                        example: '2018-08-26T06:50:00Z'
                      updated_at:
                        type: string
                        example: '2018-08-26T06:50:00Z'
                      format:
                        type: string
                        example: json
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"errors\": [\n    \"record not found!\"\n  ]\n}"
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                      example: record not found!
      deprecated: false
    put:
      tags:
      - Webhook
      summary: Update Webhook
      description: ''
      operationId: update-webhook
      parameters:
      - name: id
        in: path
        description: Webhook record ID
        schema:
          type: string
        required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type: string
                  description: Webhook notification URL, e.g. `https://example.com/webhook`
                topic:
                  type: string
                  description: Event name, e.g. `orders/cancelled,orders/create`
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"webhook\": {\n    \"id\": \"37593634-c272-4ed5-9096-1a4f1212125e\",\n    \"address\": \"https://abc.com\",\n    \"topic\": \"order/create\",\n    \"created_at\": \"2018-08-26T06:50:00Z\",\n    \"updated_at\": \"2018-08-26T06:50:00Z\",\n    \"format\": \"json\"\n  }\n}"
              schema:
                type: object
                properties:
                  webhook:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 37593634-c272-4ed5-9096-1a4f1212125e
                      address:
                        type: string
                        example: https://abc.com
                      topic:
                        type: string
                        example: order/create
                      created_at:
                        type: string
                        example: '2018-08-26T06:50:00Z'
                      updated_at:
                        type: string
                        example: '2018-08-26T06:50:00Z'
                      format:
                        type: string
                        example: json
        '422':
          description: '422'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"errors\": {\n    \"address\": [\n      \"can't be blank\",\n      \"is invalid\"\n    ],\n    \"topic\": [\n      \"can't be blank\"\n    ]\n  }\n}"
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      address:
                        type: array
                        items:
                          type: string
                          example: can't be blank
                      topic:
                        type: array
                        items:
                          type: string
                          example: can't be blank
      deprecated: false
    delete:
      tags:
      - Webhook
      summary: Delete Webhook
      description: ''
      operationId: delete-webhook
      parameters:
      - name: id
        in: path
        description: Webhook record ID
        schema:
          type: string
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"errors\": [\"record not found!\"]\n}"
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                      example: record not found!
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: access-token
      x-default: WPMSdB6M8Cpum4X1GoMYOKZpiESd8d2x7dZW8d79ZeQ
    apikey-header-access-token:
      type: apiKey
      in: header
      name: access-token
      x-default: WPMSdB6M8Cpum4X1GoMYOKZpiESd8d2x7dZW8d79ZeQ
x-standalone-page:
  title: Standalone Page
  content: Information that should be on a standalone page...
x-readme:
  headers: []
  explorer-enabled: true
  proxy-enabled: true
  samples-enabled: true