# Intake

> For AI agents: the index of these docs is at https://shippified.net/docs/llms.txt (every page it lists has a Markdown version like this one).

## Post a Discord-format checkout message to a bot.

**`POST https://shippified.net/api/webhooks/discord/{handle}/{slug}`** — Post a Discord-format checkout message to a bot.

Point a monitor's Discord webhook at this URL. No auth header — the URL itself identifies the workspace and bot. The body is the standard Discord webhook message (`content`, `embeds`, …). It's parsed with the bot's template, turned into an order (or merged into an existing one), logged in the bot's activity log, and then re-posted to the bot's output webhook (or the workspace fallback webhook) if one is set.

Anything that doesn't produce an order is still answered with **202**, not an error, so Discord doesn't retry. Check the body (`duplicate` / `ignored` / `rejected`) or `GET /api/bots/{id}/logs` to see what happened.

Rate limited to 60 requests/min per source IP and 60/min per bot.

**Test mode.** Send the header `x-shippified-test: 1` to dry-run a payload: it's parsed with the bot's template exactly as a real post would be and logged to the bot's activity with outcome `test`, but no order is created or merged, nothing is stored for re-parsing, and nothing is forwarded or pinged. Answers **200** with what was parsed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `handle` | path | string | yes | Your workspace's webhook handle (`user.webhookHandle`). Older URLs that use the raw user id still work. |
| `slug` | path | string | yes | The bot's slug. |
| `x-shippified-test` | header | string | no | Dry run: parse and preview only. See Test mode above. |

### Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `username` | string | no |  |
| `avatar_url` | string | no |  |
| `content` | string | no |  |
| `embeds` | object[] | no |  |

```json
{
  "username": "string",
  "avatar_url": "string",
  "content": "string",
  "embeds": [
    {}
  ]
}
```

### Responses

**200** — Test mode (`x-shippified-test: 1`): what the payload parsed to. Nothing was added.

```json
{
  "test": true,
  "created": true,
  "parser": "string",
  "template": null,
  "preview": {
    "store": "string",
    "storeLabel": "string",
    "itemSummary": "string",
    "orderNumber": "string",
    "total": "string",
    "price": "string",
    "quantity": 0,
    "size": "string",
    "sku": "string",
    "trackingNumber": "string",
    "carrier": "string",
    "status": "string",
    "eventType": "string",
    "imageUrl": "string"
  },
  "wouldMerge": true,
  "mergesIntoOrderId": "string"
}
```

**202** — Accepted. One of four bodies: an order was created or merged (`order`, `forward`, `merged`); the order is already in the workspace (`{ duplicate: true, orderId }`); the payload didn't produce an order (`{ ignored: true }`); or the workspace hit its free-plan monthly cap (`rejected: true`).

```json
{}
```

**404** — Unknown webhook handle (`Unknown webhook URL`), or no bot with this slug in the workspace (`Unknown bot webhook route for this user`).

```json
{
  "error": "string"
}
```

**413** — Body larger than 2 MiB.

**429** — Rate limit exceeded (60/min per IP, or 60/min for this bot). See `Retry-After`.

```json
{
  "error": "string"
}
```

### Code samples

**cURL**

```curl
curl -X POST "https://shippified.net/api/webhooks/discord/{handle}/{slug}" \
  -H "x-shippified-test: <value>" \
  -H "Content-Type: application/json" \
  -d '{"username":"string","avatar_url":"string","content":"string","embeds":[{}]}'
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/webhooks/discord/{handle}/{slug}', {
  method: 'POST',
  headers: {
    'x-shippified-test': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"username":"string","avatar_url":"string","content":"string","embeds":[{}]}),
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "POST",
    "https://shippified.net/api/webhooks/discord/{handle}/{slug}",
    headers={
    "x-shippified-test": "<value>",
    "Content-Type": "application/json",
    },
    json={"username": "string", "avatar_url": "string", "content": "string", "embeds": [{}]},
)
data = res.json()
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://shippified.net/api/webhooks/discord/{handle}/{slug}", strings.NewReader(`{"username":"string","avatar_url":"string","content":"string","embeds":[{}]}`))
	req.Header.Set("x-shippified-test", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://shippified.net/api/webhooks/discord/{handle}/{slug}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-shippified-test: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"username":"string","avatar_url":"string","content":"string","embeds":[{}]}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('https://shippified.net/api/webhooks/discord/{handle}/{slug}')
req = Net::HTTP::Post.new(uri)
req['x-shippified-test'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"username":"string","avatar_url":"string","content":"string","embeds":[{}]}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://shippified.net/api/webhooks/discord/{handle}/{slug}"))
    .header("x-shippified-test", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"username\":\"string\",\"avatar_url\":\"string\",\"content\":\"string\",\"embeds\":[{}]}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

---

## For AI agents

- This page for a human reader: https://shippified.net/docs/ref-intake
- The whole space as one Markdown file: https://shippified.net/docs/llms-full.txt
- Live search + fetch over MCP: https://shippified.net/docs/_api/public/orgs/5b8789b1-481a-41f5-8e5a-5f30d11f5151/spaces/ae0c5af4-cc84-4899-9078-2faf8e7a6fc5/mcp
  - Install (Claude CLI): `claude mcp add api-docs --transport http https://shippified.net/docs/_api/public/orgs/5b8789b1-481a-41f5-8e5a-5f30d11f5151/spaces/ae0c5af4-cc84-4899-9078-2faf8e7a6fc5/mcp`

This Markdown is the same content the page renders — safe to quote and to ground answers in.
