# GetUPC

Retrieve a single UPC

`GET /api/v2/companies/{companyId}/upcs/{id}`

**API:** AvaTax API
**Tag:** Upcs
**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/crossborder/api/methods/Upcs/GetUPC/

## Description

Get the UPC object identified by this URL.
A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
* This API depends on the following active services:*Required* (all):  AvaUpc.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The ID of the company that owns this UPC |
| `id` | integer | path | Yes | The primary key of this UPC |
| `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 | `UPCModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `UPCModel`

One Universal Product Code object as defined for your company.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | The unique ID number for this UPC. Example: `123456789`. |
| `companyId` | integer | No | The unique ID number of the company to which this UPC belongs. Example: `1234567`. |
| `upc` | string | **Yes** | The 12-14 character Universal Product Code, European Article Number, or Global Trade Identification Number. Example: `023032550992`. |
| `legacyTaxCode` | string | No | Legacy Tax Code applied to any product sold with this UPC. Example: `PS081282`. |
| `description` | string | **Yes** | Description of the product to which this UPC applies. Example: `Yarn`. |
| `effectiveDate` | string | No | If this UPC became effective on a certain date, this contains the first date on which the UPC was effective. |
| `endDate` | string | No | If this UPC expired or will expire on a certain date, this contains the last date on which the UPC was effective. |
| `usage` | integer | No | A usage identifier for this UPC code. |
| `isSystem` | integer | No | A flag indicating whether this UPC code is attached to the AvaTax system or to a company. |
| `createdDate` | string | No | The date when this record was created. |
| `createdUserId` | integer | No | The User ID of the user who created this record. |
| `modifiedDate` | string | No | The date/time when this record was last modified. |
| `modifiedUserId` | integer | No | The user ID of the user who last modified this record. |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/upcs/{id}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```