# Cin7 Core

> Manage products, stock, customers, suppliers, sales and purchases in Cin7 Core (formerly DEAR Inventory).

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/cin7

## Actions

### Add a line to a purchase order

Add a product to a purchase's draft order, keeping the lines it already has.

**Inputs**

- Purchase ID (`purchase_id`, text, required): The purchase's ID. Create a purchase returns it as ID.
- Product (`product_id`, text, required): The product to add.
- Quantity (`quantity`, number, required): How many. At least 1.
- Price (`price`, number, required): Price for one, in the supplier's currency. At least 0.
- Tax rule (`tax_rule`, text, required): The tax rule for this line.
- Tax (`tax`, number, required): The line's tax amount, in the order's currency. Enter 0 if the line has no tax. At least 0.
- Discount (`discount`, number): Discount in percent, from 0 to 100. From 0 to 100.
- Supplier SKU (`supplier_sku`, text): The supplier's own code for the product.
- Comment (`comment`, text): A comment on the line.
- Authorise (`authorise`, true/false): On to authorise the order once the line is added. Off keeps it a draft you can add more lines to.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Lines": [
      {
        "Comment": "example",
        "Discount": 1,
        "Name": "example",
        "Price": 1,
        "ProductID": "example",
        "Quantity": 1,
        "SKU": "example",
        "Tax": 1,
        "TaxRule": "example",
        "Total": 1
      }
    ],
    "Memo": "example",
    "Status": "example",
    "Tax": 1,
    "Total": 1,
    "TotalBeforeTax": 1
  }
}
```

### Add a line to a sale order

Add a product to a sale's draft order, keeping the lines it already has.

**Inputs**

- Sale ID (`sale_id`, text, required): The sale's ID. Create a sale returns it as ID.
- Product (`product_id`, text, required): The product to add.
- Quantity (`quantity`, number, required): How many. At least 1.
- Price (`price`, number, required): Price for one, in the customer's currency. At least 0.
- Tax rule (`tax_rule`, text, required): The tax rule for this line.
- Tax (`tax`, number, required): The line's tax amount, in the order's currency. Enter 0 if the line has no tax. At least 0.
- Discount (`discount`, number): Discount in percent, from 0 to 100. From 0 to 100.
- Comment (`comment`, text): A comment on the line.
- Authorise (`authorise`, true/false): On to authorise the order once the line is added. Off keeps it a draft you can add more lines to.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Lines": [
      {
        "Comment": "example",
        "Discount": 1,
        "Name": "example",
        "Price": 1,
        "ProductID": "example",
        "Quantity": 1,
        "SKU": "example",
        "Tax": 1,
        "TaxRule": "example",
        "Total": 1
      }
    ],
    "Memo": "example",
    "Status": "example",
    "Tax": 1,
    "Total": 1,
    "TotalBeforeTax": 1
  }
}
```

### Create a customer

Add a customer to Cin7 Core.

**Inputs**

