This example shows you how to edit the document object. If you need a comparison to the basic document object creation procedure, or if this is the first time creating a package with the REST API, see Creating and Sending a Transaction.
### Results
Once you have completed this procedure, you should find the appropriate document work flow in your OneSpan Sign transaction.
**Request Payload Table**
| Property | Type | Editable | Required | Default | Sample Values |
| --- | --- | --- | --- | --- | --- |
| status | string | Yes | No | DRAFT | DRAFT / SENT / COMPLETED / ARCHIVED / DECLINED / OPTED_OUT / EXPIRED |
| type | string | Yes | No | PACKAGE | PACKAGE / TEMPLATE / LAYOUT |
| name | string | Yes | Yes | n/a | Document Attributes Example |
| documents | | | | | |
| name | string | Yes | No | n/a | sample doc |
| id | string | Yes | No | n/a | doc1 |
| index | integer | Yes | No | 0 | 0 / 1 / 2 ... |
## APEX SDK
To download the full code sample see our [Code Share](https://community.onespan.com/documentation/onespan-sign/codeshare/enable-document-workflow-apex-sdk) site.
A document work flow determines the order in which multiple documents should be signed by a signer. The default work flow allows a signer to freely browse all documents and sign them in any order. This topic explains how to change that.
In this example, there are two documents to be signed, with the First Document needing to be signed before the Second Document.
```plaintext
String document1Id = 'document1';
StaticResource sr1 = [SELECT Id, Body FROM StaticResource WHERE Name = 'testdoc1' LIMIT 1];
Map