{"info":{"title":"Card Block (Lost Card) — command mock contract","version":"1.0.0","description":"Mock contract for the 5 command-executor commands used by carb-block-lost.bpmn (machine acropolis-card-mgmt, commandVersion v1). Not the real command-executor API shape — command-executor's actual transport is opaque to this repo (invoked via an internal client, see runtime/.../delegate/CommandTaskDelegate.java). This spec exists to drive a local mock (Prism, WireMock-from-OpenAPI, etc.) covering every branch of the BPMN. Path segments are {machineCode}/{commandCode}/{commandVersion}; each response example name matches the corresponding row in card-block-lost-api-docs.md.\n"},"paths":{"/commands/acropolis-card-mgmt/GET_CARD/v1":{"post":{"summary":"Look up a card. Called twice by the BPMN: LocateCard (outputVariable cardLookup) and ConfirmCardBlocked (outputVariable cardConfirm) — same contract, second call re-reads post-block status.\n","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"last4":{"type":"string"},"cardId":{"type":"string"},"status":{"enum":["ACTIVE","BLOCKED","CLOSED","REPLACED"],"type":"string"}}},"examples":{"foundActive":{"value":{"last4":"4242","cardId":"card_789","status":"ACTIVE"},"summary":"LocateCard success"},"confirmsBlocked":{"value":{"cardId":"card_789","status":"BLOCKED"},"summary":"ConfirmCardBlocked success"},"staleReadStillActive":{"value":{"cardId":"card_789","status":"ACTIVE"},"summary":"ConfirmCardBlocked stale-read case"}}}},"description":"Card found"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}},"examples":{"notFound":{"value":{"reason":"CARD_NOT_FOUND"}}}}},"description":"Card not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}},"examples":{"serviceError":{"value":{"reason":"CARD_SERVICE_ERROR"}}}}},"description":"Lookup service down"}},"operationId":"getCard","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cardId":{"type":"string"},"cardLast4":{"type":"string","maxLength":4,"minLength":4},"customerId":{"type":"string"}}}}},"required":true}}},"/commands/acropolis-card-mgmt/BLOCK_CARD/v1":{"post":{"summary":"Block a card (task BlockCard, outputVariable blockResult)","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["BLOCKED","FAILED"],"type":"string"},"blockId":{"type":"string"},"blockedAt":{"type":"string","format":"date-time"}}},"examples":{"blocked":{"value":{"status":"BLOCKED","blockId":"blk_123","blockedAt":"2026-08-25T10:00:00Z"}}}}},"description":"Block attempted"},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"status":{"type":"string"}}},"examples":{"alreadyBlocked":{"value":{"reason":"ALREADY_BLOCKED","status":"FAILED"}}}}},"description":"Already blocked (race)"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"status":{"type":"string"}}},"examples":{"blockFailed":{"value":{"reason":"BLOCK_FAILED","status":"FAILED"}}}}},"description":"Block failed"}},"operationId":"blockCard","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["cardId","reason"],"properties":{"cardId":{"type":"string"},"reason":{"enum":["LOST_OR_STOLEN"],"type":"string"},"initiatedBy":{"type":"string"}}}}},"required":true}}},"/commands/acropolis-card-mgmt/NOTIFY_CUSTOMER/v1":{"post":{"summary":"Notify the customer the card was blocked (task NotifyCustomer, outputVariable notifyResult)","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"boolean"},"channels":{"type":"array","items":{"type":"string"}},"notificationId":{"type":"string"}}},"examples":{"sentBothChannels":{"value":{"sent":true,"channels":["SMS","IN_APP"],"notificationId":"ntf_456"}},"sentOneChannelOnly":{"value":{"sent":true,"channels":["SMS"],"notificationId":"ntf_456"}}}}},"description":"Notification attempted"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"boolean"},"reason":{"type":"string"}}},"examples":{"notifyFailed":{"value":{"sent":false,"reason":"NOTIFY_SERVICE_ERROR"}}}}},"description":"Notify failed"}},"operationId":"notifyCustomer","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customerId","cardId"],"properties":{"cardId":{"type":"string"},"channels":{"type":"array","items":{"enum":["SMS","EMAIL","IN_APP"],"type":"string"}},"customerId":{"type":"string"},"templateCode":{"type":"string"}}}}},"required":true}}},"/commands/acropolis-card-mgmt/VERIFY_CUSTOMER/v1":{"post":{"summary":"Verify the caller's identity (task VerifyCaller, outputVariable verifyCaller)","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"verified":{"type":"boolean"},"riskScore":{"type":"integer"}}},"examples":{"verified":{"value":{"verified":true,"riskScore":12}},"customerNotFound":{"value":{"reason":"CUSTOMER_NOT_FOUND","verified":false}},"wrongChallengeResponse":{"value":{"reason":"CHALLENGE_MISMATCH","verified":false}}}}},"description":"Verification attempted (check body.verified)"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"verified":{"type":"boolean"}}},"examples":{"unauthorized":{"value":{"reason":"UNAUTHORIZED","verified":false}}}}},"description":"Unauthorized caller"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"verified":{"type":"boolean"}}},"examples":{"serviceError":{"value":{"reason":"VERIFICATION_SERVICE_ERROR","verified":false}}}}},"description":"Verification service down"}},"operationId":"verifyCustomer","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customerId"],"properties":{"customerId":{"type":"string"},"contactChannel":{"enum":["SMS","EMAIL"],"type":"string"},"challengeResponse":{"type":"string"}}}}},"required":true}}},"/commands/acropolis-card-mgmt/CHECK_CARD_ELIGIBILITY/v1":{"post":{"summary":"Check whether a card is eligible to block (task CheckEligibility, outputVariable eligibility)","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"eligible":{"type":"boolean"}}},"examples":{"eligible":{"value":{"eligible":true}},"cardClosed":{"value":{"reason":"CARD_CLOSED","eligible":false}},"cardReplaced":{"value":{"reason":"CARD_REPLACED","eligible":false}},"alreadyBlocked":{"value":{"reason":"ALREADY_BLOCKED","eligible":false}}}}},"description":"Eligibility check result"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"eligible":{"type":"boolean"}}},"examples":{"serviceError":{"value":{"reason":"ELIGIBILITY_SERVICE_ERROR","eligible":false}}}}},"description":"Eligibility service down"}},"operationId":"checkCardEligibility","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["cardId"],"properties":{"cardId":{"type":"string"}}}}},"required":true}}}},"openapi":"3.0.3","servers":[{"url":"http://localhost:9090","description":"local command-executor mock"}]}