- Name (`name`, text, required): The customer's name. It must be unique.
- Currency (`currency`, text, required): The customer's currency code, such as USD.
- Payment term (`payment_term`, text, required): The payment term.
- Tax rule (`tax_rule`, text, required): The tax rule for sales to them.
- Accounts receivable account (`receivable_account`, text, required): The accounts receivable account.
- Revenue account (`revenue_account`, text, required): The sales revenue account.
- Location (`location`, text): The location their orders ship from.
- Price tier (`price_tier`, text): The price tier name, such as Tier 1.
- Contact name (`contact_name`, text): Name of the main contact.
- Contact email (`contact_email`, text): Email of the main contact.
- Contact phone (`contact_phone`, text): Phone of the main contact.
- Comments (`comments`, text): Notes about the customer.
- Tags (`tags`, text): Tags, separated by commas.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "CustomerList": [
      {
        "AccountReceivable": "example",
        "Comments": "example",
        "Contacts": [
          {
            "Default": true,
            "Email": "example",
            "ID": "example",
            "Name": "example",
            "Phone": "example"
          }
        ],
        "Currency": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "Location": "example",
        "Name": "example",
        "PaymentTerm": "example",
        "PriceTier": "example",
        "RevenueAccount": "example",
        "Status": "example",
        "Tags": "example",
        "TaxRule": "example"
      }
    ],
    "Page": 1,
    "Total": 1
  }
}
```

### Create a product

Add a product or service to Cin7 Core.

**Inputs**

- SKU (`sku`, text, required): The product's SKU. It must be unique.
- Name (`name`, text, required): The product's name.
- Category (`category`, text, required): The product's category.
- Unit of measure (`unit`, text, required): The unit it is sold in, such as Item.
- Type (`type`, text): Stock for physical goods Cin7 Core counts, Service for anything else. One of: `Stock`, `Service`. Default: `Stock`.
- Costing method (`costing_method`, text): How Cin7 Core values the stock. One of: `FIFO`, `Special - Batch`, `Special - Serial Number`, `FIFO - Serial Number`, `FIFO - Batch`, `FEFO - Batch`, `FEFO - Serial Number`. Default: `FIFO`.
- Price (`price`, number): Sale price for price tier 1. At least 0.
- Barcode (`barcode`, text): The product's barcode.
- Brand (`brand`, text): The brand name.
- Short description (`short_description`, text): A short description.
- Description (`description`, text): The full description.
- Default location (`default_location`, text): The location it is usually kept in.
- Reorder point (`reorder_point`, number): Reorder once fewer than this many are available. At least 0.
- Reorder quantity (`reorder_quantity`, number): How many to order when reordering. At least 0.
- Weight (`weight`, number): Weight in kilograms. At least 0.
- Tags (`tags`, text): Tags, separated by commas.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "Products": [
      {
        "AverageCost": 1,
        "Barcode": "example",
        "Brand": "example",
        "Category": "example",
        "CostingMethod": "example",
        "DefaultLocation": "example",
        "Description": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "MinimumBeforeReorder": 1,
        "Name": "example",
        "PriceTier1": 1,
        "ReorderQuantity": 1,
        "SKU": "example",
        "ShortDescription": "example",
        "Status": "example",
        "Tags": "example",
        "Type": "example",
        "UOM": "example"
      }
    ],
    "Total": 1
  }
}
```

### Create a purchase

Start a purchase from a supplier. Add products to it with Add a line to a purchase order.

**Inputs**

