Stores
Validate a store unit switch
Dry-runs the switch: the body is the one the switch accepts, and a
switch that would fail answers the identical 409 or 422 problem. A
switch that would apply answers a 200 store_unit_switch_validation
verdict.
Overview
Nothing is written, the review token stays valid, and no
idempotency key is consumed. Requires the store:write scope.
Authorisation
Bearer token required. Include it in the Authorization header.
Required scope: store:write
Request body
measurement_unit
Request body example
application/json
{
"measurement_unit": "cm"
}Validate a store unit switch
curl https://web.signcustomiser.com/api/v3/stores/me/unit-switch/validate-create \
--request POST \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"measurement_unit": "cm"
}'Response
{
"data": {
"object": "store_unit_switch_validation",
"operation": "create",
"valid": true
},
"links": {
"self": "https://web.signcustomiser.com/api/v3/stores/me/unit-switch/validate-create",
"documentation": "https://www.signcustomiser.com/help/api/"
},
"meta": {
"api_version": "v3",
"request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}
}{
"type": "https://www.signcustomiser.com/help/api/problems/missing_api_key",
"title": "Missing API key",
"status": 401,
"code": "missing_api_key",
"detail": "Provide a store API key as a bearer token.",
"request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}{
"type": "https://www.signcustomiser.com/help/api/problems/insufficient_scope",
"title": "Insufficient scope",
"status": 403,
"code": "insufficient_scope",
"detail": "This operation requires the store:write scope.",
"required_scopes": [
"store:write"
],
"granted_scopes": [
"store:read"
],
"request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}{
"type": "https://www.signcustomiser.com/help/api/problems/unit_switch_review_invalid",
"title": "Unit switch review invalid",
"status": 409,
"code": "unit_switch_review_invalid",
"detail": "This review is no longer valid. Review the change again with POST /api/v3/stores/me/unit-switch/review.",
"request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}{
"type": "https://www.signcustomiser.com/help/api/problems/validation_failed",
"title": "Validation failed",
"status": 422,
"code": "validation_failed",
"detail": "The request payload failed validation. Correct the fields listed in errors and retry.",
"errors": [
{
"pointer": "/review_token",
"code": "required",
"detail": "The review token field is required."
}
],
"request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}{
"type": "https://www.signcustomiser.com/help/api/problems/rate_limited",
"title": "Too many requests",
"status": 429,
"code": "rate_limited",
"detail": "You have exceeded the request limit for this API key.",
"retry_after": 60,
"request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}