> This page is for version API v1.
> For other versions, use one of these documentation indexes:
> - API v3 (default): https://docs.taxcloud.com/api-v-3/llms.txt
> - API v1: https://docs.taxcloud.com/api-v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.taxcloud.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.taxcloud.com/_mcp/server.

# Lookup for Date

POST https://api.taxcloud.net/1.0/TaxCloud/LookupForDate
Content-Type: application/json

Lookup applicable tax amounts, based on a particular date, for items being purchased based on a variety of factors.


Reference: https://docs.taxcloud.com/api-v-1/api-reference/legacy-api-reference/api-v-1/advanced/date-lookup

## Request

### Body (application/json)

This endpoint expects a LookupForDate.

- `apiLoginID` (string, required) — Find your API ID via [https://app.taxcloud.com/go/stores/](https://app.taxcloud.com/go/stores/)
- `apiKey` (string, required) — Find your API KEY via [https://app.taxcloud.com/go/stores/](https://app.taxcloud.com/go/stores/)
- `customerID` (string, required) — This should be the abstract identifier used by your system to uniquely identify customers. **Note:** This should not be your customer's email address or any other form of Personally Identifiable Information (PII).
- `deliveredBySeller` (boolean, required, default: false) — If you ship orders to customers via common carrier (USPS, UPS, FedEx, etc) should always be false.
- `origin` (Address, required)
- `destination` (Address, required)
- `cartItems` (list of CartItem, required)
- `useDate` (string, optional) — Rather than inferring the Lookup date, specify the Lookup date.
- `cartID` (string, optional) — CartID is very similar to an Order ID, except most systems do not issue immutable (permanent) identifiers for orders until customers actually place their order (clicking the BUY button).IMPORTANT: You must be able to persist the CartID accross all Lookup requests for a particular customer (including situations where a customer puts an item in her cart before logging in, then proceeds ordering after logging in).If your system does not provide a mechanism to create unique identifiers, you can omit this parameter (or submit as null) and TaxCloud will provide a unique identifier in the response (which you should persist for subsequent Lookup calls and the ultimate Authorized or AuthorizedWithCapture calls).

## Response

### 200

OK

- `LookupResult` (LookupResponseLookupResult, optional)

## Errors

### 500 Server Error

Unexpected Error

- `any`

## Types

### Address

- `Address1` (string, required)
- `City` (string, required)
- `State` (any, required)
- `Zip5` (double, required)
- `Zip4` (double, required)
- `Address2` (string, optional)

### CartItem

- `Index` (integer, required)
- `ItemID` (string, required)
- `TIC` (integer, required)
- `Price` (float, required)
- `Qty` (integer, required)
- `Tax` (float, optional) — Tax property is only valid for use with TIC 99999 (in-store sales)

### LookupResponseLookupResult

- `CartID` (string, optional) — CartID is very similar to an Order ID, except most systems do not issue immutable (permanent) identifiers for orders until customers actually place their order (clicking the BUY button).IMPORTANT: You must be able to persist the CartID accross all Lookup requests for a particular customer (including situations where a customer puts an item in her cart before logging in, then proceeds ordering after logging in).If your system does not provide a mechanism to create unique identifiers, you can omit this parameter (or submit as null) and TaxCloud will provide a unique identifier in the response (which you should persist for subsequent Lookup calls and the ultimate Authorized or AuthorizedWithCapture calls).
- `CartItemsResponse` (list of CartItemResponse, optional)
- `ResponseType` (integer, optional) — Response Types include \<ul>0 = Error. Likely invalid API Credentials1 = Warning. Something is wrong.2 = Informational. Something could be better\<li>3 = SUCCESS! You did it!
- `Messages` (list of string, optional) — Optional array of messages related to the response.

### CartItemResponse

- `CartItemIndex` (integer, optional)
- `TaxAmount` (float, optional)

## Examples

**Request**

```json
{
  "apiLoginID": "2D7D820",
  "apiKey": "0946110c-2aa9-4387-ad5c-4e1c551b8d0c",
  "customerID": "CustomerX23",
  "deliveredBySeller": false,
  "origin": {
    "Address1": "162 East Avenue",
    "City": "Norwalk",
    "State": null,
    "Zip5": 6851,
    "Zip4": 5715
  },
  "destination": {
    "Address1": "162 East Avenue",
    "City": "Norwalk",
    "State": null,
    "Zip5": 6851,
    "Zip4": 5715
  },
  "cartItems": [
    {
      "Index": 0,
      "ItemID": "ProductX23",
      "TIC": 0,
      "Price": 19.95,
      "Qty": 2
    }
  ]
}
```

**Response**

```json
{
  "LookupResult": {
    "CartID": "Cart2342534235",
    "CartItemsResponse": [
      {
        "CartItemIndex": 0,
        "TaxAmount": 2.65
      }
    ],
    "ResponseType": {
      "value": 0
    },
    "Messages": [
      "string"
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.taxcloud.net/1.0/TaxCloud/LookupForDate"

payload = {
    "apiLoginID": "2D7D820",
    "apiKey": "0946110c-2aa9-4387-ad5c-4e1c551b8d0c",
    "customerID": "CustomerX23",
    "deliveredBySeller": False,
    "origin": {
        "Address1": "162 East Avenue",
        "City": "Norwalk",
        "State": None,
        "Zip5": 6851,
        "Zip4": 5715
    },
    "destination": {
        "Address1": "162 East Avenue",
        "City": "Norwalk",
        "State": None,
        "Zip5": 6851,
        "Zip4": 5715
    },
    "cartItems": [
        {
            "Index": 0,
            "ItemID": "ProductX23",
            "TIC": 0,
            "Price": 19.95,
            "Qty": 2
        }
    ]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.taxcloud.net/1.0/TaxCloud/LookupForDate';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"apiLoginID":"2D7D820","apiKey":"0946110c-2aa9-4387-ad5c-4e1c551b8d0c","customerID":"CustomerX23","deliveredBySeller":false,"origin":{"Address1":"162 East Avenue","City":"Norwalk","State":null,"Zip5":6851,"Zip4":5715},"destination":{"Address1":"162 East Avenue","City":"Norwalk","State":null,"Zip5":6851,"Zip4":5715},"cartItems":[{"Index":0,"ItemID":"ProductX23","TIC":0,"Price":19.95,"Qty":2}]}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.taxcloud.net/1.0/TaxCloud/LookupForDate"

	payload := strings.NewReader("{\n  \"apiLoginID\": \"2D7D820\",\n  \"apiKey\": \"0946110c-2aa9-4387-ad5c-4e1c551b8d0c\",\n  \"customerID\": \"CustomerX23\",\n  \"deliveredBySeller\": false,\n  \"origin\": {\n    \"Address1\": \"162 East Avenue\",\n    \"City\": \"Norwalk\",\n    \"State\": null,\n    \"Zip5\": 6851,\n    \"Zip4\": 5715\n  },\n  \"destination\": {\n    \"Address1\": \"162 East Avenue\",\n    \"City\": \"Norwalk\",\n    \"State\": null,\n    \"Zip5\": 6851,\n    \"Zip4\": 5715\n  },\n  \"cartItems\": [\n    {\n      \"Index\": 0,\n      \"ItemID\": \"ProductX23\",\n      \"TIC\": 0,\n      \"Price\": 19.95,\n      \"Qty\": 2\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	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.taxcloud.net/1.0/TaxCloud/LookupForDate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"apiLoginID\": \"2D7D820\",\n  \"apiKey\": \"0946110c-2aa9-4387-ad5c-4e1c551b8d0c\",\n  \"customerID\": \"CustomerX23\",\n  \"deliveredBySeller\": false,\n  \"origin\": {\n    \"Address1\": \"162 East Avenue\",\n    \"City\": \"Norwalk\",\n    \"State\": null,\n    \"Zip5\": 6851,\n    \"Zip4\": 5715\n  },\n  \"destination\": {\n    \"Address1\": \"162 East Avenue\",\n    \"City\": \"Norwalk\",\n    \"State\": null,\n    \"Zip5\": 6851,\n    \"Zip4\": 5715\n  },\n  \"cartItems\": [\n    {\n      \"Index\": 0,\n      \"ItemID\": \"ProductX23\",\n      \"TIC\": 0,\n      \"Price\": 19.95,\n      \"Qty\": 2\n    }\n  ]\n}"

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.post("https://api.taxcloud.net/1.0/TaxCloud/LookupForDate")
  .header("Content-Type", "application/json")
  .body("{\n  \"apiLoginID\": \"2D7D820\",\n  \"apiKey\": \"0946110c-2aa9-4387-ad5c-4e1c551b8d0c\",\n  \"customerID\": \"CustomerX23\",\n  \"deliveredBySeller\": false,\n  \"origin\": {\n    \"Address1\": \"162 East Avenue\",\n    \"City\": \"Norwalk\",\n    \"State\": null,\n    \"Zip5\": 6851,\n    \"Zip4\": 5715\n  },\n  \"destination\": {\n    \"Address1\": \"162 East Avenue\",\n    \"City\": \"Norwalk\",\n    \"State\": null,\n    \"Zip5\": 6851,\n    \"Zip4\": 5715\n  },\n  \"cartItems\": [\n    {\n      \"Index\": 0,\n      \"ItemID\": \"ProductX23\",\n      \"TIC\": 0,\n      \"Price\": 19.95,\n      \"Qty\": 2\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.taxcloud.net/1.0/TaxCloud/LookupForDate', [
  'body' => '{
  "apiLoginID": "2D7D820",
  "apiKey": "0946110c-2aa9-4387-ad5c-4e1c551b8d0c",
  "customerID": "CustomerX23",
  "deliveredBySeller": false,
  "origin": {
    "Address1": "162 East Avenue",
    "City": "Norwalk",
    "State": null,
    "Zip5": 6851,
    "Zip4": 5715
  },
  "destination": {
    "Address1": "162 East Avenue",
    "City": "Norwalk",
    "State": null,
    "Zip5": 6851,
    "Zip4": 5715
  },
  "cartItems": [
    {
      "Index": 0,
      "ItemID": "ProductX23",
      "TIC": 0,
      "Price": 19.95,
      "Qty": 2
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.taxcloud.net/1.0/TaxCloud/LookupForDate");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"apiLoginID\": \"2D7D820\",\n  \"apiKey\": \"0946110c-2aa9-4387-ad5c-4e1c551b8d0c\",\n  \"customerID\": \"CustomerX23\",\n  \"deliveredBySeller\": false,\n  \"origin\": {\n    \"Address1\": \"162 East Avenue\",\n    \"City\": \"Norwalk\",\n    \"State\": null,\n    \"Zip5\": 6851,\n    \"Zip4\": 5715\n  },\n  \"destination\": {\n    \"Address1\": \"162 East Avenue\",\n    \"City\": \"Norwalk\",\n    \"State\": null,\n    \"Zip5\": 6851,\n    \"Zip4\": 5715\n  },\n  \"cartItems\": [\n    {\n      \"Index\": 0,\n      \"ItemID\": \"ProductX23\",\n      \"TIC\": 0,\n      \"Price\": 19.95,\n      \"Qty\": 2\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "apiLoginID": "2D7D820",
  "apiKey": "0946110c-2aa9-4387-ad5c-4e1c551b8d0c",
  "customerID": "CustomerX23",
  "deliveredBySeller": false,
  "origin": [
    "Address1": "162 East Avenue",
    "City": "Norwalk",
    "State": ,
    "Zip5": 6851,
    "Zip4": 5715
  ],
  "destination": [
    "Address1": "162 East Avenue",
    "City": "Norwalk",
    "State": ,
    "Zip5": 6851,
    "Zip4": 5715
  ],
  "cartItems": [
    [
      "Index": 0,
      "ItemID": "ProductX23",
      "TIC": 0,
      "Price": 19.95,
      "Qty": 2
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.taxcloud.net/1.0/TaxCloud/LookupForDate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```