Skip to content

Approve a suggestion

POST
/api/v1/workspaces/{workspaceId}/suggestions/{suggestionId}/approve
curl --request POST \
--url https://api.crossmart.io/api/v1/workspaces/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/suggestions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve

Applies the change the way an edit would (a channel override, synced to the store), and returns it APPLIED. When its field changed since it was made, nothing is applied and it returns STALE. A suggestion that is no longer pending answers 409.

workspaceId
required
string format: uuid
suggestionId
required
string format: uuid
Media typeapplication/json
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

Example

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