- Supplier (`supplier_id`, text, required): The supplier.
- Location (`location`, text, required): The location the stock goes to.
- Approach (`approach`, text): Receive the stock first, or the invoice first. One of: `STOCK`, `INVOICE`. Default: `STOCK`.
- Tax rule (`tax_rule`, text): The purchase's tax rule. Leave empty for the supplier's.
- Required by (`required_by`, date): When the stock is needed.
- Note (`note`, text): A note on the purchase.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Approach": "example",
    "ID": "example",
    "LastUpdatedDate": "example",
    "Location": "example",
    "Note": "example",
    "Order": {
      "Lines": [
        {
          "Comment": "example",
          "Discount": 1,
          "Name": "example",
          "Price": 1,
          "ProductID": "example",
          "Quantity": 1,
          "SKU": "example",
          "Tax": 1,
          "TaxRule": "example",
          "Total": 1
        }
      ],
      "Memo": "example",
      "Status": "example",
      "Tax": 1,
      "Total": 1,
      "TotalBeforeTax": 1
    },
    "OrderDate": "example",
    "OrderNumber": "example",
    "RequiredBy": "example",
    "Status": "example",
    "Supplier": "example",
    "SupplierID": "example",
    "TaxRule": "example",
    "Type": "example"
  }
}
```

### Create a sale

Start a sale for a customer. Add products to it with Add a line to a sale order.

**Inputs**

- Customer (`customer_id`, text, required): The customer.
- Location (`location`, text, required): The location to ship stock from.
- Customer reference (`customer_reference`, text): The customer's own reference, such as their purchase order number.
- Tax rule (`tax_rule`, text): The sale's tax rule. Leave empty for the customer's.
- Ship by (`ship_by`, date): When it has to ship.
- Note (`note`, text): A note on the sale.
- External ID (`external_id`, text): Your own ID for the sale, to find it again with List sales.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Customer": "example",
    "CustomerID": "example",
    "CustomerReference": "example",
    "ExternalID": "example",
    "ID": "example",
    "LastModifiedOn": "example",
    "Location": "example",
    "Note": "example",
    "Order": {
      "Lines": [
        {
          "Comment": "example",
          "Discount": 1,
          "Name": "example",
          "Price": 1,
          "ProductID": "example",
          "Quantity": 1,
          "SKU": "example",
          "Tax": 1,
          "TaxRule": "example",
          "Total": 1
        }
      ],
      "Memo": "example",
      "Status": "example",
      "Tax": 1,
      "Total": 1,
      "TotalBeforeTax": 1
    },
    "SaleOrderDate": "example",
    "ShipBy": "example",
    "Status": "example",
    "TaxRule": "example",
    "Terms": "example",
    "Type": "example"
  }
}
```

### Create a supplier

Add a supplier to Cin7 Core.

**Inputs**

- Name (`name`, text, required): The supplier's name.
- Currency (`currency`, text, required): The supplier's currency code, such as USD.
- Payment term (`payment_term`, text, required): The payment term.
- Tax rule (`tax_rule`, text, required): The tax rule for purchases from them.
- Accounts payable account (`payable_account`, text, required): The accounts payable account.
- Contact name (`contact_name`, text): Name of the main contact.
- Contact email (`contact_email`, text): Email of the main contact.
- Contact phone (`contact_phone`, text): Phone of the main contact.
- Comments (`comments`, text): Notes about the supplier.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "SupplierList": [
      {
        "AccountPayable": "example",
        "Comments": "example",
        "Contacts": [
          {
            "Default": true,
            "Email": "example",
            "ID": "example",
            "Name": "example",
            "Phone": "example"
          }
        ],
        "Currency": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "Name": "example",
        "PaymentTerm": "example",
        "Status": "example",
        "TaxRule": "example"
      }
    ],
    "Total": 1
  }
}
```

### Get a customer

Get one customer, with their addresses and contacts.

**Inputs**

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

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "CustomerList": [
      {
        "AccountReceivable": "example",
        "Comments": "example",
        "Contacts": [
          {
            "Default": true,
            "Email": "example",
            "ID": "example",
            "Name": "example",
            "Phone": "example"
          }
        ],
        "Currency": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "Location": "example",
        "Name": "example",
        "PaymentTerm": "example",
        "PriceTier": "example",
        "RevenueAccount": "example",
        "Status": "example",
        "Tags": "example",
        "TaxRule": "example"
      }
    ],
    "Page": 1,
    "Total": 1
  }
}
```

### Get a product

Get one product, with its suppliers and reorder levels.

**Inputs**

