{"openapi":"3.1.0","info":{"title":"PushCard Integration API","version":"1.0.0","description":"Laravel sandbox API with persistent MySQL storage. POST \/payments is the isolated sandbox flow. The native customer live receipt integrates IRIS separately; GET session\/payment endpoints expose its verified status. Push delivery is simulated. Merchant administration requires a signed-in merchant session and CSRF token; tenant integrations use bearer keys."},"servers":[{"url":"https:\/\/pushcard.net\/api\/v1","description":"Native Laravel sandbox"}],"paths":{"\/health":{"get":{"operationId":"health","summary":"\u0417\u0434\u0440\u0430\u0432\u0435 \u0438 \u0432\u044a\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u0442\u0430 \u0441\u0440\u0435\u0434\u0430","tags":["health"],"security":[],"parameters":[],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Health"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"none","x-environment":"sandbox"}},"\/keys":{"get":{"operationId":"keysList","summary":"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u043a\u043b\u044e\u0447\u043e\u0432\u0435, \u0431\u0435\u0437 \u0442\u0435\u0445\u043d\u0438\u0442\u0435 \u0442\u0430\u0439\u043d\u0438","tags":["Administration"],"security":[{"MerchantSession":[]}],"parameters":[],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keysListResponse"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"owner","x-environment":"sandbox"},"post":{"operationId":"keysCreate","summary":"\u0418\u0437\u0434\u0430\u0439 sandbox \u043a\u043b\u044e\u0447 \u0437\u0430 \u0442\u044a\u0440\u0433\u043e\u0432\u0435\u0446","tags":["Administration"],"security":[{"MerchantSession":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/KeyCreate"},"example":{"merchant_id":"greenbasket","label":"POS \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f","scopes":["registrations:write","profiles:write","cards:read","preferences:write","loyalty:write","pos:read","pos:write","payments:read","payments:write","marketing:read","marketing:write","events:read","sandbox:write"]}}}},"responses":{"201":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/KeyIssued"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"owner","x-environment":"sandbox"}},"\/keys\/{key_id}":{"delete":{"operationId":"keysRevoke","summary":"\u041e\u0442\u043c\u0435\u043d\u0438 \u043a\u043b\u044e\u0447","tags":["Administration"],"security":[{"MerchantSession":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/KeyRevoked"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"owner","x-environment":"sandbox"}},"\/registrations":{"post":{"operationId":"registrationCreate","summary":"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0430\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0438\u0437\u0434\u0430\u0439 \u043b\u0438\u0447\u043d\u0430 \u043a\u0430\u0440\u0442\u0430","tags":["registrations"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Registration"},"example":{"names":"\u0422\u0435\u0441\u0442 \u041a\u043b\u0438\u0435\u043d\u0442","email":"test@example.invalid","phone":"+359888123456","marketing_consent":true}}}},"responses":{"201":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RegistrationResult"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"registrations:write","x-environment":"sandbox"}},"\/customers\/{customer_id}\/profiles":{"post":{"operationId":"profileCreate","summary":"\u0414\u043e\u0431\u0430\u0432\u0438 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u0435\u043d \u043f\u043e\u0434\u043f\u0440\u043e\u0444\u0438\u043b \u0438 \u043e\u0442\u0434\u0435\u043b\u043d\u0430 \u043a\u0430\u0440\u0442\u0430","tags":["customers"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CorporateProfile"},"example":{"company_name":"\u041f\u0440\u0438\u043c\u0435\u0440 \u041e\u041e\u0414","label":"\u041e\u0444\u0438\u0441 \u0421\u043e\u0444\u0438\u044f"}}}},"responses":{"201":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProfileResult"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"profiles:write","x-environment":"sandbox"}},"\/cards":{"get":{"operationId":"cardsList","summary":"\u041a\u0430\u0440\u0442\u0438 \u0441\u0430\u043c\u043e \u043f\u0440\u0438 \u0442\u043e\u0437\u0438 \u0442\u044a\u0440\u0433\u043e\u0432\u0435\u0446, \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u0438 \u0434\u0430\u043d\u043d\u0438","tags":["cards"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"after","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string","enum":["personal","corporate"]}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/cardsListResponse"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"cards:read","x-environment":"sandbox"}},"\/cards\/{card_id}":{"get":{"operationId":"cardGet","summary":"\u0411\u0430\u043b\u0430\u043d\u0441 \u0438 \u0434\u0430\u043d\u043d\u0438 \u0437\u0430 \u043a\u0430\u0440\u0442\u0430","tags":["cards"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Card"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"cards:read","x-environment":"sandbox"}},"\/cards\/{card_id}\/marketing-consent":{"post":{"operationId":"consentUpdate","summary":"\u0417\u0430\u043f\u0438\u0448\u0438 \u0438\u0437\u0440\u0438\u0447\u0435\u043d \u0438\u0437\u0431\u043e\u0440 \u0437\u0430 \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u043e\u0432\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u044f","tags":["cards"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Consent"},"example":{"granted":true,"source":"app_settings"}}}},"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ConsentResult"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"preferences:write","x-environment":"sandbox"}},"\/cards\/{card_id}\/points-adjustments":{"post":{"operationId":"pointsAdjust","summary":"\u041d\u0430\u0447\u0438\u0441\u043b\u0438 \u0438\u043b\u0438 \u043e\u0442\u043d\u0435\u043c\u0438 \u0442\u043e\u0447\u043a\u0438 \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435","tags":["cards"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PointsAdjustment"},"example":{"delta":10,"reason":"correction","reference":"CORRECTION-001"}}}},"responses":{"201":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AdjustmentResult"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"loyalty:write","x-environment":"sandbox"}},"\/cards\/{card_id}\/points-ledger":{"get":{"operationId":"pointsLedger","summary":"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u0432\u0430\u043d\u0438\u044f\u0442\u0430 \u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0438\u0442\u0435 \u0442\u043e\u0447\u043a\u0438","tags":["cards"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/pointsLedgerResponse"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"cards:read","x-environment":"sandbox"}},"\/tills":{"post":{"operationId":"tillCreate","summary":"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0430\u0439 \u043a\u0430\u0441\u0430 \u0438 \u043d\u0435\u0439\u043d\u0438\u0442\u0435 \u0432\u044a\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438","tags":["tills"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Till"},"example":{"label":"\u041a\u0430\u0441\u0430 02","location_label":"\u0421\u043e\u0444\u0438\u044f \u00b7 \u0428\u0438\u0448\u043c\u0430\u043d","card_push_supported":true}}}},"responses":{"201":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TillResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"pos:write","x-environment":"sandbox"},"get":{"operationId":"tillsList","summary":"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u043a\u0430\u0441\u0438","tags":["tills"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/tillsListResponse"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"pos:read","x-environment":"sandbox"}},"\/tills\/{till_id}\/sessions":{"get":{"operationId":"tillSessions","summary":"\u0410\u043a\u0442\u0438\u0432\u043d\u0438 \u0437\u0430\u044f\u0432\u043a\u0438 \u0437\u0430 \u043a\u0430\u0440\u0442\u0430 \u043a\u044a\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430 \u043a\u0430\u0441\u0430","tags":["tills"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"till_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/tillSessionsResponse"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"pos:read","x-environment":"sandbox"}},"\/pos-sessions":{"post":{"operationId":"sessionCreate","summary":"\u0418\u0437\u043f\u0440\u0430\u0442\u0438 \u043a\u0430\u0440\u0442\u0430 \u043a\u044a\u043c \u043a\u0430\u0441\u0430","tags":["pos-sessions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Session"},"example":{"till_id":"{till_id}","card_id":"{card_id}","expires_in_seconds":600}}}},"responses":{"201":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SessionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"pos:write","x-environment":"sandbox"}},"\/pos-sessions\/{session_id}":{"get":{"operationId":"sessionGet","summary":"\u0421\u044a\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0430 \u0438 \u0442\u0435\u043a\u0443\u0449\u0430 \u0441\u043c\u0435\u0442\u043a\u0430","tags":["pos-sessions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SessionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"pos:read","x-environment":"sandbox"}},"\/pos-sessions\/{session_id}\/accept":{"post":{"operationId":"sessionAccept","summary":"POS \u043f\u043e\u0442\u0432\u044a\u0440\u0436\u0434\u0430\u0432\u0430 \u043f\u0440\u0438\u0435\u043c\u0430\u043d\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0430\u0442\u0430","tags":["pos-sessions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Revision"},"example":{"expected_revision":0}}}},"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SessionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"pos:write","x-environment":"sandbox"}},"\/pos-sessions\/{session_id}\/basket":{"put":{"operationId":"basketUpdate","summary":"\u041f\u043e\u0434\u043c\u0435\u043d\u0438 \u043c\u0430\u0440\u043a\u0438\u0440\u0430\u043d\u0438\u0442\u0435 \u0430\u0440\u0442\u0438\u043a\u0443\u043b\u0438 \u0441 \u043d\u043e\u0432\u0430 \u043f\u044a\u043b\u043d\u0430 \u0441\u043d\u0438\u043c\u043a\u0430","tags":["pos-sessions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Basket"},"example":{"expected_revision":1,"currency":"EUR","items":[{"line_id":"bread","name":"\u041f\u044a\u043b\u043d\u043e\u0437\u044a\u0440\u043d\u0435\u0441\u0442 \u0445\u043b\u044f\u0431","quantity_milli":2000,"unit_price_minor":180},{"line_id":"coffee","name":"\u041a\u0430\u0444\u0435 250 \u0433","quantity_milli":1000,"unit_price_minor":1040}]}}}},"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SessionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"pos:write","x-environment":"sandbox"}},"\/pos-sessions\/{session_id}\/finalize":{"post":{"operationId":"sessionFinalize","summary":"\u0417\u0430\u043a\u043b\u044e\u0447\u0438 \u0441\u043c\u0435\u0442\u043a\u0430\u0442\u0430 \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0438 \u043f\u043b\u0430\u0449\u0430\u043d\u0435","tags":["pos-sessions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Revision"},"example":{"expected_revision":0}}}},"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SessionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"pos:write","x-environment":"sandbox"}},"\/pos-sessions\/{session_id}\/cancel":{"post":{"operationId":"sessionCancel","summary":"\u041e\u0442\u043a\u0430\u0436\u0438 \u0441\u0435\u0441\u0438\u044f \u0431\u0435\u0437 \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0442\u043e\u0447\u043a\u0438","tags":["pos-sessions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Revision"},"example":{"expected_revision":0}}}},"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SessionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"pos:write","x-environment":"sandbox"}},"\/payments":{"post":{"operationId":"paymentCreate","summary":"\u0421\u044a\u0437\u0434\u0430\u0439 \u0437\u0430\u044f\u0432\u043a\u0430 \u0441\u0430\u043c\u043e \u0437\u0430 \u0444\u0438\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430","tags":["payments"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Payment"},"example":{"session_id":"{session_id}"}}}},"responses":{"201":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"payments:write","x-environment":"sandbox"}},"\/payments\/{payment_id}":{"get":{"operationId":"paymentGet","summary":"\u041f\u0440\u043e\u0447\u0435\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u0442\u0430\u0442\u0430 \u043e\u0442 \u043f\u043b\u0430\u0449\u0430\u043d\u0435","tags":["payments"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"payments:read","x-environment":"sandbox"}},"\/sandbox\/payments\/{payment_id}\/complete":{"post":{"operationId":"paymentComplete","summary":"\u0421\u0438\u043c\u0443\u043b\u0438\u0440\u0430\u0439 \u0431\u0430\u043d\u043a\u043e\u0432 \u0440\u0435\u0437\u0443\u043b\u0442\u0430\u0442; \u0443\u0441\u043f\u0435\u0448\u043d\u0438\u044f\u0442 \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u0432\u0430 \u0442\u043e\u0447\u043a\u0438 \u0432\u0435\u0434\u043d\u044a\u0436","tags":["Sandbox"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentCompletion"},"example":{"outcome":"succeeded"}}}},"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"sandbox:write","x-environment":"sandbox"}},"\/promotions":{"post":{"operationId":"promotionCreate","summary":"\u0421\u044a\u0437\u0434\u0430\u0439 \u0447\u0435\u0440\u043d\u043e\u0432\u0430 \u043d\u0430 \u043f\u0440\u043e\u043c\u043e\u0446\u0438\u044f","tags":["promotions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Promotion"},"example":{"title":"\u0421\u0432\u0435\u0436\u0430 \u043e\u0444\u0435\u0440\u0442\u0430","description":"\u221215% \u0437\u0430 \u0438\u0437\u0431\u0440\u0430\u043d\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438 \u0441 PushCard.","benefit":"\u221215%","starts_on":"2026-10-03","ends_on":"2026-10-31","audience":"all","location_labels":["\u0421\u043e\u0444\u0438\u044f \u00b7 \u0428\u0438\u0448\u043c\u0430\u043d"]}}}},"responses":{"201":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PromotionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"marketing:write","x-environment":"sandbox"},"get":{"operationId":"promotionsList","summary":"\u041f\u0440\u043e\u0447\u0435\u0442\u0438 \u043f\u0440\u043e\u043c\u043e\u0446\u0438\u0438","tags":["promotions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/promotionsListResponse"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"marketing:read","x-environment":"sandbox"}},"\/promotions\/{promotion_id}":{"put":{"operationId":"promotionUpdate","summary":"\u041f\u0440\u043e\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u043c\u043e\u0446\u0438\u044f \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0440\u0435\u0432\u0438\u0437\u0438\u044f\u0442\u0430","tags":["promotions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PromotionUpdate"},"example":{"expected_revision":0,"title":"\u0421\u0432\u0435\u0436\u0430 \u043e\u0444\u0435\u0440\u0442\u0430","description":"\u041d\u043e\u0432\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e.","benefit":"\u221220%","starts_on":"2026-10-03","ends_on":"2026-10-31","audience":"all","location_labels":["\u0421\u043e\u0444\u0438\u044f \u00b7 \u0428\u0438\u0448\u043c\u0430\u043d"]}}}},"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PromotionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"marketing:write","x-environment":"sandbox"}},"\/promotions\/{promotion_id}\/publish":{"post":{"operationId":"promotionPublish","summary":"\u041f\u0443\u0431\u043b\u0438\u043a\u0443\u0432\u0430\u0439 \u043f\u0440\u043e\u043c\u043e\u0446\u0438\u044f","tags":["promotions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Revision"},"example":{"expected_revision":0}}}},"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PromotionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"marketing:write","x-environment":"sandbox"}},"\/promotions\/{promotion_id}\/pause":{"post":{"operationId":"promotionPause","summary":"\u0421\u043f\u0440\u0438 \u043f\u0440\u043e\u043c\u043e\u0446\u0438\u044f","tags":["promotions"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Revision"},"example":{"expected_revision":0}}}},"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PromotionResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"marketing:write","x-environment":"sandbox"}},"\/push-jobs":{"post":{"operationId":"pushCreate","summary":"\u0422\u0435\u0441\u0442\u043e\u0432\u0430 push \u0437\u0430\u044f\u0432\u043a\u0430 \u0441\u0430\u043c\u043e \u0437\u0430 \u043a\u0430\u0440\u0442\u0438 \u0441 \u0434\u0430\u0434\u0435\u043d\u043e \u0441\u044a\u0433\u043b\u0430\u0441\u0438\u0435","tags":["push-jobs"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Unique per logical write. Same key + same body replays the response; a different body returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PushJob"},"example":{"title":"\u0421\u0432\u0435\u0436\u0430 \u043e\u0444\u0435\u0440\u0442\u0430 \u0437\u0430 \u0442\u0435\u0431","body":"\u041e\u0442\u043a\u0440\u0438\u0439 \u043d\u043e\u0432\u043e\u0442\u043e \u043d\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435.","audience":"all"}}}},"responses":{"201":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PushResource"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"marketing:write","x-environment":"sandbox"},"get":{"operationId":"pushesList","summary":"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u0438\u0442\u0435 push \u0437\u0430\u044f\u0432\u043a\u0438","tags":["push-jobs"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/pushesListResponse"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"marketing:read","x-environment":"sandbox"}},"\/events":{"get":{"operationId":"eventsList","summary":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u0435\u043d \u0436\u0443\u0440\u043d\u0430\u043b \u0437\u0430 POS \u0438 \u043f\u0430\u0440\u0442\u043d\u044c\u043e\u0440\u0441\u043a\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438","tags":["events"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"after","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Successful sandbox operation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/eventsListResponse"}}}},"400":{"description":"Validation failure","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or owner permission"},"404":{"description":"Unknown or other-merchant resource"},"409":{"description":"State, revision or idempotency conflict"},"413":{"description":"Payload exceeds 64 KiB"},"503":{"description":"Database or encryption unavailable"}},"x-required-scope":"events:read","x-environment":"sandbox"}},"\/sales":{"post":{"operationId":"saleCreate","summary":"Record a merchant-reported paid sale or receipt","x-required-scope":"loyalty:write","responses":{"200":{"description":"Success"},"400":{"description":"Invalid sale totals or body"},"409":{"description":"Duplicate ID conflict or insufficient points"},"201":{"description":"Sale recorded atomically with points"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SaleCreate"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"security":[{"BearerAuth":[]}]}},"\/cards\/{card_id}\/sales":{"get":{"operationId":"salesList","summary":"List card sales","x-required-scope":"cards:read","responses":{"200":{"description":"Success"},"400":{"description":"Invalid sale totals or body"},"409":{"description":"Duplicate ID conflict or insufficient points"}},"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"security":[{"BearerAuth":[]}]}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Sandbox API key issued from the owner-only documentation console."},"MerchantSession":{"type":"apiKey","in":"cookie","name":"pushcard-session","description":"Signed-in merchant session. Writes also require a valid X-CSRF-TOKEN header."}},"schemas":{"KeyCreate":{"type":"object","properties":{"merchant_id":{"type":"string","minLength":2,"maxLength":60,"pattern":"^[a-z][a-z0-9_-]+$"},"label":{"type":"string","minLength":2,"maxLength":80},"scopes":{"type":"array","items":{"type":"string","enum":["registrations:write","profiles:write","cards:read","preferences:write","loyalty:write","pos:read","pos:write","payments:read","payments:write","marketing:read","marketing:write","events:read","sandbox:write"]},"minItems":1,"maxItems":13,"uniqueItems":true}},"required":["merchant_id","label","scopes"],"additionalProperties":false},"Registration":{"type":"object","properties":{"names":{"type":"string","minLength":2,"maxLength":100},"email":{"type":"string","minLength":3,"maxLength":254,"format":"email"},"phone":{"type":"string","minLength":8,"maxLength":30,"pattern":"^[+0-9() .-]+$"},"marketing_consent":{"type":"boolean"}},"required":["names","email","phone"],"additionalProperties":false},"CorporateProfile":{"type":"object","properties":{"company_name":{"type":"string","minLength":2,"maxLength":120},"label":{"type":"string","minLength":2,"maxLength":80}},"required":["company_name","label"],"additionalProperties":false},"Consent":{"type":"object","properties":{"granted":{"type":"boolean"},"source":{"type":"string","enum":["app_settings","registration","customer_request"]}},"required":["granted","source"],"additionalProperties":false},"PointsAdjustment":{"type":"object","properties":{"delta":{"type":"integer","minimum":-1000000,"maximum":1000000},"reason":{"type":"string","enum":["purchase","refund","reward","correction"]},"reference":{"type":"string","minLength":1,"maxLength":120}},"required":["delta","reason","reference"],"additionalProperties":false},"Till":{"type":"object","properties":{"label":{"type":"string","minLength":2,"maxLength":80},"location_label":{"type":"string","minLength":2,"maxLength":120},"card_push_supported":{"type":"boolean"}},"required":["label","location_label"],"additionalProperties":false},"Session":{"type":"object","properties":{"till_id":{"type":"string","minLength":1,"maxLength":200},"card_id":{"type":"string","minLength":1,"maxLength":200},"expires_in_seconds":{"type":"integer","minimum":60,"maximum":900}},"required":["till_id","card_id"],"additionalProperties":false},"Revision":{"type":"object","properties":{"expected_revision":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["expected_revision"],"additionalProperties":false},"BasketLine":{"type":"object","properties":{"line_id":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":160},"quantity_milli":{"type":"integer","minimum":1,"maximum":1000000},"unit_price_minor":{"type":"integer","minimum":0,"maximum":10000000}},"required":["line_id","name","quantity_milli","unit_price_minor"],"additionalProperties":false},"Basket":{"type":"object","properties":{"expected_revision":{"type":"integer","minimum":0,"maximum":1000000000},"currency":{"type":"string","enum":["EUR"]},"items":{"type":"array","items":{"$ref":"#\/components\/schemas\/BasketLine"},"minItems":1,"maxItems":100}},"required":["expected_revision","currency","items"],"additionalProperties":false},"Payment":{"type":"object","properties":{"session_id":{"type":"string","minLength":1,"maxLength":200}},"required":["session_id"],"additionalProperties":false},"PaymentCompletion":{"type":"object","properties":{"outcome":{"type":"string","enum":["succeeded","failed"]}},"required":["outcome"],"additionalProperties":false},"Promotion":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":80},"description":{"type":"string","minLength":2,"maxLength":400},"benefit":{"type":"string","minLength":1,"maxLength":40},"starts_on":{"type":"string","format":"date"},"ends_on":{"type":"string","format":"date"},"audience":{"type":"string","enum":["all","personal","corporate"]},"location_labels":{"type":"array","items":{"type":"string","minLength":2,"maxLength":120},"minItems":1,"maxItems":50,"uniqueItems":true}},"required":["title","description","benefit","starts_on","ends_on","audience","location_labels"],"additionalProperties":false},"PromotionUpdate":{"type":"object","properties":{"expected_revision":{"type":"integer","minimum":0,"maximum":1000000000},"title":{"type":"string","minLength":2,"maxLength":80},"description":{"type":"string","minLength":2,"maxLength":400},"benefit":{"type":"string","minLength":1,"maxLength":40},"starts_on":{"type":"string","format":"date"},"ends_on":{"type":"string","format":"date"},"audience":{"type":"string","enum":["all","personal","corporate"]},"location_labels":{"type":"array","items":{"type":"string","minLength":2,"maxLength":120},"minItems":1,"maxItems":50,"uniqueItems":true}},"required":["expected_revision","title","description","benefit","starts_on","ends_on","audience","location_labels"],"additionalProperties":false},"PushJob":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":50},"body":{"type":"string","minLength":2,"maxLength":180},"audience":{"type":"string","enum":["all","personal","corporate"]},"promotion_id":{"type":"string","minLength":1,"maxLength":200}},"required":["title","body","audience"],"additionalProperties":false},"Card":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"merchant_id":{"type":"string","minLength":1,"maxLength":200},"customer_ref":{"type":"string","minLength":1,"maxLength":200},"profile_id":{"type":"string","minLength":1,"maxLength":200},"profile_type":{"type":"string","enum":["personal","corporate"]},"masked_number":{"type":"string","minLength":1,"maxLength":200},"barcode_value":{"type":"string","minLength":1,"maxLength":200},"points_balance":{"type":"integer","minimum":0,"maximum":1000000000},"revision":{"type":"integer","minimum":0,"maximum":1000000000},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","merchant_id","customer_ref","profile_id","profile_type","masked_number","barcode_value","points_balance","revision","created_at","updated_at"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","minLength":1,"maxLength":200},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","minLength":1,"maxLength":200}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string","minLength":1,"maxLength":200}},"required":["error","request_id"],"additionalProperties":false},"Event":{"type":"object","properties":{"cursor":{"type":"integer","minimum":1,"maximum":1000000000},"id":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","minLength":1,"maxLength":200},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","additionalProperties":true}},"required":["cursor","id","type","created_at","data"],"additionalProperties":false},"TillResource":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"merchant_id":{"type":"string","minLength":1,"maxLength":200},"revision":{"type":"integer","minimum":0,"maximum":1000000000},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"label":{"type":"string","minLength":2,"maxLength":80},"location_label":{"type":"string","minLength":2,"maxLength":120},"card_push_supported":{"type":"boolean"}},"required":["id","merchant_id","revision","created_at","updated_at","label","location_label","card_push_supported"],"additionalProperties":false},"SessionResource":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"merchant_id":{"type":"string","minLength":1,"maxLength":200},"revision":{"type":"integer","minimum":0,"maximum":1000000000},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"till_id":{"type":"string","minLength":1,"maxLength":200},"card_id":{"type":"string","minLength":1,"maxLength":200},"state":{"type":"string","enum":["pending","accepted","marking","finalized","paid","cancelled","expired"]},"currency":{"type":"string","enum":["EUR"]},"items":{"type":"array","items":{"type":"object","properties":{"line_id":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":160},"quantity_milli":{"type":"integer","minimum":1,"maximum":1000000},"unit_price_minor":{"type":"integer","minimum":0,"maximum":10000000},"line_total_minor":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["line_id","name","quantity_milli","unit_price_minor","line_total_minor"],"additionalProperties":false}},"total_minor":{"type":"integer","minimum":0,"maximum":1000000000},"expires_at":{"type":"string","minLength":1,"maxLength":200},"finalized_at":{"type":"string","minLength":1,"maxLength":200},"paid_at":{"type":"string","minLength":1,"maxLength":200},"payment_id":{"type":"string","minLength":1,"maxLength":200},"last_payment_status":{"type":"string","minLength":1,"maxLength":200}},"required":["id","merchant_id","revision","created_at","updated_at","till_id","card_id","state","currency","items","total_minor","expires_at"],"additionalProperties":false},"PaymentResource":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"merchant_id":{"type":"string","minLength":1,"maxLength":200},"revision":{"type":"integer","minimum":0,"maximum":1000000000},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"session_id":{"type":"string","minLength":1,"maxLength":200},"card_id":{"type":"string","minLength":1,"maxLength":200},"amount_minor":{"type":"integer","minimum":0,"maximum":1000000000},"currency":{"type":"string","enum":["EUR"]},"status":{"type":"string","enum":["pending","succeeded","failed"]},"provider":{"type":"string","enum":["sandbox"]},"bank_redirect_url":{"type":["string","null"]},"completed_at":{"type":"string","minLength":1,"maxLength":200},"points_awarded":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["id","merchant_id","revision","created_at","updated_at","session_id","card_id","amount_minor","currency","status","provider","bank_redirect_url"],"additionalProperties":false},"PromotionResource":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"merchant_id":{"type":"string","minLength":1,"maxLength":200},"revision":{"type":"integer","minimum":0,"maximum":1000000000},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":2,"maxLength":80},"description":{"type":"string","minLength":2,"maxLength":400},"benefit":{"type":"string","minLength":1,"maxLength":40},"starts_on":{"type":"string","format":"date"},"ends_on":{"type":"string","format":"date"},"audience":{"type":"string","enum":["all","personal","corporate"]},"location_labels":{"type":"array","items":{"type":"string","minLength":2,"maxLength":120},"minItems":1,"maxItems":50,"uniqueItems":true},"publication_status":{"type":"string","enum":["draft","published","paused"]},"status":{"type":"string","enum":["draft","active","scheduled","paused","expired"]}},"required":["id","merchant_id","revision","created_at","updated_at","title","description","benefit","starts_on","ends_on","audience","location_labels","publication_status","status"],"additionalProperties":false},"PushResource":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"merchant_id":{"type":"string","minLength":1,"maxLength":200},"revision":{"type":"integer","minimum":0,"maximum":1000000000},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":2,"maxLength":50},"body":{"type":"string","minLength":2,"maxLength":180},"audience":{"type":"string","enum":["all","personal","corporate"]},"promotion_id":{"type":"string","minLength":1,"maxLength":200},"recipient_card_count":{"type":"integer","minimum":0,"maximum":1000000000},"status":{"type":"string","enum":["simulated"]},"delivered_count":{"type":"integer","minimum":0,"maximum":1000000000},"provider":{"type":"null"}},"required":["id","merchant_id","revision","created_at","updated_at","title","body","audience","recipient_card_count","status","delivered_count","provider"],"additionalProperties":false},"LedgerResource":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"merchant_id":{"type":"string","minLength":1,"maxLength":200},"revision":{"type":"integer","minimum":0,"maximum":1000000000},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"card_id":{"type":"string","minLength":1,"maxLength":200},"delta":{"type":"integer","minimum":-1000000,"maximum":1000000000},"reason":{"type":"string","minLength":1,"maxLength":200},"reference":{"type":"string","minLength":1,"maxLength":200},"balance_after":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["id","merchant_id","revision","created_at","updated_at","card_id","delta","reason","reference","balance_after"],"additionalProperties":false},"RegistrationResult":{"type":"object","properties":{"customer_id":{"type":"string","minLength":1,"maxLength":200},"profile_id":{"type":"string","minLength":1,"maxLength":200},"card":{"$ref":"#\/components\/schemas\/Card"}},"required":["customer_id","profile_id","card"],"additionalProperties":false},"ProfileResult":{"type":"object","properties":{"profile_id":{"type":"string","minLength":1,"maxLength":200},"card":{"$ref":"#\/components\/schemas\/Card"}},"required":["profile_id","card"],"additionalProperties":false},"AdjustmentResult":{"type":"object","properties":{"adjustment":{"$ref":"#\/components\/schemas\/LedgerResource"},"card":{"$ref":"#\/components\/schemas\/Card"}},"required":["adjustment","card"],"additionalProperties":false},"ConsentResult":{"type":"object","properties":{"card_id":{"type":"string","minLength":1,"maxLength":200},"marketing_consent":{"type":"boolean"},"revision":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["card_id","marketing_consent","revision"],"additionalProperties":false},"KeyResource":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"merchant_id":{"type":"string","minLength":1,"maxLength":200},"label":{"type":"string","minLength":1,"maxLength":200},"scopes":{"type":"array","items":{"type":"string","enum":["registrations:write","profiles:write","cards:read","preferences:write","loyalty:write","pos:read","pos:write","payments:read","payments:write","marketing:read","marketing:write","events:read","sandbox:write"]}},"environment":{"type":"string","enum":["sandbox"]},"revoked":{"type":"boolean"},"created_at":{"type":"string","minLength":1,"maxLength":200}},"required":["id","merchant_id","label","scopes","environment","revoked","created_at"],"additionalProperties":false},"KeyIssued":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"merchant_id":{"type":"string","minLength":1,"maxLength":200},"label":{"type":"string","minLength":1,"maxLength":200},"scopes":{"type":"array","items":{"type":"string","enum":["registrations:write","profiles:write","cards:read","preferences:write","loyalty:write","pos:read","pos:write","payments:read","payments:write","marketing:read","marketing:write","events:read","sandbox:write"]}},"environment":{"type":"string","enum":["sandbox"]},"created_at":{"type":"string","minLength":1,"maxLength":200},"api_key":{"type":"string","minLength":1,"maxLength":200},"notice":{"type":"string","minLength":1,"maxLength":200}},"required":["id","merchant_id","label","scopes","environment","created_at","api_key","notice"],"additionalProperties":false},"KeyRevoked":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"revoked":{"type":"boolean"}},"required":["id","revoked"],"additionalProperties":false},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"api_version":{"type":"string","minLength":1,"maxLength":200},"environment":{"type":"string","enum":["sandbox"]},"storage":{"type":"string","minLength":1,"maxLength":200},"bank_payments":{"type":"boolean"},"real_push_delivery":{"type":"boolean"},"event_feed":{"type":"boolean"}},"required":["status","api_version","environment","storage","bank_payments","real_push_delivery","event_feed"],"additionalProperties":false},"keysListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/KeyResource"}}},"required":["data"],"additionalProperties":false},"cardsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Card"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"pointsLedgerResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/LedgerResource"}}},"required":["data"],"additionalProperties":false},"tillsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TillResource"}}},"required":["data"],"additionalProperties":false},"tillSessionsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/SessionResource"}}},"required":["data"],"additionalProperties":false},"promotionsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/PromotionResource"}}},"required":["data"],"additionalProperties":false},"pushesListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/PushResource"}}},"required":["data"],"additionalProperties":false},"eventsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Event"}},"next_cursor":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["data","next_cursor"],"additionalProperties":false},"Result":{"type":"object","additionalProperties":true,"description":"Resource-specific JSON response; examples and complete shapes are documented in the integration guide."},"SaleCreate":{"type":"object","additionalProperties":false,"required":["external_id","card_id","currency","gross_minor","discount_minor","paid_minor","points_earned","points_redeemed"],"properties":{"external_id":{"type":"string","minLength":1,"maxLength":128},"card_id":{"type":"string","minLength":1,"maxLength":80},"currency":{"type":"string","enum":["EUR","BGN"]},"gross_minor":{"type":"integer","minimum":0,"maximum":100000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000},"points_earned":{"type":"integer","minimum":0,"maximum":100000000},"points_redeemed":{"type":"integer","minimum":0,"maximum":100000000},"items":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":false,"required":["name","quantity_milli","line_total_minor"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity_milli":{"type":"integer","minimum":1,"maximum":100000000},"line_total_minor":{"type":"integer","minimum":0,"maximum":100000000}}}},"receipt":{"type":"object","additionalProperties":false,"required":["number"],"properties":{"number":{"type":"string","minLength":1,"maxLength":128},"fiscal_device":{"type":"string","minLength":1,"maxLength":128},"issued_at":{"type":"string","minLength":1,"maxLength":40},"text":{"type":"string","minLength":1,"maxLength":20000}}}}}}}}