Skip to content

Set a product detail on many products

POST
/product-details/{id}/products
curl --request POST \
--url https://example.com/product-details/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/products \
--header 'Content-Type: application/json' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "productIds": [ "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" ], "value": [ "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" ] }'

Gives every product listed the same value for this detail, or clears it with null. Products the detail is not for, by kind, are left as they were and listed in skipped. Every product has to be this business’s, or nothing changes.

id
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

Media typeapplication/json
object
productIds
required
Array<string>
>= 1 items <= 500 items
value
required
Any of:
Array<string>
<= 100 items

How many were set, and which were skipped

Media typeapplication/json
object
updated
required
integer
skipped
required

Products the detail does not apply to, by kind. Left as they were.

Array<string>

Example

{
"skipped": [
"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
]
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not a member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

No such product detail

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string

Example

{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}