> This page is for version v2.
> For other versions, use one of these documentation indexes:
> - v1 (default): https://developers.outpave.com/v1/llms.txt
> - v2: https://developers.outpave.com/v2/llms.txt

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

# Retrieve card servicing capabilities and status

GET https://api.outpave.com/api/v2/cards/{cardId}/servicing

Reads the card's servicing state from its issuer. Shipping address and credentials are omitted. Replacement, PIN display and wallet token changes are not available on every card program; `capabilities` says which this card's program supports. A capability means the issuer supports the action, not that the card is eligible for it right now. An `EXTERNAL` card is serviced by its bank, so this and every servicing request for one is refused with `NOT_ELIGIBLE`.

Reference: https://developers.outpave.com/v2/api-reference/issuing-api/cards/get-card-servicing

## Authentication

- `Authorization` header (bearer token, required) — Access token from `POST /access-token`. Valid for at most 30 minutes.

## Request

### Path parameters

- `cardId` (string, required) — The card's ID.

### Headers

- `Account-Holder` (string, optional) — The account holder a platform API key acts on. Platform keys must send it on account holder operations. A company API key acts on its own account holder; it may omit the header or send its own account holder ID.
- `X-Request-Id` (string, optional) — Your own correlation ID for this request. It is recorded with the request. The `X-Request-Id` response header is always generated by the server.

## Response

### 200

Read card servicing capabilities and status.

- `cardId` (string, required) — A resource ID. Treat it as an opaque, case-sensitive string.
- `accountHolderId` (string, required) — A resource ID. Treat it as an opaque, case-sensitive string.
- `capabilities` (CardServicingCapabilities, required) — What this card's issuer supports.
- `fulfillment` (CardFulfillment, required, nullable) — Shipment of a physical card. `null` for virtual cards.
- `wallet` (CardServicingWallet, required) — Wallet eligibility.
- `walletTokens` (list of WalletToken, required) — Apple Pay and Google Pay tokens for this card.

## Errors

### 400 Bad Request Error

The request does not match the contract.

- `type` (string, required) — Documentation URI for this `code`.
- `title` (string, required) — Short summary, fixed for each `code`.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — Explanation of this occurrence.
- `code` (enum, required) — Stable error code. Clients must accept codes not listed here.
  - Allowed values: `INVALID_REQUEST`, `IDEMPOTENCY_KEY_REQUIRED`, `INVALID_CURSOR`, `ACCOUNT_HOLDER_REQUIRED`, `INVALID_ACCOUNT_HOLDER_CONTEXT`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PERMISSION_DENIED`, `PERMISSION_NOT_ENABLED`, `API_KEY_NOT_ENROLLED`, `ACCOUNT_HOLDER_NOT_ACCESSIBLE`, `RESOURCE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `VALIDATION_FAILED`, `RELATED_RESOURCE_NOT_FOUND`, `NOT_ELIGIBLE`, `PROVIDER_REJECTED`, `RATE_LIMIT_EXCEEDED`, `API_ERROR`, `OPERATION_OUTCOME_UNKNOWN`, `SERVICE_UNAVAILABLE`
- `requestId` (string, required) — The `X-Request-Id` of the request that failed.
- `errors` (list of ProblemError, optional) — Individual problems with the request.

### 401 Unauthorized Error

The credential is missing or invalid.

- `type` (string, required) — Documentation URI for this `code`.
- `title` (string, required) — Short summary, fixed for each `code`.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — Explanation of this occurrence.
- `code` (enum, required) — Stable error code. Clients must accept codes not listed here.
  - Allowed values: `INVALID_REQUEST`, `IDEMPOTENCY_KEY_REQUIRED`, `INVALID_CURSOR`, `ACCOUNT_HOLDER_REQUIRED`, `INVALID_ACCOUNT_HOLDER_CONTEXT`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PERMISSION_DENIED`, `PERMISSION_NOT_ENABLED`, `API_KEY_NOT_ENROLLED`, `ACCOUNT_HOLDER_NOT_ACCESSIBLE`, `RESOURCE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `VALIDATION_FAILED`, `RELATED_RESOURCE_NOT_FOUND`, `NOT_ELIGIBLE`, `PROVIDER_REJECTED`, `RATE_LIMIT_EXCEEDED`, `API_ERROR`, `OPERATION_OUTCOME_UNKNOWN`, `SERVICE_UNAVAILABLE`
- `requestId` (string, required) — The `X-Request-Id` of the request that failed.
- `errors` (list of ProblemError, optional) — Individual problems with the request.

### 403 Forbidden Error

The credential is valid but cannot perform this operation.

