# List of contracts

GET https://api.letsdeel.com/rest/v2/contracts

Retrieve a list of contracts.
 **Token scopes**: `contracts:read`

Reference: https://developer.deel.com/api/endpoints/contracts/get-contracts

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Deel HRIS SCIM API
  version: 1.0.0
paths:
  /contracts:
    get:
      operationId: get-contracts
      summary: List of contracts
      description: |-
        Retrieve a list of contracts.
         **Token scopes**: `contracts:read`
      tags:
        - subpackage_contracts
      parameters:
        - name: after_cursor
          in: query
          description: Return next page of results after the given cursor.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Return a page of results with the given number of records.
          required: false
          schema:
            type: string
        - name: order_direction
          in: query
          description: Order direction of results; ascending or descending.
          required: false
          schema:
            $ref: '#/components/schemas/ContractsGetParametersOrderDirection'
        - name: types
          in: query
          description: >-
            Filter contracts by type. A contract is included in the results if
            its type is in this list.
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ContractsGetParametersTypesSchemaItems'
        - name: statuses
          in: query
          description: >-
            Filter contracts by current status. A contract is included in the
            results if its status is in this list.
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ContractsGetParametersStatusesSchemaItems'
        - name: team_id
          in: query
          description: >-
            Filter contracts for the given team ID. NOTE: All query parameters
            are technically strings or arrays of strings.
          required: false
          schema:
            type: string
        - name: external_id
          in: query
          description: Filter contracts for the given external ID.
          required: false
          schema:
            type: string
        - name: external_id_absent
          in: query
          description: >-
            Filter contracts by external ID presence. When true, returns
            contracts without an external ID. When false, returns contracts with
            an external ID. Cannot be used with external_id query param when set
            to true.
          required: false
          schema:
            type: string
        - name: countries
          in: query
          description: Filter contracts by country codes.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: currencies
          in: query
          description: Filter contracts by currency codes.
          required: false
          schema:
            $ref: '#/components/schemas/ContractsGetParametersCurrencies'
        - name: search
          in: query
          description: >-
            Include a contract if its name or the contractor's name contains the
            given search term.
          required: false
          schema:
            type: string
        - name: sort_by
          in: query
          description: Sort contracts by the given field name.
          required: false
          schema:
            $ref: '#/components/schemas/ContractsGetParametersSortBy'
        - name: expand
          in: query
          description: Include cost centers in the response.
          required: false
          schema:
            $ref: '#/components/schemas/ContractsGetParametersExpand'
        - name: Authorization
          in: header
          description: >
            ## Authentication

            The Deel API uses bearer tokens to authenticate requests. All API
            calls must be made over HTTPS — calls over plain HTTP or without
            authentication will fail.


            ```curl

            curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
              -H 'Authorization: Bearer YOUR-TOKEN-HERE'
            ```


            [Learn more about authentication](/api/authentication)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contracts_getContracts_Response_200'
        '400':
          description: Bad Request - Validation error or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOfContractsRequestBadRequestError'
        '401':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '403':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '404':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '500':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
servers:
  - url: https://api.letsdeel.com/rest/v2
  - url: https://api-staging.letsdeel.com/rest/v2
