# Discord

> 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).

## Invite link for the Shippified Discord bot.

**`GET https://shippified.net/api/discord/install`** — Invite link for the Shippified Discord bot.

Add the bot to your server before setting a digest channel.

### Responses

**200** — OK

```json
{
  "url": "string"
}
```

**401** — Not authenticated.

**503** — The Discord integration isn't configured on this deployment.

### Code samples

**cURL**

```curl
curl -X GET "https://shippified.net/api/discord/install"
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/discord/install', {
  method: 'GET',
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "GET",
    "https://shippified.net/api/discord/install",
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://shippified.net/api/discord/install", nil)
	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/discord/install');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

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

uri = URI('https://shippified.net/api/discord/install')
req = Net::HTTP::Get.new(uri)
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/discord/install"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Configure the daily checkout-recap digest.

**`PATCH https://shippified.net/api/discord/settings`** — Configure the daily checkout-recap digest.

Partial update — fields that are omitted or invalid keep their current values. The bot posts the digest to `channelId` at `hour` in your account timezone (`POST /api/account/timezone`).

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | no |  |
| `channelId` | string | no | Discord channel id. The bot must be in that server. |
| `hour` | integer | no |  |
| `groupBy` | string | no | Group the recap by webhook bot, by retailer, or by source (webhook / email / manual). |

```json
{
  "enabled": true,
  "channelId": "string",
  "hour": 0,
  "groupBy": "bots"
}
```

### Responses

**200** — Updated.

```json
{
  "digest": {
    "enabled": true,
    "channelId": "string",
    "hour": 0,
    "groupBy": "bots",
    "lastSentDate": "string"
  }
}
```

**401** — Not authenticated.

### Code samples

**cURL**

```curl
curl -X PATCH "https://shippified.net/api/discord/settings" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true,"channelId":"string","hour":0,"groupBy":"bots"}'
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/discord/settings', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"enabled":true,"channelId":"string","hour":0,"groupBy":"bots"}),
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "PATCH",
    "https://shippified.net/api/discord/settings",
    headers={
    "Content-Type": "application/json",
    },
    json={"enabled": True, "channelId": "string", "hour": 0, "groupBy": "bots"},
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("PATCH", "https://shippified.net/api/discord/settings", strings.NewReader(`{"enabled":true,"channelId":"string","hour":0,"groupBy":"bots"}`))
	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/discord/settings');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"enabled":true,"channelId":"string","hour":0,"groupBy":"bots"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

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

uri = URI('https://shippified.net/api/discord/settings')
req = Net::HTTP::Patch.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"enabled":true,"channelId":"string","hour":0,"groupBy":"bots"}'
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/discord/settings"))
    .header("Content-Type", "application/json")
    .method("PATCH", BodyPublishers.ofString("{\"enabled\":true,\"channelId\":\"string\",\"hour\":0,\"groupBy\":\"bots\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Post the checkout-recap digest to your channel now.

**`POST https://shippified.net/api/discord/digest`** — Post the checkout-recap digest to your channel now.

Uses the channel and grouping from `PATCH /api/discord/settings` (it doesn't need the scheduled digest to be enabled). Doesn't affect the scheduled post.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `date` | query | string | no | Day to summarise (`YYYY-MM-DD`). Defaults to today in your account timezone. |

### Responses

**200** — Posted.

```json
{
  "ok": true,
  "messageId": "string",
  "channelId": "string"
}
```

**400** — No digest channel configured.

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

**401** — Not authenticated.

**502** — Discord rejected the post (e.g. the bot can't see the channel).

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

**503** — The Discord integration isn't configured on this deployment.

### Code samples

**cURL**

```curl
curl -X POST "https://shippified.net/api/discord/digest"
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/discord/digest', {
  method: 'POST',
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "POST",
    "https://shippified.net/api/discord/digest",
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://shippified.net/api/discord/digest", nil)
	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/discord/digest');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

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

uri = URI('https://shippified.net/api/discord/digest')
req = Net::HTTP::Post.new(uri)
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/discord/digest"))
    .method("POST", BodyPublishers.noBody())
    .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-discord
- 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.
