ShahiAssist

Developer Reference: Extending ShahiAssist

REST API

    1. Base URL: /wp-json/shahi-assist/v1/
    2. Endpoints:
    3. GET /tickets – List tickets (params: status, author, search)
      POST /tickets – Create ticket
      GET /tickets/{id} – Get ticket details
      PUT /tickets/{id} – Update ticket
      DELETE /tickets/{id} – Delete ticket
      – Similar for /articles, /users

    4. Auth: Use Application Passwords in headers.
    5. Rate Limiting: 100 requests/hour per user.
    6. See API.md for examples and schemas.
    7. Webhooks

    8. Events:
    9. ticket.created: {ticket_id, subject, status, author}
      ticket.statuschanged: {ticketid, oldstatus, newstatus}
      ticket.reply: {ticketid, replyid, author}
      article.published: {article_id, title, author}

    10. Payload: JSON with event data and timestamp.
    11. Delivery: Asynchronous, with retry on failure.
    12. Hooks and Filters

    13. Actions:
    14. shahiassistticket_created – Passes ticket ID.
      shahiassistticketstatuschanged – Passes ticket ID, old/new status.
      shahiassistarticle_published – Passes article ID.

    15. Filters:

shahiassistticket_statuses – Modify status array.
shahiassistdefault_settings – Alter defaults.
shahiassistemail_content – Change email body.
shahiassistcustom_fields – Add fields programmatically.

Custom Modules

  • Create folder in includes/modules/your_module/.
  • Add class-your-module.php extending ShahiAssistModuleBase.
  • Implement init(), admin_menu(), etc.
  • Register in class-module-registry.php.
  • Follow PSR-4 autoloading.
  • Share this article

    Was this article helpful?

    Help us improve our documentation

    Still need help?

    Our support team is ready to assist you with personalized guidance for your workspace.

    Submit a support ticket