components:
  schemas:
    ContractsGetParametersOrderDirection:
      type: string
      enum:
        - asc
        - desc
      title: ContractsGetParametersOrderDirection
    ContractsGetParametersTypesSchemaItems:
      type: string
      enum:
        - ongoing_time_based
        - milestones
        - time_based
        - pay_as_you_go_time_based
        - commission
        - payg_milestones
        - payg_tasks
        - eor
        - peo
        - unknown
        - employee
        - global_payroll
        - shield_msa
        - hris_direct_employee
        - contractor_outside_deel
      description: Type of a contract.
      title: ContractsGetParametersTypesSchemaItems
    ContractsGetParametersStatusesSchemaItems:
      type: string
      enum:
        - new
        - under_review
        - waiting_for_employee_contract
        - waiting_for_client_sign
        - processing_payment
        - waiting_for_contractor_sign
        - waiting_for_eor_sign
        - waiting_for_employee_sign
        - awaiting_deposit_payment
        - in_progress
        - completed
        - cancelled
        - user_cancelled
        - rejected
        - waiting_for_client_payment
        - onboarding
        - onboarded
      description: Status of a contract in Deel workflow.
      title: ContractsGetParametersStatusesSchemaItems
    ContractsGetParametersCurrencies:
      oneOf:
        - type: array
          items:
            type: string
        - type: string
      title: ContractsGetParametersCurrencies
    ContractsGetParametersSortBy:
      type: string
      enum:
        - contract_title
        - worker_name
      title: ContractsGetParametersSortBy
    ContractsGetParametersExpand:
      type: string
      enum:
        - cost_centers
      title: ContractsGetParametersExpand
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsType:
      type: string
      enum:
        - ongoing_time_based
        - milestones
        - time_based
        - pay_as_you_go_time_based
        - commission
        - payg_milestones
        - payg_tasks
        - eor
        - unknown
        - peo
        - employee
        - global_payroll
        - shield_msa
        - hris_direct_employee
        - contractor_outside_deel
      description: Type of a contract.
      title: ContractsGetResponsesContentApplicationJsonSchemaDataItemsType
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsClientTeam:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of this resource.
        name:
          type:
            - string
            - 'null'
          description: Name of a team.
      required:
        - id
        - name
      description: Team information for the client.
      title: ContractsGetResponsesContentApplicationJsonSchemaDataItemsClientTeam
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsClient:
      type: object
      properties:
        team:
          $ref: >-
            #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsClientTeam
          description: Team information for the client.
      description: Client information associated with the contract.
      title: ContractsGetResponsesContentApplicationJsonSchemaDataItemsClient
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsStatus:
      type: string
      enum:
        - new
        - under_review
        - waiting_for_approval
        - waiting_for_employee_contract
        - waiting_for_client_sign
        - processing_payment
        - waiting_for_contractor_sign
        - waiting_for_eor_sign
        - waiting_for_employee_sign
        - waiting_for_hris_employee_sign
        - awaiting_deposit_payment
        - in_progress
        - completed
        - cancelled
        - user_cancelled
        - rejected
        - waiting_for_client_payment
        - onboarding
        - onboarded
      description: Status of a contract in Deel workflow.
      title: ContractsGetResponsesContentApplicationJsonSchemaDataItemsStatus
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsWorkerAlternateEmailItems:
      type: object
      properties:
        email:
          type:
            - string
            - 'null'
          format: email
          description: User's email address.
        isVerified:
          type: boolean
          description: Indicates whether the alternate email address is verified.
      description: Alternate email address object.
      title: >-
        ContractsGetResponsesContentApplicationJsonSchemaDataItemsWorkerAlternateEmailItems
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsWorker:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of this resource.
        email:
          type:
            - string
            - 'null'
          description: User's email address.
        image:
          type:
            - string
            - 'null'
          format: uri
          description: URL of the worker's profile image.
        full_name:
          type: string
          description: Full name of the worker.
        alternate_email:
          type: array
          items:
            $ref: >-
              #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsWorkerAlternateEmailItems
          description: List of alternate email addresses.
      required:
        - id
      description: Worker information associated with the contract.
      title: ContractsGetResponsesContentApplicationJsonSchemaDataItemsWorker
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsSignatures:
      type: object
      properties:
        client_signed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the client signed the contract, in ISO-8601 format.
        worker_signature:
          type:
            - string
            - 'null'
          description: Worker's signature.
        worker_signed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the worker signed the contract, in ISO-8601 format.
      required:
        - client_signed_at
        - worker_signature
        - worker_signed_at
      description: Signature information for the contract.
      title: ContractsGetResponsesContentApplicationJsonSchemaDataItemsSignatures
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsInvitations:
      type: object
      properties:
        client_email:
          type:
            - string
            - 'null'
          description: Email address of the client to invite.
        worker_email:
          type:
            - string
            - 'null'
          description: Email address of the worker to invite.
      description: Details of invitations sent for signing the contract.
      title: ContractsGetResponsesContentApplicationJsonSchemaDataItemsInvitations
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsWhoReports:
      type: string
      enum:
        - both
        - client
        - contractor
      description: Indicates who is responsible for providing regular reports.
      title: ContractsGetResponsesContentApplicationJsonSchemaDataItemsWhoReports
    ContractsGetResponsesContentApplicationJsonSchemaDataItemsCostCentersItems:
      type: object
      properties:
        name:
          type: string
          description: Cost center name.
        number:
          type: string
          description: Cost center number.
        allocation_percentage:
          type: number
          format: double
          description: Percentage of the cost center allocation.
      description: Cost center object.
      title: >-
        ContractsGetResponsesContentApplicationJsonSchemaDataItemsCostCentersItems
    ContractsGetResponsesContentApplicationJsonSchemaDataItems:
      type: object
      properties:
        id:
          type: string
          description: UUID of the contract.
        type:
          $ref: >-
            #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsType
          description: Type of a contract.
        scale:
          type:
            - string
            - 'null'
          description: The payment scale (e.g., hourly, weekly, monthly, etc.).
        title:
          type: string
          description: Title of the contract.
        client:
          $ref: >-
            #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsClient
          description: Client information associated with the contract.
        status:
          $ref: >-
            #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsStatus
          description: Status of a contract in Deel workflow.
        worker:
          oneOf:
            - $ref: >-
                #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsWorker
            - type: 'null'
          description: Worker information associated with the contract.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the contract was created, in ISO-8601 format.
        signatures:
          $ref: >-
            #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsSignatures
          description: Signature information for the contract.
        external_id:
          type:
            - string
            - 'null'
          description: A unique identifier for the object provided by an external system.
        invitations:
          $ref: >-
            #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsInvitations
          description: Details of invitations sent for signing the contract.
        is_archived:
          type: boolean
          description: Indicates whether the contract is archived.
        is_shielded:
          type: boolean
          description: Indicates whether the contract is shielded.
        who_reports:
          $ref: >-
            #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsWhoReports
          description: Indicates who is responsible for providing regular reports.
        cost_centers:
          type: array
          items:
            $ref: >-
              #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItemsCostCentersItems
          description: List of cost centers associated with the contract.
        notice_period:
          type: number
          format: double
          default: 0
          description: >-
            Number of days required to give notice before terminating the
            contract.
        termination_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Date when the contract is terminated, in ISO-8601 format.
      required:
        - id
        - type
        - title
        - client
        - status
        - created_at
        - signatures
        - invitations
        - is_archived
        - is_shielded
        - termination_date
      title: ContractsGetResponsesContentApplicationJsonSchemaDataItems
    ContractsGetResponsesContentApplicationJsonSchemaPage:
      type: object
      properties:
        cursor:
          type: string
          description: Cursor for paginated results.
        total_rows:
          type: number
          format: double
          description: Total number of rows in the result set.
      required:
        - cursor
        - total_rows
      description: Pagination information for the response.
      title: ContractsGetResponsesContentApplicationJsonSchemaPage
    contracts_getContracts_Response_200:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaDataItems
          description: Array of contract objects.
        page:
          $ref: >-
            #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaPage
          description: Pagination information for the response.
      required:
        - data
        - page
      title: contracts_getContracts_Response_200
    ContractsGetResponsesContentApplicationJsonSchemaErrorsItems:
      type: object
      properties:
        message:
          type: string
          description: Error response
      required:
        - message
      title: ContractsGetResponsesContentApplicationJsonSchemaErrorsItems
    ContractsGetResponsesContentApplicationJsonSchemaRequest:
      type: object
      properties:
        method:
          type: string
          description: Method of the API
        status:
          type: number
          format: double
          description: Status of API response
      description: Error request details
      title: ContractsGetResponsesContentApplicationJsonSchemaRequest
    ListOfContractsRequestBadRequestError:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaErrorsItems
          description: Error messages
        request:
          $ref: >-
            #/components/schemas/ContractsGetResponsesContentApplicationJsonSchemaRequest
          description: Error request details
      required:
        - errors
      title: ListOfContractsRequestBadRequestError
    ApiErrorRequest:
      type: object
      properties:
        method:
          type: string
          description: The HTTP method of the failed request
        url:
          type: string
          description: The relative URL of the failed request
        status:
          type: number
          format: double
          description: The status code of the response
        api_req_id:
          type: string
          description: The request ID of the failed request
        docs:
          type: string
          description: >-
            A link to the official documentation for the requested endpoint
            resource
        source:
          type: string
          description: The source handler which produced the returned error
        code:
          type: number
          format: double
          description: The code of the source handler which produced the returned error
      title: ApiErrorRequest
    ApiError:
      type: object
      properties:
        message:
          type: string
          description: A description of the returned error
        path:
          type: string
          description: The JSON path where input validation failed
      title: ApiError
    ApiErrorContainer:
      type: object
      properties:
        request:
          $ref: '#/components/schemas/ApiErrorRequest'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
      title: ApiErrorContainer
  securitySchemes:
    deelToken:
      type: http
      scheme: bearer
      description: >
        ## Authentication

        The Deel API uses bearer tokens to authenticate requests. All API calls
        must be made over HTTPS — calls over plain HTTP or without
        authentication will fail.


        ```curl

        curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
          -H 'Authorization: Bearer YOUR-TOKEN-HERE'
        ```


        [Learn more about authentication](/api/authentication)
    oauth2:
      type: http
      scheme: bearer
      description: >-
        Standard OAuth2 security scheme based on
        https://swagger.io/docs/specification/authentication/

