Record Apple Consumption Consent
PATCH https://api.botsi.com/v2/profiles/{profileId}/apple-consumption-consentRecord whether the user agreed to share consumption data with Apple if they ask Apple for a refund. Call it when the user answers your consent prompt.
This route accepts $BOTSI_SECRET_KEY or $BOTSI_PUBLIC_KEY in the Authorization header, with no Bearer prefix. The sample sends the secret key. From inside the app, send the public key. Delete a Profile is the exception and accepts the secret key only. See Authentication.
How Botsi uses consent#
When a customer requests a refund, Apple sends a consumption request (a notification asking the developer how the customer used the purchase). If your app has Botsi's refund-guard feature enabled, Botsi answers it and sends this value to Apple as customerConsented.
Path parameters#
Request body#
# Authorization: $BOTSI_SECRET_KEY or $BOTSI_PUBLIC_KEY
curl -X PATCH "https://api.botsi.com/v2/profiles/fff3c120-0ca8-480f-9b19-3955a5428e39/apple-consumption-consent" \
-H "Authorization: $BOTSI_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{ "appleConsumptionConsent": true }'Response#
{ "ok": true }