Set a product detail on many products
POST
/product-details/{id}/products
const url = 'https://example.com/product-details/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/products';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"productIds":["019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"],"value":["019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
productIds
required
Array<string>
value
required
Any of:
Array<string>
number
boolean
string
null
Responses
Section titled “Responses”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
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}