Service
Health, usage and the OpenAPI document itself.
/v1/usageGET/v1/invoicesGET/v1/invoices/{id}GET/v1/credit_notesGET/v1/credit_notes/{id}GET/v1/healthGET/v1/openapi.jsonThis month's live checks, desk cases and estimated charge
GET/v1/usageSecret key · scope billing:read
Parameters
| Name | In | Description |
|---|---|---|
month | query | pattern ^\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"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/usage");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/usage"){}Your GST invoices, newest month first: issued tax invoices and drafts waiting for billing details
GET/v1/invoicesSecret key · scope billing:read
Returns
| Field | Type | Description |
|---|---|---|
data | array 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"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/invoices");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/invoices"){
"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
| Name | In | Description |
|---|---|---|
id required | path | Invoice idpattern ^txi_[\w-]{6,40}$ |
Returns
| Field | Type | Description |
|---|---|---|
total_minor required | integer | Paise for INR or cents for USD |
document_url | string | Original finance-issued USD invoice |
object required | "invoice" | |
id required | string | |
month required | string | |
status required | "issued" | "draft" | issued: an issued INR or USD invoice. draft: an INR preview pending billing details |
number | string or null | Domestic invoice number or finance-issued USD invoice reference |
issued_at | integer or null | |
supplier | object | |
customer | object | |
place_of_supply | string or null | |
lines | array of object | |
taxable_paise | integer | |
kind | "intra" | "inter" | intra: CGST and SGST at 9% each. inter: IGST at 18% |
cgst_paise | integer | |
sgst_paise | integer | |
igst_paise | integer | |
total_tax_paise | integer | |
total_paise | integer | |
gst_rate | 18 | |
currency required | "INR" | "USD" | |
missing | array 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"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/invoices/chk_P1iENx01EDRJ");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/invoices/chk_P1iENx01EDRJ"){
"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
| Field | Type | Description |
|---|---|---|
data | array 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"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/credit_notes");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/credit_notes"){
"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
| Name | In | Description |
|---|---|---|
id required | path | Credit note idpattern ^crn_[\w-]{6,40}$ |
Returns
| Field | Type | Description |
|---|---|---|
total_minor required | integer | Paise for INR or cents for USD |
currency required | "INR" | "USD" | |
document_url | string | Original finance-issued USD credit note |
object required | "credit_note" | |
id required | string | |
number required | string | Domestic credit note number or finance-issued USD credit reference |
issued_at | integer | |
reason | "refund" | "goodwill" | "correction" | "service_issue" | |
note | string | |
reference | string | |
invoice required | object | |
invoice.id | string | |
invoice.number | string | |
invoice.issued_at | integer | |
invoice.month | string | |
kind | "intra" | "inter" | |
taxable_paise | integer | |
cgst_paise | integer | |
sgst_paise | integer | |
igst_paise | integer | |
total_tax_paise | integer | |
total_paise | integer | |
emailed_at | integer 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"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/credit_notes/chk_P1iENx01EDRJ");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/credit_notes/chk_P1iENx01EDRJ"){
"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
| Field | Type | Description |
|---|---|---|
status | "ok" | "degraded" | |
api_version | string | |
store | string | |
email | boolean | Email sending is configured; this does not assert inbox delivery. |
release | string | Deployed Git commit, when the hosting provider supplies it. |
store_ms | integer | |
time | integer |
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl https://thewavly.com/v1/healthimport { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/health");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/health"){
"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.jsonimport { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/openapi.json");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/openapi.json"){}