---
title: Send new orders to another system
project: Tables
version: 7.0
section: recipes
language: fr
translation: missing
license: Total.js Enterprise
url: https://totaljs.es/docs/fr/tables/7-0/recipes/send-orders-to-another-system/
updated: 2026-11-20T06:39:57.622Z
---

# Send new orders to another system

> Use a hook to post every new order to the endpoint of another application.

This recipe sends each new order to another application, for example an accounting system, as soon as it is saved.

## 1. Prepare the endpoint

The other system needs an address that accepts a `POST` request with JSON, for example `https://erp.example.com/api/orders/`. It receives the format described in [Hook and action data](../../reference/hook-and-action-data/).

A minimal receiver in Node.js that logs the order:

```js
const http = require('http');

http.createServer(function(req, res) {
	let body = '';
	req.on('data', chunk => body += chunk);
	req.on('end', function() {
		const hook = JSON.parse(body);
		console.log('New order', hook.data.name, 'for', hook.data.x02);
		res.end('OK');
	});
}).listen(9000);
```

## 2. Set the hook

1. Open the settings of the *Orders* table.
2. In the **Hooks** tab, enter the address in **Create**.
3. Click **SUBMIT**.

## 3. Try it

Create an order. The other system receives the order with its number, customer, amount and status, and the name of the user who created it.

To also send changes, enter the same address in **Update**. The receiver can tell new orders from changes by `dtupdated`, which is empty for a new record.