```

## SDK Code Examples

```python
import requests

url = "https://api.letsdeel.com/rest/v2/contracts"

querystring = {"after_cursor":"eyJlZmZlY3RpdmVEYXRlIjoiMjAyMy0wNS0wMyIsImlkIjozOSwibGltaXQiOjMsInJhbmsiOjZ9","limit":"50","order_direction":"desc","types":"[\"ongoing_time_based\",\"milestones\",\"pay_as_you_go_time_based\"]","statuses":"[\"waiting_for_client_sign\",\"waiting_for_contractor_sign\"]","team_id":"123e4567-e89b-12d3-a456-426614174000","external_id":"1234567890","external_id_absent":"true","countries":"[\"US\",\"GB\"]","currencies":"[\"USD\",\"GBP\"]","search":"Test","sort_by":"contract_title","expand":"cost_centers"}

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

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

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/v2/contracts?after_cursor=eyJlZmZlY3RpdmVEYXRlIjoiMjAyMy0wNS0wMyIsImlkIjozOSwibGltaXQiOjMsInJhbmsiOjZ9&limit=50&order_direction=desc&types=%5B%22ongoing_time_based%22%2C%22milestones%22%2C%22pay_as_you_go_time_based%22%5D&statuses=%5B%22waiting_for_client_sign%22%2C%22waiting_for_contractor_sign%22%5D&team_id=123e4567-e89b-12d3-a456-426614174000&external_id=1234567890&external_id_absent=true&countries=%5B%22US%22%2C%22GB%22%5D&currencies=%5B%22USD%22%2C%22GBP%22%5D&search=Test&sort_by=contract_title&expand=cost_centers';
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
package main

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

