Action API
Read, update and delete the entries (actions) that make up a customer's balance with the Shopwaive Action API (2026-11)
Every change to a balance is saved as an entry, which the API calls an action. The Action API reads entries, changes an entry's note, expiry or media, and deletes entries. Every request needs your Shopwaive API key in the X-Shopwaive-Access-Token header and shopify in the X-Shopwaive-Platform header. POST and DELETE also need an Idempotency-Key header: see Retry safely.
GET /api/actions
Searches entries by customer and date.
GET /api/action/{actionid}
Returns the entries with this id.
POST /api/action/{actionid}
Changes an entry's note, expiry or media.
DELETE /api/action/{actionid}
Deletes the entries with this id, and reverses their amount on the balance.
Base URL: https://app.shopwaive.com
An entry's id is the id of the Customer API answer that made it, or the id of an entry in activity.
GET actions endpoint
Searches entries. Filter by customer with email and by date with created_at_min and created_at_max.
Returns entries (actions) of the store's balances. Filter by customer with email and by date with created_at_min and created_at_max.
An email that is not a valid address is ignored, and entries of every customer are returned.
Your Shopwaive API key. Create it in the Shopwaive app under Settings > Develop > Shopwaive API keys. It starts with swak_.
Only this customer's entries.
customer@example.comOnly entries from this date on, for example 2026-10-01T00:00:00Z.
2026-10-01T00:00:00ZOnly entries up to this date. Without it, entries up to now.
2026-10-26T23:59:59ZAlways shopify.
shopifyExample: shopifyPossible values: The entries found. actions is empty when none match.
The X-Shopwaive-Platform header is missing or is not shopify. Nothing was changed.
A date is not valid (status names which), or the API key was not accepted.
Too many requests. Wait the seconds in Retry-After.
The key could not be checked just now. Nothing was changed. Retry.
GET /api/actions HTTP/1.1
Host: app.shopwaive.com
X-Shopwaive-Access-Token: swak_YOUR_API_KEY
X-Shopwaive-Platform: shopify
Accept: */*
{
"actions": [
{
"id": "1761500000000",
"date": "2026-10-26T15:00:00.000Z",
"note": "Thank you gift",
"type": "rest_api",
"amount": 10,
"expires": "false",
"validity": "does not expire",
"message": "amount field must be set greater than 0 and expires set to true to assign an expiration"
}
]
}GET action endpoint
Returns the entries with this id in actions. The list is empty when no entry has it.
Returns the entries with this id. actions is empty when none has it.
Your Shopwaive API key. Create it in the Shopwaive app under Settings > Develop > Shopwaive API keys. It starts with swak_.
The id of an entry, as in the id of a Customer API answer or of an entry in activity.
1761500000000Always shopify.
shopifyExample: shopifyPossible values: The entries with this id.
The X-Shopwaive-Platform header is missing or is not shopify. Nothing was changed.
The API key was not accepted. A value that starts with swak_ gets status failed and a message that names the reason. A key of a store that uninstalled Shopwaive is paused, not revoked: it gets reason app_uninstalled and works again when the app is reinstalled. No key, or a token Shopwaive does not know, gets unknown_api_token.
Too many requests. Wait the seconds in Retry-After.
The key could not be checked just now. Nothing was changed. Retry.
GET /api/action/{actionid} HTTP/1.1
Host: app.shopwaive.com
X-Shopwaive-Access-Token: swak_YOUR_API_KEY
X-Shopwaive-Platform: shopify
Accept: */*
{
"actions": [
{
"id": "1761500000000",
"date": "2026-10-26T15:00:00.000Z",
"note": "Spring Budget",
"type": "rest_api",
"amount": 20,
"expires": "true",
"expirationdate": "2027-04-21",
"validity": "expires in less than 6 months"
}
]
}The fields of an entry
Which fields an entry has depends on how it was made.
id
The entry's id
date
When the entry was made or last changed
note
The entry's note
type
How the entry was made, for example rest_api
amount
The amount the entry added (negative when it took)
expirationdate
When the amount expires, if expires is true
expires
true or false, as text
status
For example expired or redeemed
media
A media link
orderid
The order of the latest spend from this entry
lineitemid
The order line that made this entry
segment_query
The customer segment query the entry was made with
collectionids
Collection ids where the amount can be spent
productids
Product ids where the amount can be spent
remaining
What is left of the entry after earlier orders
partial_amount
What can be spent now, when the balance is lower than remaining
validity
How long until the amount expires, in words, for example expires in less than 3 months, expired or does not expire
message
A note about the entry, for example why it does not expire
POST action endpoint
Changes an entry's note, expiry or media link. It does not change any amount or balance.
Changes the note, the expiry or the media link of an entry. It does not change any amount or balance.
An expiry is changed only when the request has both expirationdate and expires. An expired entry cannot be changed.
An answer of HTTP 200 with the plain text OK means the update was sent for processing. Read the entry again with GET to see the change.
Your Shopwaive API key. Create it in the Shopwaive app under Settings > Develop > Shopwaive API keys. It starts with swak_.
The id of an entry, as in the id of a Customer API answer or of an entry in activity.
1761500000000Always shopify.
shopifyExample: shopifyPossible values: Required with a Shopwaive API key. A key you choose for this change: 1 to 255 printable ASCII characters, with no space at either end. A UUID is a good choice. Use a new key for each change, and send the same key again to retry: Shopwaive answers with the first answer and changes nothing again. Without it, the request returns 400 idempotency_key_required and changes nothing.
3f9c2b8e-1d4a-4c7e-9b2f-6a1e5d0c7b3aThe new note.
The new expiry date, for example 2028-04-21 or April 21, 2028. Needs expires.
true when the amount expires on expirationdate, else false. Sent and stored as text.
trueA new link to an image.
Sent for processing, with the plain text OK. When an entry with this id has expired, the answer is JSON that lists it with a message, and it is not changed.
The X-Shopwaive-Platform header is missing or is not shopify. Nothing was changed.
The Idempotency-Key header is missing (a request made with a Shopwaive API key needs one) or is not valid. Nothing was changed.
The API key was not accepted. A value that starts with swak_ gets status failed and a message that names the reason. A key of a store that uninstalled Shopwaive is paused, not revoked: it gets reason app_uninstalled and works again when the app is reinstalled. No key, or a token Shopwaive does not know, gets unknown_api_token.
The API key cannot change balances. A request that changes a balance or starts a workflow needs a key with Change balances through the REST API (wallets:write), chosen when the key is created. Nothing was changed. Reading balances needs no scope.
No entry has this id.
A request with the same key is still running. Retry after the seconds in Retry-After.
This Idempotency-Key was already used with different fields. Nothing was changed.
Too many requests. Wait the seconds in Retry-After.
The key could not be checked, or the outcome of the request is not known yet (the update may or may not have been queued). Read the entry with GET, then retry the same request, with the same Idempotency-Key, after the seconds in Retry-After.
POST /api/action/{actionid} HTTP/1.1
Host: app.shopwaive.com
X-Shopwaive-Access-Token: swak_YOUR_API_KEY
X-Shopwaive-Platform: shopify
Idempotency-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"expirationdate": "2027-04-21",
"expires": "true"
}textRequest body
note
The new note
expirationdate
The new expiry date, for example 2028-04-21 or April 21, 2028
expires
true or false
media
A new media link
Send only the fields you want to change. An expiry is changed only when the request has both expirationdate and expires.
Answer
200
The plain text OK
The update was sent for processing. Read the entry again with GET to see the change.
200
actions, each with message "action has already expired and cannot be updated"
An entry with this id has expired. It is not changed.
405
message "Failed. No document found or malformed request body"
No entry has this id.
DELETE action endpoint
Deletes the entries with this id. This changes real balances in your store.
When a deleted entry added or took an amount, and it is not marked redeemed or expired, Shopwaive asks for that amount to be reversed on the balance: only remaining when it is above 0 and below the amount, otherwise the whole amount. Read the customer's balance with GET customer to confirm.
Deletes the entries with this id. This changes real balances in your store.
When a deleted entry added or took an amount, and it is not marked redeemed or expired, Shopwaive asks for that amount to be reversed on the balance: only remaining when it is above 0 and below the amount, else the whole amount. Each entry in the answer says what happened to it. Read the balance with GET customer to confirm.
This route takes up to 20 requests a second.
Your Shopwaive API key. Create it in the Shopwaive app under Settings > Develop > Shopwaive API keys. It starts with swak_.
The id of an entry, as in the id of a Customer API answer or of an entry in activity.
1761500000000Always shopify.
shopifyExample: shopifyPossible values: Required with a Shopwaive API key. A key you choose for this change: 1 to 255 printable ASCII characters, with no space at either end. A UUID is a good choice. Use a new key for each change, and send the same key again to retry: Shopwaive answers with the first answer and changes nothing again. Without it, the request returns 400 idempotency_key_required and changes nothing.
3f9c2b8e-1d4a-4c7e-9b2f-6a1e5d0c7b3aWhat happened to each entry with this id. actions is empty when none has it.
The X-Shopwaive-Platform header is missing or is not shopify. Nothing was changed.
The Idempotency-Key header is missing (a request made with a Shopwaive API key needs one) or is not valid. Nothing was changed.
No X-Shopwaive-Access-Token was sent, or the API key was not accepted.
The API key cannot change balances. A request that changes a balance or starts a workflow needs a key with Change balances through the REST API (wallets:write), chosen when the key is created. Nothing was changed. Reading balances needs no scope.
A request with the same key is still running. Retry after the seconds in Retry-After.
This Idempotency-Key was already used with different fields. Nothing was changed.
Too many requests. Wait the seconds in Retry-After.
An entry was deleted, but its balance reversal could not be confirmed. Do not send this request again. Read the customer's balance with GET customer, and contact support@shopwaive.com with the request id. actions says what happened to each entry.
Another request is deleting the same entry, the key could not be checked, or the outcome of a request with this Idempotency-Key is not known yet. This answer changed nothing. Retry after the seconds in Retry-After, with the same Idempotency-Key.
DELETE /api/action/{actionid} HTTP/1.1
Host: app.shopwaive.com
X-Shopwaive-Access-Token: swak_YOUR_API_KEY
X-Shopwaive-Platform: shopify
Idempotency-Key: text
Accept: */*
{
"actions": [
{
"status": "success",
"actionid": "1761500000000"
}
]
}Answer
actions lists what happened to each entry with this id:
{"status": "success", "actionid": "..."}
Deleted. When it had an amount, its reversal on the balance was confirmed.
The entry, with message "action deleted but is not eligible for balance adjustments. If required, update balance with the Customer API"
Deleted. The balance did not change.
The entry, with message "action is not eligible for deletion"
Not deleted.
401 with status failed_credential
No X-Shopwaive-Access-Token was sent.
503 with status failed_temporary
Another request is deleting the same entry. Nothing was changed. Retry after Retry-After.
502 with reason reversal_not_confirmed
An entry was deleted, but its balance reversal was not confirmed. actions lists each entry: the one not confirmed has status failed. Do not send the request again. Read the customer's balance with GET customer, and contact support@shopwaive.com with the request id.
This route takes up to 20 requests a second.
Retry safely
POST and DELETE need an Idempotency-Key header: a key you choose, 1 to 255 printable ASCII characters with no space at either end. A UUID is a good choice. Use a new key for each change. Send the same request with the same key again and Shopwaive answers with the first answer, with the header Idempotent-Replayed: true. Nothing is done twice.
400
idempotency_key_required
The request was made with a Shopwaive API key and has no Idempotency-Key header. Nothing was changed.
400
IDEMPOTENCY_KEY_INVALID
The key is not 1 to 255 printable ASCII characters, or it starts or ends with a space.
409
IDEMPOTENCY_CONCURRENT_REQUEST
A request with the same key is still running. Retry after Retry-After.
422
IDEMPOTENCY_KEY_PARAMETER_MISMATCH
The key was already used with a different entry or different fields.
503
pending
The outcome is not known yet. Read the entry with GET, then retry with the same key after Retry-After.
Last updated