{
  "openapi": "3.0.1",
  "info": {
    "title": "Payment Methods",
    "version": "9.1.20.0",
    "description": "Provide access to payment methods for the specified store.",
    "x-introduced": "9.1.0.0"
  },
  "servers": [
    {
      "url": "https://{hostname}:{port}/rest/admin/v2",
      "variables": {
        "port": {
          "default": "443",
          "enum": [
            "443",
            "8000"
          ]
        },
        "hostname": {
          "default": "localhost",
          "enum": [
            "localhost",
            "test.hcl.com"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Payment Methods",
      "description": "Provide RESTful services to manage payment methods."
    }
  ],
  "paths": {
    "/payment-methods": {
      "get": {
        "tags": [
          "Payment Methods"
        ],
        "summary": "Gets a collection payment methods.",
        "description": "Gets a collection of payment methods for the specified store.",
        "operationId": "getPaymentMethods",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "languageId",
            "in": "query",
            "description": "The ID of the language to be used to retrieve the payment method data.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of records to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Limits search results to only include payment methods that match the specified name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "The comma-separated set of properties that control the order of the listed items. Properties can be prefixed by either (-) to sort in descending order, or (+) to sort in ascending order. By default, properties are sorted in ascending order. For example, sort=name will order the items based on the name value in ascending order.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request completed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodCollection"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The request could not be understood by the server due to malformed syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated. The user session is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "403": {
            "description": "The user is not authorized to perform the specified request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. For details, see the server log files.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponseContainer": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "requestId": {
            "type": "string",
            "description": "The request identifier."
          }
        },
        "description": "The error message model."
      },
      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "The error message code."
          },
          "errorMessage": {
            "type": "string",
            "description": "The error message."
          },
          "errorKey": {
            "type": "string",
            "description": "The error message key."
          },
          "errorParameters": {
            "type": "array",
            "description": "The arguments used to construct the error message.",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "errorLevel": {
            "type": "string",
            "description": "The error level."
          },
          "errorHref": {
            "type": "string",
            "description": "The error hypertext reference."
          }
        },
        "description": "The error message item model."
      },
      "PaymentMethod": {
        "type": "object",
        "required": [
          "name",
          "id"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "A description of the payment method."
          },
          "name": {
            "type": "string",
            "description": "The name of the payment method."
          },
          "id": {
            "type": "string",
            "description": "The unique numeric ID for identifying the payment method."
          }
        }
      },
      "PaymentMethodCollection": {
        "type": "object",
        "required": [
          "count"
        ],
        "properties": {
          "offset": {
            "minimum": 0,
            "type": "integer",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "format": "int32"
          },
          "count": {
            "minimum": 0,
            "type": "integer",
            "description": "The total number of item records that match the query parameters.",
            "format": "int32"
          },
          "limit": {
            "maximum": 500,
            "type": "integer",
            "description": "The maximum number of records to return.",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethod"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-components": {}
}
