Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Upsert customer group prices

Bulk-upserts customer group product variant prices. Successful entities are returned in data; per-item failures in errors keyed by customer group and variant.

PUT/api/v2/{team_slug}/{app_slug}/customer-groups/prices
Authorization
AuthorizationBearer token · headerrequired

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

Path parameters
team_slugstringrequired
app_slugstringrequired
Request body
requiredapplication/json
pricesUpsertCustomerGroupPriceItem[]required
min items 1 · max items 20
Show properties
Array of UpsertCustomerGroupPriceItem
customer_group_idUUIDrequired
variant_idUUIDrequired
market_idUUIDrequired
price_amountintegerrequired
Responses
200

OK (partial success possible)

dataCustomerGroupProductVariantPrice[]required
Show properties
Array of CustomerGroupProductVariantPrice
idUUIDrequired
customer_groupCustomerGroupRefrequired
Show properties
idUUIDrequired
slugstringrequired
namestringrequired
marketCustomerGroupPriceMarketrequired
Show properties
idUUIDrequired
slugstringrequired
namestringrequired
product_variantCustomerGroupPriceVariantRefrequired
Show properties
idUUIDrequired
variant_namestringrequired
price_amountintegerrequired
created_atstring<date-time>required
updated_atstring<date-time>required
errorsCustomerGroupPriceError[]required
Show properties
Array of CustomerGroupPriceError
customer_group_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
variant_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
market_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 PUT 'https://api.enad.io/api/v2/string/string/customer-groups/prices' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "prices": [
    {
      "customer_group_id": "9136bb06-5b02-45e6-b51e-7d2eea8ad1e4",
      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",
      "market_id": "6364d859-8e1b-477a-bacc-de8305a9292b",
      "price_amount": 0
    }
  ]
}'
Response
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "customer_group": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "slug": "string",
        "name": "string"
      },
      "market": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "slug": "string",
        "name": "string"
      },
      "product_variant": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "variant_name": "string"
      },
      "price_amount": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "errors": [
    {
      "customer_group_id": "9136bb06-5b02-45e6-b51e-7d2eea8ad1e4",
      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",
      "market_id": "6364d859-8e1b-477a-bacc-de8305a9292b",
      "message": "string"
    }
  ]
}