> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetContactTaxDetails

# Package: tax

# Namespace: ContactTaxDetailsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/contact-tax-details/get-contact-tax-details.md

## Permission Scopes:
Read eCommerce - all read permissions: SCOPE.DC-ECOM-MEGA.READ-ECOM

## Introduction

Retrieves a contact's tax details by contact ID.

To include the contact's name, email, and VAT ID in the response, pass `CONTACT_DETAILS` in the `fields` array.

---

## REST API

### Schema

```
 Method: getContactTaxDetails
 Description: Retrieves a contact's tax details by contact GUID.  To include the contact's name, email, and VAT GUID in the response, pass `CONTACT_DETAILS` in the `fields` array.
 URL: https://www.wixapis.com/billing/v1/contact-tax-details/{id}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  id
 Method parameters: 
   query param name: fields | type: array<fields> | description: Additional fields to return in the response.  Supported values: `CONTACT_DETAILS`  | validation: maxItems 10
                 - enum:
                 -     CONTACT_DETAILS: Returns the contact's details, including first name, last name, company, email, and VAT ID.
   param name: id | type:   none | required: true 
 Return type: GetContactTaxDetailsResponse
  - name: contactTaxDetails | type: ContactTaxDetails | description: Retrieved contact tax details.  
     - name: id | type: string | description: Contact GUID. Also serves as the GUID of the contact tax details, since each contact has a single set of tax details.  | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the contact tax details are updated.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the contact tax details were created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the contact tax details were updated.  | read-only: true | validation: format date-time
     - name: taxExemptGroupId | type: string | description: GUID of the tax exempt group the contact is associated with. Setting this value makes the contact eligible for the group's tax exemption at checkout.  | validation: format GUID
     - name: contactDetails | type: ContactDetails | description: The contact's details, such as name, email, and VAT GUID.  Returned only when `CONTACT_DETAILS` is passed to the `fields` array in the request.  
        - name: firstName | type: string | description: Contact's first name.  | read-only: true | validation: maxLength 100
        - name: lastName | type: string | description: Contact's last name.  | read-only: true | validation: maxLength 100
        - name: company | type: string | description: Contact's company name.  | read-only: true | validation: maxLength 100
        - name: email | type: string | description: Contact's email address.  | read-only: true | validation: format EMAIL
        - name: vatId | type: string | description: Contact's VAT GUID. Read from the contact's `invoices.vatId` extended field, so it's empty unless that field is set on the contact.  | read-only: true | validation: maxLength 100
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the contact tax details.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
     - name: tags | type: Tags | description: Tags associated with the contact tax details.  
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  


```

### Examples

### Get Contact Tax Details
Retrieves a contact's tax details by contact ID. Pass CONTACT_DETAILS in the fields array to include the contact's name, email, and VAT ID.

```curl
curl -X GET \
    'https://www.wixapis.com/billing/v1/contact-tax-details/f1c3e2a0-1b2c-4d5e-8f90-1a2b3c4d5e6f?fields=CONTACT_DETAILS' \
    -H 'Authorization: <AUTH>' \
    -H 'Content-Type: application/json'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.contactTaxDetails.getContactTaxDetails(_id, options)
 Description: Retrieves a contact's tax details by contact GUID.  To include the contact's name, email, and VAT GUID in the response, pass `CONTACT_DETAILS` in the `fields` array.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  _id
 Method parameters: 
   param name: _id | type: string | description: GUID of the contact whose tax details to retrieve. | required: true | validation: format GUID
   param name: options | type: GetContactTaxDetailsOptions  none  
        - name: fields | type: array<ContactTaxDetailsRequestedFields> | description: Additional fields to return in the response.  Supported values: `CONTACT_DETAILS`  | validation: maxItems 10
             - enum:
             -     CONTACT_DETAILS: Returns the contact's details, including first name, last name, company, email, and VAT ID.
 Return type: PROMISE<ContactTaxDetails>
  - name: _id | type: string | description: Contact GUID. Also serves as the GUID of the contact tax details, since each contact has a single set of tax details.  | validation: format GUID
  - name: revision | type: string | description: Revision number, which increments by 1 each time the contact tax details are updated.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the contact tax details were created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the contact tax details were updated.  | read-only: true 
  - name: taxExemptGroupId | type: string | description: GUID of the tax exempt group the contact is associated with. Setting this value makes the contact eligible for the group's tax exemption at checkout.  | validation: format GUID
  - name: contactDetails | type: ContactDetails | description: The contact's details, such as name, email, and VAT GUID.  Returned only when `CONTACT_DETAILS` is passed to the `fields` array in the request.  
     - name: firstName | type: string | description: Contact's first name.  | read-only: true | validation: maxLength 100
     - name: lastName | type: string | description: Contact's last name.  | read-only: true | validation: maxLength 100
     - name: company | type: string | description: Contact's company name.  | read-only: true | validation: maxLength 100
     - name: email | type: string | description: Contact's email address.  | read-only: true | validation: format EMAIL
     - name: vatId | type: string | description: Contact's VAT GUID. Read from the contact's `invoices.vatId` extended field, so it's empty unless that field is set on the contact.  | read-only: true | validation: maxLength 100
  - name: extendedFields | type: ExtendedFields | description: Custom field data for the contact tax details.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
     - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
  - name: tags | type: Tags | description: Tags associated with the contact tax details.  
     - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
        - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
     - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  


```

### Examples

### getContactTaxDetails
```javascript
import { contactTaxDetails } from '@wix/ecom';

async function getContactTaxDetails(_id,options) {
  const response = await contactTaxDetails.getContactTaxDetails(_id,options);
};
```

### getContactTaxDetails (with elevated permissions)
```javascript
import { contactTaxDetails } from '@wix/ecom';
import { auth } from '@wix/essentials';

async function myGetContactTaxDetailsMethod(_id,options) {
  const elevatedGetContactTaxDetails = auth.elevate(contactTaxDetails.getContactTaxDetails);
  const response = await elevatedGetContactTaxDetails(_id,options);
}
```

### getContactTaxDetails (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { contactTaxDetails } from '@wix/ecom';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { contactTaxDetails },
  // Include the auth strategy and host as relevant
});


async function getContactTaxDetails(_id,options) {
  const response = await myWixClient.contactTaxDetails.getContactTaxDetails(_id,options);
};
```

---