Skip to main content
PATCH
/
api
/
v2
/
platform
/
store_credit_categories
/
{id}
Update a Store Credit Category
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({store_credit_category: {name: 'refunded'}})
};

fetch('http://{defaultHost}/api/v2/platform/store_credit_categories/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "data": {
    "id": "9",
    "type": "store_credit_category",
    "attributes": {
      "name": "refunded",
      "created_at": "2022-11-08T19:35:34.884Z",
      "updated_at": "2022-11-08T19:35:35.112Z"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
store_credit_category
object
required

Response

Record updated

data
object
required