This service facilitates the automated creation of credit notes to adjust or cancel issued invoices.
GenerateCreditNote
HTTP | Operation | Type | Object | DTO Why-DTOs? |
---|---|---|---|---|
(Mutation) | generateCreditNote |
GenerateCreditNoteGLDtoInput |
Description
The GenerateCreditNote service allows you to create a credit note for an invoice that must be in ‘Closed’ or ‘Posted’ status directly through the API.
Functionality
- Credit Note Creation: Automates the creation of credit notes for invoices.
- Invoice Status Requirement: Only invoices in
Closed
orPosted
status can be processed. - Adjustments and Cancellations: Allows for adjustments or complete cancellations of invoices through credit notes.
Input Parameters
Invoice Details: Specify the details of the invoice for which a credit note is being created.
- id: Mandatory, the unique identifier of the invoice that requires a credit note.
Response
The service returns a GenerateCreditNoteOutputGLDto
object containing the following fields:
- Id: the unique identifier of the credit note created.
Header
Key | Value |
---|---|
Authorization |
Bearer Current access Token How to find? |
X-TenantId |
Current tenant id How to find? |
X-OrganizationId |
Current organization Id How to find? |
x-api-key |
Primary or secondary subscription key of your app How to find? |
How to use the GenerateCreditNote service?
graphQL Query
mutation($input: GenerateCreditNoteGLDtoInput!) {
generateCreditNote(input: $input) {
id
}
}
graphQL Variables
{
"input": {
"id": "7af9f050-4a34-4a0b-a1af-30fe00a38abc"
}
}
Example Response
{
"id": "4c9810f5-e242-4115-88fb-5e1e99bf44d2"
}
generateCreditNote Input parameters
Fields | Type | Description |
---|---|---|
id |
UUID | Unique identifier of the invoice |
generateCreditNote Response
Fields | Type | Description |
---|---|---|
id | UUID | Unique identifier of the credit note created |