- Product (`product_id`, text, required): The product.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "Products": [
      {
        "AverageCost": 1,
        "Barcode": "example",
        "Brand": "example",
        "Category": "example",
        "CostingMethod": "example",
        "DefaultLocation": "example",
        "Description": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "MinimumBeforeReorder": 1,
        "Name": "example",
        "PriceTier1": 1,
        "ReorderQuantity": 1,
        "SKU": "example",
        "ShortDescription": "example",
        "Status": "example",
        "Tags": "example",
        "Type": "example",
        "UOM": "example"
      }
    ],
    "Total": 1
  }
}
```

### Get a purchase

Get one purchase with its order, receipts and invoices.

**Inputs**

- Purchase ID (`purchase_id`, text, required): The purchase's ID. List purchases returns it as ID.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Approach": "example",
    "ID": "example",
    "LastUpdatedDate": "example",
    "Location": "example",
    "Note": "example",
    "Order": {
      "Lines": [
        {
          "Comment": "example",
          "Discount": 1,
          "Name": "example",
          "Price": 1,
          "ProductID": "example",
          "Quantity": 1,
          "SKU": "example",
          "Tax": 1,
          "TaxRule": "example",
          "Total": 1
        }
      ],
      "Memo": "example",
      "Status": "example",
      "Tax": 1,
      "Total": 1,
      "TotalBeforeTax": 1
    },
    "OrderDate": "example",
    "OrderNumber": "example",
    "RequiredBy": "example",
    "Status": "example",
    "Supplier": "example",
    "SupplierID": "example",
    "TaxRule": "example",
    "Type": "example"
  }
}
```

### Get a sale

Get one sale with its order, invoices and fulfilments.

**Inputs**

- Sale ID (`sale_id`, text, required): The sale's ID. List sales returns it as SaleID.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Customer": "example",
    "CustomerID": "example",
    "CustomerReference": "example",
    "ExternalID": "example",
    "ID": "example",
    "LastModifiedOn": "example",
    "Location": "example",
    "Note": "example",
    "Order": {
      "Lines": [
        {
          "Comment": "example",
          "Discount": 1,
          "Name": "example",
          "Price": 1,
          "ProductID": "example",
          "Quantity": 1,
          "SKU": "example",
          "Tax": 1,
          "TaxRule": "example",
          "Total": 1
        }
      ],
      "Memo": "example",
      "Status": "example",
      "Tax": 1,
      "Total": 1,
      "TotalBeforeTax": 1
    },
    "SaleOrderDate": "example",
    "ShipBy": "example",
    "Status": "example",
    "TaxRule": "example",
    "Terms": "example",
    "Type": "example"
  }
}
```

### Get account

Get the Cin7 Core company this connection reaches: its name, base currency and time zone.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Company": "example",
    "Currency": "example",
    "DefaultSaleTaxRuleName": "example",
    "TimeZone": "example"
  }
}
```

### Get stock levels

Get how many of each product are on hand, allocated, available and on order, by location.

**Inputs**

- Product (`product_id`, text): Only this product.
- SKU (`sku`, text): Only the product with this SKU.
- Name (`name`, text): Only products whose name starts with this.
- Location (`location`, text): Only stock at this location.
- Category (`category`, text): Only products in this category.
- Page (`page`, number): Which page of results, starting at 1. At least 1.
- Limit (`limit`, number): How many to return on a page, up to 1000. Cin7 Core's default is 100. From 1 to 1000.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "ProductAvailabilityList": [
      {
        "Allocated": 1,
        "Available": 1,
        "Batch": "example",
        "Bin": "example",
        "ID": "example",
        "InTransit": 1,
        "Location": "example",
        "Name": "example",
        "OnHand": 1,
        "OnOrder": 1,
        "SKU": "example"
      }
    ],
    "Total": 1
  }
}
```

### List customers

List customers, optionally by name, contact or when they last changed.

**Inputs**

- Name (`name`, text): Only customers whose name starts with this.
- Contact (`contact`, text): Only customers with a contact whose name starts with this, or whose email is this.
- Modified since (`modified_since`, date and time): Only customers changed at or after this time.
- Include deprecated (`include_deprecated`, true/false): Include deprecated customers too.
- Page (`page`, number): Which page of results, starting at 1. At least 1.
- Limit (`limit`, number): How many to return on a page, up to 1000. Cin7 Core's default is 100. From 1 to 1000.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "CustomerList": [
      {
        "AccountReceivable": "example",
        "Comments": "example",
        "Contacts": [
          {
            "Default": true,
            "Email": "example",
            "ID": "example",
            "Name": "example",
            "Phone": "example"
          }
        ],
        "Currency": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "Location": "example",
        "Name": "example",
        "PaymentTerm": "example",
        "PriceTier": "example",
        "RevenueAccount": "example",
        "Status": "example",
        "Tags": "example",
        "TaxRule": "example"
      }
    ],
    "Page": 1,
    "Total": 1
  }
}
```

