---
agentTools:
  projectIndex: https://payment-orchestrator.readme.io/llms.txt
---

# Get all Scopes

Returns all available scopes for the current logged in client.

# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "version": "v1",
    "title": "Orchestration API",
    "description": "The Orchestration API is a service that executes one or more business rules at runtime according to predefined workflows.\n"
  },
  "servers": [
    {
      "url": "http://sandbox-planet-oapi-269696318.eu-central-1.elb.amazonaws.com:8081/api",
      "description": "Orchestration API - Staging"
    },
    {
      "url": "http://orchestration-api-alb-18064633.eu-west-3.elb.amazonaws.com:8081/api",
      "description": "Orchestration API - Sandbox"
    },
    {
      "url": "http://localhost:8080/api",
      "description": "Orchestration API - Dev"
    }
  ],
  "security": [
    {
      "api-key": []
    }
  ],
  "tags": [
    {
      "name": "Scopes",
      "description": "Manage Scopes"
    }
  ],
  "paths": {
    "/v1/scopes": {
      "get": {
        "tags": [
          "Scopes"
        ],
        "operationId": "get-scopes",
        "summary": "Get all Scopes",
        "description": "Returns all available scopes for the current logged in client.\n",
        "responses": {
          "200": {
            "description": "Successfully returned all available scopes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetScopesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "BadRequest": {
        "description": "The request is invalid. The specific reason is returned in the response body.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The requester is not authorized to access the resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        },
        "headers": {
          "WWW_Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "The request is valid but the server could not process it. The specific reason is returned in the response body.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "api-key": {
        "type": "apiKey",
        "name": "API-KEY",
        "in": "header",
        "description": "The API Key to authorize requests."
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "An explanation of the problem that occurred when processing a request [RFC7807].",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "A URI reference [RFC3986] that identifies the problem type.  This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]).  When this member is not present, its value is assumed to be \"about:blank\".\n",
            "example": "/problems/validation-failed"
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable summary of the problem type.  It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).",
            "example": "The validation for the request has produced errors."
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem. Optional field.",
            "example": 400
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "example": "The validation of the request failed on field(s) 'A'."
          },
          "errors": {
            "type": "array",
            "nullable": true,
            "description": "A collection of all errors that occurred when processing the request.",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "Represents a single error within the application.",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true,
            "description": "The unique error code.",
            "example": "V1234"
          },
          "message": {
            "type": "string",
            "description": "A human-readable message that states the error.",
            "example": "Field A value must be between 1 and 20."
          }
        }
      },
      "ScopeId": {
        "type": "string",
        "format": "uuid",
        "nullable": true,
        "description": "The scope identifier."
      },
      "Scope": {
        "type": "object",
        "description": "Represents a scope.",
        "required": [
          "name",
          "fields",
          "input",
          "output"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ScopeId"
          },
          "name": {
            "type": "string",
            "description": "The scope name."
          },
          "input": {
            "type": "object",
            "description": "The input schema for the scope.",
            "title": "ScopeInput",
            "properties": {
              "fields": {
                "type": "array",
                "description": "The input fields for this scope.",
                "items": {
                  "$ref": "#/components/schemas/ScopeInputField"
                }
              }
            }
          },
          "output": {
            "type": "object",
            "description": "The output schema for the scope.",
            "title": "ScopeOutput",
            "properties": {
              "fields": {
                "type": "array",
                "description": "The output fields for this scope.",
                "items": {
                  "$ref": "#/components/schemas/ScopeOutputField"
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The creation date."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The last update date."
          }
        }
      },
      "ScopeField": {
        "type": "object",
        "description": "Represents a scope field.",
        "properties": {
          "path": {
            "type": "string",
            "example": "amount",
            "description": "The path to a field to be provided whenever an associated Workflow is executed. \n\nA path may contain dot (.) separators to indicate hierarchy. So for example `card.number` would map to the JSON-equivalent ``` { \"card\": { \"number\": <value> } }``` when executing a workflow targeting this scope.\n"
          },
          "type": {
            "$ref": "#/components/schemas/ScopeFieldType"
          },
          "required": {
            "type": "boolean",
            "description": "Whether this scope field is required or not. For input fields, this will cause an error upon triggering a Workflow Execution whenever this field is not present in the request body. For output fields, an error will occur when configuring a workflow that contains at least one path that does not return this field."
          }
        }
      },
      "ScopeOutputField": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ScopeField"
          },
          {
            "type": "object",
            "description": "Represents an output field."
          }
        ]
      },
      "ScopeInputField": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ScopeField"
          },
          {
            "type": "object",
            "description": "Represents an input field.",
            "properties": {
              "queryable": {
                "type": "boolean",
                "default": true,
                "description": "Whether this field can be used by rules to constrain the workflow execution path. Default is true."
              }
            }
          }
        ]
      },
      "GetScopesResponse": {
        "type": "array",
        "description": "A collection of all scopes available to the caller.",
        "items": {
          "$ref": "#/components/schemas/Scope"
        }
      },
      "ScopeFieldType": {
        "type": "string",
        "description": "The scope field type. Available operators differ based on the scope field type. For example, the `gt` operator may only be used when the field type is `Numeric`.",
        "enum": [
          "Numeric",
          "String"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 152,
      "2": 73,
      "3": 33,
      "4": 56,
      "5": 133,
      "6": 176,
      "7": 0,
      "8": 100,
      "9": 168,
      "10": 2,
      "11": 8
    }
  }
}
````