Appearance
Invoice Item Created
This event is triggered when an existing case invoice item is deleted on WillSuite.
Input
Payload
webhook_type string
This is set to case_invoice_item.deleted
invoice_item_data object
The deleted invoice item
invoice_data object
The related invoice
case_data object
This is the case data related to the invoice
Response
WARNING
A response of 202 status code is expected
INFO
202 status code indicates the request has been accepted for processing, but the processing has not been finished yet.
Payload
json
{
"case_data": { "id": "840a1286-e4eb-414e-8b7c-2baf5462a7b9", "ref": "06062024 - RPTEST002" },
"invoice_data": {
"id": "510634bd-da51-448b-b06a-ab998e10670c",
"ref": null,
"notes": null,
"terms": "If this invoice is not paid within 30 days, 1% interest shall be added for each week it is overdue.",
"total": 350,
"date_due": "27/08/2024",
"subtotal": 350,
"date_paid": null,
"date_sent": null,
"vat_amount": 0,
"date_created": "25/07/2024",
"payment_terms": "30 Days Payment Period",
"invoice_number": "ANDR0007-1",
"recipients_name": "Mr C. Andrews",
"customer_case_id": "840a1286-e4eb-414e-8b7c-2baf5462a7b9"
},
"webhook_type": "case_invoice_item.deleted",
"invoice_item_data": {
"id": "05a4a551-4333-4927-9406-a7381c3ed957",
"rate": 175,
"amount": 350,
"status": null,
"paid_at": null,
"quantity": 2,
"subtotal": 350,
"vat_amount": 0,
"description": "Cancer Research Will",
"case_invoice_id": "510634bd-da51-448b-b06a-ab998e10670c",
"customer_case_id": "840a1286-e4eb-414e-8b7c-2baf5462a7b9"
}
}json
{
"type": "object",
"properties": {
"case_data": {
"type": "object",
"properties": {
"id": { "type": "string" },
"ref": { "type": "string" }
},
"required": ["id", "ref"]
},
"invoice_data": {
"type": "object",
"properties": {
"id": { "type": "string" },
"ref": { "type": ["string", "null"] },
"notes": { "type": ["string", "null"] },
"terms": { "type": "string" },
"total": { "type": "number" },
"date_due": { "type": "string" },
"subtotal": { "type": "number" },
"date_paid": { "type": ["string", "null"] },
"date_sent": { "type": ["string", "null"] },
"vat_amount": { "type": "number" },
"date_created": { "type": "string" },
"payment_terms": { "type": "string" },
"invoice_number": { "type": "string" },
"recipients_name": { "type": "string" },
"customer_case_id": { "type": "string" }
},
"required": [
"id",
"terms",
"total",
"date_due",
"subtotal",
"vat_amount",
"date_created",
"payment_terms",
"invoice_number",
"recipients_name",
"customer_case_id"
]
},
"webhook_type": { "type": "string" },
"invoice_item_data": {
"type": "object",
"properties": {
"id": { "type": "string" },
"rate": { "type": "number" },
"amount": { "type": "number" },
"status": { "type": ["string", "null"] },
"paid_at": { "type": ["string", "null"] },
"quantity": { "type": "number" },
"subtotal": { "type": "number" },
"vat_amount": { "type": "number" },
"description": { "type": "string" },
"case_invoice_id": { "type": "string" },
"customer_case_id": { "type": "string" }
},
"required": [
"id",
"rate",
"amount",
"quantity",
"subtotal",
"vat_amount",
"description",
"case_invoice_id",
"customer_case_id"
]
}
},
"required": ["case_data", "invoice_data", "webhook_type", "invoice_item_data"]
}