> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.staple.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.staple.ai/_mcp/server.

# Get Model Fields

GET https://api.staple.io/v2/supernova/models/{modelName}

Get pre-configured model fields.

Reference: https://docs.staple.ai/api-reference/v2/document-creation/get-model-fields

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v2
  version: 1.0.0
paths:
  /v2/supernova/models/{modelName}:
    get:
      operationId: getModelFields
      summary: Get Model Fields
      description: Get pre-configured model fields.
      tags:
        - documentCreation
      parameters:
        - name: modelName
          in: path
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Document
                  Creation_getModelFields_Response_200
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    Document Creation_getModelFields_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Document Creation_getModelFields_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples



**Response**

```json
{
  "documentModelFields": {
    "model_fields": [
      {
        "UICategory": "Basic Information",
        "code": "InvoiceNumber",
        "description": null,
        "extraction_method": null,
        "name": "Invoice Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "DeliveryOrderNumber",
        "description": null,
        "extraction_method": null,
        "name": "Delivery Order Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "SalesOrderNumber",
        "description": null,
        "extraction_method": null,
        "name": "Sales Order Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "VendorGSTNumber",
        "description": null,
        "extraction_method": null,
        "name": "Vendor GST Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "CustomerGSTNumber",
        "description": null,
        "extraction_method": null,
        "name": "Customer GST Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "PONumber",
        "description": null,
        "extraction_method": null,
        "name": "PO Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "OutletCode",
        "description": null,
        "extraction_method": null,
        "name": "Outlet Code",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Payment Instructions",
        "code": "AccountNumber",
        "description": null,
        "extraction_method": null,
        "name": "Account Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Payment Instructions",
        "code": "PaymentTerm",
        "description": null,
        "extraction_method": null,
        "name": "Payment Term",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Payment Instructions",
        "code": "SwiftCode",
        "description": null,
        "extraction_method": null,
        "name": "Swift Code",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Payment Instructions",
        "code": "IBAN",
        "description": null,
        "extraction_method": null,
        "name": "IBAN",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "InvoiceDate",
        "description": null,
        "extraction_method": null,
        "name": "Invoice Date",
        "recurring": null,
        "required": null,
        "type": "Date"
      },
      {
        "UICategory": "Basic Information",
        "code": "PaymentDate",
        "description": null,
        "extraction_method": null,
        "name": "Payment Date",
        "recurring": null,
        "required": null,
        "type": "Date"
      },
      {
        "UICategory": "Basic Information",
        "code": "DeliveryDate",
        "description": null,
        "extraction_method": null,
        "name": "Delivery Date",
        "recurring": null,
        "required": null,
        "type": "Date"
      },
      {
        "UICategory": "Basic Information",
        "code": "OtherDate",
        "description": null,
        "extraction_method": null,
        "name": "Other Date",
        "recurring": null,
        "required": null,
        "type": "Date"
      },
      {
        "UICategory": "Basic Information",
        "code": "ProjectName",
        "description": null,
        "extraction_method": null,
        "name": " Project Name",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "TaxPercent",
        "description": null,
        "extraction_method": null,
        "name": "Tax Percent",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "FXRate",
        "description": null,
        "extraction_method": null,
        "name": "FX Rate",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "Payment Instructions",
        "code": "AccountName",
        "description": null,
        "extraction_method": null,
        "name": "Account Name",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "Total",
        "description": null,
        "extraction_method": null,
        "name": "Total",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "Subtotal",
        "description": null,
        "extraction_method": null,
        "name": "Subtotal",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "Freight",
        "description": null,
        "extraction_method": null,
        "name": "Freight",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "TaxTotal",
        "description": null,
        "extraction_method": null,
        "name": "Tax Total",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "Discount",
        "description": null,
        "extraction_method": null,
        "name": "Discount",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "DiscountPercent",
        "description": null,
        "extraction_method": null,
        "name": "Discount Percent",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "Email",
        "description": null,
        "extraction_method": null,
        "name": "Email",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "URL",
        "description": null,
        "extraction_method": null,
        "name": "URL",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "Currency",
        "description": null,
        "extraction_method": null,
        "name": "Currency",
        "recurring": null,
        "required": null,
        "type": "Currency"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "CustomerName",
        "description": null,
        "extraction_method": null,
        "name": "Customer Name",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "BillingAddress",
        "description": null,
        "extraction_method": null,
        "name": "Billing Address",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "ShippingAddress",
        "description": null,
        "extraction_method": null,
        "name": "Shipping Address",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "CompanyName",
        "description": null,
        "extraction_method": null,
        "name": "Vendor Name",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "SenderAddress",
        "description": null,
        "extraction_method": null,
        "name": "Vendor Address",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "SupplierNote",
        "description": null,
        "extraction_method": null,
        "name": "Supplier Note",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "SpecialNotice",
        "description": null,
        "extraction_method": null,
        "name": "Special Notice",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "ReceivedAddress",
        "description": null,
        "extraction_method": null,
        "name": "Received Address",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "DocumentType",
        "description": null,
        "extraction_method": null,
        "name": "Invoice Type",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "TotalRounding",
        "description": null,
        "extraction_method": null,
        "name": "Total Rounding",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "LessAmountPaid",
        "description": null,
        "extraction_method": null,
        "name": "Advance Payment",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "Basic Information",
        "code": "InvoiceBankName",
        "description": null,
        "extraction_method": null,
        "name": "Bank Name",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "UniqueStamp",
        "description": null,
        "extraction_method": null,
        "name": "Unique Stamp",
        "recurring": null,
        "required": null,
        "type": "Boolean"
      },
      {
        "UICategory": "Basic Information",
        "code": "Signature",
        "description": null,
        "extraction_method": null,
        "name": "Signature",
        "recurring": null,
        "required": null,
        "type": "Boolean"
      },
      {
        "UICategory": "Basic Information",
        "code": "RubberStamp",
        "description": null,
        "extraction_method": null,
        "name": "RubberStamp",
        "recurring": null,
        "required": null,
        "type": "Boolean"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "ExchangeCurrencyTo",
        "description": null,
        "extraction_method": null,
        "name": "Exchange Currency To",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "ExchangeCurrencyFrom",
        "description": null,
        "extraction_method": null,
        "name": "Exchange Currency From",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "Basic Information",
        "code": "SerialNumber",
        "description": null,
        "extraction_method": null,
        "name": "Serial Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "FormNumber",
        "description": null,
        "extraction_method": null,
        "name": "Form Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "DescriptionText",
        "description": null,
        "extraction_method": null,
        "name": "Description Text",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "ISOCountryCode",
        "description": null,
        "extraction_method": null,
        "name": "ISOCountryCode",
        "recurring": null,
        "required": null,
        "type": "CountryCode"
      },
      {
        "UICategory": "Verification",
        "code": "E-Verification",
        "description": null,
        "extraction_method": null,
        "name": "Govt. Verification",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "VendorPhone",
        "description": null,
        "extraction_method": null,
        "name": "Vendor Phone Number",
        "recurring": null,
        "required": null,
        "type": "Digits"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "VendorFax",
        "description": null,
        "extraction_method": null,
        "name": "Vendor Fax Number",
        "recurring": null,
        "required": null,
        "type": "Digits"
      },
      {
        "UICategory": "Verification",
        "code": "LineRowsCheck",
        "description": null,
        "extraction_method": null,
        "name": "Line Rows Check",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "SubtotalCheck",
        "description": null,
        "extraction_method": null,
        "name": "Subtotal Check",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "Totalcheck",
        "description": null,
        "extraction_method": null,
        "name": "Total Check",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "VendorAddressCheck",
        "description": null,
        "extraction_method": null,
        "name": "Vendor Address Check",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "VendorNameCheck",
        "description": null,
        "extraction_method": null,
        "name": "Vendor Name Check",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "RegisteredVendorStatus",
        "description": null,
        "extraction_method": null,
        "name": "Registered Vendor Status",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "RegisteredVendorName",
        "description": null,
        "extraction_method": null,
        "name": "Registered Vendor Name",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "RegisteredVendorAddress",
        "description": null,
        "extraction_method": null,
        "name": "Registered Vendor Address",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "NationalTaxNumber",
        "description": null,
        "extraction_method": null,
        "name": "NTN",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "HSNOrSACCode",
        "description": null,
        "extraction_method": null,
        "name": "HSN SAC",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "WithholdingTaxTotal",
        "description": null,
        "extraction_method": null,
        "name": "Withholding Tax Total",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "AdvanceTax",
        "description": null,
        "extraction_method": null,
        "name": "Advance Tax",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "SpecificTax",
        "description": null,
        "extraction_method": null,
        "name": "Specific Tax",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "SpecificTaxPercent",
        "description": null,
        "extraction_method": null,
        "name": "Specific Tax Percent",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "PublicLightingTax",
        "description": null,
        "extraction_method": null,
        "name": "Public Lighting Tax",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "PublicLightingTaxPercent",
        "description": null,
        "extraction_method": null,
        "name": "Public Lighting Tax Percent",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "SalesTax",
        "description": null,
        "extraction_method": null,
        "name": "Sales Tax",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "AdditionalTax",
        "description": null,
        "extraction_method": null,
        "name": "Additional Tax",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "SalesTaxPercent",
        "description": null,
        "extraction_method": null,
        "name": "Sales Tax Percent",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "BIRNumber",
        "description": null,
        "extraction_method": null,
        "name": "BIR Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "AdditionalPONumbers",
        "description": null,
        "extraction_method": null,
        "name": "Additional PO Numbers",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "POTotal",
        "description": null,
        "extraction_method": null,
        "name": "PO Total",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "VAT & Amounts",
        "code": "DOTotal",
        "description": null,
        "extraction_method": null,
        "name": "DO Total",
        "recurring": null,
        "required": null,
        "type": "Amount"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "CustomerEntityName",
        "description": null,
        "extraction_method": null,
        "name": "Customer Entity Name",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "Region",
        "description": null,
        "extraction_method": null,
        "name": "Region",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Basic Information",
        "code": "Strikethrough",
        "description": null,
        "extraction_method": null,
        "name": "Strikethrough",
        "recurring": null,
        "required": null,
        "type": "Boolean"
      },
      {
        "UICategory": "Basic Information",
        "code": "Handwritten",
        "description": null,
        "extraction_method": null,
        "name": "Handwritten",
        "recurring": null,
        "required": null,
        "type": "Boolean"
      },
      {
        "UICategory": "Basic Information",
        "code": "VendorCode",
        "description": null,
        "extraction_method": null,
        "name": "VendorCode",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "ABN",
        "description": null,
        "extraction_method": null,
        "name": "ABN",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "ABNVerification",
        "description": null,
        "extraction_method": null,
        "name": "ABN Verification",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "EntityStatus",
        "description": null,
        "extraction_method": null,
        "name": "Entity Status",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "ASICNumber",
        "description": null,
        "extraction_method": null,
        "name": "ASIC Number",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Metadata",
        "code": "Producer",
        "description": null,
        "extraction_method": null,
        "name": "Producer",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Metadata",
        "code": "CreatedAt",
        "description": null,
        "extraction_method": null,
        "name": "Created At",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Metadata",
        "code": "ModifiedAt",
        "description": null,
        "extraction_method": null,
        "name": "Modified At",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Metadata",
        "code": "GPSCoordinates",
        "description": null,
        "extraction_method": null,
        "name": "GPS Coordinates",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Verification",
        "code": "DigitalSignature",
        "description": null,
        "extraction_method": null,
        "name": "Digital Signature",
        "recurring": null,
        "required": null,
        "type": "Text"
      },
      {
        "UICategory": "Vendor & Customer",
        "code": "ABA",
        "description": null,
        "extraction_method": null,
        "name": "ABA",
        "recurring": null,
        "required": null,
        "type": "Text"
      }
    ],
    "table_headers": [
      "Description",
      "Quantity",
      "LineAmount",
      "UnitAmount",
      "Tax",
      "TaxRate",
      "DiscountRate",
      "DiscountAmount",
      "UnitOfMeasurement",
      "ItemCode",
      "ItemNumber",
      "ItemizedHSNOrSACCode",
      "WithholdingTax",
      "Other",
      "SKUCode"
    ]
  }
}
```

**SDK Code**

```python Get Model Fields
import requests

url = "https://api.staple.io/v2/supernova/models/modelName"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Get Model Fields
const url = 'https://api.staple.io/v2/supernova/models/modelName';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get Model Fields
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staple.io/v2/supernova/models/modelName"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get Model Fields
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v2/supernova/models/modelName")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Get Model Fields
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.staple.io/v2/supernova/models/modelName")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Get Model Fields
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.staple.io/v2/supernova/models/modelName', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Get Model Fields
using RestSharp;

var client = new RestClient("https://api.staple.io/v2/supernova/models/modelName");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Get Model Fields
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v2/supernova/models/modelName")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```