Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Create price relay sources

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
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
team_slugstringrequired
app_slugstringrequired
Request body
requiredapplication/json
sourcesPriceRelaySourceRuleInput[]required
min items 1 · max items 20
Show properties
Array of PriceRelaySourceRuleInput
namestringrequired
market_slugstringrequired
activeboolean
percentage_of_sourceinteger | null
percentage_of_source_decimalsinteger | null
store_groupsPriceRelaySourceStoreGroupInput[]required
min items 1
Show properties
Array of PriceRelaySourceStoreGroupInput
store_group_slugstringrequired
amount_fromstring
sale_price_fromstring | null
relay_on_sale_store_group_slugstring | null
relay_status_store_group_slugstringrequired
force_on_saleboolean | null
tax_country_codestring | null
roundingPriceRelayRoundingInput
Show properties
round_upboolean
round_downboolean
targetsstring[] | null
filtersPriceRelayFiltersInput
Show properties
category_idsUUID[] | null
collection_idsUUID[] | null
brand_idsUUID[] | null
tag_idsUUID[] | null
Responses
201

Created (partial success possible)

dataPriceRelaySourceRule[]required
Show properties
Array of PriceRelaySourceRule
idUUIDrequired
app_idUUIDrequired
namestringrequired
marketUUIDrequired
market_slugstringrequired
activebooleanrequired
percentage_of_sourceinteger | null
percentage_of_source_decimalsinteger | null
store_groupsPriceRelaySourceStoreGroup[] | null
Show properties
Array of PriceRelaySourceStoreGroup
store_groupUUIDrequired
store_group_slugstringrequired
amount_fromstring
sale_price_fromstring | null
relay_on_sale_store_groupUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
relay_status_store_groupUUIDrequired
force_on_saleboolean | null
tax_country_codestring | null
roundingPriceRelayRoundingrequired
Show properties
round_upboolean
round_downboolean
targetsstring[] | null
filtersPriceRelayFiltersrequired
Show properties
category_idsUUID[] | null
collection_idsUUID[] | null
brand_idsUUID[] | null
tag_idsUUID[] | null
created_atstring<date-time>required
updated_atstring<date-time>required
errorsPriceRelaySourceRuleError[]required
Show properties
Array of PriceRelaySourceRuleError
namestring
idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
messagestringrequired
400

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
401

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
403

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
500

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.enad.io/api/v2/string/string/price-relays/sources' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "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"
        ]
      }
    }
  ]
}'
Response
{
  "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"
    }
  ]
}