- `type` (string, required) — Documentation URI for this `code`.
- `title` (string, required) — Short summary, fixed for each `code`.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — Explanation of this occurrence.
- `code` (enum, required) — Stable error code. Clients must accept codes not listed here.
  - Allowed values: `INVALID_REQUEST`, `IDEMPOTENCY_KEY_REQUIRED`, `INVALID_CURSOR`, `ACCOUNT_HOLDER_REQUIRED`, `INVALID_ACCOUNT_HOLDER_CONTEXT`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PERMISSION_DENIED`, `PERMISSION_NOT_ENABLED`, `API_KEY_NOT_ENROLLED`, `ACCOUNT_HOLDER_NOT_ACCESSIBLE`, `RESOURCE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `VALIDATION_FAILED`, `RELATED_RESOURCE_NOT_FOUND`, `NOT_ELIGIBLE`, `PROVIDER_REJECTED`, `RATE_LIMIT_EXCEEDED`, `API_ERROR`, `OPERATION_OUTCOME_UNKNOWN`, `SERVICE_UNAVAILABLE`
- `requestId` (string, required) — The `X-Request-Id` of the request that failed.
- `errors` (list of ProblemError, optional) — Individual problems with the request.

### 404 Not Found Error

The resource does not exist, or it is outside the account holder this request acts on.

- `type` (string, required) — Documentation URI for this `code`.
- `title` (string, required) — Short summary, fixed for each `code`.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — Explanation of this occurrence.
- `code` (enum, required) — Stable error code. Clients must accept codes not listed here.
  - Allowed values: `INVALID_REQUEST`, `IDEMPOTENCY_KEY_REQUIRED`, `INVALID_CURSOR`, `ACCOUNT_HOLDER_REQUIRED`, `INVALID_ACCOUNT_HOLDER_CONTEXT`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PERMISSION_DENIED`, `PERMISSION_NOT_ENABLED`, `API_KEY_NOT_ENROLLED`, `ACCOUNT_HOLDER_NOT_ACCESSIBLE`, `RESOURCE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `VALIDATION_FAILED`, `RELATED_RESOURCE_NOT_FOUND`, `NOT_ELIGIBLE`, `PROVIDER_REJECTED`, `RATE_LIMIT_EXCEEDED`, `API_ERROR`, `OPERATION_OUTCOME_UNKNOWN`, `SERVICE_UNAVAILABLE`
- `requestId` (string, required) — The `X-Request-Id` of the request that failed.
- `errors` (list of ProblemError, optional) — Individual problems with the request.

### 409 Conflict Error

The request conflicts with the resource's state, with a unique value, or with another request that used the same `Idempotency-Key`.

- `type` (string, required) — Documentation URI for this `code`.
- `title` (string, required) — Short summary, fixed for each `code`.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — Explanation of this occurrence.
- `code` (enum, required) — Stable error code. Clients must accept codes not listed here.
  - Allowed values: `INVALID_REQUEST`, `IDEMPOTENCY_KEY_REQUIRED`, `INVALID_CURSOR`, `ACCOUNT_HOLDER_REQUIRED`, `INVALID_ACCOUNT_HOLDER_CONTEXT`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PERMISSION_DENIED`, `PERMISSION_NOT_ENABLED`, `API_KEY_NOT_ENROLLED`, `ACCOUNT_HOLDER_NOT_ACCESSIBLE`, `RESOURCE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `VALIDATION_FAILED`, `RELATED_RESOURCE_NOT_FOUND`, `NOT_ELIGIBLE`, `PROVIDER_REJECTED`, `RATE_LIMIT_EXCEEDED`, `API_ERROR`, `OPERATION_OUTCOME_UNKNOWN`, `SERVICE_UNAVAILABLE`
- `requestId` (string, required) — The `X-Request-Id` of the request that failed.
- `errors` (list of ProblemError, optional) — Individual problems with the request.

### 422 Unprocessable Entity Error

The request matches the contract but a business rule refused it.

- `type` (string, required) — Documentation URI for this `code`.
- `title` (string, required) — Short summary, fixed for each `code`.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — Explanation of this occurrence.
- `code` (enum, required) — Stable error code. Clients must accept codes not listed here.
  - Allowed values: `INVALID_REQUEST`, `IDEMPOTENCY_KEY_REQUIRED`, `INVALID_CURSOR`, `ACCOUNT_HOLDER_REQUIRED`, `INVALID_ACCOUNT_HOLDER_CONTEXT`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PERMISSION_DENIED`, `PERMISSION_NOT_ENABLED`, `API_KEY_NOT_ENROLLED`, `ACCOUNT_HOLDER_NOT_ACCESSIBLE`, `RESOURCE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `VALIDATION_FAILED`, `RELATED_RESOURCE_NOT_FOUND`, `NOT_ELIGIBLE`, `PROVIDER_REJECTED`, `RATE_LIMIT_EXCEEDED`, `API_ERROR`, `OPERATION_OUTCOME_UNKNOWN`, `SERVICE_UNAVAILABLE`