func main() {

	url := "https://api.letsdeel.com/rest/v2/contracts?after_cursor=eyJlZmZlY3RpdmVEYXRlIjoiMjAyMy0wNS0wMyIsImlkIjozOSwibGltaXQiOjMsInJhbmsiOjZ9&limit=50&order_direction=desc&types=%5B%22ongoing_time_based%22%2C%22milestones%22%2C%22pay_as_you_go_time_based%22%5D&statuses=%5B%22waiting_for_client_sign%22%2C%22waiting_for_contractor_sign%22%5D&team_id=123e4567-e89b-12d3-a456-426614174000&external_id=1234567890&external_id_absent=true&countries=%5B%22US%22%2C%22GB%22%5D&currencies=%5B%22USD%22%2C%22GBP%22%5D&search=Test&sort_by=contract_title&expand=cost_centers"

	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
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/v2/contracts?after_cursor=eyJlZmZlY3RpdmVEYXRlIjoiMjAyMy0wNS0wMyIsImlkIjozOSwibGltaXQiOjMsInJhbmsiOjZ9&limit=50&order_direction=desc&types=%5B%22ongoing_time_based%22%2C%22milestones%22%2C%22pay_as_you_go_time_based%22%5D&statuses=%5B%22waiting_for_client_sign%22%2C%22waiting_for_contractor_sign%22%5D&team_id=123e4567-e89b-12d3-a456-426614174000&external_id=1234567890&external_id_absent=true&countries=%5B%22US%22%2C%22GB%22%5D&currencies=%5B%22USD%22%2C%22GBP%22%5D&search=Test&sort_by=contract_title&expand=cost_centers")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.letsdeel.com/rest/v2/contracts?after_cursor=eyJlZmZlY3RpdmVEYXRlIjoiMjAyMy0wNS0wMyIsImlkIjozOSwibGltaXQiOjMsInJhbmsiOjZ9&limit=50&order_direction=desc&types=%5B%22ongoing_time_based%22%2C%22milestones%22%2C%22pay_as_you_go_time_based%22%5D&statuses=%5B%22waiting_for_client_sign%22%2C%22waiting_for_contractor_sign%22%5D&team_id=123e4567-e89b-12d3-a456-426614174000&external_id=1234567890&external_id_absent=true&countries=%5B%22US%22%2C%22GB%22%5D&currencies=%5B%22USD%22%2C%22GBP%22%5D&search=Test&sort_by=contract_title&expand=cost_centers")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.letsdeel.com/rest/v2/contracts?after_cursor=eyJlZmZlY3RpdmVEYXRlIjoiMjAyMy0wNS0wMyIsImlkIjozOSwibGltaXQiOjMsInJhbmsiOjZ9&limit=50&order_direction=desc&types=%5B%22ongoing_time_based%22%2C%22milestones%22%2C%22pay_as_you_go_time_based%22%5D&statuses=%5B%22waiting_for_client_sign%22%2C%22waiting_for_contractor_sign%22%5D&team_id=123e4567-e89b-12d3-a456-426614174000&external_id=1234567890&external_id_absent=true&countries=%5B%22US%22%2C%22GB%22%5D&currencies=%5B%22USD%22%2C%22GBP%22%5D&search=Test&sort_by=contract_title&expand=cost_centers', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/v2/contracts?after_cursor=eyJlZmZlY3RpdmVEYXRlIjoiMjAyMy0wNS0wMyIsImlkIjozOSwibGltaXQiOjMsInJhbmsiOjZ9&limit=50&order_direction=desc&types=%5B%22ongoing_time_based%22%2C%22milestones%22%2C%22pay_as_you_go_time_based%22%5D&statuses=%5B%22waiting_for_client_sign%22%2C%22waiting_for_contractor_sign%22%5D&team_id=123e4567-e89b-12d3-a456-426614174000&external_id=1234567890&external_id_absent=true&countries=%5B%22US%22%2C%22GB%22%5D&currencies=%5B%22USD%22%2C%22GBP%22%5D&search=Test&sort_by=contract_title&expand=cost_centers");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/v2/contracts?after_cursor=eyJlZmZlY3RpdmVEYXRlIjoiMjAyMy0wNS0wMyIsImlkIjozOSwibGltaXQiOjMsInJhbmsiOjZ9&limit=50&order_direction=desc&types=%5B%22ongoing_time_based%22%2C%22milestones%22%2C%22pay_as_you_go_time_based%22%5D&statuses=%5B%22waiting_for_client_sign%22%2C%22waiting_for_contractor_sign%22%5D&team_id=123e4567-e89b-12d3-a456-426614174000&external_id=1234567890&external_id_absent=true&countries=%5B%22US%22%2C%22GB%22%5D&currencies=%5B%22USD%22%2C%22GBP%22%5D&search=Test&sort_by=contract_title&expand=cost_centers")! 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()
```