### List locations

List the locations (warehouses) stock is kept in.

**Inputs**

- Name (`name`, text): Only locations whose name starts with this.
- Page (`page`, number): Which page of results, starting at 1. At least 1.
- Limit (`limit`, number): How many to return on a page, up to 1000. Cin7 Core's default is 100. From 1 to 1000.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "LocationList": [
      {
        "Deprecated": true,
        "ID": "example",
        "IsDefault": true,
        "Name": "example"
      }
    ],
    "Page": 1,
    "Total": 1
  }
}
```

### List products

List products, optionally by name, SKU or when they last changed.

**Inputs**

- Name (`name`, text): Only products whose name contains this.
- SKU (`sku`, text): Only products whose SKU contains this.
- Modified since (`modified_since`, date and time): Only products changed at or after this time.
- Include deprecated (`include_deprecated`, true/false): Include deprecated products too.
- Page (`page`, number): Which page of results, starting at 1. At least 1.
- Limit (`limit`, number): How many to return on a page, up to 1000. Cin7 Core's default is 100. From 1 to 1000.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "Products": [
      {
        "AverageCost": 1,
        "Barcode": "example",
        "Brand": "example",
        "Category": "example",
        "CostingMethod": "example",
        "DefaultLocation": "example",
        "Description": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "MinimumBeforeReorder": 1,
        "Name": "example",
        "PriceTier1": 1,
        "ReorderQuantity": 1,
        "SKU": "example",
        "ShortDescription": "example",
        "Status": "example",
        "Tags": "example",
        "Type": "example",
        "UOM": "example"
      }
    ],
    "Total": 1
  }
}
```

### List purchases

List purchases, optionally by search words, status or when they last changed.

**Inputs**

- Search (`search`, text): Words to find in the order number, supplier or invoice number.
- Updated since (`updated_since`, date and time): Only purchases changed after this time.
- Status (`status`, text): Only purchases in this state. One of: `DRAFT`, `ORDERING`, `ORDERED`, `RECEIVING`, `RECEIVED`, `INVOICED`, `CREDITED`, `COMPLETED`, `VOIDED`.
- Page (`page`, number): Which page of results, starting at 1. At least 1.
- Limit (`limit`, number): How many to return on a page, up to 1000. Cin7 Core's default is 100. From 1 to 1000.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "PurchaseList": [
      {
        "ID": "example",
        "InvoiceAmount": 1,
        "InvoiceNumber": "example",
        "LastUpdatedDate": "example",
        "OrderDate": "example",
        "OrderNumber": "example",
        "OrderStatus": "example",
        "PaidAmount": 1,
        "RequiredBy": "example",
        "Status": "example",
        "Supplier": "example",
        "SupplierID": "example"
      }
    ],
    "Total": 1
  }
}
```

### List sales

List sales, optionally by search words, status or when they were created or changed.

**Inputs**

- Search (`search`, text): Words to find in the order number, customer, invoice number or customer reference.
- Created since (`created_since`, date and time): Only sales created after this time.
- Updated since (`updated_since`, date and time): Only sales changed after this time.
- Status (`status`, text): Only sales in this state. One of: `ESTIMATING`, `ESTIMATED`, `ORDERING`, `ORDERED`, `BACKORDERED`, `PICKING`, `PICKED`, `PACKING`, `PACKED`, `SHIPPING`, and 5 more.
- External ID (`external_id`, text): Only the sale with this external ID.
- Page (`page`, number): Which page of results, starting at 1. At least 1.
- Limit (`limit`, number): How many to return on a page, up to 1000. Cin7 Core's default is 100. From 1 to 1000.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "SaleList": [
      {
        "CombinedInvoiceStatus": "example",
        "CombinedPaymentStatus": "example",
        "CombinedShippingStatus": "example",
        "Customer": "example",
        "CustomerID": "example",
        "CustomerReference": "example",
        "ExternalID": "example",
        "InvoiceAmount": 1,
        "InvoiceNumber": "example",
        "OrderDate": "example",
        "OrderNumber": "example",
        "OrderStatus": "example",
        "PaidAmount": 1,
        "SaleID": "example",
        "Status": "example",
        "Updated": "example"
      }
    ],
    "Total": 1
  }
}
```

