These presets provide flexibility in customizing document numbering.
The API resources / Organization Sales Setup includes two fields to define the default presets: one for invoices and another for credit notes.
✨ Ask AI
| HTTP | Operation | Type | Object |
|---|---|---|---|
| Query | operationalNumberPresetTexts filtered by id Why? |
||
| Query | operationalNumberPresetTexts |
The API resources / Organization Sales Setup includes two fields to define the default presets: one for invoices and another for credit notes.
query {
operationalNumberPresetTexts(
where: {
operation: { eq: INVOICE }
}
) {
edges {
node {
id
description
isDefault
operation
presetText
}
}
}
}
{
"data": {
"operationalNumberPresetTexts": {
"edges": [
{
"node": {
"id": "01234567-89ab-cdef-0123-456789abcdef",
"description": "Default invoice prefix",
"isDefault": true,
"operation": "INVOICE",
"presetText": "N/A"
}
}
]
}
}
}
| Key | Value |
|---|---|
Authorization |
Bearer Current access Token How to find? |
X-TenantId |
Current tenant id Why deprecated ? |
X-OrganizationId |
Current organization Id How to find? |
x-api-key |
Primary or secondary subscription key of your app How to find? |
| Fields | Type | Description |
|---|---|---|
| id |
UUID | Id |
| creationDate |
DateTime | Creation date |
| modificationDate |
DateTime | Modification date |
| description | String | Description of the preset text |
| isDefault | Boolean | initial default prefix |
| operation |
|
Operation type related to the preset |
| operationalNumberSeriesType |
|
Operational number series type |
| presetText | String | Preset text |
Is Default:
Indicates whether this prefix was automatically added as the default when the organization was created.
This value is stored in the database and does not change; it does not indicate which prefix the user has currently selected as the default in the application settings.
To determine which prefix is currently used as the default for a document type, retrieve API resources / Organization Sales Setup and compare each prefix id with the corresponding field:
| Operation | organizationSalesSetup field |
|---|---|
INVOICE |
salesInvoiceDefaultPresetTextId |
ORDER |
salesOrderDefaultPresetTextId |
DELIVERY_NOTE |
salesDeliveryNoteDefaultPresetTextId |
QUOTE |
salesQuotesDefaultPresetTextId |
For example, for invoices, the prefix whose id matches salesInvoiceDefaultPresetTextId is the one currently selected as the default.