Return a Store Credit
Returns a Store Credit
GET
/
api
/
v2
/
platform
/
store_credits
/
{id}
Return a Store Credit
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://{defaultHost}/api/v2/platform/store_credits/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v2/platform/store_credits/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "7",
"type": "store_credit",
"attributes": {
"amount": "150.0",
"amount_used": "0.0",
"memo": null,
"deleted_at": null,
"currency": "USD",
"amount_authorized": "0.0",
"originator_type": null,
"created_at": "2022-11-08T19:35:39.554Z",
"updated_at": "2022-11-08T19:35:39.554Z",
"public_metadata": {},
"private_metadata": {},
"display_amount": "$150.00",
"display_amount_used": "$0.00"
},
"relationships": {
"user": {
"data": {
"id": "115",
"type": "user"
}
},
"created_by": {
"data": {
"id": "116",
"type": "user"
}
},
"store_credit_category": {
"data": {
"id": "19",
"type": "store_credit_category"
}
},
"store_credit_type": {
"data": {
"id": "20",
"type": "store_credit_type"
}
},
"store_credit_events": {
"data": [
{
"id": "8",
"type": "store_credit_event"
}
]
}
}
}
}{
"error": "The access token is invalid"
}{
"error": "The resource you were looking for could not be found."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes
Response
Record found
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Return a Store Credit
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://{defaultHost}/api/v2/platform/store_credits/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v2/platform/store_credits/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "7",
"type": "store_credit",
"attributes": {
"amount": "150.0",
"amount_used": "0.0",
"memo": null,
"deleted_at": null,
"currency": "USD",
"amount_authorized": "0.0",
"originator_type": null,
"created_at": "2022-11-08T19:35:39.554Z",
"updated_at": "2022-11-08T19:35:39.554Z",
"public_metadata": {},
"private_metadata": {},
"display_amount": "$150.00",
"display_amount_used": "$0.00"
},
"relationships": {
"user": {
"data": {
"id": "115",
"type": "user"
}
},
"created_by": {
"data": {
"id": "116",
"type": "user"
}
},
"store_credit_category": {
"data": {
"id": "19",
"type": "store_credit_category"
}
},
"store_credit_type": {
"data": {
"id": "20",
"type": "store_credit_type"
}
},
"store_credit_events": {
"data": [
{
"id": "8",
"type": "store_credit_event"
}
]
}
}
}
}{
"error": "The access token is invalid"
}{
"error": "The resource you were looking for could not be found."
}
