If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see Creating and Sending a Transaction.
#### HTTP Request
`POST /api/packages`
#### HTTP Headers
```http
Accept: application/json
Content-Type: multipart/form-data
Authorization: Basic api_key
```
#### Request Payload
```http
------WebKitFormBoundary1bNO60n7FqP5WO4t
Content-Disposition: form-data; name="file"; filename="testDocumentExtraction.pdf"
Content-Type: application/pdf
%PDF-1.5
%µµµµ
1 0 obj
<>>>
endobj....
------WebKitFormBoundary1bNO60n7FqP5WO4t
Content-Disposition: form-data; name="payload"
{
"roles": [
{
"id": "Signer1",
"type": "SIGNER",
"signers": [
{
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@example.com"
}
],
"name": "Signer1"
}
],
"documents": [
{
"approvals": [
{
"fields": [
{
"type": "INPUT",
"extract": true,
"subtype": "LABEL",
"name": "name1",
"binding": "{signer.name}"
},
{
"type": "INPUT",
"extract": true,
"subtype": "TEXTFIELD",
"name": "age1"
},
{
"type": "INPUT",
"extract": true,
"subtype": "TEXTFIELD",
"name": "address1"
},
{
"type": "INPUT",
"extract": true,
"subtype": "TEXTFIELD",
"name": "zip1"
},
{
"type": "INPUT",
"extract": true,
"subtype": "TEXTFIELD",
"name": "city1"
},
{
"type": "SIGNATURE",
"extract": true,
"subtype": "FULLNAME",
"name": "sig1"
}
],
"role": "Signer1"
}
],
"extract": true,
"name": "Sample Contract"
}
],
"name": "Field Position Extraction Example",
"type": "PACKAGE",
"language": "en",
"autoComplete": true,
"status": "DRAFT"
}
------WebKitFormBoundary1bNO60n7FqP5WO4t--
```
Ensure that you have “extract” : true set at the document level and that your PDF document contains fields named name1, age1, address1, zip1, city1 and sig1. If you do not, an error will be thrown.
For a complete description of each field, see the Request Payload table below.
#### Response Payload
```http
{
"id": "9sKhW-h-qS9m6Ho3zRv3n2a-rkI="
}
```
### Results
Here is an example of what you can expect to see once you have run your code.

### Request Payload Table
| Property | | | Type | Editable | Required | Default | Sample Values |
| --- | --- | --- | --- | --- | --- | --- | --- |
| status | | | string | Yes | No | DRAFT | DRAFT / SENT / COMPLETED / ARCHIVED / DECLINED / OPTED_OUT / EXPIRED |
| autoComplete | | | boolean | Yes | No | true | true / false |
| type | | | string | Yes | No | PACKAGE | PACKAGE / TEMPLATE / LAYOUT |
| name | | | string | Yes | Yes | n/a | Field Position Extraction Example |
| documents | | | | | | | |
| name | | | string | Yes | No | n/a | Sample Contract |
| extract | | | boolean | Yes | No | false | true / false |
| approvals | | | | | | | |
| | role | | string | Yes | No | n/a | Signer1 |
| | fields | | | | | | |
| | | type | string | Yes | Yes | n/a | SIGNATURE / INPUT |
| | | extract | boolean | Yes | No | false | true / false |
| | | subtype | string | Yes | Yes | n/a | FULLNAME / INITIALS / CAPTURE / MOBILE_CAPTURE / LABEL / TEXTFIELD / TEXTAREA / CHECKBOX / DATE / RADIO / LIST |
| | | name | string | Yes | No | n/a | sig1 |
| | | value | string | Yes | No | n/a | FULLNAME / INITIALS / CAPTURE / LABEL / TEXTFIELD / TEXTAREA / CHECKBOX / RADIO / LIST |
| | | binding | string | Yes | No | null | {approval.signed} / {signer.title} / {signer.name} / {signer.company} |
| roles | | | | | | | |
| id | | | string | Yes | No | n/a | Signer1 |
| name | | | string | Yes | No | n/a | Sender |
| type | | | string | Yes | No | SIGNER | SIGNER / SENDER |
| signers | | | | | | | |
| | email | | string | Yes | Yes | n/a | john.smith@example.com |
| | firstName | | string | Yes | Yes | n/a | John |
| | lastName | | string | Yes | Yes | n/a | Smith |
## APEX SDK
To download the full code sample see our [Code Share](https://community.onespan.com/documentation/onespan-sign/codeshare/position-extraction-apex-sdk/) site.
The Position Extraction feature ensures that the exact position and size of a field or signature in an uploaded PDF file are automatically retained in OneSpan Sign.
The following sample code shows you how to edit the document block object with position extraction.
If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see [](https://developer.esignlive.com/guides/quick-start/creating-and-sending-a-package-net/)[Creating and Sending a Transaction](/v1/docs/creating-and-sending-a-transaction#net-sdk).
```plaintext
// Prepare Documents Blob
String document1Name = 'Sample_Position_Extraction';
StaticResource sr = [SELECT Id, Body FROM StaticResource WHERE Name = 'test_position_extraction' LIMIT 1];
Map