{
  "openapi" : "3.0.0",
  "info" : {
    "version" : "1.1.0",
    "title" : "Document Support",
    "description" : "File handling API to enable sending, retrieval, and listing of documents provided in support of Swift India JV Corporate to Bank API interactions.",
    "contact" : {
      "name" : "Developer Hub",
      "url" : "https://developer.swift.com",
      "email" : "developer-support@swift.com"
    },
    "license" : {
      "name" : "Community API Redistribution License",
      "url" : "https://www.swift.com/swift-resource/251146/download"
    }
  },
  "tags" : [ {
    "name" : "Transfer Supporting Documents",
    "description" : "Operations for transferring documents to and from the file server (upload and download of documents)."
  }, {
    "name" : "List Supporting Documents",
    "description" : "Operations for listing the documents available on the file server."
  } ],
  "servers" : [ {
    "description" : "SwaggerHub API Auto Mocking",
    "url" : "https://virtserver.swaggerhub.com/SWIFT-API/Swift_JVIN_Document_Support/1.0.0"
  }, {
    "url" : "https://sandbox.swift.com/swift-file-support/v1",
    "description" : "URL for Sandbox Environment."
  }, {
    "url" : "https://api-test.swiftnet.sipn.swift.com/swift-file-support/v1",
    "description" : "URL for Pilot."
  }, {
    "url" : "https://api.swiftnet.sipn.swift.com/swift-file-support/v1",
    "description" : "URL for Live."
  } ],
  "security" : [ {
    "oauthBearerToken" : [ ]
  }, {
    "oAuth2" : [ ]
  } ],
  "paths" : {
    "/supporting-documents/{document_identification}" : {
      "get" : {
        "tags" : [ "Transfer Supporting Documents" ],
        "summary" : "Get a supporting document using the identification issued for the document.",
        "description" : "Download a document from the file server using the identifier (document_identification) created when the server received the file (as either an upload or created at the server).",
        "operationId" : "getSupportingDocument",
        "parameters" : [ {
          "$ref" : "#/components/parameters/X-Request-ID"
        }, {
          "$ref" : "#/components/parameters/X-UserContext"
        }, {
          "$ref" : "#/components/parameters/X-BIC"
        }, {
          "$ref" : "#/components/parameters/X-ProductType"
        }, {
          "name" : "document_identification",
          "in" : "path",
          "description" : "An unique and unambiguous identification of the supporting document as assigned by the origin server. The value must be constant throughout the lifecycle of the document. On successful creation, the document can be retrieved using the document identification. This identification shall be used as a resource identifier for all state transition.\n",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 36
          },
          "example" : "123e4567-e89b-12d3-a456-426614174000"
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "headers" : {
              "X-Request-ID" : {
                "$ref" : "#/components/headers/X-Request-ID"
              },
              "Swift-Request-ID" : {
                "$ref" : "#/components/headers/Swift-Request-ID"
              }
            },
            "content" : {
              "multipart/form-data" : {
                "schema" : {
                  "type" : "object",
                  "additionalProperties" : false,
                  "properties" : {
                    "document" : {
                      "type" : "string",
                      "format" : "binary",
                      "description" : "The document supporting the Corporate's request (May be multiple documents contained within a zip file)."
                    },
                    "document_information" : {
                      "description" : "Information about the document (e.g. document type, file format, file name, references)",
                      "$ref" : "#/components/schemas/SupportingDocument"
                    }
                  },
                  "required" : [ "document" ]
                },
                "example" : {
                  "document" : "JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9UeXBlL1BhZ2UvUGFyZW50IDMgMCBSL1Jlc291cmNlcyA8PC9YT2JqZWN0PDwvSW1nMSA2IDAgUj4+L0ZvbnQ8PC9GMSA3IDAgUj4+L1Byb2NTZXRbL1",
                  "document_information" : {
                    "document_identification" : "123e4567-e89b-12d3-a456-426614174000",
                    "document_type" : "CINV",
                    "document_format" : "DPDF",
                    "product_type" : "PTPI",
                    "file_name" : "INV20221110",
                    "digital_signature" : {
                      "name" : "SWIFT High Fidelity Components, Ltd",
                      "digital_signature" : "9Jfg1ha9RsFK /PHU"
                    },
                    "transaction_identification" : {
                      "identification" : "BPR-76473863938"
                    },
                    "file_status" : "DSCS",
                    "additional_details" : "payment initiation document."
                  }
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400-BadRequest"
          },
          "401" : {
            "$ref" : "#/components/responses/401-Unauthorized"
          },
          "403" : {
            "$ref" : "#/components/responses/403-Forbidden"
          },
          "404" : {
            "$ref" : "#/components/responses/404-NotFound"
          },
          "406" : {
            "$ref" : "#/components/responses/406-NotAcceptable"
          },
          "415" : {
            "$ref" : "#/components/responses/415-UnsupportedMediaType"
          },
          "429" : {
            "$ref" : "#/components/responses/429-TooManyRequests"
          },
          "502" : {
            "$ref" : "#/components/responses/502-BadGateway"
          },
          "503" : {
            "$ref" : "#/components/responses/503-ServiceUnavailable"
          },
          "504" : {
            "$ref" : "#/components/responses/504-GatewayTimeout"
          }
        }
      }
    },
    "/supporting-documents" : {
      "post" : {
        "tags" : [ "Transfer Supporting Documents" ],
        "summary" : "Send a document in support of a Corporate's request. The document is sent to the Bank responding to the request.",
        "description" : "Send a document in support of a Corporate's request. \nThe document is sent to the Bank responding to the request. \n\nThis operation supports sending of a single document file only. To send multiple documents, the documents must be compressed into a single file such as a zip file.\n",
        "operationId" : "sendSupportingDocument",
        "parameters" : [ {
          "$ref" : "#/components/parameters/X-Request-ID"
        }, {
          "$ref" : "#/components/parameters/X-UserContext"
        }, {
          "$ref" : "#/components/parameters/X-BIC"
        }, {
          "$ref" : "#/components/parameters/X-ProductType"
        } ],
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "type" : "object",
                "additionalProperties" : false,
                "properties" : {
                  "document" : {
                    "type" : "string",
                    "format" : "binary",
                    "description" : "The document supporting the Corporate's request(May be multiple documents contained within a zip file)."
                  },
                  "document_information" : {
                    "description" : "Information about the document (e.g. document type, file format, file name, references)",
                    "type" : "object",
                    "additionalProperties" : false,
                    "properties" : {
                      "document_type" : {
                        "x-MXComponent" : "Max4Text",
                        "description" : "Type of document or template.\n\nSpecifies a character string with a maximum length of 4 characters.\n",
                        "type" : "string",
                        "minLength" : 1,
                        "maxLength" : 4
                      },
                      "document_format" : {
                        "x-MXComponent" : "Max4Text",
                        "description" : "Format of the document or template, such as PDF, XML, XSLT.\n\n\"\nCode\"\t\"\nName\"\nDPDF - PDF\nDXML - XML\nSDSH - Spreadsheet\nWORD - Word\nXSLT - XSLT\n\nOr any other bilaterally agreed code.\n\nSpecifies a character string with a maximum length of 4 characters.\n",
                        "type" : "string",
                        "enum" : [ "DPDF", "DXML", "DZIP", "DCSV", "SDSH", "WORD", "XSLT", "OTHR" ],
                        "minLength" : 1,
                        "maxLength" : 4
                      },
                      "product_type" : {
                        "description" : "Identifies the type of request that the document supports.\n\n\"\nCode\"\t\"\nName\"\nPTPI - Payment Initiation\nPTSD - Stamp Duty\nPTFX - FX Confirmation\n\nPTFO - FX Option Confirmation\n\nOr any other bilaterally agreed code.\n\nSpecifies a character string with a maximum length of 4 characters.\n",
                        "type" : "string",
                        "enum" : [ "PTPI", "PTSD", "PTFC", "PTFO", "OTHR" ],
                        "minLength" : 1,
                        "maxLength" : 4
                      },
                      "file_name" : {
                        "x-MXComponent" : "Max140Text",
                        "description" : "Technical name of the file.\n\nSpecifies a character string with a maximum length of 140 characters.\n",
                        "type" : "string",
                        "minLength" : 1,
                        "maxLength" : 140
                      },
                      "digital_signature" : {
                        "$ref" : "#/components/schemas/PartyAndSignature6"
                      },
                      "transaction_identification" : {
                        "type" : "object",
                        "description" : "Optional identifiers for correlation between the document and the Corporate's request.",
                        "additionalProperties" : false,
                        "properties" : {
                          "identification" : {
                            "anyOf" : [ {
                              "$ref" : "#/components/schemas/ApplicationReference"
                            }, {
                              "$ref" : "#/components/schemas/BatchPaymentInitiationIdentification"
                            }, {
                              "$ref" : "#/components/schemas/TransactionReferenceNumber"
                            }, {
                              "$ref" : "#/components/schemas/FXReference"
                            } ]
                          }
                        },
                        "required" : [ "identification" ]
                      },
                      "additional_details" : {
                        "x-MXComponent" : "RestrictedFINMax35Text",
                        "description" : "Additional details about the document.\n\nUsage Guideline: This field can additionally be used to identify the document type when the type is 'OTHR'.\n\nSpecifies a character string with a maximum length of 35 characters. It has a pattern ([^/]+/)+([^/]+)|([^/]*) that disables the use of slash \"/\" at the beginning and end of line and double slash \"//\" within the line.\n",
                        "type" : "string",
                        "minLength" : 1,
                        "maxLength" : 35,
                        "pattern" : "^([^/]+/)+([^/]+)|([^/]*)$"
                      }
                    },
                    "required" : [ "transaction_identification", "product_type", "file_name", "document_format", "document_type" ]
                  }
                },
                "required" : [ "document", "document_information" ]
              },
              "examples" : {
                "ExampleFileDataUploadCommercialInvoicePDF" : {
                  "$ref" : "#/components/examples/ExampleFileDataUploadPaymentInitiationPDF"
                },
                "ExampleFileUploadStampDutySDSH" : {
                  "$ref" : "#/components/examples/ExampleFileUploadStampDutySDSH"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "202" : {
            "description" : "Accepted",
            "headers" : {
              "X-Request-ID" : {
                "$ref" : "#/components/headers/X-Request-ID"
              },
              "Swift-Request-ID" : {
                "$ref" : "#/components/headers/Swift-Request-ID"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SupportingDocument"
                },
                "examples" : {
                  "ExampleFileDataPaymentInitiationPDF" : {
                    "$ref" : "#/components/examples/ExampleFileDataPaymentInitiationPDF"
                  },
                  "ExampleFileDataBeneficiaryStatementSDSH" : {
                    "$ref" : "#/components/examples/ExampleFileDataStampDutySDSH"
                  }
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400-BadRequest"
          },
          "401" : {
            "$ref" : "#/components/responses/401-Unauthorized"
          },
          "403" : {
            "$ref" : "#/components/responses/403-Forbidden"
          },
          "404" : {
            "$ref" : "#/components/responses/404-NotFound"
          },
          "406" : {
            "$ref" : "#/components/responses/406-NotAcceptable"
          },
          "415" : {
            "$ref" : "#/components/responses/415-UnsupportedMediaType"
          },
          "429" : {
            "$ref" : "#/components/responses/429-TooManyRequests"
          },
          "502" : {
            "$ref" : "#/components/responses/502-BadGateway"
          },
          "503" : {
            "$ref" : "#/components/responses/503-ServiceUnavailable"
          },
          "504" : {
            "$ref" : "#/components/responses/504-GatewayTimeout"
          }
        }
      },
      "get" : {
        "tags" : [ "List Supporting Documents" ],
        "summary" : "List or search for documents supporting a Corporate's request.",
        "description" : "Lists all documents on the file server or, search for a document or documents by document name, format, or type. The document list or search results includes only files that the client is authorised to view.",
        "operationId" : "listSupportingDocuments",
        "parameters" : [ {
          "$ref" : "#/components/parameters/X-Request-ID"
        }, {
          "$ref" : "#/components/parameters/X-UserContext"
        }, {
          "$ref" : "#/components/parameters/X-BIC"
        }, {
          "$ref" : "#/components/parameters/X-ProductType"
        }, {
          "name" : "file-name",
          "in" : "query",
          "description" : "Filters by file name, the list of files available on the server to a client.\nThis parameter intended to be used for finding a single file by its name.\n",
          "schema" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 140
          },
          "example" : "INV20221110"
        }, {
          "name" : "document-type",
          "in" : "query",
          "description" : "Filters by document-type, the list of files available on the server to a client. (e.g. for Demand Guarantees, \"CINV\" for a commercial invoice).\n",
          "schema" : {
            "type" : "string",
            "minLength" : 4,
            "maxLength" : 4
          },
          "example" : "CINV"
        }, {
          "name" : "document-format",
          "in" : "query",
          "description" : "Filters by document-format, the list of files available on the server to a client. (e.g. for Demand Guarantees, \"DPDF\" for a PDF document).\n",
          "schema" : {
            "type" : "string",
            "minLength" : 4,
            "maxLength" : 4
          },
          "example" : "DPDF"
        }, {
          "name" : "document-identification",
          "in" : "query",
          "description" : "Filters by document-identification, the list of files available on the server to a client.\n",
          "schema" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 36
          },
          "example" : "123e4567-e89b-12d3-a456-426614174000"
        }, {
          "name" : "application-reference",
          "in" : "query",
          "description" : "Filters by application-reference, the list of files related to the specified application-reference. \n",
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          },
          "example" : "6c6c1cc6-e2da-48e8-99eb-6d8ed8488f4d"
        }, {
          "name" : "trade-transaction-identification",
          "in" : "query",
          "description" : "Filters by trade-transaction-reference, the list of files related to the trade-transaction-reference. (e.g. for Demand Guarantees, this is the issued undertaking-identification).\n",
          "schema" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 16
          },
          "example" : "BG202407181234"
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "headers" : {
              "X-Request-ID" : {
                "$ref" : "#/components/headers/X-Request-ID"
              },
              "Swift-Request-ID" : {
                "$ref" : "#/components/headers/Swift-Request-ID"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "additionalProperties" : false,
                  "properties" : {
                    "supporting_documents" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/SupportingDocument"
                      }
                    }
                  }
                },
                "examples" : {
                  "ExampleListOfSupportingDocuments" : {
                    "$ref" : "#/components/examples/ExampleListOfSupportingDocuments"
                  }
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400-BadRequest"
          },
          "401" : {
            "$ref" : "#/components/responses/401-Unauthorized"
          },
          "403" : {
            "$ref" : "#/components/responses/403-Forbidden"
          },
          "404" : {
            "$ref" : "#/components/responses/404-NotFound"
          },
          "406" : {
            "$ref" : "#/components/responses/406-NotAcceptable"
          },
          "415" : {
            "$ref" : "#/components/responses/415-UnsupportedMediaType"
          },
          "429" : {
            "$ref" : "#/components/responses/429-TooManyRequests"
          },
          "502" : {
            "$ref" : "#/components/responses/502-BadGateway"
          },
          "503" : {
            "$ref" : "#/components/responses/503-ServiceUnavailable"
          },
          "504" : {
            "$ref" : "#/components/responses/504-GatewayTimeout"
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "BatchPaymentInitiationIdentification" : {
        "maxLength" : 35,
        "minLength" : 1,
        "type" : "string",
        "description" : "Point to point reference, as assigned by the instructing party, sent to the next party in the chain to unambiguously identify the batch payment initiation.\nUsage: The instructing party has to make sure that BatchPaymentInitiationIdentification is unique per instructed party for a pre-agreed period.\n"
      },
      "ApplicationReference" : {
        "type" : "string",
        "format" : "uuid",
        "description" : "An unique and unambiguous identification of the Stamp Duty Application as assigned by the origin server. The value must be constant throughout the lifecycle of the application. On successful creation, the application can be retrieved using the application reference. This identification shall be used as a resource identifier for all state transition.\n\nUniversally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\".\n"
      },
      "TransactionReferenceNumber" : {
        "description" : "An unique and unambiguous identification assigned by the Sender to unambiguously identify the transaction.",
        "type" : "string",
        "minLength" : 1,
        "maxLength" : 36
      },
      "FXReference" : {
        "type" : "string",
        "description" : "Unique technical identification of the foreign exchange confirmation or foreign currency option as created by the server. \n\nUsage: This element should only be populated when a PUT or GET operation is undertaken. The identifier is only created after the original POST.\n\nBased on datatype UUIDv4Identifier: Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\".\n",
        "format" : "uuid"
      },
      "SupportingDocument" : {
        "type" : "object",
        "description" : "Information about a document.",
        "additionalProperties" : false,
        "properties" : {
          "document_type" : {
            "x-MXComponent" : "Max4Text",
            "description" : "Type of document or template.\n\nSpecifies a character string with a maximum length of 4 characters.\n",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 4
          },
          "document_identification" : {
            "x-MXComponent" : "Max36Text",
            "description" : "Identification of the document or template.\n\nSpecifies a character string with a maximum length of 36 characters.\n",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 36
          },
          "document_format" : {
            "x-MXComponent" : "Max4Text",
            "description" : "Format of the document or template, such as PDF, XML, XSLT.\n\n\"\nCode\"\t\"\nName\"\nDPDF - PDF\nDXML - XML\nSDSH - Spreadsheet\nWORD - Word\nXSLT - XSLT\n\nOr any other bilaterally agreed code.\n\nSpecifies a character string with a maximum length of 4 characters.\n",
            "type" : "string",
            "enum" : [ "DPDF", "DXML", "DZIP", "DCSV", "SDSH", "WORD", "XSLT", "OTHR" ],
            "minLength" : 1,
            "maxLength" : 4
          },
          "product_type" : {
            "description" : "Identifies the type of request that the document supports.\n\n\"\nCode\"\t\"\nName\"\nPTPI - Payment Initiation\nPTSD - Stamp Duty\nPTFC - FX Confirmation\n\nPTOC - FX Option Confirmation\n\nOr any other bilaterally agreed code.\n\nSpecifies a character string with a maximum length of 4 characters.\n",
            "type" : "string",
            "enum" : [ "PTPI", "PTSD", "PTFC", "PTOC", "OTHR" ],
            "minLength" : 1,
            "maxLength" : 4
          },
          "file_name" : {
            "x-MXComponent" : "Max140Text",
            "description" : "Technical name of the file.\n\nSpecifies a character string with a maximum length of 140 characters.\n",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 140
          },
          "issue_date" : {
            "x-MXComponent" : "ISODate",
            "description" : "Issue date of the document.\n\nA particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in \"XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004\" which is aligned with ISO 8601.\n",
            "type" : "string",
            "pattern" : "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$",
            "minLength" : 10,
            "maxLength" : 16
          },
          "linked_url_address" : {
            "x-MXComponent" : "Max256Text",
            "description" : "Address for the Universal Resource Locator (URL), for example used over the www (HTTP) service.\n\nSpecifies a character string with a maximum length of 256 characters.\n",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 256
          },
          "digital_signature" : {
            "$ref" : "#/components/schemas/PartyAndSignature6"
          },
          "transaction_identification" : {
            "type" : "object",
            "description" : "Optional identifiers for correlation between the document and the Corporate's request.",
            "additionalProperties" : false,
            "properties" : {
              "identification" : {
                "anyOf" : [ {
                  "$ref" : "#/components/schemas/ApplicationReference"
                }, {
                  "$ref" : "#/components/schemas/BatchPaymentInitiationIdentification"
                }, {
                  "$ref" : "#/components/schemas/TransactionReferenceNumber"
                }, {
                  "$ref" : "#/components/schemas/FXReference"
                } ]
              }
            },
            "required" : [ "identification" ]
          },
          "file_status" : {
            "x-MXComponent" : "Max4Text",
            "description" : "Status of document processing at the server.\n\n\"\nCode\"\t\"\nName\"\nDSCS - Successfully processed\nDFAL - Document failed processing\nDSCN - Document scan in progress\n\nOr any other bilaterally agreed code.\n\nSpecifies a character string with a maximum length of 4 characters.\n",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 4
          },
          "additional_details" : {
            "x-MXComponent" : "RestrictedFINMax35Text",
            "description" : "Additional details about the document.\n\nUsage Guideline: This field can additionally be used to identify the document type when the type is 'OTHR'.\n\nSpecifies a character string with a maximum length of 35 characters. It has a pattern ([^/]+/)+([^/]+)|([^/]*) that disables the use of slash \"/\" at the beginning and end of line and double slash \"//\" within the line.\n",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 35,
            "pattern" : "^([^/]+/)+([^/]+)|([^/]*)$"
          }
        },
        "required" : [ "document_identification" ]
      },
      "PartyAndSignature6" : {
        "x-MXComponent" : "PartyAndSignature6",
        "type" : "object",
        "description" : "Entity involved in an activity.",
        "additionalProperties" : false,
        "properties" : {
          "name" : {
            "x-MXComponent" : "RestrictedFINXMax140Text",
            "description" : "Name by which a party is known and which is usually used to identify that party.\n\nSpecifies a character string with a maximum length of 140 characters limited to character set X, that is, a-z A-Z / - ? : ( ) . , ‘ + .\n",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 140,
            "pattern" : "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.\\n\\r,'\\+ ]{1,140}$"
          },
          "digital_signature" : {
            "x-MXComponent" : "Max2048Text",
            "description" : "Digital signature of the linked binary file.\n\nSpecifies a character string with a maximum length of 2048 characters.\n",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 2048
          }
        },
        "required" : [ "name", "digital_signature" ]
      },
      "ErrorMessage" : {
        "description" : "Custom error schema to support detailed error message.",
        "type" : "object",
        "readOnly" : true,
        "additionalProperties" : false,
        "properties" : {
          "severity" : {
            "description" : "Specifies the severity of the error.",
            "type" : "string",
            "enum" : [ "Fatal", "Transient", "Logic" ]
          },
          "code" : {
            "description" : "Specifies the custom error code as defined by the service provider.",
            "type" : "string",
            "minLength" : 3,
            "maxLength" : 70
          },
          "text" : {
            "description" : "Specifies the detail error message identifying the cause of the error.",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 255
          },
          "user_message" : {
            "description" : "A human-readable text describing the error.",
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 255
          },
          "more_info" : {
            "description" : "Specifies an URL to find more information about the error.",
            "type" : "string",
            "format" : "uri"
          }
        },
        "required" : [ "code", "severity", "text" ]
      }
    },
    "headers" : {
      "X-Request-ID" : {
        "description" : "End to end tracking ID. If a request header of the same name is passed in the request, this response header will be be returned to the caller with the same value. If no request header is passed by the caller, then this header will still be returned but with a value generated by Swift.",
        "required" : true,
        "schema" : {
          "type" : "string",
          "maxLength" : 270
        },
        "example" : "nlartp03-2674166-324389-2"
      },
      "Swift-Request-ID" : {
        "required" : true,
        "schema" : {
          "type" : "string",
          "format" : "uuid"
        },
        "examples" : {
          "SwiftIdResponseHeader" : {
            "value" : "ce480d68-2612-4aef-867a-e91566a1e012"
          }
        },
        "description" : "A Universally Unique Identifier (UUID) generated by the API Gateway for tracking and support purposes.\nThis Swift-Request-ID response header must always be returned to the API consumer, even when the response is an error message      "
      }
    },
    "parameters" : {
      "X-Request-ID" : {
        "name" : "X-Request-ID",
        "in" : "header",
        "description" : "End to end tracking ID. If a request header of the same name is passed in the request, this response header will be be returned to the caller with the same value. If no request header is passed by the caller, then this header will still be returned but with a value generated by Swift.",
        "required" : true,
        "schema" : {
          "type" : "string",
          "maxLength" : 270
        },
        "example" : "nlartp03-2674166-324389-2"
      },
      "X-UserContext" : {
        "name" : "X-UserContext",
        "in" : "header",
        "description" : "Provides requester entitlement information to service provider. A JWT containing a claim representing the entitlements of the API consumer as defined at the SWIFT Identity Provider. This header is provided by the SWIFT API Gateway and is not required to be provided by the API consumer.",
        "required" : false,
        "schema" : {
          "type" : "string",
          "maxLength" : 8192
        },
        "example" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIiLCJuYW1lIjoiIiwiaWF0IjowfQ.u_kftAUkjiUZO-OhIyj24H7lOUk1wi9GUF-e14JmCtQ"
      },
      "X-BIC" : {
        "name" : "X-BIC",
        "in" : "header",
        "description" : "Specify the BIC of the provider of the service. The identification will be used by the API Gateway to forward the request to service provider.",
        "required" : true,
        "schema" : {
          "type" : "string",
          "minLength" : 8,
          "maxLength" : 11
        },
        "example" : "SWHQBEBB"
      },
      "X-ProductType" : {
        "name" : "X-ProductType",
        "in" : "header",
        "description" : "Identifies the type of request that the document supports.\n\n\"\nCode\"\t\"\nName\"\nPTPI - Payment Initiation\nPTSD - Stamp Duty\nPTFC - FX Confirmation\n\nPTOC - FX Option Confirmation\n\nOr any other bilaterally agreed code.\n\nSpecifies a character string with a maximum length of 4 characters.\n",
        "required" : true,
        "schema" : {
          "type" : "string",
          "minLength" : 4,
          "maxLength" : 4,
          "enum" : [ "PTPI", "PTSD", "PTFC", "PTOC", "OTHR" ]
        },
        "example" : "PTPI"
      }
    },
    "responses" : {
      "400-BadRequest" : {
        "description" : "Bad Request",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            },
            "examples" : {
              "invalid_request" : {
                "summary" : "Standard bad request response.",
                "value" : {
                  "severity" : "Fatal",
                  "code" : "Sw.cm.InvalidRequest",
                  "text" : "Invalid request"
                }
              },
              "missing_mandatory_field" : {
                "summary" : "Bad request where a mandatory field is missing.",
                "value" : {
                  "severity" : "Fatal",
                  "code" : "Sw.cm.MandatoryFieldMissing",
                  "text" : "Mandatory field %field missing"
                }
              }
            }
          }
        }
      },
      "401-Unauthorized" : {
        "description" : "Unauthorized",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            },
            "examples" : {
              "from_authorization_failure" : {
                "summary" : "API credentials may be valid but no RBAC role found for request.",
                "value" : {
                  "severity" : "Fatal",
                  "code" : "Sw.cm.AuthorizationFailure",
                  "text" : "From %From does not have the appropriate RBAC role"
                }
              }
            }
          }
        }
      },
      "403-Forbidden" : {
        "description" : "Forbidden",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "404-NotFound" : {
        "description" : "Not Found",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            },
            "examples" : {
              "resource_not_exist" : {
                "summary" : "Standard resource not found.",
                "value" : {
                  "severity" : "Fatal",
                  "code" : "SwAP506",
                  "text" : "Resource does not exist."
                }
              }
            }
          }
        }
      },
      "405-MethodNotAllowed" : {
        "description" : "Method Not Allowed",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "406-NotAcceptable" : {
        "description" : "Not Acceptable",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "413-PayloadTooLarge" : {
        "description" : "Payload Too Large",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "414-URITooLong" : {
        "description" : "URI Too Long",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "415-UnsupportedMediaType" : {
        "description" : "Unsupported Media Type",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "429-TooManyRequests" : {
        "description" : "Too Many Requests",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            },
            "examples" : {
              "system_too_many_requests" : {
                "summary" : "Too many requests sent in a short timescale.",
                "value" : {
                  "severity" : "Transient",
                  "code" : "SwAP507",
                  "text" : "Request cannot be processed at this time. Please try later. (header Retry-After indicates how long to wait before making a follow-up request)."
                }
              }
            }
          }
        }
      },
      "502-BadGateway" : {
        "description" : "Bad Gateway",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "503-ServiceUnavailable" : {
        "description" : "Service Unavailable",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "504-GatewayTimeout" : {
        "description" : "Gateway Timeout",
        "headers" : {
          "X-Request-ID" : {
            "$ref" : "#/components/headers/X-Request-ID"
          },
          "Swift-Request-ID" : {
            "$ref" : "#/components/headers/Swift-Request-ID"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/ErrorMessage"
            }
          }
        }
      }
    },
    "securitySchemes" : {
      "oauthBearerToken" : {
        "type" : "http",
        "description" : "The access token obtained as a result of OAuth 2.0 flows. SWIFT supports two OAuth grant types for consumption depending on the environment where the API is exposed. \n\n* MV-SIPN - jwt-bearer grant type [RFC 7523](https://tools.ietf.org/html/rfc7523) with Signed JWT assertion\n* Internet - Password grant type with license credentials.\n\nThis API uses JWT-Bearer grant type.\n\nPlease visit [SWIFT OAuth Token API](https://developer.swift.com/swift-oauth-token-api) page for more information and examples on how to generate an OAuth token.\n\nIn this declaration only the basic security element to transport the bearer token of an OAuth2 process is declared.\n",
        "scheme" : "bearer",
        "bearerFormat" : "opaque OAuth 2.0"
      },
      "oAuth2" : {
        "type" : "oauth2",
        "description" : "This API uses OAuth2 with the client credentials grant type for service provider API gateway integration. Used between an end SWIFT API gateway and service provider API gateway.\n\nPlease visit [SWIFT OAuth Token API](https://developer.swift.com/swift-oauth-token-api) for more information and examples.\n",
        "flows" : {
          "clientCredentials" : {
            "tokenUrl" : "/v1/oauth2/token",
            "scopes" : { }
          }
        }
      }
    },
    "examples" : {
      "ExampleFileDataUploadPaymentInitiationPDF" : {
        "summary" : "An example set of data describing a document supporting payment initiation uploaded as a PDF document.",
        "value" : {
          "document" : "JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9UeXBlL1BhZ2UvUGFyZW50IDMgMCBSL1Jlc291cmNlcyA8PC9YT2JqZWN0PDwvSW1nMSA2IDAgUj4+L0ZvbnQ8PC9GMSA3IDAgUj4+L1Byb2NTZXRbL1",
          "document_information" : {
            "document_type" : "CINV",
            "document_format" : "DPDF",
            "product_type" : "PTPI",
            "file_name" : "INV20221110",
            "digital_signature" : {
              "name" : "SWIFT High Fidelity Components, Ltd",
              "digital_signature" : "9Jfg1ha9RsFK /PHU"
            },
            "transaction_identification" : {
              "identification" : "BPR-76473863938"
            },
            "additional_details" : "payment initiation document."
          }
        }
      },
      "ExampleFileUploadStampDutySDSH" : {
        "summary" : "An example set of data describing a document supporting a stamp duty request uploaed as a spreadsheet.",
        "value" : {
          "document" : "JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9UeXBlL1BhZ2UvUGFyZW50IDMgMCBSL1Jlc291cmNlcyA8PD1YS2JqZWN0PDwvSW1nMSA2IDAgUj4+L0ZvbnQ8PC9GMSA3IDAgUj4+L1Byb2NTYBaLc3",
          "document_information" : {
            "product_type" : "PTSD",
            "document_type" : "BENS",
            "document_format" : "SDSH",
            "file_name" : "INV20221110",
            "digital_signature" : {
              "name" : "SWIFT High Fidelity Components, Ltd",
              "digital_signature" : "9Jfg1ha9RsFK /PHU"
            },
            "transaction_identification" : {
              "identification" : "113e4567-e86b-12d3-a456-426614172345"
            },
            "additional_details" : "stamp duty document."
          }
        }
      },
      "ExampleFileDataPaymentInitiationPDF" : {
        "summary" : "An example set of data describing a document supporting payment initiation uploaded as a PDF document.",
        "value" : {
          "document_identification" : "123e4567-e89b-12d3-a456-426614174000",
          "document_type" : "CINV",
          "document_format" : "DPDF",
          "product_type" : "PTPI",
          "file_name" : "INV20221110",
          "digital_signature" : {
            "name" : "SWIFT High Fidelity Components, Ltd",
            "digital_signature" : "9Jfg1ha9RsFK /PHU"
          },
          "transaction_identification" : {
            "identification" : "BPR-76473863938"
          },
          "file_status" : "DSCS",
          "additional_details" : "payment initiation document."
        }
      },
      "ExampleFileDataStampDutySDSH" : {
        "summary" : "An example set of data describing a document supporting a stamp duty request uploaed as a spreadsheet.",
        "value" : {
          "document_identification" : "123e4567-e89b-12d3-a456-426614174004",
          "product_type" : "PTSD",
          "document_type" : "BENS",
          "document_format" : "SDSH",
          "file_name" : "INV20221110",
          "digital_signature" : {
            "name" : "SWIFT High Fidelity Components, Ltd",
            "digital_signature" : "9Jfg1ha9RsFK /PHU"
          },
          "transaction_identification" : {
            "identification" : "113e4567-e86b-12d3-a456-426614172345"
          },
          "additional_details" : "stamp duty document."
        }
      },
      "ExampleListOfSupportingDocuments" : {
        "summary" : "An example set of data describing files listed on a server.",
        "value" : {
          "supporting_documents" : [ {
            "document_type" : "CINV",
            "document_identification" : "123e4567-e89b-12d3-a456-426614174000",
            "document_format" : "DPDF",
            "product_type" : "PTPI",
            "file_name" : "INV20221110",
            "issue_date" : "2025-04-22",
            "linked_url_address" : "https://www.abank.com/ijv-file-support/supporting-documents/123e4567-e89b-12d3-a456-426614174000",
            "digital_signature" : {
              "name" : "SWIFT High Fidelity Components, Ltd",
              "digital_signature" : "9Jfg1ha9RsFK /PHU"
            },
            "transaction_identification" : {
              "identification" : "BPR-76473863938"
            },
            "file_status" : "DSCS",
            "additional_details" : "payment initiation document."
          }, {
            "document_type" : "FXOC",
            "document_identification" : "123e4567-e89b-12d3-a456-426614174123",
            "document_format" : "DPDF",
            "file_name" : "FXO2451110",
            "issue_date" : "2025-05-04",
            "linked_url_address" : "https://www.abank.com/ijv-file-support/supporting-documents/123e4567-e89b-12d3-a456-426614174123",
            "transaction_identification" : {
              "identification" : "153e3377-c19e-12d3-a456-426614155891"
            },
            "file_status" : "DSCS",
            "additional_details" : "FX Option Confirmation document."
          }, {
            "document_type" : "BENS",
            "product_type" : "PTSD",
            "document_identification" : "123e4567-e89b-12d3-a456-426614174004",
            "document_format" : "SDSH",
            "file_name" : "INV20221110",
            "issue_date" : "2025-04-22",
            "linked_url_address" : "https://www.abank.com/ijv-file-support/supporting-documents/123e4567-e89b-12d3-a456-426614174004",
            "digital_signature" : {
              "name" : "SWIFT High Fidelity Components, Ltd",
              "digital_signature" : "9Jfg1ha9RsFK /PHU"
            },
            "transaction_identification" : {
              "identification" : "113e4567-e86b-12d3-a456-426614172345"
            },
            "file_status" : "DSCS",
            "additional_details" : "stamp duty document."
          } ]
        }
      }
    }
  }
}