# Ping

Tests connectivity and version of the service

`GET /api/v2/utilities/ping`

**API:** AvaTax API
**Tag:** Utilities
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/avatax/api/methods/Utilities/Ping/

## Description

Check connectivity to AvaTax and return information about the AvaTax API server.
            
This API is intended to help you verify that your connection is working.  This API will always succeed and will
never return a error.  It provides basic information about the server you connect to:
            
* `version` - The version number of the AvaTax API server that responded to your request.  The AvaTax API version number is updated once per month during Avalara's update process.
* `authenticated` - A boolean flag indicating whether or not you sent valid credentials with your API request.
* `authenticationType` - If you provided valid credentials to the API, this field will tell you whether you used Bearer, Username, or LicenseKey authentication.
* `authenticatedUserName` - If you provided valid credentials to the API, this field will tell you the username of the currently logged in user.
* `authenticatedUserId` - If you provided valid credentials to the API, this field will tell you the user ID of the currently logged in user.
* `authenticatedAccountId` - If you provided valid credentials to the API, this field will contain the account ID of the currently logged in user.
            
This API helps diagnose connectivity problems between your application and AvaTax; you may call this API even
if you do not have verified connection credentials.  If this API fails, either your computer is not connected to
the internet, or there is a routing problem between your office and Avalara, or the Avalara server is not available.
For more information on the uptime of AvaTax, please see [Avalara's AvaTax Status Page](https://status.avalara.com/).

### Security Policies

* This API may be called without providing authentication credentials.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `PingResultModel` |
| 400 | Bad Request | `ProblemDetails` |
| 401 | Unauthorized | `ProblemDetails` |

### 200 Response: `PingResultModel`

Ping Result Model

| Property | Type | Required | Description |
|---|---|---|---|
| `version` | string | No | Version number Example: `1.0.0.0`. |
| `authenticated` | boolean | No | Returns true if you provided authentication for this API call; false if you did not. Example: `true`. |
| `authenticationType` | string | No | Returns the type of authentication you provided, if authenticated Values: `None`, `UsernamePassword`, `AccountIdLicenseKey`, `OpenIdBearerToken`, `ClientMtlsCertificate`. Example: `None`. |
| `authenticatedUserName` | string | No | The username of the currently authenticated user, if any. Example: `TestUser`. |
| `authenticatedUserId` | integer | No | The ID number of the currently authenticated user, if any. Example: `98765`. |
| `authenticatedAccountId` | integer | No | The ID number of the currently authenticated user's account, if any. Example: `123456789`. |
| `authenticatedCompanyId` | integer | No | The ID number of the currently authenticated user's company, if any. Example: `123456789`. |
| `crmid` | string | No | The connected Salesforce account. Example: `1111`. |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/utilities/ping" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```