{"openapi":"3.0.0","info":{"version":"0.0.1","title":"3DS Gateway Config API","description":"3DS Gateway Config API","contact":{"name":"Fight Club"}},"tags":[{"name":"default"},{"name":"settings"}],"paths":{"/":{"get":{"tags":["default"],"operationId":"health","description":"Health endpoint","responses":{"200":{"description":"Healthy","content":{"text/plain":{"schema":{"type":"string","example":"Healthy"}}}},"500":{"description":"Unhealthy","content":{"text/plain":{"schema":{"type":"string","example":"Unhealthy"}}}}},"summary":"Health","security":[]}},"/settings":{"post":{"tags":["settings"],"description":"Create a new nSoftware configuration for given payment methods","operationId":"addSettings","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"PV-Correlation-ID","description":"The unique identifier that relates all inter-service messages in the same session.","example":"cca9b187-f4b5-4a6c-b939-65163227c955","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"PV-Causation-ID","description":"The Message-ID of the caller service. Being Message-ID the unique identifier that identifies the current portion of the session processed by one service.","example":"428c4145-d422-479c-82db-679198a5013c","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsRequest"},"examples":{"default":{"value":{"merchant":{"name":"OpsFlow","webiste":"www.opsflow.com","country":"724","mcc":"1000"},"paymentMethods":[{"name":"mastercard","acquirerMerchantId":"900111","requestorId":"12009","requestorName":"OpsFlow","acquirerBin":"540011"}]}}}}},"required":true},"responses":{"201":{"description":"Merchant response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"},"example":{"configurationId":"98100","merchantId":"1001"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Input error.","status":400,"detail":"Validation errors occurred.","errors":[{"code":1004,"message":"The '$.purchase.amount' property has not been found in the input request."}],"traceId":"PV:GW:8df78e32-6279-4da0-9079-e58e60e79de9"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Unauthorized access.","status":401,"detail":"Invalid credentials.","traceId":"PV:GW:8df78e32-6279-4da0-9079-e58e60e79de9"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Internal server error.","status":500,"detail":"Unhandled error occurred.","traceId":"PV:3GW:1a3957c3-0e5a-4f44-b9fa-c7c4f6901a3f"}}}}},"summary":"Create"},"get":{"tags":["settings"],"description":"Filter settings by the given criteria.\n\nThe response is ordered by merchantId desc.","operationId":"getSettings","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"PV-Correlation-ID","description":"The unique identifier that relates all inter-service messages in the same session.","example":"cca9b187-f4b5-4a6c-b939-65163227c955","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"PV-Causation-ID","description":"The Message-ID of the caller service. Being Message-ID the unique identifier that identifies the current portion of the session processed by one service.","example":"428c4145-d422-479c-82db-679198a5013c","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"offset","description":"The number of items to skip before starting to collect the result set","schema":{"type":"integer","default":0}},{"in":"query","name":"limit","description":"The numbers of items to return","schema":{"type":"integer","default":50,"maximum":50}}],"responses":{"200":{"description":"Settings response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationResponse"},"example":{"offset":0,"limit":50,"total":1,"results":[{"configurationId":"98100","merchantId":"1001"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Unauthorized access.","status":401,"detail":"Invalid credentials.","traceId":"PV:GW:8df78e32-6279-4da0-9079-e58e60e79de9"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Internal server error.","status":500,"detail":"Unhandled error occurred.","traceId":"PV:3GW:1a3957c3-0e5a-4f44-b9fa-c7c4f6901a3f"}}}}},"summary":"Filter"}},"/settings/{merchantId}":{"post":{"tags":["settings"],"description":"Update an existing nSoftware configuration for given payment methods.\n\nIf the merchant was disabled the new configuration is enabling the merchant again.","operationId":"addSettingsById","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"PV-Correlation-ID","description":"The unique identifier that relates all inter-service messages in the same session.","example":"cca9b187-f4b5-4a6c-b939-65163227c955","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"PV-Causation-ID","description":"The Message-ID of the caller service. Being Message-ID the unique identifier that identifies the current portion of the session processed by one service.","example":"428c4145-d422-479c-82db-679198a5013c","schema":{"type":"string","format":"uuid"}},{"name":"merchantId","in":"path","description":"ID of config to fetch","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsRequest"},"example":{"merchant":{"name":"OpsFlow","webiste":"www.opsflow.com","country":"724","mcc":"1000"},"paymentMethods":[{"name":"mastercard","acquirerMerchantId":"900111","requestorId":"12009","requestorName":"OpsFlow","acquirerBin":"540011"}]}}}},"responses":{"201":{"description":"Merchant response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"},"example":{"configurationId":"98100","merchantId":"98100"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Input error.","status":400,"detail":"Malformed Json","traceId":"PV:3GW:c0eb573c-2003-47f5-b6d1-f112ea6bc35e","errors":[{"code":1000,"message":"Invalid json: invalid, line 2, position 2"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Input error.","status":401,"detail":"Malformed Json","traceId":"PV:3GW:c0eb573c-2003-47f5-b6d1-f112ea6bc35e","errors":[{"code":1000,"message":"Invalid json: invalid, line 2, position 2"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Not found.","status":404,"detail":"Merchant not found","traceId":"PV:3GW:1a3957c3-0e5a-4f44-b9fa-c7c4f6901a3f"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Internal server error.","status":500,"detail":"Unhandled error occurred.","traceId":"PV:3GW:1a3957c3-0e5a-4f44-b9fa-c7c4f6901a3f"}}}}},"summary":"Update"},"get":{"tags":["settings"],"description":"Find a setting by Id","operationId":"findSettingsById","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"PV-Correlation-ID","description":"The unique identifier that relates all inter-service messages in the same session.","example":"cca9b187-f4b5-4a6c-b939-65163227c955","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"PV-Causation-ID","description":"The Message-ID of the caller service. Being Message-ID the unique identifier that identifies the current portion of the session processed by one service.","example":"428c4145-d422-479c-82db-679198a5013c","schema":{"type":"string","format":"uuid"}},{"name":"merchantId","in":"path","description":"ID of config to fetch","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Settings response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SettingsResponse"}},"example":[{"configurationId":"98100","merchantId":"989798"}]}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Input error.","status":401,"detail":"Malformed Json","traceId":"PV:3GW:c0eb573c-2003-47f5-b6d1-f112ea6bc35e","errors":[{"code":1000,"message":"Invalid json: invalid, line 2, position 2"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Not found.","status":404,"detail":"Merchant not found","traceId":"PV:3GW:1a3957c3-0e5a-4f44-b9fa-c7c4f6901a3f"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Input error.","status":401,"detail":"Malformed Json","traceId":"PV:3GW:c0eb573c-2003-47f5-b6d1-f112ea6bc35e","errors":[{"code":1000,"message":"Invalid json: invalid, line 2, position 2"}]}}}}},"summary":"Find last configuration by id"}},"/settings/{merchantId}/disable":{"post":{"tags":["settings"],"description":"Disable a configuration","operationId":"disableSettingsById","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"PV-Correlation-ID","description":"The unique identifier that relates all inter-service messages in the same session.","example":"cca9b187-f4b5-4a6c-b939-65163227c955","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"PV-Causation-ID","description":"The Message-ID of the caller service. Being Message-ID the unique identifier that identifies the current portion of the session processed by one service.","example":"428c4145-d422-479c-82db-679198a5013c","schema":{"type":"string","format":"uuid"}},{"name":"merchantId","in":"path","description":"ID of config to fetch","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Settings response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Input error.","status":401,"detail":"Malformed Json","traceId":"PV:3GW:c0eb573c-2003-47f5-b6d1-f112ea6bc35e","errors":[{"code":1000,"message":"Invalid json: invalid, line 2, position 2"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Not found.","status":404,"detail":"Merchant not found","traceId":"PV:3GW:1a3957c3-0e5a-4f44-b9fa-c7c4f6901a3f"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"type":"https://payvision.atlassian.net/wiki/spaces/FightClub/pages/1422557271/Errors","title":"Internal server error.","status":500,"detail":"Unhandled error occurred.","traceId":"PV:3GW:1a3957c3-0e5a-4f44-b9fa-c7c4f6901a3f"}}}}},"summary":"Disable"}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://nsoftware-config/api/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWS","description":"The messages passed to the API will be validated to ensure the integrity of the messages using Detached JWS Compact Serialization (see [RFC 7515]('https://tools.ietf.org/html/rfc7515#appendix-F')) <br> A JWS represents these logical values: <ul>\n  <li>\n    JOSE Header: This is a JSON object consisting of these fields (claims):\n    <ul>\n      <li>alg(algorithm): HS256</li>\n      <li>iss(issuer): \"https://opsflow.payvision.com\"</li>\n      <li>aud(audience): \"3DSGWConfig\"</li>\n      <li>iat(issuedAt): 1543914167</li>\n      <li>exp(expiration): 1544000567</li>\n      <li>crit(critical): [\"iss\", \"aud\", \"iat\", \"exp\"]</li>\n    </ul>\n  </li>\n  <li>Payload: Request Body. This is used to sign, but the value present in the token does not have to contain a payload because we are using the detached mode.</li>\n  <li>Signature: Digital signature over the JWS Protected Header and the JWS Payload.</li>\n<ul>"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"traceId":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}}},"Merchant":{"type":"object","properties":{"name":{"type":"string"},"webiste":{"type":"string"},"country":{"type":"string","format":"ISO THREE DIGITS (Padleft)"},"mcc":{"type":"string","format":"FOUR DIGITS (Padleft)"}},"required":["id","name","webiste","country","mcc"]},"PaymentMethod":{"type":"object","properties":{"name":{"type":"string","enum":["mastercard","visa"]},"acquirerMerchantId":{"type":"string"},"requestorId":{"type":"string"},"requestorName":{"type":"string"},"acquirerBin":{"type":"string"}},"required":["name","acquirerMerchantId","requestorId","requestorName","acquirerBin"]},"SettingsRequest":{"type":"object","properties":{"merchant":{"$ref":"#/components/schemas/Merchant"},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}}},"required":["merchant","paymentMethods"]},"SettingsResponse":{"type":"object","properties":{"merchantId":{"type":"string"},"configurationId":{"type":"string"}}},"PaginationResponse":{"type":"object","properties":{"offset":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"results":{"type":"object","properties":{"merchantId":{"type":"string"},"configurationId":{"type":"string"}}}}}}}}