Create a Store Credit Category
Create a Store Credit Category
Creates a Store Credit Category
POST
Create a Store Credit Category
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
const options = {
method: 'POST',
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', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url http://{defaultHost}/api/v2/platform/store_credit_categories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"store_credit_category": {
"name": "refunded"
}
}
'{
"data": {
"id": "6",
"type": "store_credit_category",
"attributes": {
"name": "Exchange",
"created_at": "2022-11-08T19:35:34.099Z",
"updated_at": "2022-11-08T19:35:34.099Z"
}
}
}{
"error": "Name can't be blank",
"errors": {
"name": [
"can't be blank"
]
}
}Creates a Store Credit Category
const options = {
method: 'POST',
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', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url http://{defaultHost}/api/v2/platform/store_credit_categories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"store_credit_category": {
"name": "refunded"
}
}
'{
"data": {
"id": "6",
"type": "store_credit_category",
"attributes": {
"name": "Exchange",
"created_at": "2022-11-08T19:35:34.099Z",
"updated_at": "2022-11-08T19:35:34.099Z"
}
}
}{
"error": "Name can't be blank",
"errors": {
"name": [
"can't be blank"
]
}
}Was this page helpful?
