Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Update price relay sources

Bulk-patches price relay source rules by id. Successful entities are returned in data; per-item failures in errors.

PATCH/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
sourcesPatchPriceRelaySourceItem[]required
min items 1 · max items 20
Show properties
Array of PatchPriceRelaySourceItem
idUUIDrequired
namestring
market_idUUID
activeboolean
percentage_of_sourceinteger | null
percentage_of_source_decimalsinteger | null
store_groupsPriceRelaySourceStoreGroupInput[] | null
Show properties
Array of PriceRelaySourceStoreGroupInput
store_group_idUUIDrequired
amount_fromstring
sale_price_fromstring | null
relay_on_sale_store_group_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
relay_status_store_group_idUUID
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
200

Patched (partial success possible)

dataPriceRelaySourceRule[]required
Show properties
Array of PriceRelaySourceRule
idUUIDrequired
app_idUUIDrequired
namestringrequired
market_idUUIDrequired
activebooleanrequired
percentage_of_sourceinteger | null
percentage_of_source_decimalsinteger | null
store_groupsPriceRelaySourceStoreGroup[] | null
Show properties
Array of PriceRelaySourceStoreGroup
store_group_idUUIDrequired
amount_fromstring
sale_price_fromstring | null
relay_on_sale_store_group_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
relay_status_store_group_idUUIDrequired
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 PATCH '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": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "market_id": "6364d859-8e1b-477a-bacc-de8305a9292b",
      "active": true,
      "percentage_of_source": 0,
      "percentage_of_source_decimals": 0,
      "store_groups": [
        {
          "store_group_id": "6c760e36-a704-4b09-93bb-c191a46ca67f",
          "amount_from": "string",
          "sale_price_from": "string"
        }
      ],
      "relay_on_sale_store_group_id": "56c24a4e-c90d-4e6d-89e7-80ebb30dfbfb",
      "relay_status_store_group_id": "a00e1b1e-5344-453f-9831-0220193c8c0c",
      "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_id": "6364d859-8e1b-477a-bacc-de8305a9292b",
      "active": true,
      "percentage_of_source": 0,
      "percentage_of_source_decimals": 0,
      "store_groups": [
        {
          "store_group_id": "6c760e36-a704-4b09-93bb-c191a46ca67f",
          "amount_from": "string",
          "sale_price_from": "string"
        }
      ],
      "relay_on_sale_store_group_id": "56c24a4e-c90d-4e6d-89e7-80ebb30dfbfb",
      "relay_status_store_group_id": "a00e1b1e-5344-453f-9831-0220193c8c0c",
      "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"
    }
  ]
}