Update store credit entry
PUT: /wp-json/wc-store-credits/v1/entries/{entry_id}
Requirements:
Logged-in user
user role with
manage_woocommerceuser capability
Method
Endpoint
PUT
/wp-json/wc-store-credits/v1/entries/{entry_id}
Parameters
Required
Type
Default
Description
amount
no
float
-
Entry amount value.
user_id
no
integer
-
Customer ID
type
no
string
-
Entry type: increase or decrease
action
no
string
-
The action or source slug of the entry.
This requires a valid source/action that is registered by code (learn more).
date
no
string
current date & time
Date and time the entry was created
date_format
no
string
Y-m-d H:i:s
Date format of the provided date values.
object_id
no
integer
0
The ID of related object of the entry. This can either be the ID of an order, coupon, user or post.
Update store credit entry amount
PUT: http://example.com/wp-json/wc-store-credits/v1/entry/35
{
"amount": 50
}Status: 200 OK
{
"message": "Successfully updated store credit entry.",
"data": {
"key": "35",
"id": 35,
"amount_raw": 50,
"amount": "$50.00",
"type": "increase",
"activity": "Refunded order",
"user_id": 1,
"date": "2021-11-16 13:12:10",
"rel_link": "http://acfw.test/my-account/view-order/436/",
"rel_label": "View Order",
"note": ""
},
"balance_raw": 300.25,
"balance": "$300.25"
}Status: 403 Forbidden
{
"code": "rest_forbidden_context",
"message": "Sorry, you are not allowed access to this endpoint.",
"data": {
"status": 401
}
}Last updated
Was this helpful?