Title: 2khat Catalog Sync
Author: mohammad61
Published: <strong>17 de Julho, 2026</strong>
Last modified: 20 de Setembro, 2026

---

Pesquisar plugins

![](https://ps.w.org/2khat-catalog-sync/assets/icon-256x256.png?rev=3611961)

# 2khat Catalog Sync

 Por [mohammad61](https://profiles.wordpress.org/mohammad61/)

[Baixar](https://downloads.wordpress.org/plugin/2khat-catalog-sync.1.0.9.zip)

 * [Detalhes](https://pt-ao.wordpress.org/plugins/2khat-catalog-sync/#description)
 * [Avaliações](https://pt-ao.wordpress.org/plugins/2khat-catalog-sync/#reviews)
 *  [Instalação](https://pt-ao.wordpress.org/plugins/2khat-catalog-sync/#installation)
 * [Desenvolvimento](https://pt-ao.wordpress.org/plugins/2khat-catalog-sync/#developers)

 [Suporte](https://wordpress.org/support/plugin/2khat-catalog-sync/)

## Descrição

2khat connects your WooCommerce store to the 2khat platform by exposing a secure,
paginated REST API for product catalog synchronization.

After registering your store with the 2khat team, install and activate this plugin
to allow 2khat to fetch your published products and variations.

### Security

    ```
    public_key.pem is the 2khat RSA public key used to verify API request signatures. It is not a private credential and must remain in the plugin directory.<h3>Authentication</h3>
    ```

All 2khat API requests require RSA domain signature verification.

**Signing (2khat server side):**

 1. Normalize the store domain: use the host from `site_url()`, without a `www.` prefix.
 2. Sign the domain string with the 2khat private key using SHA256.
 3. Base64-encode the binary signature.
 4. Send it in the request header:
 5. Authorization: Twokcs

Legacy clients may also use `Authorization: Basic <base64-signature>` during migration.

**Example (OpenSSL CLI):**

    ```
    `
    ```

echo -n “example.com” | openssl dgst -sha256 -sign 2khat_private.pem | openssl base64-
A
 `<h3>REST API</h3> **GET**/wp-json/twokcs/v1/version`

Returns the plugin version.

**GET** `/wp-json/twokcs/v1/products?page=1&per_page=100`

Returns paginated published products with nested variations.

**GET** `/wp-json/twokcs/v1/categories?page=1&per_page=100`

Returns paginated product categories.

**GET** `/wp-json/twokcs/v1/attributes?page=1&per_page=100`

Returns paginated product attributes.

**GET** `/wp-json/twokcs/v1/attribute-terms?page=1&per_page=100`

Returns paginated attribute terms across all attributes. Optionally filter by attribute:

**GET** `/wp-json/twokcs/v1/attribute-terms?attribute_id=1&page=1&per_page=100`

**GET** `/wp-json/twokcs/v1/variants?product_ids=10,20`

Returns compact published variants grouped by parent product ID. Each item includes
parent product fields (`product_id`, `type`, `manage_stock`, `price`, `regular_price`,`
sale_price`, `stock_quantity`, `stock_status`) and a `variants` array with: `id`,`
on_sale`, `status`, `price`, `regular_price`, `sale_price`, `stock_quantity`, `stock_status`.
Simple products return an empty `variants` array and their own price/stock on the
parent object.

**GET** `/wp-json/twokcs/v1/variants?ids=305,306,307`

Returns compact published variants for the given variation IDs in request order.
Response shape: `{ count, results: [...] }` with the same variant fields as above.

**GET** `/wp-json/twokcs/v1/variant?id=305`

Returns a single compact published variant object with the same fields as above.
Returns 404 when the variation is missing or not published.

**POST** `/wp-json/twokcs/v1/orders`

Creates a WooCommerce order for the 2khat platform.

Request body (JSON):

 * `external_order_id` (required) — platform order id, stored as `_twokcs_external_order_id`
 * `line_items` (required) — array of `{ product_id, variation_id?, quantity }`
 * `billing` / `shipping` — address objects
 * `status` — WooCommerce status without `wc-` prefix (default: `processing`)
 * `customer_note` — optional note
 * `meta_data` — optional array of `{ key, value }` (public keys and `_twokcs_*`
   only)

Returns **201** with a compact order object. Duplicate `external_order_id` returns**
409** with `existing_order_id`.

**GET** `/wp-json/twokcs/v1/order`

Lists orders as `{ count, max_pages, results }`. All filters are optional and combinable:`
id`, `external_order_id`, `status`, plus `page` / `per_page`. Bare `GET /order` 
returns a paginated list. No matches return an empty `results` array (200). If both`
id` and `external_order_id` are provided and refer to different orders, the request
returns 400.

Examples:

 * `/wp-json/twokcs/v1/order`
 * `/wp-json/twokcs/v1/order?status=processing`
 * `/wp-json/twokcs/v1/order?id=123`
 * `/wp-json/twokcs/v1/order?external_order_id=2khat-12345`
 * `/wp-json/twokcs/v1/order?id=123&status=processing`

Each result includes: `id`, `status`, `external_order_id`, `tracking_code`, `tracking_provider`,`
shipping_method`, `date_created`, `date_modified`, `total`, `currency`, `line_items`.

Query parameters (all catalog endpoints):

 * `page` — page number (default: 1, minimum: 1)
 * `per_page` — items per page (default: 100, maximum: 200)
 * `attribute_id` — (attribute-terms only) filter terms to a single attribute
 * `product_ids` — (variants only) comma-separated parent product IDs; returns variants
   grouped by product
 * `ids` — (variants only) comma-separated variation IDs; returns a flat list in
   request order
 * `id` — (variant / order) single variation or WooCommerce order ID filter
 * `external_order_id` — (order only) filter by 2khat external order id meta
 * `status` — (order only) optional WooCommerce status filter
 * `debug` — include SQL query stats only when `WP_DEBUG` and `TWOKCS_DEBUG` are
   enabled, or when the `twokcs_allow_debug` filter returns true. Full query details
   require `SAVEQUERIES` enabled in `wp-config.php`.

## Instalação

 1. Upload the `2khat` folder to `/wp-content/plugins/`.
 2. Activate the plugin through the WordPress Plugins screen.
 3. Ensure WooCommerce is installed and active.
 4. Confirm `public_key.pem` is present in the plugin directory.

## Avaliações

There are no reviews for this plugin.

## Contribuidores e desenvolvedores

“2khat Catalog Sync” é um software com código aberto. As seguintes pessoas contribuíram
para este plugin.

Contribuidores

 *   [ mohammad61 ](https://profiles.wordpress.org/mohammad61/)

[Traduzir “2khat Catalog Sync” para o seu idioma.](https://translate.wordpress.org/projects/wp-plugins/2khat-catalog-sync)

### Interessado no desenvolvimento?

[Navegue pelo código](https://plugins.trac.wordpress.org/browser/2khat-catalog-sync/),
dê uma olhada no [repositório SVN](https://plugins.svn.wordpress.org/2khat-catalog-sync/)
ou assine o [registro de desenvolvimento](https://plugins.trac.wordpress.org/log/2khat-catalog-sync/)
via [RSS](https://plugins.trac.wordpress.org/log/2khat-catalog-sync/?limit=100&mode=stop_on_copy&format=rss).

## Registro de alterações

#### 1.0.8

 * `GET /order` returns a paginated list; `id`, `external_order_id`, and `status`
   are optional filters

#### 1.0.7

 * Add create order (`POST /orders`) and track order (`GET /order`) endpoints

#### 1.0.6

 * Align text domain with WordPress.org slug `2khat-catalog-sync`

#### 1.0.5

 * Rename all plugin globals from `dokhat` to `twokcs` prefix for WordPress.org 
   compliance
 * Update REST namespace to `twokcs/v1` and auth scheme to `Twokcs`

#### 1.0.4

 * Align plugin folder and main file name with WordPress.org slug `2khat`
 * Fix auth header documentation to match the `Dokhat` scheme accepted by the plugin

#### 1.0.3

 * Rename display name to 2khat Catalog Sync (WordPress.org trademark requirement)

#### 1.0.2

 * Rename plugin for WordPress.org compliance (2khat WooCommerce Catalog Sync)
 * Remove runtime SAVEQUERIES global side effects from debug mode
 * Document public_key.pem as intentional RSA public key

#### 1.0.1

 * Align plugin metadata for WordPress.org submission

#### 1.0.0

 * Initial 2khat release
 * Modular plugin architecture
 * RSA domain authentication with 2khat key pair
 * Optimized bulk product export endpoint
 * Compatibility with Discount Rules for WooCommerce and Woodmart theme

## Meta

 *  Version **1.0.9**
 *  Last updated **2 semanas atrás**
 *  Active installations **Menos de 10**
 *  WordPress version ** 5.0 ou maior **
 *  Tested up to **7.0.6**
 *  PHP version ** 7.4 ou maior **
 *  Language
 * [English (US)](https://wordpress.org/plugins/2khat-catalog-sync/)
 *  [Panorama avançado](https://pt-ao.wordpress.org/plugins/2khat-catalog-sync/advanced/)

## Classificações

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/2khat-catalog-sync/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/2khat-catalog-sync/reviews/)

## Contribuidores

 *   [ mohammad61 ](https://profiles.wordpress.org/mohammad61/)

## Suporte

Tem algo a dizer? Precisa de ajuda?

 [Ver fórum de suporte](https://wordpress.org/support/plugin/2khat-catalog-sync/)