---
search:
  tags:
    - Price Relays V2
    - POST
seo:
  description: >-
    Bulk-creates price relay source rules.… Reference for the POST
    /api/v2/{team_slug}/{app_slug}/price-relays/sources endpoint in the
    Management API v2.
sidebar:
  label: Create price relay sources
  badge: POST
title: Create price relay sources
type: openapi-operation
---
Bulk-creates price relay source rules. Successful entities are returned in data; per-item failures in errors keyed by the rule name.

`POST /api/v2/{team_slug}/{app_slug}/price-relays/sources`

**Request body** (`application/json`, required)

- `sources` (PriceRelaySourceRuleInput[], required)

Request body example:

```json
{
  "sources": [
    {
      "name": "string",
      "market_slug": "string",
      "active": true,
      "percentage_of_source": 0,
      "percentage_of_source_decimals": 0,
      "store_groups": [
        {
          "store_group_slug": "string",
          "amount_from": "string",
          "sale_price_from": "string"
        }
      ],
      "relay_on_sale_store_group_slug": "string",
      "relay_status_store_group_slug": "string",
      "force_on_sale": true,
      "tax_country_code": "string",
      "rounding": {
        "round_up": true,
        "round_down": true,
        "targets": [
          "string"
        ]
      },
      "filters": {
        "category_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "collection_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "brand_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "tag_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ]
      }
    }
  ]
}
```

**Responses**

- `201` — Created (partial success possible)
- `400` — Request-level failure
- `401` — Request-level failure
- `403` — Request-level failure
- `500` — Request-level failure

Response example, 201:

```json
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "app_id": "affd1d10-9538-4fc8-9e0b-4594a28c1335",
      "name": "string",
      "market": "7cbb2c4d-c9b2-4555-b35d-f45eb2fff673",
      "market_slug": "string",
      "active": true,
      "percentage_of_source": 0,
      "percentage_of_source_decimals": 0,
      "store_groups": [
        {
          "store_group": "0b23369c-9687-4c4c-af38-d6700348bb98",
          "store_group_slug": "string",
          "amount_from": "string",
          "sale_price_from": "string"
        }
      ],
      "relay_on_sale_store_group": "6386c9b8-dda1-4105-851a-e3894e665666",
      "relay_status_store_group": "95dbee80-237f-41be-bcd8-32bb772b6424",
      "force_on_sale": true,
      "tax_country_code": "string",
      "rounding": {
        "round_up": true,
        "round_down": true,
        "targets": [
          "string"
        ]
      },
      "filters": {
        "category_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "collection_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "brand_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "tag_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ]
      },
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "errors": [
    {
      "name": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "message": "string"
    }
  ]
}
```
