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

# List Merchant Markups Configuration

> List markup configurations for merchants with optional filters.

# List Merchant Markups Configuration

Use this endpoint to list existing markup configurations for merchants.

If no filters are provided, the API returns the markups that belong to the authenticated user's companies.

## Query Parameters

<ParamField query="account_id" type="integer">
  Merchant ID filter.

  Business rules:

  * Optional
  * Must be greater than or equal to `1`
</ParamField>

<ParamField query="parent_id" type="integer">
  Parent merchant ID filter.

  Business rules:

  * Optional
  * Must be greater than or equal to `1`
  * **Prohibited** when `account_id` is present (one or the other)
</ParamField>

<ParamField query="id" type="integer">
  Specific markup ID filter.

  Business rules:

  * Optional
  * Must be greater than or equal to `1`
</ParamField>

<ParamField query="payment_method" type="string">
  Filter by payment method.

  Allowed values: `pix`, `billet`, `credit_card`
</ParamField>

<ParamField query="product" type="string">
  Filter by product.

  Allowed values: `payin`, `payout`
</ParamField>

<ParamField query="type" type="string">
  Filter by markup type.

  Business rules:

  * Optional
  * Currently, only `global` is supported externally
</ParamField>

## Request Examples

<CodeGroup>
  ```bash cURL - List all markups for authenticated user theme={null}
  curl -X GET "https://api.sandbox.wepayout.com.br/v2/account/markups" \
    -H "Authorization: Bearer SEU_TOKEN_AQUI" \
    -H "Accept: application/json"
  ```

  ```bash cURL - Filter by account, product, payment_method and type theme={null}
  curl -X GET "https://api.sandbox.wepayout.com.br/v2/account/markups?account_id=123&product=payin&payment_method=pix&type=global" \
    -H "Authorization: Bearer SEU_TOKEN_AQUI" \
    -H "Accept: application/json"
  ```

  ```bash cURL - Fetch specific markup by id theme={null}
  curl -X GET "https://api.sandbox.wepayout.com.br/v2/account/markups?id=10" \
    -H "Authorization: Bearer SEU_TOKEN_AQUI" \
    -H "Accept: application/json"
  ```

  ```bash cURL - Invalid filters (account_id + parent_id and invalid payment_method) theme={null}
  curl -X GET "https://api.sandbox.wepayout.com.br/v2/account/markups?account_id=123&parent_id=456&payment_method=xyz" \
    -H "Authorization: Bearer SEU_TOKEN_AQUI" \
    -H "Accept: application/json"
  ```

  ```bash cURL - Internal error example theme={null}
  curl -X GET "https://api.sandbox.wepayout.com.br/v2/account/markups?account_id=123" \
    -H "Authorization: Bearer SEU_TOKEN_AQUI" \
    -H "Accept: application/json"
  ```
</CodeGroup>

## Response

<ResponseField name="data" type="array[object]">
  List of markup configurations.

  <Expandable title="Markup Object">
    <ResponseField name="id" type="integer">
      Markup configuration ID.
    </ResponseField>

    <ResponseField name="product" type="string">
      Product where the markup is applied.
    </ResponseField>

    <ResponseField name="payment_method" type="string">
      Payment method where the markup is applied.
    </ResponseField>

    <ResponseField name="account_id" type="integer">
      Merchant ID that receives the markup.
    </ResponseField>

    <ResponseField name="parent_id" type="integer or null">
      Parent relationship ID, when applicable.
    </ResponseField>

    <ResponseField name="type" type="string">
      Markup scope type. Example: `global`.
    </ResponseField>

    <ResponseField name="mode" type="string">
      Markup mode. Example: `fixed` or `percent`.
    </ResponseField>

    <ResponseField name="amount" type="number">
      Markup value configured for this rule.
    </ResponseField>

    <ResponseField name="min_charge_value" type="number or null">
      Minimum markup value when `mode` is `percent`.
    </ResponseField>

    <ResponseField name="max_charge_value" type="number or null">
      Maximum markup value when `mode` is `percent`.
    </ResponseField>

    <ResponseField name="enabled" type="boolean">
      Indicates whether the markup configuration is currently active.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Date and time when the markup configuration was created.
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      Date and time when the markup configuration was last updated.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": [
      {
        "id": 1,
        "product": "payin",
        "payment_method": "pix",
        "account_id": 123,
        "parent_id": null,
        "type": "global",
        "mode": "percent",
        "amount": 2.5,
        "min_charge_value": 1.0,
        "max_charge_value": 100.0,
        "enabled": true,
        "created_at": "2025-01-01 12:00:00",
        "updated_at": "2025-01-10 09:30:00"
      },
      {
        "id": 2,
        "product": "payout",
        "payment_method": "ted",
        "account_id": 123,
        "parent_id": null,
        "type": "global",
        "mode": "fixed",
        "amount": 5.0,
        "min_charge_value": null,
        "max_charge_value": null,
        "enabled": true,
        "created_at": "2025-01-02 12:00:00",
        "updated_at": "2025-01-10 09:40:00"
      }
    ]
  }
  ```

  ```json 422 Unprocessable Entity theme={null}
  {
    "message": "Dados inválidos.",
    "errors": {
      "parent_id": [
        "O campo parent_id é proibido quando account_id está presente."
      ],
      "payment_method": [
        "O campo payment_method é inválido."
      ]
    }
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "error": "Não foi possível buscar os markups."
  }
  ```
</ResponseExample>

## Related Resources

<CardGroup cols={2}>
  <Card title="Create Merchant Markup" icon="plus" href="/api-reference/markup/account/create-merchant-markup">
    Create new markup configurations
  </Card>

  <Card title="Update Merchant Markup" icon="pen" href="/api-reference/markup/account/update-merchant-markup">
    Update existing markup configurations
  </Card>

  <Card title="About Markup" icon="circle-info" href="/markup/about-markup">
    Learn about markup types and configuration levels
  </Card>

  <Card title="Create Payin with Global Markup" icon="code" href="/api-reference/markup/payin/create-payin-with-global-markup">
    Use global markup when creating payin charges
  </Card>
</CardGroup>
