TheWavlyDocs
DocsAPI reference

Service

Health, usage and the OpenAPI document itself.

This month's live checks, desk cases and estimated charge

GET/v1/usageSecret key · scope billing:read

Parameters

NameInDescription
monthquerypattern ^\d{4}-\d{2}$

Returns

A JSON object.

Errors

Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.

curl https://thewavly.com/v1/usage \
  -H "Authorization: Bearer $WAVLY_API_KEY"
Response
{}

Your GST invoices, newest month first: issued tax invoices and drafts waiting for billing details

GET/v1/invoicesSecret key · scope billing:read

Returns

FieldTypeDescription
dataarray of object

Errors

Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.

curl https://thewavly.com/v1/invoices \
  -H "Authorization: Bearer $WAVLY_API_KEY"
Response
{
  "data": [
    {
      "total_minor": 1,
      "object": "invoice",
      "id": "chk_P1iENx01EDRJ",
      "month": "month",
      "status": "paid",
      "currency": "INR"
    }
  ]
}

One GST invoice

GET/v1/invoices/{id}Secret key · scope billing:read

Parameters

NameInDescription
id requiredpathInvoice idpattern ^txi_[\w-]{6,40}$

Returns

FieldTypeDescription
total_minor requiredintegerPaise for INR or cents for USD
document_urlstringOriginal finance-issued USD invoice
object required"invoice"
id requiredstring
month requiredstring
status required"issued" | "draft"issued: an issued INR or USD invoice. draft: an INR preview pending billing details
numberstring or nullDomestic invoice number or finance-issued USD invoice reference
issued_atinteger or null
supplierobject
customerobject
place_of_supplystring or null
linesarray of object
taxable_paiseinteger
kind"intra" | "inter"intra: CGST and SGST at 9% each. inter: IGST at 18%
cgst_paiseinteger
sgst_paiseinteger
igst_paiseinteger
total_tax_paiseinteger
total_paiseinteger
gst_rate18
currency required"INR" | "USD"
missingarray of string

Errors

Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.

curl https://thewavly.com/v1/invoices/chk_P1iENx01EDRJ \
  -H "Authorization: Bearer $WAVLY_API_KEY"
Response
{
  "total_minor": 1,
  "object": "invoice",
  "id": "chk_P1iENx01EDRJ",
  "month": "month",
  "status": "paid",
  "kind": "statement",
  "currency": "INR"
}

Credit notes TheWavly has issued against your invoices: refunds, goodwill credits and corrections

GET/v1/credit_notesSecret key · scope billing:read

Returns

FieldTypeDescription
dataarray of object

Errors

Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.

curl https://thewavly.com/v1/credit_notes \
  -H "Authorization: Bearer $WAVLY_API_KEY"
Response
{
  "data": [
    {
      "total_minor": 1,
      "currency": "INR",
      "object": "credit_note",
      "id": "chk_P1iENx01EDRJ",
      "number": "number",
      "invoice": {}
    }
  ]
}

One credit note

GET/v1/credit_notes/{id}Secret key · scope billing:read

Parameters

NameInDescription
id requiredpathCredit note idpattern ^crn_[\w-]{6,40}$

Returns

FieldTypeDescription
total_minor requiredintegerPaise for INR or cents for USD
currency required"INR" | "USD"
document_urlstringOriginal finance-issued USD credit note
object required"credit_note"
id requiredstring
number requiredstringDomestic credit note number or finance-issued USD credit reference
issued_atinteger
reason"refund" | "goodwill" | "correction" | "service_issue"
notestring
referencestring
invoice requiredobject
invoice.idstring
invoice.numberstring
invoice.issued_atinteger
invoice.monthstring
kind"intra" | "inter"
taxable_paiseinteger
cgst_paiseinteger
sgst_paiseinteger
igst_paiseinteger
total_tax_paiseinteger
total_paiseinteger
emailed_atinteger or null

Errors

Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.

curl https://thewavly.com/v1/credit_notes/chk_P1iENx01EDRJ \
  -H "Authorization: Bearer $WAVLY_API_KEY"
Response
{
  "total_minor": 1,
  "currency": "INR",
  "object": "credit_note",
  "id": "chk_P1iENx01EDRJ",
  "number": "number",
  "reason": "not_as_ordered",
  "note": "The merchant substituted an item without consent.",
  "reference": "FC-1001",
  "invoice": {
    "id": "chk_P1iENx01EDRJ"
  },
  "kind": "statement"
}

Service health, for uptime monitors

GET/v1/healthPublic · no key needed

Returns

FieldTypeDescription
status"ok" | "degraded"
api_versionstring
storestring
emailbooleanEmail sending is configured; this does not assert inbox delivery.
releasestringDeployed Git commit, when the hosting provider supplies it.
store_msinteger
timeinteger

Errors

Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.

curl https://thewavly.com/v1/health
Response
{
  "status": "paid"
}

This document

GET/v1/openapi.jsonPublic · no key needed

Returns

A JSON object.

Errors

Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.

curl https://thewavly.com/v1/openapi.json
Response
{}