### List suppliers

List suppliers, optionally by name or when they last changed.

**Inputs**

- Name (`name`, text): Only suppliers whose name starts with this.
- Modified since (`modified_since`, date and time): Only suppliers changed at or after this time.
- Include deprecated (`include_deprecated`, true/false): Include deprecated suppliers too.
- Page (`page`, number): Which page of results, starting at 1. At least 1.
- Limit (`limit`, number): How many to return on a page, up to 1000. Cin7 Core's default is 100. From 1 to 1000.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "SupplierList": [
      {
        "AccountPayable": "example",
        "Comments": "example",
        "Contacts": [
          {
            "Default": true,
            "Email": "example",
            "ID": "example",
            "Name": "example",
            "Phone": "example"
          }
        ],
        "Currency": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "Name": "example",
        "PaymentTerm": "example",
        "Status": "example",
        "TaxRule": "example"
      }
    ],
    "Total": 1
  }
}
```

### Update a customer

Change a customer's details. Only the fields you fill in change.

**Inputs**

- Customer (`customer_id`, text, required): The customer.
- Name (`name`, text): The new name.
- Payment term (`payment_term`, text): The new payment term.
- Tax rule (`tax_rule`, text): The new tax rule.
- Location (`location`, text): The new location their orders ship from.
- Price tier (`price_tier`, text): The new price tier name.
- Comments (`comments`, text): The new notes.
- Tags (`tags`, text): The new tags, separated by commas.
- Status (`status`, text): Active, or Deprecated to retire it. Cin7 Core can't delete it. One of: `Active`, `Deprecated`.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "CustomerList": [
      {
        "AccountReceivable": "example",
        "Comments": "example",
        "Contacts": [
          {
            "Default": true,
            "Email": "example",
            "ID": "example",
            "Name": "example",
            "Phone": "example"
          }
        ],
        "Currency": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "Location": "example",
        "Name": "example",
        "PaymentTerm": "example",
        "PriceTier": "example",
        "RevenueAccount": "example",
        "Status": "example",
        "Tags": "example",
        "TaxRule": "example"
      }
    ],
    "Page": 1,
    "Total": 1
  }
}
```

### Update a product

Change a product's details. Only the fields you fill in change.

**Inputs**

