Skip to content

Approve selected edits or confident suggestions

POST
/products/review/accept-all
curl --request POST \
--url https://example.com/products/review/accept-all \
--header 'Content-Type: application/json' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "minimumConfidence": 1, "decisions": [ { "kind": "cylinder", "gasTypeName": "example", "gasTypeId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "brand": "example", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ] }'

With decisions, approves only the selected pending products using their supplied edits, regardless of model confidence. Returns acceptedProductIds so failed rows remain visible. Without decisions, accepts pending suggestions at or above minimumConfidence (default 0.8). Imported charges stay below that default threshold. Anything that cannot be applied is left waiting.

Media typeapplication/json
object
minimumConfidence
number
<= 1
decisions
Array<object>
>= 1 items <= 500 items
object
kind

A cylinder of gas, a deposit or rent on cylinders, an accessory such as a regulator, the delivery charge, or nothing Bottle could tell.

string
Allowed values: cylinder deposit hire accessory delivery unknown
gasTypeName
string | null
>= 1 characters <= 80 characters
gasTypeId

UUID v7

string | null format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
brand
string | null
<= 40 characters
productId
required

UUID v7

string format: uuid

Example

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

How many were accepted and how many are still waiting

Media typeapplication/json
object
accepted
required
integer
skipped
required
integer
acceptedProductIds
Array<string>

Example

{
"acceptedProductIds": [
"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"
}

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"
}
]
}