- `requestId` (string, required) — The `X-Request-Id` of the request that failed.
- `errors` (list of ProblemError, optional) — Individual problems with the request.

### 429 Too Many Requests Error

The request budget is exhausted.

- `type` (string, required) — Documentation URI for this `code`.
- `title` (string, required) — Short summary, fixed for each `code`.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — Explanation of this occurrence.
- `code` (enum, required) — Stable error code. Clients must accept codes not listed here.
  - Allowed values: `INVALID_REQUEST`, `IDEMPOTENCY_KEY_REQUIRED`, `INVALID_CURSOR`, `ACCOUNT_HOLDER_REQUIRED`, `INVALID_ACCOUNT_HOLDER_CONTEXT`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PERMISSION_DENIED`, `PERMISSION_NOT_ENABLED`, `API_KEY_NOT_ENROLLED`, `ACCOUNT_HOLDER_NOT_ACCESSIBLE`, `RESOURCE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `VALIDATION_FAILED`, `RELATED_RESOURCE_NOT_FOUND`, `NOT_ELIGIBLE`, `PROVIDER_REJECTED`, `RATE_LIMIT_EXCEEDED`, `API_ERROR`, `OPERATION_OUTCOME_UNKNOWN`, `SERVICE_UNAVAILABLE`
- `requestId` (string, required) — The `X-Request-Id` of the request that failed.
- `errors` (list of ProblemError, optional) — Individual problems with the request.

### 500 Internal Server Error

An unexpected error occurred.

- `type` (string, required) — Documentation URI for this `code`.
- `title` (string, required) — Short summary, fixed for each `code`.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — Explanation of this occurrence.
- `code` (enum, required) — Stable error code. Clients must accept codes not listed here.
  - Allowed values: `INVALID_REQUEST`, `IDEMPOTENCY_KEY_REQUIRED`, `INVALID_CURSOR`, `ACCOUNT_HOLDER_REQUIRED`, `INVALID_ACCOUNT_HOLDER_CONTEXT`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PERMISSION_DENIED`, `PERMISSION_NOT_ENABLED`, `API_KEY_NOT_ENROLLED`, `ACCOUNT_HOLDER_NOT_ACCESSIBLE`, `RESOURCE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `VALIDATION_FAILED`, `RELATED_RESOURCE_NOT_FOUND`, `NOT_ELIGIBLE`, `PROVIDER_REJECTED`, `RATE_LIMIT_EXCEEDED`, `API_ERROR`, `OPERATION_OUTCOME_UNKNOWN`, `SERVICE_UNAVAILABLE`
- `requestId` (string, required) — The `X-Request-Id` of the request that failed.
- `errors` (list of ProblemError, optional) — Individual problems with the request.

### 503 Service Unavailable Error

A service this request depends on is unavailable.

