Use document sequencing to generate new IDs automatically for common transactions and records, such as new customers, vendors, invoices, and more. For example, you can create a document sequence for invoices. This new sequence automatically creates a new ID, such as 'INV-0100' and increments the number each time a new invoice is created.
Note: Document sequences are called "accounting sequences" in the General Ledger.
Increments and returns the next sequence value for a specified document sequence, optionally for a specified fiscal year.
get-next-sequence request
key required | string Document sequence key. Example: "14" |
id | string Document sequence ID. Example: "AR Inv" |
fiscalYear | integer Fiscal year. If fiscal year rollover is not enabled for the document sequence, this field has no effect. Example: 2024 |
Executed
Bad Request
{- "id": "AR Inv"
}
{- "ia::result": {
- "id": "AR Inv",
- "nextSequence": "INV-16"
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 1,
- "totalError": 0
}
}