# Numeral

> Quote sales tax, look up exchange rates and read Numeral tax records.

App · 15 actions. Web page: https://docs.lodol.com/docs/integrations/numeral

## Actions

### Calculate sales tax

Quote sales tax for an order using its destination and line items.

**Inputs**

- Address line 1 (`address_line_1`, text, required): Street address.
- Address line 2 (`address_line_2`, text): Apartment or suite.
- Address city (`address_city`, text, required): City.
- Address province (`address_province`, text, required): State or province code.
- Address postal code (`address_postal_code`, text): Postal code. Required for US and Canadian addresses.
- Address country (`address_country`, text, required): Country of the destination address. One of: `US`, `CA`, `AT`, `BE`, `BG`, `HR`, `CZ`, `DE`, `DK`, `EE`, and 18 more.
- Address type (`address_type`, text, required): Kind of destination address. One of: `shipping`, `billing`.
- Currency (`currency`, text, required): Three-letter currency code for the order.
- Tax included (`tax_included`, true/false): Whether line amounts already include tax.
- Line items (`line_items`, list, required): Order line items with amount in the currency’s smallest unit, quantity and product ID or fallback tax category.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "id": "example",
    "line_items": [
      {}
    ],
    "total_amount_excluding_tax": 1,
    "total_amount_including_tax": 1,
    "total_tax_amount": 1
  }
}
```

### Check the Numeral connection

Check access and see whether the key is for test or production.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "api_version": "example",
    "env": "example",
    "status": "example",
    "timestamp": "example"
  }
}
```

### Create a tax customer

Create a customer for tax calculations and reporting.

**Inputs**

- Email (`email`, text, required): Customer email address.
- Name (`name`, text): Customer name.
- Reference customer ID (`reference_customer_id`, text): Your own ID for this customer.
- Is tax exempt (`is_tax_exempt`, true/false): Treat this customer as tax exempt.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "email": "example",
    "id": "example",
    "is_tax_exempt": true,
    "name": "example",
    "reference_customer_id": "example"
  }
}
```

### Delete a recorded sale

Delete a transaction recorded by mistake. Use Record a refund to report a return.

**Inputs**

- Transaction ID (`transaction_id`, text, required): Numeral transaction ID.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "deleted_at": 1,
    "object": "example"
  }
}
```

### Delete a tax customer

Delete a customer using their Numeral ID.

**Inputs**

- Customer ID (`customer_id`, text, required): Numeral customer ID.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "deleted_at": 1,
    "object": "example"
  }
}
```

### Get a daily exchange rate

Look up the rate between two currencies on a past date.

**Inputs**

- Date (`date`, date, required): Date of the exchange rate.
- Base currency (`base_currency`, text, required): Three-letter currency code to convert from.
- Target currency (`target_currency`, text, required): Three-letter currency code to convert to.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "base_currency": "example",
    "date": "example",
    "rate": 1,
    "target_currency": "example"
  }
}
```

### Get a product

Read the name and tax category for a product.

**Inputs**

- Product ID (`product_id`, text, required): Product id.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "created_at": 1,
    "product_category": "example",
    "reference_product_id": "example",
    "reference_product_name": "example",
    "testmode": true,
    "updated_at": 1
  }
}
```

### Get a recorded sale

Read a tax transaction and its line items.

**Inputs**

- Transaction ID (`transaction_id`, text, required): Numeral transaction ID.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "calculation_id": "example",
    "id": "example",
    "line_items": [
      {}
    ],
    "reference_order_id": "example",
    "testmode": true,
    "transaction_processed_at": 1
  }
}
```

### Get a tax customer

Look up a customer by their Numeral ID or your own reference ID.

**Inputs**

- Customer ID (`customer_id`, text, required): Numeral customer ID.
- ID type (`id_type`, text): Which kind of customer ID to look up. One of: `id`, `reference_customer_id` (Reference customer id).

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "email": "example",
    "id": "example",
    "is_tax_exempt": true,
    "name": "example",
    "reference_customer_id": "example"
  }
}
```

### List products

Read up to 50 products and the cursor for the next page.

**Inputs**

- Cursor (`cursor`, text): Last product ID from the previous page.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "has_more": true,
    "last_product_id": "example",
    "products": [
      {
        "created_at": 1,
        "product_category": "example",
        "reference_product_id": "example",
        "reference_product_name": "example",
        "testmode": true,
        "updated_at": 1
      }
    ]
  }
}
```

### List refunds for a sale

Read the refunds associated with a tax transaction.

**Inputs**

- Transaction ID (`transaction_id`, text, required): Numeral transaction ID.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "refunds": [
      {
        "id": "example",
        "line_items": [
          {}
        ],
        "refund_processed_at": 1,
        "testmode": true
      }
    ]
  }
}
```

### Record a refund

Record a full or partial tax refund against a sale.

**Inputs**

- Transaction ID (`transaction_id`, text, required): Numeral ID of the sale to refund.
- Refund type (`refund_type`, text, required): Whether the refund is full or partial. One of: `full`, `partial`.
- Refund processed at (`refund_processed_at`, date and time): Date and time when the refund was made.
- Line items (`line_items`, list): For partial refunds, provide the refunded line items.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "id": "example",
    "line_items": [
      {}
    ],
    "refund_processed_at": 1,
    "testmode": true
  }
}
```

### Record a sale

Record a paid order for tax reporting using its Numeral calculation.

**Inputs**

- Calculation ID (`calculation_id`, text, required): ID from Calculate sales tax.
- Reference order ID (`reference_order_id`, text, required): Your order ID.
- Transaction processed at (`transaction_processed_at`, date and time): Date and time when the order was paid.
- Metadata (`metadata`, object): Additional text values to store with the sale.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "calculation_id": "example",
    "id": "example",
    "line_items": [
      {}
    ],
    "reference_order_id": "example",
    "testmode": true,
    "transaction_processed_at": 1
  }
}
```

### Reverse a refund

Reverse a refund recorded by mistake.

**Inputs**

- Refund ID (`refund_id`, text, required): Numeral ID of the refund to reverse.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "id": "example",
    "line_items": [
      {}
    ],
    "refund_processed_at": 1,
    "testmode": true
  }
}
```

### Update a tax customer

Change a customer’s name, email or tax exemption.

**Inputs**

- Customer ID (`customer_id`, text, required): Numeral customer ID.
- Email (`email`, text): Customer email address.
- Name (`name`, text): Customer name.
- Reference customer ID (`reference_customer_id`, text): Your own ID for this customer.
- Is tax exempt (`is_tax_exempt`, true/false): Treat this customer as tax exempt.

**Outputs**

- `data` (object): The response from Numeral.

**Example output**

```json
{
  "data": {
    "email": "example",
    "id": "example",
    "is_tax_exempt": true,
    "name": "example",
    "reference_customer_id": "example"
  }
}
```
