Skip to content

Approve several suggestions

POST
/api/v1/workspaces/{workspaceId}/suggestions/bulk-approve
curl --request POST \
--url https://api.crossmart.io/api/v1/workspaces/example/suggestions/bulk-approve \
--header 'Content-Type: application/json' \
--data '{ "suggestionIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'

Applies each pending suggestion, or marks it STALE when its field changed since it was made. Suggestions that are not pending are skipped.

workspaceId
required
string
Media typeapplication/json
object
suggestionIds
required

Pending suggestions to approve; others are skipped

Array<string>
>= 1 items <= 100 items

Example generated

{
"suggestionIds": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}
Media typeapplication/json
object
items
required

Each suggestion reviewed: APPLIED, or STALE when its field had changed

Array<object>
object
id
required
string format: uuid
productId
required
string format: uuid
productTitle
required
string
imageUrl
required
string
nullable
connection
required

The store the change is for; null for the product’s own content

object
id
required
string format: uuid
channel
required
string
Allowed values: shopify ebay google_merchant etsy amazon walmart
displayName
required
string
kind
required
string
Allowed values: listing_title listing_description
status
required
string
Allowed values: PENDING APPLIED REJECTED STALE
currentValue
required

The value it replaces, as it was when it was made

string
proposedValue
required
string
rationale
required

Why the agent proposes it

string
createdBy
required
object
type
required
string
Allowed values: AGENT USER API_KEY
agent
required

The agent that made it, for AGENT suggestions

string
Allowed values: content_generator
userId
required

Who asked for it

string format: uuid
nullable
apiKeyId
required
string format: uuid
nullable
name
required

The user’s or API key’s name

string
nullable
review
required
object
userId
required
string format: uuid
nullable
apiKeyId
required
string format: uuid
nullable
name
required
string
nullable
reviewedAt
required
string format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
skippedIds
required

Ids not found in the workspace or no longer pending

Array<string>

Example

{
"items": [
{
"productTitle": "Stoneware Mug",
"connection": {
"channel": "shopify",
"displayName": "Demo Store"
},
"kind": "listing_title",
"status": "PENDING",
"createdBy": {
"type": "AGENT",
"agent": "content_generator"
}
}
]
}