Document Numbering Mutations

UpdateDocumentSequenceConfigs

Updates document numbering configurations for one or more document types.

Parameters:

ParameterTypeDescription
input[DocumentSequenceConfigInput!]!List of configurations to update.

Example Query:

mutation UpdateDocumentSequenceConfigs($input: [DocumentSequenceConfigInput!]!) {
  UpdateDocumentSequenceConfigs(input: $input) {
    id
    document_type
    format_mode
    manual_override_allowed
    prefix
    next_number
    padding_length
    reset_policy
    shared_sequence_with
    can_apply_now
  }
}

Example Variables:

{
  "input": [
    {
      "document_type": "invoice",
      "format_mode": "auto",
      "prefix": "INV-",
      "next_number": 1001,
      "padding_length": 5
    }
  ]
}
Return TypeDescription
[DocumentSequenceConfig]Updated configurations.

Input Data Types

DocumentSequenceConfigInput

FieldTypeDescription
document_typeString!Document type (e.g., invoice, estimate, order).
format_modeStringNumbering mode: auto (system-generated) or manual (user-defined).
manual_override_allowedBooleanAllow users to manually override the number.
prefixStringPrefix before the number (e.g., INV-).
next_numberIntNext number in sequence.
padding_lengthIntZero-padding length (e.g., 5 → 00001).
reset_policyStringWhen to reset the sequence: never, yearly, monthly.
apply_timingStringWhen to apply the number: on_creation or on_finalization.
shared_sequence_withStringShare sequence with another document type.

Data Types

DocumentSequenceConfig

FieldTypeDescription
idInt!Unique identifier.
company_idInt!Company ID.
document_typeString!Document type.
format_modeString!Numbering mode.
manual_override_allowedBoolean!Manual override allowed.
prefixStringNumber prefix.
next_numberIntNext number in sequence.
padding_lengthIntZero-padding length.
reset_policyStringReset policy.
current_period_keyStringCurrent period key for reset tracking.
shared_sequence_withStringShared sequence document type.
can_apply_nowBoolean!Whether settings can be applied immediately.
pending_settingsJSONPending configuration changes.
pending_activation_period_keyStringPeriod key for pending activation.