- `type` (string, required) — Documentation URI for this `code`.
- `title` (string, required) — Short summary, fixed for each `code`.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — Explanation of this occurrence.
- `code` (enum, required) — Stable error code. Clients must accept codes not listed here.
  - Allowed values: `INVALID_REQUEST`, `IDEMPOTENCY_KEY_REQUIRED`, `INVALID_CURSOR`, `ACCOUNT_HOLDER_REQUIRED`, `INVALID_ACCOUNT_HOLDER_CONTEXT`, `INVALID_API_KEY`, `INVALID_ACCESS_TOKEN`, `PERMISSION_DENIED`, `PERMISSION_NOT_ENABLED`, `API_KEY_NOT_ENROLLED`, `ACCOUNT_HOLDER_NOT_ACCESSIBLE`, `RESOURCE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `VALIDATION_FAILED`, `RELATED_RESOURCE_NOT_FOUND`, `NOT_ELIGIBLE`, `PROVIDER_REJECTED`, `RATE_LIMIT_EXCEEDED`, `API_ERROR`, `OPERATION_OUTCOME_UNKNOWN`, `SERVICE_UNAVAILABLE`
- `requestId` (string, required) — The `X-Request-Id` of the request that failed.
- `errors` (list of ProblemError, optional) — Individual problems with the request.

## Types

### CardServicingCapabilities

What this card's issuer supports.

- `replacement` (boolean, optional) — Whether the card can be replaced.
- `replacementReasons` (list of string, optional) — Reasons accepted when replacing the card. `DAMAGED` applies to physical cards only.
- `balanceBehavior` (string, optional) — `SHARED_PROGRAM_BALANCE`: a replacement spends from the same card program balance. `UNSUPPORTED`: the card cannot be replaced.
- `fulfillment` (boolean, optional) — Whether the card is shipped. `true` for physical cards.
- `shippingUpdate` (boolean, optional) — Whether a pending shipment can be changed. Where `shippingCancel` is `true`, a canceled shipment can be shipped again too.
- `shippingCancel` (boolean, optional) — Whether a pending shipment can be canceled.
- `deliveryOptions` (list of string, optional) — Shipping speeds available: `STANDARD`, `EXPRESS`. Empty for virtual cards.
- `pinDisplay` (boolean, optional) — Whether a `PIN_DISPLAY` servicing session can be created.
- `pinChange` (boolean, optional) — Whether a `PIN_CHANGE` servicing session can be created to set or change the PIN.
- `walletProvisioning` (string, optional) — `SERVER_PAYLOAD`: send the device's wallet data and receive an encrypted payload. `ISSUER_SDK`: receive credentials for the issuer's SDK.
- `walletTokens` (boolean, optional) — Whether the card's wallet tokens are listed.
- `walletTokenUpdate` (boolean, optional) — Whether wallet tokens can be suspended, reactivated or deleted.

### CardFulfillment

- `status` (string, required) — `NOT_ORDERED`, `PENDING`, `SUBMITTED`, `SHIPPED`, `DELIVERED`, `RETURNED`, `FAILURE`, `CANCELED` or `UNKNOWN`.
- `service` (string, optional) — Shipping speed, for example `STANDARD` or `EXPRESS`.
- `carrier` (string, optional) — Shipping carrier.
- `trackingNumber` (string, optional) — Carrier tracking number.
- `trackingUrl` (string, optional) — Carrier tracking page. Always HTTPS.
- `estimatedArrival` (datetime, optional) — Estimated delivery time.

### CardServicingWallet

Wallet eligibility.

- `applePayEligible` (boolean, required) — Whether the card can be added to Apple Pay. `false` unless the card is `ACTIVE`.
- `googlePayEligible` (boolean, required) — Whether the card can be added to Google Pay. `false` unless the card is `ACTIVE`.
- `provisioningMethod` (string, required) — Same as `capabilities.walletProvisioning`.

### WalletToken

- `id` (string, required) — Token ID.
- `status` (enum, required) — `REQUESTED`, `ACTIVE`, `SUSPENDED` or `DELETED`. A deleted token cannot be restored.
  - Allowed values: `REQUESTED`, `ACTIVE`, `SUSPENDED`, `DELETED`
- `wallet` (enum, required) — `apple_pay` or `google_pay`.
  - Allowed values: `apple_pay`, `google_pay`
- `updatedAt` (double, required) — When the card network last changed the token, in epoch milliseconds.

### ProblemError

One problem with the request. At most one of `pointer`, `parameter` and `header` is present.

- `detail` (string, required) — What is wrong.
- `pointer` (string, optional) — JSON Pointer (RFC 6901) into the request body, written as a URI fragment, for example `#/policy/dailyLimit`.
- `parameter` (string, optional) — Name of the query or path parameter.
- `header` (string, optional) — Name of the request header, in lower case.
- `code` (string, optional) — Machine-readable reason for this item, when one exists.

## Examples

**Response**

```json
{
  "cardId": "6b1d4f0e-2a9c-4e7b-8d3f-0c5a1e9b7d26",
  "accountHolderId": "2b1f8f53-5d0e-4c0f-9a51-1d3b8c2e4f10",
  "capabilities": {
    "replacement": true,
    "replacementReasons": [
      "LOST",
      "STOLEN"
    ],
    "balanceBehavior": "SHARED_PROGRAM_BALANCE",
    "fulfillment": false,
    "shippingUpdate": false,
    "shippingCancel": false,
    "deliveryOptions": [],
    "pinDisplay": true,
    "pinChange": false,
    "walletProvisioning": "ISSUER_SDK",
    "walletTokens": true,
    "walletTokenUpdate": true
  },
  "fulfillment": null,
  "wallet": {
    "applePayEligible": true,
    "googlePayEligible": true,
    "provisioningMethod": "ISSUER_SDK"
  },
  "walletTokens": []
}
```

**SDK Code**

```python servicing
import requests

url = "https://api.outpave.com/api/v2/cards/cardId/servicing"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript servicing
const url = 'https://api.outpave.com/api/v2/cards/cardId/servicing';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go servicing
package main

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

func main() {

	url := "https://api.outpave.com/api/v2/cards/cardId/servicing"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby servicing
require 'uri'
require 'net/http'

url = URI("https://api.outpave.com/api/v2/cards/cardId/servicing")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java servicing
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.outpave.com/api/v2/cards/cardId/servicing")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php servicing
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.outpave.com/api/v2/cards/cardId/servicing', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp servicing
using RestSharp;

var client = new RestClient("https://api.outpave.com/api/v2/cards/cardId/servicing");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift servicing
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.outpave.com/api/v2/cards/cardId/servicing")! 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()
```