# Examples

### FBT

{% tabs %}
{% tab title="Request" %}
The following request performs a FBT query on the analysis endpoint:

```javascript
curl -g -X POST \
  'https://{{your_domain}}.commercelayer.io/metrics/analysis/fbt' \
  -H 'Accept: application/vnd.api.v1+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {{your_access_token}}' \
  -d '{
    "filter": {
      "line_items": {
        "item_ids": {
          "in": [ "adGhjZHKt8" ]
        }
      }
    }
  }'
```

{% endtab %}

{% tab title="Response" %}
On success, the API responds with a `200 OK` status code, returning the aggregated values in the `data` object and extra information in the `meta` object:

```json
{
  "data": [
    {
      "item_id": "adGhjZHKt8",
      "value": 1,
      "type": "skus",
      "name": "Black Baby Onesie Short Sleeve with Pink Logo (New born)"
    }
  ],
  "meta": {
    "type": "fbt",
    "trace_id": "bb74e399-af67-44b8-abf6-008c6a233b50",
    "mode": "test",
    "organization_id": "mzRmbZFPyO",
    "market_ids": [
      "AjRevhvqvo",
      "dlQbPhqGro"
    ]
  }
}
```

{% endtab %}
{% endtabs %}
