# Get possible states Get possible dispute states given a state machine and dispute status. See Disputes state machine for more information. # OpenAPI definition ```json { "openapi": "3.0.1", "info": { "title": "Card issuing - Disputes", "version": "1.0.0", "description": "Disputes API endpoints", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/disputes", "description": "Sandbox API server for testing" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "State check", "description": "Endpoints to check a dispute's current or possible states" } ], "components": { "schemas": { "DisputeStatus": { "type": "string", "description": "Dispute status enums.\n", "example": "PENDING", "enum": [ "OPENED", "PENDING", "CANCELED", "FAILED", "CHARGEBACK_REJECTED", "CHARGEBACK_CREATED", "CHARGEBACK_ACCEPTED", "CHARGEBACK_CLOSED", "SECOND_PRESENTMENT", "PRE_ARBITRATION_OPENED", "PRE_ARBITRATION_ACCEPTED", "PRE_ARBITRATION_DECLINED", "PRE_ARBITRATION_RECALL", "PRE_ARB_ALLOCATION_OPENED", "FAILED_PRE_ARBITRATION", "PRE_ARB_ALLOCATION_ACCEPTED", "PRE_ARB_ALLOCATION_DECLINED", "PRE_ARB_ALLOCATION_RECALLED", "FAILED_DECLINE_PRE_ARB", "FAILED_ACCEPT_PRE_ARB", "FAILED_ON_CLOSE", "EXPIRED", "ISSUER_LOSS", "MIGRATION", "FAILED_MIGRATION" ] }, "Event": { "type": "string", "description": "Event enums. An event has to occur to change a dispute's status\n", "example": "ISSUER_LOSS", "enum": [ "ISSUER_WORKED", "CANCEL", "OPEN", "FAILED_ON_CREATION", "RESEND", "REOPEN", "REJECTS", "FAILED_ON_CLOSE", "CLOSED_PROCESSED", "CLOSED", "REJECTS_5000_5001", "ISSUER_REPRESENTMENT_UNWORKED", "ISSUER_LOSS", "EXPIRE", "SEND_PRE_ARBITRATION", "ACCEPTED_PRE_ARBITRATION", "REJECT_PRE_ARBITRATION", "ACCEPT_PRE_ARBITRATION", "DECLINE_PRE_ARBITRATION", "RECALL_PRE_ARBITRATION", "FAILED_ON_MIGRATION" ] }, "StateMachineConfigResponse": { "title": "StateMachineConfigResponse", "type": "array", "x-examples": {}, "items": { "type": "object", "properties": { "source": { "$ref": "#/components/schemas/DisputeStatus" }, "target": { "$ref": "#/components/schemas/DisputeStatus" }, "event": { "$ref": "#/components/schemas/Event" } } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account access token. Tokens can expire quickly, which can result in an \"Unauthorized\" error.", "bearerFormat": "JWT" } }, "responses": { "400BadRequest": { "description": "Bad Request" }, "401Unauthorized": { "description": "Unauthorized. Invalid or missing access token." }, "500InternalServerError": { "description": "Internal server error" } } }, "paths": { "/v1/disputes/possible-status": { "get": { "summary": "Get possible states", "description": "Get possible dispute states given a state machine and dispute status.\n\nSee Disputes state machine for more information.\n", "operationId": "get-v1-disputes-possible-status", "tags": [ "State check" ], "parameters": [ { "schema": { "type": "string", "enum": [ "MASTERCARD_CARD", "PRIMITIVE", "TOK_PAG" ] }, "in": "header", "name": "type", "description": "State machine type - `MASTERCARD_CARD` (BTG), `PRIMITIVE` and `TOK_PAG`.", "required": true }, { "in": "header", "name": "source", "schema": { "type": "string", "description": "Dispute status enums, i.e., `OPENED`", "enum": [ "OPENED", "PENDING", "CANCELED", "FAILED", "CHARGEBACK_REJECTED", "CHARGEBACK_CREATED", "CHARGEBACK_ACCEPTED", "CHARGEBACK_CLOSED", "SECOND_PRESENTMENT", "PRE_ARBITRATION_OPENED", "PRE_ARBITRATION_DECLINED", "PRE_ARBITRATION_ACCEPTED", "PRE_ARBITRATION_RECALL", "PRE_ARB_ALLOCATION_OPENED", "FAILED_PRE_ARBITRATION", "PRE_ARB_ALLOCATION_ACCEPTED", "PRE_ARB_ALLOCATION_DECLINED", "PRE_ARB_ALLOCATION_RECALLED", "FAILED_DECLINE_PRE_ARB", "FAILED_ACCEPT_PRE_ARB", "FAILED_ON_CLOSE", "EXPIRED", "ISSUER_LOSS", "MIGRATION", "FAILED_MIGRATION" ] }, "required": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StateMachineConfigResponse" }, "examples": { "Sample result of possibles status": { "value": [ { "source": "PENDING", "target": "OPENED", "event": "OPEN" } ] } } } } }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```