Configuration

Rutter provides configuration endpoints to manage various aspects of your integration, including webhook settings and platform data filtering.

Webhook Configuration

Configure webhook endpoints and customize the data included in webhook payloads using platform data filtering.

Platform Data Filtering

Platform data filtering allows you to extract specific fields from webhook payloads using JSONPath expressions. This reduces payload size and lets you receive only the data you need for each webhook type and platform combination.

List Webhook Configurations

GEThttps://production.rutterapi.com/versioned/configs/webhooks

Response Body

Get Webhook Configurations
1
curl "https://production.rutterapi.com/versioned/configs/webhooks" \
2
-H "X-Rutter-Version: 2024-08-31" \
3
-H "Authorization: Basic <YOUR_ENCODED_CLIENT_ID_AND_CLIENT_SECRET>"
Response
1
{
2
"webhooks": [
3
{
4
"id": "webhook_config_123",
5
"url": "https://your-app.com/webhooks",
6
"disabled": false,
7
"allow_list": {
8
"allowedTypes": ["ORDER_CREATED", "ORDER_UPDATED"]
9
},
10
"platform_data_config": {
11
"ORDER_CREATED": {
12
"SHOPIFY": {
13
"customer_email": "$.customer.email",
14
"line_items": "$.line_items[*].title",
15
"total_amount": "$.total_price"
16
}
17
}
18
}
19
}
20
]
21
}

Get Platform Data Configuration

GEThttps://production.rutterapi.com/versioned/configs/webhooks/:id/platform_data_config

Request Parameters

    idstringpathRequired

Response Body

Get Platform Data Config
1
curl "https://production.rutterapi.com/versioned/configs/webhooks/webhook_config_123/platform_data_config" \
2
-H "X-Rutter-Version: 2024-08-31" \
3
-H "Authorization: Basic <YOUR_ENCODED_CLIENT_ID_AND_CLIENT_SECRET>"
Response
1
{
2
"platform_data_config": {
3
"ORDER_CREATED": {
4
"SHOPIFY": {
5
"customer_email": "$.customer.email",
6
"line_items": "$.line_items[*].title",
7
"total_amount": "$.total_price"
8
},
9
"WOOCOMMERCE": {
10
"customer_id": "$.customer_id",
11
"order_total": "$.total"
12
}
13
},
14
"ORDER_UPDATED": {
15
"SHOPIFY": {
16
"status": "$.financial_status",
17
"updated_at": "$.updated_at"
18
}
19
}
20
}
21
}

Update Platform Data Configuration

PATCHhttps://production.rutterapi.com/versioned/configs/webhooks/:id/platform_data_config

Request Parameters

    idstringpathRequired

Request Body

    platform_data_configobject
    Structure:
    • First level: Webhook event types (e.g., ORDER_CREATED, ORDER_UPDATED)
    • Second level: Platform names (e.g., SHOPIFY, WOOCOMMERCE)
    • Third level: Field names mapped to JSONPath expressions (e.g., customer_email: "$.customer.email")

    Each JSONPath expression filters the raw platform data to include only the specified fields in webhook payloads.

Response Body

Update Platform Data Config
1
curl -X PATCH "https://production.rutterapi.com/versioned/configs/webhooks/webhook_config_123/platform_data_config" \
2
-H "X-Rutter-Version: 2024-08-31" \
3
-H "Authorization: Basic <YOUR_ENCODED_CLIENT_ID_AND_CLIENT_SECRET>" \
4
-H "Content-Type: application/json" \
5
-d '{
6
"platform_data_config": {
7
"ORDER_CREATED": {
8
"SHOPIFY": {
9
"customer_email": "$.customer.email",
10
"line_items": "$.line_items[*].title",
11
"total_amount": "$.total_price",
12
"shipping_address": "$.shipping_address.city"
13
}
14
}
15
}
16
}'
Response
1
{
2
"platform_data_config": {
3
"ORDER_CREATED": {
4
"SHOPIFY": {
5
"customer_email": "$.customer.email",
6
"line_items": "$.line_items[*].title",
7
"total_amount": "$.total_price",
8
"shipping_address": "$.shipping_address.city"
9
}
10
}
11
}
12
}

Platform Data Filtering Details

JSONPath Expression Requirements

  • All JSONPath expressions must start with $
  • Field names are limited to 64 characters maximum
  • Expressions are applied to the raw platform data before standardization
  • Invalid expressions will be ignored during filtering

Webhook Payload Filtering

When platform data filtering is configured, webhook payloads will include a filtered_platform_data field instead of the full platform_data field.

Standard Webhook Payload
1
{
2
"type": "ORDER",
3
"code": "ORDER_CREATED",
4
"entity": {
5
"id": "order_123",
6
"total": 99.99
7
},
8
"platform_data": {
9
"customer": {
10
"email": "customer@example.com",
11
"phone": "+1234567890"
12
},
13
"line_items": [
14
{"title": "Product A", "price": 49.99},
15
{"title": "Product B", "price": 49.99}
16
],
17
"total_price": "99.99",
18
"shipping_address": {
19
"city": "San Francisco",
20
"state": "CA"
21
}
22
}
23
}
Filtered Webhook Payload
1
{
2
"type": "ORDER",
3
"code": "ORDER_CREATED",
4
"entity": {
5
"id": "order_123",
6
"total": 99.99
7
},
8
"filtered_platform_data": {
9
"ORDER_CREATED": {
10
"customer_email": ["customer@example.com"],
11
"line_items": ["Product A", "Product B"],
12
"total_amount": ["99.99"],
13
"shipping_address": ["San Francisco"]
14
}
15
}
16
}

Size Limitations

Filtered platform data is subject to a 500KB size limit. If the filtered data exceeds this limit, the webhook will be sent without the filtered_platform_data field and an error will be logged.

Authentication

Webhook configuration endpoints use basic authentication (Authorization: Basic header) rather than access tokens. This is because access tokens are connection-specific, while webhook configurations apply across all connections within your organization. Basic authentication ensures you can manage webhook settings that affect all your integrations from a single endpoint.

Have questions?

Contact support for personalized guidance.

Contact support