# DIL: Get PCode outside of the US

Source: https://developer.avalara.com/products/communications/integration-guides/communications-integration/qfw5325924227758/

Guide: Communications

# DIL: Get PCode outside of the US

Use the [PCode](https://developer.avalara.com/api-reference/communications/v2/methods/Jurisdiction%20Determination/GetPCode/) endpoint to retrieve a PCode for location outside of the US.

## Request

**View example**:

This example requests a best match for PCodes for a location in Quebec, Canada, with no limit as to the number of results returned.

```
curl
   --request POST
   --header 'Content-Type: application/json'
  --header 'Authorization: Basic {Base64-encoded credentials}'
  --location
   -g
   --data-raw '{
    "CountryIso": "CA",
    "State": "QC",
    "County": "",
    "City": "Chomeday",
    "ZipCode": "H7V 3Z3",
    "BestMatch": true,
    "LimitResults": 0,
    "NpaNxx": "string",
    "Fips": "string
  }'
  https://communicationsua.avalara.net/api/v2/afc/PCode'
```

## Response

**View example**:

The response returns a single PCode.

```
{
    "LocationData": [{    "IsAlternate": true,    "CountryIso": "CAN",    "State": "QC",    "County": "",    "Locality": "LAVAL",    "PCode": 4934500}
    ],
    "MatchCount": 1,
    "InputMatchType": "Best",
    "MatchTypeApplied": "Best",
    "ResultsLimit": 100
}
```