- Product (`product_id`, text, required): The product.
- Name (`name`, text): The new name.
- SKU (`sku`, text): The new SKU.
- Category (`category`, text): The new category.
- Price (`price`, number): The new sale price for price tier 1. At least 0.
- Barcode (`barcode`, text): The new barcode.
- Short description (`short_description`, text): The new short description.
- Description (`description`, text): The new full description.
- Reorder point (`reorder_point`, number): Reorder once fewer than this many are available. At least 0.
- Reorder quantity (`reorder_quantity`, number): How many to order when reordering. At least 0.
- Tags (`tags`, text): The new tags, separated by commas.
- Status (`status`, text): Active, or Deprecated to retire it. Cin7 Core can't delete it. One of: `Active`, `Deprecated`.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "Products": [
      {
        "AverageCost": 1,
        "Barcode": "example",
        "Brand": "example",
        "Category": "example",
        "CostingMethod": "example",
        "DefaultLocation": "example",
        "Description": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "MinimumBeforeReorder": 1,
        "Name": "example",
        "PriceTier1": 1,
        "ReorderQuantity": 1,
        "SKU": "example",
        "ShortDescription": "example",
        "Status": "example",
        "Tags": "example",
        "Type": "example",
        "UOM": "example"
      }
    ],
    "Total": 1
  }
}
```

### Update a supplier

Change a supplier's details. Only the fields you fill in change.

**Inputs**

- Supplier (`supplier_id`, text, required): The supplier.
- Name (`name`, text): The new name.
- Payment term (`payment_term`, text): The new payment term.
- Tax rule (`tax_rule`, text): The new tax rule.
- Comments (`comments`, text): The new notes.
- Status (`status`, text): Active, or Deprecated to retire it. Cin7 Core can't delete it. One of: `Active`, `Deprecated`.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Page": 1,
    "SupplierList": [
      {
        "AccountPayable": "example",
        "Comments": "example",
        "Contacts": [
          {
            "Default": true,
            "Email": "example",
            "ID": "example",
            "Name": "example",
            "Phone": "example"
          }
        ],
        "Currency": "example",
        "ID": "example",
        "LastModifiedOn": "example",
        "Name": "example",
        "PaymentTerm": "example",
        "Status": "example",
        "TaxRule": "example"
      }
    ],
    "Total": 1
  }
}
```

### Void or undo a purchase

Void a purchase for good, or undo it back to a draft.

**Inputs**

- Purchase ID (`purchase_id`, text, required): The purchase's ID. List purchases returns it as ID.
- Void (`void`, true/false, required): On to void the purchase for good. Off to undo its authorisations back to a draft.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Approach": "example",
    "ID": "example",
    "LastUpdatedDate": "example",
    "Location": "example",
    "Note": "example",
    "Order": {
      "Lines": [
        {
          "Comment": "example",
          "Discount": 1,
          "Name": "example",
          "Price": 1,
          "ProductID": "example",
          "Quantity": 1,
          "SKU": "example",
          "Tax": 1,
          "TaxRule": "example",
          "Total": 1
        }
      ],
      "Memo": "example",
      "Status": "example",
      "Tax": 1,
      "Total": 1,
      "TotalBeforeTax": 1
    },
    "OrderDate": "example",
    "OrderNumber": "example",
    "RequiredBy": "example",
    "Status": "example",
    "Supplier": "example",
    "SupplierID": "example",
    "TaxRule": "example",
    "Type": "example"
  }
}
```

### Void or undo a sale

Void a sale for good, or undo it back to a draft.

**Inputs**

- Sale ID (`sale_id`, text, required): The sale's ID. List sales returns it as SaleID.
- Void (`void`, true/false, required): On to void the sale for good. Off to undo its authorisations back to a draft.

**Outputs**

- `data` (object): The response from Cin7 Core.

**Example output**

```json
{
  "data": {
    "Customer": "example",
    "CustomerID": "example",
    "CustomerReference": "example",
    "ExternalID": "example",
    "ID": "example",
    "LastModifiedOn": "example",
    "Location": "example",
    "Note": "example",
    "Order": {
      "Lines": [
        {
          "Comment": "example",
          "Discount": 1,
          "Name": "example",
          "Price": 1,
          "ProductID": "example",
          "Quantity": 1,
          "SKU": "example",
          "Tax": 1,
          "TaxRule": "example",
          "Total": 1
        }
      ],
      "Memo": "example",
      "Status": "example",
      "Tax": 1,
      "Total": 1,
      "TotalBeforeTax": 1
    },
    "SaleOrderDate": "example",
    "ShipBy": "example",
    "Status": "example",
    "TaxRule": "example",
    "Terms": "example",
    "Type": "example"
  }
}
```
