CopyHero

Read Product Change

GET
/api/v1/product-changes/{change_id}

Read a product change

One product change. A user's decision shows as pending until it can no longer be undone (35 seconds).

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

change_id*Change Id
Formatuuid

Response Body

Successful Response

application/json
  1. response

A product change as an MCP client sees it. A decision by a user stays hidden (pending, no decision fields) until it can no longer be undone. apply_error is set for failed only.

id*Id
Formatuuid
status*ProductChangeStatus
Value in"pending""approved""declined""applied""failed""stale""withdrawn"
internal_product_id*Internal Product Id
Formatuuid
store_id*Store Id
product_store_link_id*Product Store Link Id
Formatuuid
change_types*array<>
patch*

The change a client proposes, on the fields of InternalProductUpdateRequest: null leaves a field alone, a list replaces the whole list. Metafields are not in the product document, so they are set or deleted one namespace.key at a time. delete removes the product and stands alone.

diff*

product_change.diff: old and new value of every field the change touches, computed against base_revision_number; variants and images per element.

base_revision_number*Base Revision Number
reason*string|null
proposer*

api_key: the key's Clerk id and name; user: the signed-in user.

amended_at*|null
amend_count*Amend Count
risk_level*|null
risk_raised_from*|null
risk_raised_at*|null
evaluation*

product_change.evaluation and the rule result of pchange.api.evaluate. risk_level is null for auto_approve; order_data_missing marks an auto_approve lowered to manual_low because the store has no order data.

decided_by_kind*|null
decided_at*|null
decline_feedback*string|null
applied_at*|null
apply_error*string|null
created_at*Created At
Formatdate-time
updated_at*Updated At
Formatdate-time
Example Request
curl -X GET 'https://app.copyhero.app/api/v1/product-changes/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "pending",  "internal_product_id": "17d65d0a-2bba-46da-af25-e6db2fc23598",  "store_id": 0,  "product_store_link_id": "f7d0a9a7-e8e4-4f5e-9e00-7ea8f5e3b61b",  "change_types": [    "price"  ],  "patch": {    "title": "string",    "body_html": "string",    "vendor": "string",    "product_type": "string",    "tags": [      "string"    ],    "seo_title": "string",    "seo_description": "string",    "options": [      {        "name": "string",        "position": 0,        "values": [          {            "value": "string",            "position": 0          }        ]      }    ],    "variants": [      {        "sku": "string",        "price": "string",        "compare_at_price": "string",        "option_values": [          {            "name": "string",            "value": "string"          }        ],        "image_src": "string",        "metafields": [          {            "namespace": "string",            "key": "string",            "type": "string",            "value": "string"          }        ]      }    ],    "images": [      {        "src": "string",        "position": 0,        "alt_text": "string"      }    ],    "metafields": [      {        "namespace": "string",        "key": "string",        "type": "string",        "value": "string"      }    ],    "status": "active",    "delete": false  },  "diff": {    "fields": [      {        "field": "title",        "old": null,        "new": null      }    ],    "variants": [      {        "ref": {          "key": "string",          "sku": "string",          "option_values": [            {              "name": "string",              "value": "string"            }          ],          "create": true        },        "old": {          "sku": "string",          "price": "string",          "compare_at_price": "string",          "option_values": [            {              "name": "string",              "value": "string"            }          ],          "image_src": "string",          "metafields": [            {              "namespace": "string",              "key": "string",              "type": "string",              "value": "string"            }          ]        },        "new": {          "sku": "string",          "price": "string",          "compare_at_price": "string",          "option_values": [            {              "name": "string",              "value": "string"            }          ],          "image_src": "string",          "metafields": [            {              "namespace": "string",              "key": "string",              "type": "string",              "value": "string"            }          ]        }      }    ],    "images": [      {        "ref": {          "key": "string",          "shopify_id": "string",          "url": "string",          "create": true        },        "old": {          "src": "string",          "position": 0,          "alt_text": "string"        },        "new": {          "src": "string",          "position": 0,          "alt_text": "string"        }      }    ]  },  "base_revision_number": 0,  "reason": "string",  "proposer": {    "kind": "api_key",    "api_key_id": "string",    "api_key_name": "string",    "user_id": 0  },  "amended_at": "2019-08-24T14:15:22Z",  "amend_count": 0,  "risk_level": "low",  "risk_raised_from": "low",  "risk_raised_at": "2019-08-24T14:15:22Z",  "evaluation": {    "outcome": "auto_approve",    "risk_level": "low",    "order_data_missing": true,    "change_types": [      {        "change_type": "price",        "outcome": "auto_approve",        "winner_rule_id": "a0d63d6e-eec1-49e2-b3f1-596e5cd260a6",        "rules": [          {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "name": "string",            "outcome": "auto_approve",            "change_types": [              "price"            ],            "conditions": {              "v": 1,              "all": [                {                  "field": "string",                  "op": "string",                  "value": null                }              ]            }          }        ]      }    ]  },  "decided_by_kind": "user",  "decided_at": "2019-08-24T14:15:22Z",  "decline_feedback": "string",  "applied_at": "2019-08-24T14:15:22Z",  "apply_error": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}