Skip to content

Update confirmation

BetaAPI v2 is in public beta: endpoints, fields and behaviour can change before general availability. See the changelog

PATCH
/preorders/notification_settings/confirmation
curl --request PATCH \
--url https://app.stoqapp.com/api/v2/external/preorders/notification_settings/confirmation \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <X-Auth-Token>' \
--data '{ "email_enabled": true, "sms_enabled": true, "customer_cancellation_enabled": true }'

Switch the preorder confirmation email and SMS on or off, and whether customers may cancel their preorder from the email.

Note: Deep partial: absent fields are unchanged, unknown or read-only keys are rejected. Errors are 422 keyed “notification_setting.”. Returns the notification setting.

Media typeapplication/json
object
email_enabled

Send the preorder confirmation email.

boolean
sms_enabled

Send the preorder confirmation SMS to customers who gave a phone number.

boolean
customer_cancellation_enabled

Let customers cancel their preorder from the link in the confirmation email.

boolean

Example

{
"email_enabled": true,
"sms_enabled": true,
"customer_cancellation_enabled": true
}

Success — the updated resource.

Media typeapplication/json
object

Example generated

{}

Saved. Returns the updated section, with also_changed for cascades.

Media typeapplication/json
object

Example generated

{}

Missing or invalid X-Auth-Token.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"Unauthorized"
]
}

Invalid fields, keyed by canonical section paths. Nothing was saved.

Media typeapplication/json
object
errors
required
object
key
additional properties
Array<string>

Example generated

{
"errors": {
"additionalProperty": [
"example"
]
}
}

Rate limited — cost-weighted per token (read 1, write 2; 360 points / 60s). Check Retry-After.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"Rate limit exceeded"
]
}
Was this page helpful?

Still stuck? Ask Quinn or chat with support