Developers

API reference

Every endpoint of the WonderFatoora REST API v1: methods, parameters, request fields, responses and examples.

Generated from the published OpenAPI document (version 1.4.0). https://fatoora.tw.sa/api/v1

Basics

Base URL https://fatoora.tw.sa/api/v1
Format JSON over HTTPS. Send Accept: application/json.
Language Messages in Arabic, or English with Accept-Language: en; the answer's Content-Language says which. See Errors.
Authentication Authorization: Bearer <key>. See Authentication.
Success {"ok": true, "data": {…}}
Error {"ok": false, "error": {"code", "message", "details"}}. See Errors.
Amounts JSON numbers rounded to 2 decimal places.
Dates YYYY-MM-DD; timestamps are ISO 8601.
Versioning Changes within v1 are additive and listed in the changelog. A breaking change would come under a new version path. A path naming any other version answers 400 unsupported_api_version.

Endpoints

Credit and debit notes, the only way to correct an issued invoice.

Signed HTTPS notifications of the company's events, the endpoints that receive them, and the events list for polling.

Webhook events

  • invoice.created

    An invoice draft was created

  • invoice.issued

    An invoice was issued

  • invoice.zatca_status_changed

    An invoice's ZATCA status changed

  • invoice.payment_recorded

    A payment was recorded, voided or deleted

  • invoice.paid

    An invoice was paid in full

  • invoice.overdue

    An invoice became overdue

  • invoice.cancelled

    A draft invoice was cancelled

  • credit_note.issued

    A credit note was issued

  • debit_note.issued

    A debit note was issued

  • credit_note.zatca_status_changed

    A credit note's ZATCA status changed

  • debit_note.zatca_status_changed

    A debit note's ZATCA status changed

  • customer.created

    A customer was added

  • customer.updated

    A customer was changed

  • ping

    A test event you sent

Ready to build?

API access is part of the Business and Enterprise plans. Create a key in Settings → API keys and make your first call in minutes.