Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 75 additions & 42 deletions xero-webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ webhooks:
application/json:
schema:
$ref: "#/components/schemas/CreditNoteWebhookEvent"
examples:
creditNoteCreate:
summary: Credit Note Create Event
value:
events:
- resourceUrl: https://api.xero.com/api.xro/2.0/CreditNotes/55d84274-a3da-4829-a7c0-0cab601b95cc
resourceId: 55d84274-a3da-4829-a7c0-0cab601b95cc
tenantId: aef86862-2015-4b6b-88bc-d89032cecc50
tenantType: ORGANISATION
eventCategory: CREDITNOTE
eventType: CREATE
eventDateUtc: 2025-12-02T00:44:09.923
data:
Type: ACCPAYCREDIT
Status: DRAFT
firstEventSequence: 76
lastEventSequence: 76
entropy: FXNGWLCCGVANWHKILRUB
responses:
"200":
$ref: "#/components/responses/200WebhookDataReceivedOk"
Expand Down Expand Up @@ -138,6 +156,9 @@ components:
- type: string
const: SUBSCRIPTION
description: For application subscription-related events
- type: string
const: CREDITNOTE
description: For organisation credit note-related events
tenantId:
type: string
format: uuid
Expand Down Expand Up @@ -179,48 +200,60 @@ components:
- $ref: "#/components/schemas/WebhookEvent"
- type: object
properties:
data:
type: object
required:
- Type
- Status
properties:
Type:
type: string
description: The type of credit note
externalDocs:
url: https://developer.xero.com/documentation/api/accounting/types#credit-notes
oneOf:
- type: string
const: ACCPAYCREDIT
description: An Accounts Payable(supplier) Credit Note
- type: string
const: ACCRECCREDIT
description: An Account Receivable(customer) Credit Note
Status:
type: string
description: The status of the credit note
externalDocs:
url: https://developer.xero.com/documentation/api/accounting/types#invoice-status-codes
oneOf:
- type: string
const: DRAFT
description: Draft credit note
- type: string
const: SUBMITTED
description: Submitted credit note
- type: string
const: DELETED
description: Deleted credit note
- type: string
const: AUTHORISED
description: Authorised credit note
- type: string
const: PAID
description: Paid credit note
- type: string
const: VOIDED
description: Voided credit note
events:
type: array
items:
allOf:
- $ref: "#/components/schemas/WebhookEvent/properties/events/items"
- type: object
properties:
eventCategory:
const: CREDITNOTE
data:
type: object
description: Additional data for credit note events
required:
- Type
- Status
properties:
Type:
type: string
description: The type of credit note
externalDocs:
url: https://developer.xero.com/documentation/api/accounting/types#credit-notes
oneOf:
- type: string
const: ACCPAYCREDIT
description: An Accounts Payable(supplier) Credit Note
- type: string
const: ACCRECCREDIT
description: An Account Receivable(customer) Credit Note
Status:
type: string
description: The status of the credit note
externalDocs:
url: https://developer.xero.com/documentation/api/accounting/types#invoice-status-codes
oneOf:
- type: string
const: DRAFT
description: Draft credit note
- type: string
const: SUBMITTED
description: Submitted credit note
- type: string
const: DELETED
description: Deleted credit note
- type: string
const: AUTHORISED
description: Authorised credit note
- type: string
const: PAID
description: Paid credit note
- type: string
const: VOIDED
description: Voided credit note
required:
- data
responses:
401InvalidWebhookData:
description: Return a 401 status to indicate that the webhook subscription failed
Expand Down