> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.treet.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Shipping Label Webhook

These notifications are sent to provide updates about shipping labels in Treet's system.

### Triggers

| Trigger         | Description                                        |
| --------------- | -------------------------------------------------- |
| `label/created` | Webhook triggered by a new shipping label created. |
| `label/updated` | Webhook triggered by an updated tracking status.   |

### Payload

| Field            | Description                                                      |
| ---------------- | ---------------------------------------------------------------- |
| `topic`          | Treet Webhook topic                                              |
| `trigger`        | Treet Webhook trigger (see possible triggers above)              |
| `shopId`         | Treet Shop ID                                                    |
| `bundleId`       | Treet Bundle Id. Unique identifier for the bundle                |
| `bundleType`     | Treet Bundle Type. Possible values: `TRADE_IN` or `MARKETPLACE`  |
| `carrier`        | Treet Shipment carrier. Possible values: `USPS`                  |
| `trackingNumber` | Treet Shipment tracking number from the carrier                  |
| `status`         | Treet Shipment status. Possible values: `SHIPPED` or `DELIVERED` |
| `updatedAt`      | Date and time (ISO 8601 format)                                  |
| `items`          | List of item objects in the shipment, described below            |

### Item Object

| Field            | Description                                                           |
| ---------------- | --------------------------------------------------------------------- |
| `id`             | Treet Bundle Item ID                                                  |
| `variantId`      | Shopify Variant Id                                                    |
| `sku`            | Shopify SKU                                                           |
| `stockImageUrl`  | Shopify Stock Image URL                                               |
| `variantOptions` | Object that contains Shopify Variant Options (e.g. size, color, etc.) |
| `title`          | Shopify Product title                                                 |
| `category`       | Treet item category                                                   |

### Example Webhook Payload

The following is the example formatted into the JSON payload that will be sent when this webhook is triggered:

```json theme={null}
{
  "topic": "label",
  "trigger": "label/updated",
  "shopId": "boyish",
  "bundleId": "12345678-1234-1234-1234-123456789105",
  "bundleType": "TRADE_IN",
  "carrier": "USPS",
  "trackingNumber": "28735625627856237856287",
  "status": "SHIPPED",
  "updatedAt": "2024-01-01T12:00:00+00:00",
  "items": [
    {
      "id": "11345678-1234-1234-1234-123456789101",
      "variantId": "01345678-1234-1234-1234-123456789101",
      "sku": "large-pink-shirt",
      "stockImageUrl": "https://ucarecdn.com/405d9723-c637-4f50-bd11-a10aaf9ff4ce/",
      "variantOptions": {
        "size": "L",
        "color": "pink"
      },
      "category": "shirts",
      "title": "Large Pink Shirt"
    }
  ]
}
```
