{
  "openapi": "3.0.4",
  "info": {
    "title": "Merchant",
    "description": "Create, update and retrieve a Merchant.",
    "contact": {
      "name": "Stratus Team 8",
      "x-library-name": "Stratus.Common.OpenApi",
      "x-library-version": "1.1.7"
    },
    "version": "1.5"
  },
  "servers": [
    {
      "url": "https://mtapi.stg-newdaytechnology.net/tms/merchant-service",
      "description": "Staging"
    },
    {
      "url": "https://mtapi.newdaytechnology.net/tms/merchant-service",
      "description": "Production"
    }
  ],
  "paths": {
    "/merchants": {
      "post": {
        "tags": [
          "Merchant"
        ],
        "summary": "Creates a new Merchant.",
        "description": "Creates a new Merchant.",
        "operationId": "Create Merchant",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "description": "Identifier for idempotency",
            "schema": {
              "type": "string"
            },
            "example": "EE735673-05F2-4C56-8A68-60170BDA4524"
          },
          {
            "name": "context-tenantId",
            "in": "header",
            "description": "Identifier assigned to the tenant.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The information on the Merchant to create.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMerchantRequest"
              },
              "examples": {
                "Merchant with VAT": {
                  "summary": "Creates Merchant with VAT",
                  "value": {
                    "name": "Bob's Table Store",
                    "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "100 1745 76",
                    "primaryContact": {
                      "fullName": "Joe Bloggs",
                      "telephone": "03332202532",
                      "email": "joebloggs@email.com",
                      "remittanceEmail": "joebloggs2@email.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "Finance",
                        "fullName": "Jane Bloggs",
                        "telephone": "03332202532",
                        "email": "janebloggs@email.com"
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": {
                      "name": "Some Fake Bank",
                      "branch": "Optional Branch",
                      "accountName": "J Bloggs",
                      "sortCode": "123456",
                      "accountNumber": "12345678"
                    },
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": true,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "signature": null,
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "upfrontPaymentEnabled": false
                  }
                },
                "Merchant without VAT": {
                  "summary": "Creates Merchant without VAT",
                  "value": {
                    "name": "Bob's Table Store",
                    "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "100 1745 76",
                    "primaryContact": {
                      "fullName": "Joe Bloggs",
                      "telephone": "03332202532",
                      "email": "joebloggs@email.com",
                      "remittanceEmail": "joebloggs2@email.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "Finance",
                        "fullName": "Jane Bloggs",
                        "telephone": "03332202532",
                        "email": "janebloggs@email.com"
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": null,
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": false,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "signature": null,
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "upfrontPaymentEnabled": null
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMerchantRequest"
              },
              "examples": {
                "Merchant with VAT": {
                  "summary": "Creates Merchant with VAT",
                  "value": {
                    "name": "Bob's Table Store",
                    "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "100 1745 76",
                    "primaryContact": {
                      "fullName": "Joe Bloggs",
                      "telephone": "03332202532",
                      "email": "joebloggs@email.com",
                      "remittanceEmail": "joebloggs2@email.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "Finance",
                        "fullName": "Jane Bloggs",
                        "telephone": "03332202532",
                        "email": "janebloggs@email.com"
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": {
                      "name": "Some Fake Bank",
                      "branch": "Optional Branch",
                      "accountName": "J Bloggs",
                      "sortCode": "123456",
                      "accountNumber": "12345678"
                    },
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": true,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "signature": null,
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "upfrontPaymentEnabled": false
                  }
                },
                "Merchant without VAT": {
                  "summary": "Creates Merchant without VAT",
                  "value": {
                    "name": "Bob's Table Store",
                    "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "100 1745 76",
                    "primaryContact": {
                      "fullName": "Joe Bloggs",
                      "telephone": "03332202532",
                      "email": "joebloggs@email.com",
                      "remittanceEmail": "joebloggs2@email.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "Finance",
                        "fullName": "Jane Bloggs",
                        "telephone": "03332202532",
                        "email": "janebloggs@email.com"
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": null,
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": false,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "signature": null,
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "upfrontPaymentEnabled": null
                  }
                }
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMerchantRequest"
              },
              "examples": {
                "Merchant with VAT": {
                  "summary": "Creates Merchant with VAT",
                  "value": {
                    "name": "Bob's Table Store",
                    "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "100 1745 76",
                    "primaryContact": {
                      "fullName": "Joe Bloggs",
                      "telephone": "03332202532",
                      "email": "joebloggs@email.com",
                      "remittanceEmail": "joebloggs2@email.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "Finance",
                        "fullName": "Jane Bloggs",
                        "telephone": "03332202532",
                        "email": "janebloggs@email.com"
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": {
                      "name": "Some Fake Bank",
                      "branch": "Optional Branch",
                      "accountName": "J Bloggs",
                      "sortCode": "123456",
                      "accountNumber": "12345678"
                    },
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": true,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "signature": null,
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "upfrontPaymentEnabled": false
                  }
                },
                "Merchant without VAT": {
                  "summary": "Creates Merchant without VAT",
                  "value": {
                    "name": "Bob's Table Store",
                    "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "100 1745 76",
                    "primaryContact": {
                      "fullName": "Joe Bloggs",
                      "telephone": "03332202532",
                      "email": "joebloggs@email.com",
                      "remittanceEmail": "joebloggs2@email.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "Finance",
                        "fullName": "Jane Bloggs",
                        "telephone": "03332202532",
                        "email": "janebloggs@email.com"
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": null,
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": false,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "signature": null,
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "upfrontPaymentEnabled": null
                  }
                }
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMerchantRequest"
              },
              "examples": {
                "Merchant with VAT": {
                  "summary": "Creates Merchant with VAT",
                  "value": {
                    "name": "Bob's Table Store",
                    "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "100 1745 76",
                    "primaryContact": {
                      "fullName": "Joe Bloggs",
                      "telephone": "03332202532",
                      "email": "joebloggs@email.com",
                      "remittanceEmail": "joebloggs2@email.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "Finance",
                        "fullName": "Jane Bloggs",
                        "telephone": "03332202532",
                        "email": "janebloggs@email.com"
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": {
                      "name": "Some Fake Bank",
                      "branch": "Optional Branch",
                      "accountName": "J Bloggs",
                      "sortCode": "123456",
                      "accountNumber": "12345678"
                    },
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": true,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "signature": null,
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "upfrontPaymentEnabled": false
                  }
                },
                "Merchant without VAT": {
                  "summary": "Creates Merchant without VAT",
                  "value": {
                    "name": "Bob's Table Store",
                    "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "100 1745 76",
                    "primaryContact": {
                      "fullName": "Joe Bloggs",
                      "telephone": "03332202532",
                      "email": "joebloggs@email.com",
                      "remittanceEmail": "joebloggs2@email.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "Finance",
                        "fullName": "Jane Bloggs",
                        "telephone": "03332202532",
                        "email": "janebloggs@email.com"
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": null,
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": false,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "signature": null,
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "upfrontPaymentEnabled": null
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created Merchant detail",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMerchantResponse"
                },
                "examples": {
                  "Example CreateMerchantResponse": {
                    "value": {
                      "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMerchantResponse"
                },
                "examples": {
                  "Example CreateMerchantResponse": {
                    "value": {
                      "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMerchantResponse"
                },
                "examples": {
                  "Example CreateMerchantResponse": {
                    "value": {
                      "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "Example ValidationProblemDetails": {
                    "value": {
                      "errors": {},
                      "type": "newday:tenancymanagement.merchant:error:name too short",
                      "title": "Name too short",
                      "detail": "Name too short"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "Example ValidationProblemDetails": {
                    "value": {
                      "errors": {},
                      "type": "newday:tenancymanagement.merchant:error:name too short",
                      "title": "Name too short",
                      "detail": "Name too short"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "Example ValidationProblemDetails": {
                    "value": {
                      "errors": {},
                      "type": "newday:tenancymanagement.merchant:error:name too short",
                      "title": "Name too short",
                      "detail": "Name too short"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorised.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:authenticationFailed",
                      "title": "Unauthorised.",
                      "status": 401
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:forbidden",
                      "title": "Forbidden.",
                      "status": 403
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The number of requests exceeded the maximum allowed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:tooManyRequests",
                      "title": "The number of requests exceeded the maximum allowed.",
                      "status": 429
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:error",
                      "title": "An internal server error occurred.",
                      "status": 500
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:badGateway",
                      "title": "Bad gateway.",
                      "status": 502
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:unavailable",
                      "title": "Service unavailable.",
                      "status": 503
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Gateway timeout.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:gatewayTimeout",
                      "title": "Gateway timeout.",
                      "status": 504
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants \\\n  --header 'content-type: application/json' \\\n  --header 'context-tenantId: SOME_STRING_VALUE' \\\n  --header 'idempotency-key: EE735673-05F2-4C56-8A68-60170BDA4524' \\\n  --data '{\"name\":\"string\",\"organisationUnitId\":\"3b58a0e5-7149-4aca-bc52-79281122b071\",\"status\":\"string\",\"address\":{\"line1\":\"string\",\"town\":\"string\",\"county\":\"string\",\"postcode\":\"string\",\"country\":\"string\",\"line2\":\"string\",\"line3\":\"string\",\"line4\":\"string\",\"line5\":\"string\"},\"vatNumber\":\"string\",\"primaryContact\":{\"fullName\":\"string\",\"telephone\":\"string\",\"email\":\"string\",\"remittanceEmail\":\"string\"},\"alternativeContacts\":[{\"type\":\"string\",\"fullName\":\"string\",\"telephone\":\"string\",\"email\":\"string\"}],\"retailer\":{\"tradingName\":\"string\",\"description\":\"string\",\"customerFacingName\":\"string\",\"brandLogoUrl\":\"string\",\"websiteUrl\":\"string\",\"retailerChannel\":\"string\"},\"bankDetails\":{\"name\":\"string\",\"branch\":\"string\",\"accountName\":\"string\",\"sortCode\":\"string\",\"accountNumber\":\"string\"},\"fcaNumber\":\"string\",\"companyRegistrationNumber\":\"string\",\"categoryCode\":\"string\",\"industryType\":\"string\",\"averageTransactionValue\":{\"value\":50,\"currencyCode\":\"GBP\"},\"brokerageStatus\":\"string\",\"groupId\":\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\",\"contractStartDate\":\"2019-08-24T14:15:22Z\",\"contractEndDate\":\"2019-08-24T14:15:22Z\",\"vatApplicable\":true,\"externalCrmReference\":\"string\",\"externalMerchantReference\":\"string\",\"marketingSource\":\"string\",\"signature\":\"string\",\"thirdPartyDetails\":{\"legalEntityName\":\"string\",\"companyRegistrationNumber\":\"string\",\"address\":{\"line1\":\"string\",\"town\":\"string\",\"county\":\"string\",\"postcode\":\"string\",\"country\":\"string\",\"line2\":\"string\",\"line3\":\"string\",\"line4\":\"string\",\"line5\":\"string\"}},\"upfrontPaymentEnabled\":true}'"
          },
          {
            "lang": "Csharp + Restsharp",
            "source": "var client = new RestClient(\"https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"idempotency-key\", \"EE735673-05F2-4C56-8A68-60170BDA4524\");\nrequest.AddHeader(\"context-tenantId\", \"SOME_STRING_VALUE\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddParameter(\"application/json\", \"{\\\"name\\\":\\\"string\\\",\\\"organisationUnitId\\\":\\\"3b58a0e5-7149-4aca-bc52-79281122b071\\\",\\\"status\\\":\\\"string\\\",\\\"address\\\":{\\\"line1\\\":\\\"string\\\",\\\"town\\\":\\\"string\\\",\\\"county\\\":\\\"string\\\",\\\"postcode\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\",\\\"line2\\\":\\\"string\\\",\\\"line3\\\":\\\"string\\\",\\\"line4\\\":\\\"string\\\",\\\"line5\\\":\\\"string\\\"},\\\"vatNumber\\\":\\\"string\\\",\\\"primaryContact\\\":{\\\"fullName\\\":\\\"string\\\",\\\"telephone\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"remittanceEmail\\\":\\\"string\\\"},\\\"alternativeContacts\\\":[{\\\"type\\\":\\\"string\\\",\\\"fullName\\\":\\\"string\\\",\\\"telephone\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\"}],\\\"retailer\\\":{\\\"tradingName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"customerFacingName\\\":\\\"string\\\",\\\"brandLogoUrl\\\":\\\"string\\\",\\\"websiteUrl\\\":\\\"string\\\",\\\"retailerChannel\\\":\\\"string\\\"},\\\"bankDetails\\\":{\\\"name\\\":\\\"string\\\",\\\"branch\\\":\\\"string\\\",\\\"accountName\\\":\\\"string\\\",\\\"sortCode\\\":\\\"string\\\",\\\"accountNumber\\\":\\\"string\\\"},\\\"fcaNumber\\\":\\\"string\\\",\\\"companyRegistrationNumber\\\":\\\"string\\\",\\\"categoryCode\\\":\\\"string\\\",\\\"industryType\\\":\\\"string\\\",\\\"averageTransactionValue\\\":{\\\"value\\\":50,\\\"currencyCode\\\":\\\"GBP\\\"},\\\"brokerageStatus\\\":\\\"string\\\",\\\"groupId\\\":\\\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\\\",\\\"contractStartDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"contractEndDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"vatApplicable\\\":true,\\\"externalCrmReference\\\":\\\"string\\\",\\\"externalMerchantReference\\\":\\\"string\\\",\\\"marketingSource\\\":\\\"string\\\",\\\"signature\\\":\\\"string\\\",\\\"thirdPartyDetails\\\":{\\\"legalEntityName\\\":\\\"string\\\",\\\"companyRegistrationNumber\\\":\\\"string\\\",\\\"address\\\":{\\\"line1\\\":\\\"string\\\",\\\"town\\\":\\\"string\\\",\\\"county\\\":\\\"string\\\",\\\"postcode\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\",\\\"line2\\\":\\\"string\\\",\\\"line3\\\":\\\"string\\\",\\\"line4\\\":\\\"string\\\",\\\"line5\\\":\\\"string\\\"}},\\\"upfrontPaymentEnabled\\\":true}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"name\": \"string\",\n  \"organisationUnitId\": \"3b58a0e5-7149-4aca-bc52-79281122b071\",\n  \"status\": \"string\",\n  \"address\": {\n    \"line1\": \"string\",\n    \"town\": \"string\",\n    \"county\": \"string\",\n    \"postcode\": \"string\",\n    \"country\": \"string\",\n    \"line2\": \"string\",\n    \"line3\": \"string\",\n    \"line4\": \"string\",\n    \"line5\": \"string\"\n  },\n  \"vatNumber\": \"string\",\n  \"primaryContact\": {\n    \"fullName\": \"string\",\n    \"telephone\": \"string\",\n    \"email\": \"string\",\n    \"remittanceEmail\": \"string\"\n  },\n  \"alternativeContacts\": [\n    {\n      \"type\": \"string\",\n      \"fullName\": \"string\",\n      \"telephone\": \"string\",\n      \"email\": \"string\"\n    }\n  ],\n  \"retailer\": {\n    \"tradingName\": \"string\",\n    \"description\": \"string\",\n    \"customerFacingName\": \"string\",\n    \"brandLogoUrl\": \"string\",\n    \"websiteUrl\": \"string\",\n    \"retailerChannel\": \"string\"\n  },\n  \"bankDetails\": {\n    \"name\": \"string\",\n    \"branch\": \"string\",\n    \"accountName\": \"string\",\n    \"sortCode\": \"string\",\n    \"accountNumber\": \"string\"\n  },\n  \"fcaNumber\": \"string\",\n  \"companyRegistrationNumber\": \"string\",\n  \"categoryCode\": \"string\",\n  \"industryType\": \"string\",\n  \"averageTransactionValue\": {\n    \"value\": 50,\n    \"currencyCode\": \"GBP\"\n  },\n  \"brokerageStatus\": \"string\",\n  \"groupId\": \"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\",\n  \"contractStartDate\": \"2019-08-24T14:15:22Z\",\n  \"contractEndDate\": \"2019-08-24T14:15:22Z\",\n  \"vatApplicable\": true,\n  \"externalCrmReference\": \"string\",\n  \"externalMerchantReference\": \"string\",\n  \"marketingSource\": \"string\",\n  \"signature\": \"string\",\n  \"thirdPartyDetails\": {\n    \"legalEntityName\": \"string\",\n    \"companyRegistrationNumber\": \"string\",\n    \"address\": {\n      \"line1\": \"string\",\n      \"town\": \"string\",\n      \"county\": \"string\",\n      \"postcode\": \"string\",\n      \"country\": \"string\",\n      \"line2\": \"string\",\n      \"line3\": \"string\",\n      \"line4\": \"string\",\n      \"line5\": \"string\"\n    }\n  },\n  \"upfrontPaymentEnabled\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants\");\nxhr.setRequestHeader(\"idempotency-key\", \"EE735673-05F2-4C56-8A68-60170BDA4524\");\nxhr.setRequestHeader(\"context-tenantId\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants',\n  headers: {\n    'idempotency-key': 'EE735673-05F2-4C56-8A68-60170BDA4524',\n    'context-tenantId': 'SOME_STRING_VALUE',\n    'content-type': 'application/json'\n  },\n  body: {\n    name: 'string',\n    organisationUnitId: '3b58a0e5-7149-4aca-bc52-79281122b071',\n    status: 'string',\n    address: {\n      line1: 'string',\n      town: 'string',\n      county: 'string',\n      postcode: 'string',\n      country: 'string',\n      line2: 'string',\n      line3: 'string',\n      line4: 'string',\n      line5: 'string'\n    },\n    vatNumber: 'string',\n    primaryContact: {\n      fullName: 'string',\n      telephone: 'string',\n      email: 'string',\n      remittanceEmail: 'string'\n    },\n    alternativeContacts: [{type: 'string', fullName: 'string', telephone: 'string', email: 'string'}],\n    retailer: {\n      tradingName: 'string',\n      description: 'string',\n      customerFacingName: 'string',\n      brandLogoUrl: 'string',\n      websiteUrl: 'string',\n      retailerChannel: 'string'\n    },\n    bankDetails: {\n      name: 'string',\n      branch: 'string',\n      accountName: 'string',\n      sortCode: 'string',\n      accountNumber: 'string'\n    },\n    fcaNumber: 'string',\n    companyRegistrationNumber: 'string',\n    categoryCode: 'string',\n    industryType: 'string',\n    averageTransactionValue: {value: 50, currencyCode: 'GBP'},\n    brokerageStatus: 'string',\n    groupId: 'eb54e96e-21b8-4f54-9cd4-80fccbd06f55',\n    contractStartDate: '2019-08-24T14:15:22Z',\n    contractEndDate: '2019-08-24T14:15:22Z',\n    vatApplicable: true,\n    externalCrmReference: 'string',\n    externalMerchantReference: 'string',\n    marketingSource: 'string',\n    signature: 'string',\n    thirdPartyDetails: {\n      legalEntityName: 'string',\n      companyRegistrationNumber: 'string',\n      address: {\n        line1: 'string',\n        town: 'string',\n        county: 'string',\n        postcode: 'string',\n        country: 'string',\n        line2: 'string',\n        line3: 'string',\n        line4: 'string',\n        line5: 'string'\n      }\n    },\n    upfrontPaymentEnabled: true\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          }
        ]
      },
      "get": {
        "tags": [
          "Merchant"
        ],
        "summary": "Get all Merchants for an Organisational unit.",
        "description": "Retrieves a List of Merchants that belong to an Organisational unit.",
        "operationId": "Retrieve Merchants",
        "parameters": [
          {
            "name": "organisationUnitId",
            "in": "query",
            "description": "Identifier assigned to the organisational unit.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includePurged",
            "in": "query",
            "description": "Flag indicating whether the purged merchants should be retrieved or not.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "context-tenantId",
            "in": "header",
            "description": "Identifier assigned to the tenant.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of Merchants",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllMerchantsResponse"
                },
                "examples": {
                  "Example GetAllMerchantsResponse": {
                    "value": {
                      "merchants": [
                        {
                          "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "name": "MerchantName",
                          "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "status": "Active",
                          "address": {
                            "line1": "Line1",
                            "town": "Town",
                            "county": "County",
                            "postcode": "Postcode",
                            "country": "Country",
                            "line2": null,
                            "line3": null,
                            "line4": null,
                            "line5": null
                          },
                          "vatNumber": "123",
                          "primaryContact": {
                            "fullName": "Test Contact",
                            "telephone": "0123456789",
                            "email": "test@test.com",
                            "remittanceEmail": "remittance@test.com"
                          },
                          "alternativeContacts": [
                            {
                              "type": "Finance",
                              "fullName": "Alternative Test Contact",
                              "telephone": "0987654321",
                              "email": "test-alternative@test.com"
                            }
                          ],
                          "retailer": {
                            "tradingName": "TradingName",
                            "description": "RetailerDescription",
                            "customerFacingName": "RetailerCustomerFacingName",
                            "brandLogoUrl": "http://test-url",
                            "websiteUrl": "http://test-url",
                            "retailerChannel": null
                          },
                          "bankDetails": null,
                          "fcaNumber": "123456",
                          "companyRegistrationNumber": "123",
                          "categoryCode": "12",
                          "industryType": "Industry Type",
                          "averageTransactionValue": {
                            "value": 100,
                            "currencyCode": "GBP"
                          },
                          "brokerageStatus": "Brokerage Type",
                          "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "contractStartDate": null,
                          "contractEndDate": null,
                          "vatApplicable": true,
                          "externalCrmReference": "External CRM Reference",
                          "externalMerchantReference": "External Merchant Reference",
                          "marketingSource": "Marketing Source",
                          "signature": null,
                          "thirdPartyDetails": {
                            "legalEntityName": "LegalEntityName",
                            "companyRegistrationNumber": "12345678",
                            "address": {
                              "line1": "Line1",
                              "town": "Town",
                              "county": "County",
                              "postcode": "N1C 4DA",
                              "country": "England",
                              "line2": null,
                              "line3": null,
                              "line4": null,
                              "line5": null
                            }
                          },
                          "upfrontPaymentEnabled": false
                        },
                        {
                          "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "name": "MerchantName",
                          "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "status": "Active",
                          "address": {
                            "line1": "Line1",
                            "town": "Town",
                            "county": "County",
                            "postcode": "Postcode",
                            "country": "Country",
                            "line2": null,
                            "line3": null,
                            "line4": null,
                            "line5": null
                          },
                          "vatNumber": "123",
                          "primaryContact": {
                            "fullName": "Test Contact",
                            "telephone": "0123456789",
                            "email": "test@test.com",
                            "remittanceEmail": "remittance@test.com"
                          },
                          "alternativeContacts": [
                            {
                              "type": "Finance",
                              "fullName": "Alternative Test Contact",
                              "telephone": "0987654321",
                              "email": "test-alternative@test.com"
                            }
                          ],
                          "retailer": {
                            "tradingName": "TradingName",
                            "description": "RetailerDescription",
                            "customerFacingName": "RetailerCustomerFacingName",
                            "brandLogoUrl": "http://test-url",
                            "websiteUrl": "http://test-url",
                            "retailerChannel": null
                          },
                          "bankDetails": null,
                          "fcaNumber": "123456",
                          "companyRegistrationNumber": "123",
                          "categoryCode": "12",
                          "industryType": "Industry Type",
                          "averageTransactionValue": {
                            "value": 100,
                            "currencyCode": "GBP"
                          },
                          "brokerageStatus": "Brokerage Type",
                          "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "contractStartDate": null,
                          "contractEndDate": null,
                          "vatApplicable": true,
                          "externalCrmReference": "External CRM Reference",
                          "externalMerchantReference": "External Merchant Reference",
                          "marketingSource": "Marketing Source",
                          "signature": null,
                          "thirdPartyDetails": {
                            "legalEntityName": "LegalEntityName",
                            "companyRegistrationNumber": "12345678",
                            "address": {
                              "line1": "Line1",
                              "town": "Town",
                              "county": "County",
                              "postcode": "N1C 4DA",
                              "country": "England",
                              "line2": null,
                              "line3": null,
                              "line4": null,
                              "line5": null
                            }
                          },
                          "upfrontPaymentEnabled": false
                        }
                      ]
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllMerchantsResponse"
                },
                "examples": {
                  "Example GetAllMerchantsResponse": {
                    "value": {
                      "merchants": [
                        {
                          "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "name": "MerchantName",
                          "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "status": "Active",
                          "address": {
                            "line1": "Line1",
                            "town": "Town",
                            "county": "County",
                            "postcode": "Postcode",
                            "country": "Country",
                            "line2": null,
                            "line3": null,
                            "line4": null,
                            "line5": null
                          },
                          "vatNumber": "123",
                          "primaryContact": {
                            "fullName": "Test Contact",
                            "telephone": "0123456789",
                            "email": "test@test.com",
                            "remittanceEmail": "remittance@test.com"
                          },
                          "alternativeContacts": [
                            {
                              "type": "Finance",
                              "fullName": "Alternative Test Contact",
                              "telephone": "0987654321",
                              "email": "test-alternative@test.com"
                            }
                          ],
                          "retailer": {
                            "tradingName": "TradingName",
                            "description": "RetailerDescription",
                            "customerFacingName": "RetailerCustomerFacingName",
                            "brandLogoUrl": "http://test-url",
                            "websiteUrl": "http://test-url",
                            "retailerChannel": null
                          },
                          "bankDetails": null,
                          "fcaNumber": "123456",
                          "companyRegistrationNumber": "123",
                          "categoryCode": "12",
                          "industryType": "Industry Type",
                          "averageTransactionValue": {
                            "value": 100,
                            "currencyCode": "GBP"
                          },
                          "brokerageStatus": "Brokerage Type",
                          "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "contractStartDate": null,
                          "contractEndDate": null,
                          "vatApplicable": true,
                          "externalCrmReference": "External CRM Reference",
                          "externalMerchantReference": "External Merchant Reference",
                          "marketingSource": "Marketing Source",
                          "signature": null,
                          "thirdPartyDetails": {
                            "legalEntityName": "LegalEntityName",
                            "companyRegistrationNumber": "12345678",
                            "address": {
                              "line1": "Line1",
                              "town": "Town",
                              "county": "County",
                              "postcode": "N1C 4DA",
                              "country": "England",
                              "line2": null,
                              "line3": null,
                              "line4": null,
                              "line5": null
                            }
                          },
                          "upfrontPaymentEnabled": false
                        },
                        {
                          "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "name": "MerchantName",
                          "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "status": "Active",
                          "address": {
                            "line1": "Line1",
                            "town": "Town",
                            "county": "County",
                            "postcode": "Postcode",
                            "country": "Country",
                            "line2": null,
                            "line3": null,
                            "line4": null,
                            "line5": null
                          },
                          "vatNumber": "123",
                          "primaryContact": {
                            "fullName": "Test Contact",
                            "telephone": "0123456789",
                            "email": "test@test.com",
                            "remittanceEmail": "remittance@test.com"
                          },
                          "alternativeContacts": [
                            {
                              "type": "Finance",
                              "fullName": "Alternative Test Contact",
                              "telephone": "0987654321",
                              "email": "test-alternative@test.com"
                            }
                          ],
                          "retailer": {
                            "tradingName": "TradingName",
                            "description": "RetailerDescription",
                            "customerFacingName": "RetailerCustomerFacingName",
                            "brandLogoUrl": "http://test-url",
                            "websiteUrl": "http://test-url",
                            "retailerChannel": null
                          },
                          "bankDetails": null,
                          "fcaNumber": "123456",
                          "companyRegistrationNumber": "123",
                          "categoryCode": "12",
                          "industryType": "Industry Type",
                          "averageTransactionValue": {
                            "value": 100,
                            "currencyCode": "GBP"
                          },
                          "brokerageStatus": "Brokerage Type",
                          "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "contractStartDate": null,
                          "contractEndDate": null,
                          "vatApplicable": true,
                          "externalCrmReference": "External CRM Reference",
                          "externalMerchantReference": "External Merchant Reference",
                          "marketingSource": "Marketing Source",
                          "signature": null,
                          "thirdPartyDetails": {
                            "legalEntityName": "LegalEntityName",
                            "companyRegistrationNumber": "12345678",
                            "address": {
                              "line1": "Line1",
                              "town": "Town",
                              "county": "County",
                              "postcode": "N1C 4DA",
                              "country": "England",
                              "line2": null,
                              "line3": null,
                              "line4": null,
                              "line5": null
                            }
                          },
                          "upfrontPaymentEnabled": false
                        }
                      ]
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllMerchantsResponse"
                },
                "examples": {
                  "Example GetAllMerchantsResponse": {
                    "value": {
                      "merchants": [
                        {
                          "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "name": "MerchantName",
                          "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "status": "Active",
                          "address": {
                            "line1": "Line1",
                            "town": "Town",
                            "county": "County",
                            "postcode": "Postcode",
                            "country": "Country",
                            "line2": null,
                            "line3": null,
                            "line4": null,
                            "line5": null
                          },
                          "vatNumber": "123",
                          "primaryContact": {
                            "fullName": "Test Contact",
                            "telephone": "0123456789",
                            "email": "test@test.com",
                            "remittanceEmail": "remittance@test.com"
                          },
                          "alternativeContacts": [
                            {
                              "type": "Finance",
                              "fullName": "Alternative Test Contact",
                              "telephone": "0987654321",
                              "email": "test-alternative@test.com"
                            }
                          ],
                          "retailer": {
                            "tradingName": "TradingName",
                            "description": "RetailerDescription",
                            "customerFacingName": "RetailerCustomerFacingName",
                            "brandLogoUrl": "http://test-url",
                            "websiteUrl": "http://test-url",
                            "retailerChannel": null
                          },
                          "bankDetails": null,
                          "fcaNumber": "123456",
                          "companyRegistrationNumber": "123",
                          "categoryCode": "12",
                          "industryType": "Industry Type",
                          "averageTransactionValue": {
                            "value": 100,
                            "currencyCode": "GBP"
                          },
                          "brokerageStatus": "Brokerage Type",
                          "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "contractStartDate": null,
                          "contractEndDate": null,
                          "vatApplicable": true,
                          "externalCrmReference": "External CRM Reference",
                          "externalMerchantReference": "External Merchant Reference",
                          "marketingSource": "Marketing Source",
                          "signature": null,
                          "thirdPartyDetails": {
                            "legalEntityName": "LegalEntityName",
                            "companyRegistrationNumber": "12345678",
                            "address": {
                              "line1": "Line1",
                              "town": "Town",
                              "county": "County",
                              "postcode": "N1C 4DA",
                              "country": "England",
                              "line2": null,
                              "line3": null,
                              "line4": null,
                              "line5": null
                            }
                          },
                          "upfrontPaymentEnabled": false
                        },
                        {
                          "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "name": "MerchantName",
                          "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "status": "Active",
                          "address": {
                            "line1": "Line1",
                            "town": "Town",
                            "county": "County",
                            "postcode": "Postcode",
                            "country": "Country",
                            "line2": null,
                            "line3": null,
                            "line4": null,
                            "line5": null
                          },
                          "vatNumber": "123",
                          "primaryContact": {
                            "fullName": "Test Contact",
                            "telephone": "0123456789",
                            "email": "test@test.com",
                            "remittanceEmail": "remittance@test.com"
                          },
                          "alternativeContacts": [
                            {
                              "type": "Finance",
                              "fullName": "Alternative Test Contact",
                              "telephone": "0987654321",
                              "email": "test-alternative@test.com"
                            }
                          ],
                          "retailer": {
                            "tradingName": "TradingName",
                            "description": "RetailerDescription",
                            "customerFacingName": "RetailerCustomerFacingName",
                            "brandLogoUrl": "http://test-url",
                            "websiteUrl": "http://test-url",
                            "retailerChannel": null
                          },
                          "bankDetails": null,
                          "fcaNumber": "123456",
                          "companyRegistrationNumber": "123",
                          "categoryCode": "12",
                          "industryType": "Industry Type",
                          "averageTransactionValue": {
                            "value": 100,
                            "currencyCode": "GBP"
                          },
                          "brokerageStatus": "Brokerage Type",
                          "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                          "contractStartDate": null,
                          "contractEndDate": null,
                          "vatApplicable": true,
                          "externalCrmReference": "External CRM Reference",
                          "externalMerchantReference": "External Merchant Reference",
                          "marketingSource": "Marketing Source",
                          "signature": null,
                          "thirdPartyDetails": {
                            "legalEntityName": "LegalEntityName",
                            "companyRegistrationNumber": "12345678",
                            "address": {
                              "line1": "Line1",
                              "town": "Town",
                              "county": "County",
                              "postcode": "N1C 4DA",
                              "country": "England",
                              "line2": null,
                              "line3": null,
                              "line4": null,
                              "line5": null
                            }
                          },
                          "upfrontPaymentEnabled": false
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorised.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:authenticationFailed",
                      "title": "Unauthorised.",
                      "status": 401
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:forbidden",
                      "title": "Forbidden.",
                      "status": 403
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The number of requests exceeded the maximum allowed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:tooManyRequests",
                      "title": "The number of requests exceeded the maximum allowed.",
                      "status": 429
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:error",
                      "title": "An internal server error occurred.",
                      "status": 500
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:badGateway",
                      "title": "Bad gateway.",
                      "status": 502
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:unavailable",
                      "title": "Service unavailable.",
                      "status": 503
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Gateway timeout.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:gatewayTimeout",
                      "title": "Gateway timeout.",
                      "status": 504
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants?organisationUnitId=SOME_STRING_VALUE&includePurged=SOME_BOOLEAN_VALUE' \\\n  --header 'context-tenantId: SOME_STRING_VALUE'"
          },
          {
            "lang": "Csharp + Restsharp",
            "source": "var client = new RestClient(\"https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants?organisationUnitId=SOME_STRING_VALUE&includePurged=SOME_BOOLEAN_VALUE\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"context-tenantId\", \"SOME_STRING_VALUE\");\nIRestResponse response = client.Execute(request);"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants?organisationUnitId=SOME_STRING_VALUE&includePurged=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"context-tenantId\", \"SOME_STRING_VALUE\");\n\nxhr.send(data);"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants',\n  qs: {organisationUnitId: 'SOME_STRING_VALUE', includePurged: 'SOME_BOOLEAN_VALUE'},\n  headers: {'context-tenantId': 'SOME_STRING_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          }
        ]
      }
    },
    "/merchants/{merchantId}": {
      "put": {
        "tags": [
          "Merchant"
        ],
        "summary": "Updates a Merchant.",
        "description": "Updates Merchant Details.",
        "operationId": "Update Merchant",
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "description": "Identifier assigned to the Merchant.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "context-tenantId",
            "in": "header",
            "description": "Identifier assigned to the tenant.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMerchantRequest"
              },
              "examples": {
                "Example UpdateMerchantRequest": {
                  "value": {
                    "name": "MerchantName",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "123",
                    "primaryContact": {
                      "fullName": "me",
                      "telephone": "02020",
                      "email": "email.com",
                      "remittanceEmail": "email2.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "",
                        "fullName": "",
                        "telephone": "",
                        "email": ""
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": null,
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": true,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "signature": null,
                    "upfrontPaymentEnabled": null
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMerchantRequest"
              },
              "examples": {
                "Example UpdateMerchantRequest": {
                  "value": {
                    "name": "MerchantName",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "123",
                    "primaryContact": {
                      "fullName": "me",
                      "telephone": "02020",
                      "email": "email.com",
                      "remittanceEmail": "email2.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "",
                        "fullName": "",
                        "telephone": "",
                        "email": ""
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": null,
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": true,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "signature": null,
                    "upfrontPaymentEnabled": null
                  }
                }
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMerchantRequest"
              },
              "examples": {
                "Example UpdateMerchantRequest": {
                  "value": {
                    "name": "MerchantName",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "123",
                    "primaryContact": {
                      "fullName": "me",
                      "telephone": "02020",
                      "email": "email.com",
                      "remittanceEmail": "email2.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "",
                        "fullName": "",
                        "telephone": "",
                        "email": ""
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": null,
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": true,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "signature": null,
                    "upfrontPaymentEnabled": null
                  }
                }
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMerchantRequest"
              },
              "examples": {
                "Example UpdateMerchantRequest": {
                  "value": {
                    "name": "MerchantName",
                    "status": "Active",
                    "address": {
                      "line1": "Line1",
                      "town": "Town",
                      "county": "County",
                      "postcode": "N1C 4DA",
                      "country": "England",
                      "line2": null,
                      "line3": null,
                      "line4": null,
                      "line5": null
                    },
                    "vatNumber": "123",
                    "primaryContact": {
                      "fullName": "me",
                      "telephone": "02020",
                      "email": "email.com",
                      "remittanceEmail": "email2.com"
                    },
                    "alternativeContacts": [
                      {
                        "type": "",
                        "fullName": "",
                        "telephone": "",
                        "email": ""
                      }
                    ],
                    "retailer": {
                      "tradingName": "TradingName",
                      "description": "RetailerDescription",
                      "customerFacingName": "RetailerCustomerFacingName",
                      "brandLogoUrl": "http://test-url",
                      "websiteUrl": "http://test-url",
                      "retailerChannel": null
                    },
                    "bankDetails": null,
                    "fcaNumber": "123456",
                    "companyRegistrationNumber": "123",
                    "categoryCode": "12",
                    "industryType": "Industry Type",
                    "averageTransactionValue": {
                      "value": 100,
                      "currencyCode": "GBP"
                    },
                    "brokerageStatus": "Brokerage Type",
                    "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                    "contractStartDate": "2024-12-24T09:30:00+00:00",
                    "contractEndDate": null,
                    "vatApplicable": true,
                    "externalCrmReference": "External CRM Reference",
                    "externalMerchantReference": "External Merchant Reference",
                    "marketingSource": "Marketing Source",
                    "thirdPartyDetails": {
                      "legalEntityName": "LegalEntityName",
                      "companyRegistrationNumber": "12345678",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "N1C 4DA",
                        "country": "England",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      }
                    },
                    "signature": null,
                    "upfrontPaymentEnabled": null
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successfully updated Merchant details"
          },
          "400": {
            "description": "The request was invalid",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "Example ValidationProblemDetails": {
                    "value": {
                      "errors": {},
                      "type": "newday:tenancymanagement.merchant:error:name too short",
                      "title": "Name too short",
                      "detail": "Name too short"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "Example ValidationProblemDetails": {
                    "value": {
                      "errors": {},
                      "type": "newday:tenancymanagement.merchant:error:name too short",
                      "title": "Name too short",
                      "detail": "Name too short"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "Example ValidationProblemDetails": {
                    "value": {
                      "errors": {},
                      "type": "newday:tenancymanagement.merchant:error:name too short",
                      "title": "Name too short",
                      "detail": "Name too short"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorised.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:authenticationFailed",
                      "title": "Unauthorised.",
                      "status": 401
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:forbidden",
                      "title": "Forbidden.",
                      "status": 403
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The number of requests exceeded the maximum allowed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:tooManyRequests",
                      "title": "The number of requests exceeded the maximum allowed.",
                      "status": 429
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:error",
                      "title": "An internal server error occurred.",
                      "status": 500
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:badGateway",
                      "title": "Bad gateway.",
                      "status": 502
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:unavailable",
                      "title": "Service unavailable.",
                      "status": 503
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Gateway timeout.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:gatewayTimeout",
                      "title": "Gateway timeout.",
                      "status": 504
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants/%7BmerchantId%7D \\\n  --header 'content-type: application/json' \\\n  --header 'context-tenantId: SOME_STRING_VALUE' \\\n  --data '{\"name\":\"string\",\"status\":\"string\",\"address\":{\"line1\":\"string\",\"town\":\"string\",\"county\":\"string\",\"postcode\":\"string\",\"country\":\"string\",\"line2\":\"string\",\"line3\":\"string\",\"line4\":\"string\",\"line5\":\"string\"},\"vatNumber\":\"string\",\"primaryContact\":{\"fullName\":\"string\",\"telephone\":\"string\",\"email\":\"string\",\"remittanceEmail\":\"string\"},\"alternativeContacts\":[{\"type\":\"string\",\"fullName\":\"string\",\"telephone\":\"string\",\"email\":\"string\"}],\"retailer\":{\"tradingName\":\"string\",\"description\":\"string\",\"customerFacingName\":\"string\",\"brandLogoUrl\":\"string\",\"websiteUrl\":\"string\",\"retailerChannel\":\"string\"},\"bankDetails\":{\"name\":\"string\",\"branch\":\"string\",\"accountName\":\"string\",\"sortCode\":\"string\",\"accountNumber\":\"string\"},\"fcaNumber\":\"string\",\"companyRegistrationNumber\":\"string\",\"categoryCode\":\"string\",\"industryType\":\"string\",\"averageTransactionValue\":{\"value\":50,\"currencyCode\":\"GBP\"},\"brokerageStatus\":\"string\",\"groupId\":\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\",\"contractStartDate\":\"2019-08-24T14:15:22Z\",\"contractEndDate\":\"2019-08-24T14:15:22Z\",\"vatApplicable\":true,\"externalCrmReference\":\"string\",\"externalMerchantReference\":\"string\",\"marketingSource\":\"string\",\"thirdPartyDetails\":{\"legalEntityName\":\"string\",\"companyRegistrationNumber\":\"string\",\"address\":{\"line1\":\"string\",\"town\":\"string\",\"county\":\"string\",\"postcode\":\"string\",\"country\":\"string\",\"line2\":\"string\",\"line3\":\"string\",\"line4\":\"string\",\"line5\":\"string\"}},\"signature\":\"string\",\"upfrontPaymentEnabled\":true}'"
          },
          {
            "lang": "Csharp + Restsharp",
            "source": "var client = new RestClient(\"https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants/%7BmerchantId%7D\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"context-tenantId\", \"SOME_STRING_VALUE\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddParameter(\"application/json\", \"{\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"string\\\",\\\"address\\\":{\\\"line1\\\":\\\"string\\\",\\\"town\\\":\\\"string\\\",\\\"county\\\":\\\"string\\\",\\\"postcode\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\",\\\"line2\\\":\\\"string\\\",\\\"line3\\\":\\\"string\\\",\\\"line4\\\":\\\"string\\\",\\\"line5\\\":\\\"string\\\"},\\\"vatNumber\\\":\\\"string\\\",\\\"primaryContact\\\":{\\\"fullName\\\":\\\"string\\\",\\\"telephone\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"remittanceEmail\\\":\\\"string\\\"},\\\"alternativeContacts\\\":[{\\\"type\\\":\\\"string\\\",\\\"fullName\\\":\\\"string\\\",\\\"telephone\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\"}],\\\"retailer\\\":{\\\"tradingName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"customerFacingName\\\":\\\"string\\\",\\\"brandLogoUrl\\\":\\\"string\\\",\\\"websiteUrl\\\":\\\"string\\\",\\\"retailerChannel\\\":\\\"string\\\"},\\\"bankDetails\\\":{\\\"name\\\":\\\"string\\\",\\\"branch\\\":\\\"string\\\",\\\"accountName\\\":\\\"string\\\",\\\"sortCode\\\":\\\"string\\\",\\\"accountNumber\\\":\\\"string\\\"},\\\"fcaNumber\\\":\\\"string\\\",\\\"companyRegistrationNumber\\\":\\\"string\\\",\\\"categoryCode\\\":\\\"string\\\",\\\"industryType\\\":\\\"string\\\",\\\"averageTransactionValue\\\":{\\\"value\\\":50,\\\"currencyCode\\\":\\\"GBP\\\"},\\\"brokerageStatus\\\":\\\"string\\\",\\\"groupId\\\":\\\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\\\",\\\"contractStartDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"contractEndDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"vatApplicable\\\":true,\\\"externalCrmReference\\\":\\\"string\\\",\\\"externalMerchantReference\\\":\\\"string\\\",\\\"marketingSource\\\":\\\"string\\\",\\\"thirdPartyDetails\\\":{\\\"legalEntityName\\\":\\\"string\\\",\\\"companyRegistrationNumber\\\":\\\"string\\\",\\\"address\\\":{\\\"line1\\\":\\\"string\\\",\\\"town\\\":\\\"string\\\",\\\"county\\\":\\\"string\\\",\\\"postcode\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\",\\\"line2\\\":\\\"string\\\",\\\"line3\\\":\\\"string\\\",\\\"line4\\\":\\\"string\\\",\\\"line5\\\":\\\"string\\\"}},\\\"signature\\\":\\\"string\\\",\\\"upfrontPaymentEnabled\\\":true}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"name\": \"string\",\n  \"status\": \"string\",\n  \"address\": {\n    \"line1\": \"string\",\n    \"town\": \"string\",\n    \"county\": \"string\",\n    \"postcode\": \"string\",\n    \"country\": \"string\",\n    \"line2\": \"string\",\n    \"line3\": \"string\",\n    \"line4\": \"string\",\n    \"line5\": \"string\"\n  },\n  \"vatNumber\": \"string\",\n  \"primaryContact\": {\n    \"fullName\": \"string\",\n    \"telephone\": \"string\",\n    \"email\": \"string\",\n    \"remittanceEmail\": \"string\"\n  },\n  \"alternativeContacts\": [\n    {\n      \"type\": \"string\",\n      \"fullName\": \"string\",\n      \"telephone\": \"string\",\n      \"email\": \"string\"\n    }\n  ],\n  \"retailer\": {\n    \"tradingName\": \"string\",\n    \"description\": \"string\",\n    \"customerFacingName\": \"string\",\n    \"brandLogoUrl\": \"string\",\n    \"websiteUrl\": \"string\",\n    \"retailerChannel\": \"string\"\n  },\n  \"bankDetails\": {\n    \"name\": \"string\",\n    \"branch\": \"string\",\n    \"accountName\": \"string\",\n    \"sortCode\": \"string\",\n    \"accountNumber\": \"string\"\n  },\n  \"fcaNumber\": \"string\",\n  \"companyRegistrationNumber\": \"string\",\n  \"categoryCode\": \"string\",\n  \"industryType\": \"string\",\n  \"averageTransactionValue\": {\n    \"value\": 50,\n    \"currencyCode\": \"GBP\"\n  },\n  \"brokerageStatus\": \"string\",\n  \"groupId\": \"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\",\n  \"contractStartDate\": \"2019-08-24T14:15:22Z\",\n  \"contractEndDate\": \"2019-08-24T14:15:22Z\",\n  \"vatApplicable\": true,\n  \"externalCrmReference\": \"string\",\n  \"externalMerchantReference\": \"string\",\n  \"marketingSource\": \"string\",\n  \"thirdPartyDetails\": {\n    \"legalEntityName\": \"string\",\n    \"companyRegistrationNumber\": \"string\",\n    \"address\": {\n      \"line1\": \"string\",\n      \"town\": \"string\",\n      \"county\": \"string\",\n      \"postcode\": \"string\",\n      \"country\": \"string\",\n      \"line2\": \"string\",\n      \"line3\": \"string\",\n      \"line4\": \"string\",\n      \"line5\": \"string\"\n    }\n  },\n  \"signature\": \"string\",\n  \"upfrontPaymentEnabled\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants/%7BmerchantId%7D\");\nxhr.setRequestHeader(\"context-tenantId\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants/%7BmerchantId%7D',\n  headers: {'context-tenantId': 'SOME_STRING_VALUE', 'content-type': 'application/json'},\n  body: {\n    name: 'string',\n    status: 'string',\n    address: {\n      line1: 'string',\n      town: 'string',\n      county: 'string',\n      postcode: 'string',\n      country: 'string',\n      line2: 'string',\n      line3: 'string',\n      line4: 'string',\n      line5: 'string'\n    },\n    vatNumber: 'string',\n    primaryContact: {\n      fullName: 'string',\n      telephone: 'string',\n      email: 'string',\n      remittanceEmail: 'string'\n    },\n    alternativeContacts: [{type: 'string', fullName: 'string', telephone: 'string', email: 'string'}],\n    retailer: {\n      tradingName: 'string',\n      description: 'string',\n      customerFacingName: 'string',\n      brandLogoUrl: 'string',\n      websiteUrl: 'string',\n      retailerChannel: 'string'\n    },\n    bankDetails: {\n      name: 'string',\n      branch: 'string',\n      accountName: 'string',\n      sortCode: 'string',\n      accountNumber: 'string'\n    },\n    fcaNumber: 'string',\n    companyRegistrationNumber: 'string',\n    categoryCode: 'string',\n    industryType: 'string',\n    averageTransactionValue: {value: 50, currencyCode: 'GBP'},\n    brokerageStatus: 'string',\n    groupId: 'eb54e96e-21b8-4f54-9cd4-80fccbd06f55',\n    contractStartDate: '2019-08-24T14:15:22Z',\n    contractEndDate: '2019-08-24T14:15:22Z',\n    vatApplicable: true,\n    externalCrmReference: 'string',\n    externalMerchantReference: 'string',\n    marketingSource: 'string',\n    thirdPartyDetails: {\n      legalEntityName: 'string',\n      companyRegistrationNumber: 'string',\n      address: {\n        line1: 'string',\n        town: 'string',\n        county: 'string',\n        postcode: 'string',\n        country: 'string',\n        line2: 'string',\n        line3: 'string',\n        line4: 'string',\n        line5: 'string'\n      }\n    },\n    signature: 'string',\n    upfrontPaymentEnabled: true\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          }
        ]
      },
      "get": {
        "tags": [
          "Merchant"
        ],
        "summary": "Get a Merchant.",
        "description": "Retrieves a specific Merchant by id.",
        "operationId": "Retrieve Merchant",
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "description": "Identifier assigned to the Merchant.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "context-tenantId",
            "in": "header",
            "description": "Identifier assigned to the tenant.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Merchant detail",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantResponse"
                },
                "examples": {
                  "Example response": {
                    "value": {
                      "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                      "name": "MerchantName",
                      "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                      "status": "Active",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "Postcode",
                        "country": "Country",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      },
                      "vatNumber": "123",
                      "primaryContact": {
                        "fullName": "Test Contact",
                        "telephone": "0123456789",
                        "email": "test@test.com",
                        "remittanceEmail": "remittance@test.com"
                      },
                      "alternativeContacts": [
                        {
                          "type": "Finance",
                          "fullName": "Alternative Test Contact",
                          "telephone": "0987654321",
                          "email": "test-alternative@test.com"
                        }
                      ],
                      "retailer": {
                        "tradingName": "TradingName",
                        "description": "RetailerDescription",
                        "customerFacingName": "RetailerCustomerFacingName",
                        "brandLogoUrl": "http://test-url",
                        "websiteUrl": "http://test-url",
                        "retailerChannel": null
                      },
                      "bankDetails": null,
                      "fcaNumber": "123456",
                      "companyRegistrationNumber": "123",
                      "categoryCode": "12",
                      "industryType": "Industry Type",
                      "averageTransactionValue": {
                        "value": 100,
                        "currencyCode": "GBP"
                      },
                      "brokerageStatus": "Brokerage Type",
                      "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                      "contractStartDate": null,
                      "contractEndDate": null,
                      "vatApplicable": true,
                      "externalCrmReference": "External CRM Reference",
                      "externalMerchantReference": "External Merchant Reference",
                      "marketingSource": "Marketing Source",
                      "signature": null,
                      "thirdPartyDetails": {
                        "legalEntityName": "LegalEntityName",
                        "companyRegistrationNumber": "12345678",
                        "address": {
                          "line1": "Line1",
                          "town": "Town",
                          "county": "County",
                          "postcode": "N1C 4DA",
                          "country": "England",
                          "line2": null,
                          "line3": null,
                          "line4": null,
                          "line5": null
                        }
                      },
                      "upfrontPaymentEnabled": false
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantResponse"
                },
                "examples": {
                  "Example response": {
                    "value": {
                      "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                      "name": "MerchantName",
                      "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                      "status": "Active",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "Postcode",
                        "country": "Country",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      },
                      "vatNumber": "123",
                      "primaryContact": {
                        "fullName": "Test Contact",
                        "telephone": "0123456789",
                        "email": "test@test.com",
                        "remittanceEmail": "remittance@test.com"
                      },
                      "alternativeContacts": [
                        {
                          "type": "Finance",
                          "fullName": "Alternative Test Contact",
                          "telephone": "0987654321",
                          "email": "test-alternative@test.com"
                        }
                      ],
                      "retailer": {
                        "tradingName": "TradingName",
                        "description": "RetailerDescription",
                        "customerFacingName": "RetailerCustomerFacingName",
                        "brandLogoUrl": "http://test-url",
                        "websiteUrl": "http://test-url",
                        "retailerChannel": null
                      },
                      "bankDetails": null,
                      "fcaNumber": "123456",
                      "companyRegistrationNumber": "123",
                      "categoryCode": "12",
                      "industryType": "Industry Type",
                      "averageTransactionValue": {
                        "value": 100,
                        "currencyCode": "GBP"
                      },
                      "brokerageStatus": "Brokerage Type",
                      "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                      "contractStartDate": null,
                      "contractEndDate": null,
                      "vatApplicable": true,
                      "externalCrmReference": "External CRM Reference",
                      "externalMerchantReference": "External Merchant Reference",
                      "marketingSource": "Marketing Source",
                      "signature": null,
                      "thirdPartyDetails": {
                        "legalEntityName": "LegalEntityName",
                        "companyRegistrationNumber": "12345678",
                        "address": {
                          "line1": "Line1",
                          "town": "Town",
                          "county": "County",
                          "postcode": "N1C 4DA",
                          "country": "England",
                          "line2": null,
                          "line3": null,
                          "line4": null,
                          "line5": null
                        }
                      },
                      "upfrontPaymentEnabled": false
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantResponse"
                },
                "examples": {
                  "Example response": {
                    "value": {
                      "merchantId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                      "name": "MerchantName",
                      "organisationUnitId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                      "status": "Active",
                      "address": {
                        "line1": "Line1",
                        "town": "Town",
                        "county": "County",
                        "postcode": "Postcode",
                        "country": "Country",
                        "line2": null,
                        "line3": null,
                        "line4": null,
                        "line5": null
                      },
                      "vatNumber": "123",
                      "primaryContact": {
                        "fullName": "Test Contact",
                        "telephone": "0123456789",
                        "email": "test@test.com",
                        "remittanceEmail": "remittance@test.com"
                      },
                      "alternativeContacts": [
                        {
                          "type": "Finance",
                          "fullName": "Alternative Test Contact",
                          "telephone": "0987654321",
                          "email": "test-alternative@test.com"
                        }
                      ],
                      "retailer": {
                        "tradingName": "TradingName",
                        "description": "RetailerDescription",
                        "customerFacingName": "RetailerCustomerFacingName",
                        "brandLogoUrl": "http://test-url",
                        "websiteUrl": "http://test-url",
                        "retailerChannel": null
                      },
                      "bankDetails": null,
                      "fcaNumber": "123456",
                      "companyRegistrationNumber": "123",
                      "categoryCode": "12",
                      "industryType": "Industry Type",
                      "averageTransactionValue": {
                        "value": 100,
                        "currencyCode": "GBP"
                      },
                      "brokerageStatus": "Brokerage Type",
                      "groupId": "71b17112-4762-407b-aefb-374dd4fcdb64",
                      "contractStartDate": null,
                      "contractEndDate": null,
                      "vatApplicable": true,
                      "externalCrmReference": "External CRM Reference",
                      "externalMerchantReference": "External Merchant Reference",
                      "marketingSource": "Marketing Source",
                      "signature": null,
                      "thirdPartyDetails": {
                        "legalEntityName": "LegalEntityName",
                        "companyRegistrationNumber": "12345678",
                        "address": {
                          "line1": "Line1",
                          "town": "Town",
                          "county": "County",
                          "postcode": "N1C 4DA",
                          "country": "England",
                          "line2": null,
                          "line3": null,
                          "line4": null,
                          "line5": null
                        }
                      },
                      "upfrontPaymentEnabled": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorised.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:authenticationFailed",
                      "title": "Unauthorised.",
                      "status": 401
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:forbidden",
                      "title": "Forbidden.",
                      "status": 403
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The specified merchant was not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "Example ProblemDetails": {
                    "value": {
                      "errors": {
                        "Name too short": [
                          "Name too short"
                        ]
                      },
                      "type": "newday:tenancymanagement.merchant:error:name too short",
                      "title": "Name too short",
                      "detail": "Name too short"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "Example ProblemDetails": {
                    "value": {
                      "errors": {
                        "Name too short": [
                          "Name too short"
                        ]
                      },
                      "type": "newday:tenancymanagement.merchant:error:name too short",
                      "title": "Name too short",
                      "detail": "Name too short"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "Example ProblemDetails": {
                    "value": {
                      "errors": {
                        "Name too short": [
                          "Name too short"
                        ]
                      },
                      "type": "newday:tenancymanagement.merchant:error:name too short",
                      "title": "Name too short",
                      "detail": "Name too short"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The number of requests exceeded the maximum allowed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:tooManyRequests",
                      "title": "The number of requests exceeded the maximum allowed.",
                      "status": 429
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:error",
                      "title": "An internal server error occurred.",
                      "status": 500
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:badGateway",
                      "title": "Bad gateway.",
                      "status": 502
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:unavailable",
                      "title": "Service unavailable.",
                      "status": 503
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Gateway timeout.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "example": {
                    "value": {
                      "type": "stratus:merchant:error:gatewayTimeout",
                      "title": "Gateway timeout.",
                      "status": 504
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants/%7BmerchantId%7D \\\n  --header 'context-tenantId: SOME_STRING_VALUE'"
          },
          {
            "lang": "Csharp + Restsharp",
            "source": "var client = new RestClient(\"https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants/%7BmerchantId%7D\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"context-tenantId\", \"SOME_STRING_VALUE\");\nIRestResponse response = client.Execute(request);"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants/%7BmerchantId%7D\");\nxhr.setRequestHeader(\"context-tenantId\", \"SOME_STRING_VALUE\");\n\nxhr.send(data);"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://mtapi.stg-newdaytechnology.net/tms/merchant-service/merchants/%7BmerchantId%7D',\n  headers: {'context-tenantId': 'SOME_STRING_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "required": [
          "line1",
          "postcode",
          "town"
        ],
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "description": "Line 1 of the Company registered address."
          },
          "town": {
            "type": "string",
            "description": "Town of the Company registered address."
          },
          "county": {
            "type": "string",
            "description": "County of the Company registered address.",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "description": "Postcode of the Company registered address."
          },
          "country": {
            "type": "string",
            "description": "Country of the Company registered address.",
            "nullable": true
          },
          "line2": {
            "type": "string",
            "description": "Line 2 of the Company registered address.",
            "nullable": true
          },
          "line3": {
            "type": "string",
            "description": "Line 3 of the Company registered address.",
            "nullable": true
          },
          "line4": {
            "type": "string",
            "description": "Line 4 of the Company registered address.",
            "nullable": true
          },
          "line5": {
            "type": "string",
            "description": "Line 5 of the Company registered address.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Address of the Merchant"
      },
      "AlternativeMerchantContact": {
        "required": [
          "email",
          "fullName",
          "telephone",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of contact i.e. Financial, Compliance, Technical or Other."
          },
          "fullName": {
            "type": "string",
            "description": "Full name of the contact."
          },
          "telephone": {
            "type": "string",
            "description": "Phone number of the contact."
          },
          "email": {
            "type": "string",
            "description": "Email of the contact."
          }
        },
        "additionalProperties": false,
        "description": "Alternative contact of the Merchant"
      },
      "Amount": {
        "required": [
          "currencyCode",
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "number",
            "description": "The monetary amount",
            "format": "double",
            "example": 50
          },
          "currencyCode": {
            "type": "string",
            "description": "The three character ISO currency code for the amount",
            "example": "GBP"
          }
        },
        "additionalProperties": false
      },
      "Bank": {
        "required": [
          "accountName",
          "accountNumber",
          "sortCode"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Bank name",
            "nullable": true
          },
          "branch": {
            "type": "string",
            "description": "Branch name",
            "nullable": true
          },
          "accountName": {
            "type": "string",
            "description": "Company name as registered on the bank account."
          },
          "sortCode": {
            "type": "string",
            "description": "Sort code of the bank account."
          },
          "accountNumber": {
            "type": "string",
            "description": "Account number of the bank account."
          }
        },
        "additionalProperties": false,
        "description": "Bank details of the Merchant"
      },
      "CreateMerchantRequest": {
        "required": [
          "address",
          "averageTransactionValue",
          "companyRegistrationNumber",
          "contractStartDate",
          "industryType",
          "name",
          "primaryContact",
          "status"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Legal entity name of the company."
          },
          "organisationUnitId": {
            "type": "string",
            "description": "Organisational unit identifier assigned by NewTech.",
            "format": "uuid",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Merchant status, indicating whether it is i.e. Provisioned, Active, Suspended, Hold or Terminated."
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "vatNumber": {
            "type": "string",
            "description": "VAT registered number (required if vatApplicable is True).",
            "nullable": true
          },
          "primaryContact": {
            "$ref": "#/components/schemas/MerchantContact"
          },
          "alternativeContacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlternativeMerchantContact"
            },
            "description": "Optional list of alternative contacts of the Merchant.",
            "nullable": true
          },
          "retailer": {
            "$ref": "#/components/schemas/RetailerRequest"
          },
          "bankDetails": {
            "$ref": "#/components/schemas/Bank"
          },
          "fcaNumber": {
            "type": "string",
            "description": "FCA assigned unique reference for the company.",
            "nullable": true
          },
          "companyRegistrationNumber": {
            "type": "string",
            "description": "Companies House registration number."
          },
          "categoryCode": {
            "type": "string",
            "description": "Merchant category code for business classification based on the type of goods or services it provides.",
            "nullable": true
          },
          "industryType": {
            "type": "string",
            "description": "Description of Merchant category code."
          },
          "averageTransactionValue": {
            "$ref": "#/components/schemas/Amount"
          },
          "brokerageStatus": {
            "type": "string",
            "description": "Brokerage status of the business entity i.e. Direct or IAR or Direct pending.",
            "nullable": true
          },
          "groupId": {
            "type": "string",
            "description": "Unique parent reference to identify the group of retailers within the company hierarchy.",
            "format": "uuid",
            "nullable": true
          },
          "contractStartDate": {
            "type": "string",
            "description": "Date the contract commences.",
            "format": "date-time"
          },
          "contractEndDate": {
            "type": "string",
            "description": "Date the contract will terminate.",
            "format": "date-time",
            "nullable": true
          },
          "vatApplicable": {
            "type": "boolean",
            "description": "VAT applicability flag for the Merchant.",
            "nullable": true
          },
          "externalCrmReference": {
            "type": "string",
            "description": "Unique retailer reference ID supplied by the client.",
            "nullable": true
          },
          "externalMerchantReference": {
            "type": "string",
            "description": "Unique external Merchant reference ID.",
            "nullable": true
          },
          "marketingSource": {
            "type": "string",
            "description": "Marketing reference identifying the source origin of the Merchant.",
            "nullable": true
          },
          "signature": {
            "type": "string",
            "description": "Digital signature to check the integrity of the request (required if bankDetails are provided)",
            "nullable": true
          },
          "thirdPartyDetails": {
            "$ref": "#/components/schemas/ThirdPartyDetails"
          },
          "upfrontPaymentEnabled": {
            "type": "boolean",
            "description": "Indicates if upfront payment is enabled for the Merchant, defaults to False",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Model used when creating a new Merchant."
      },
      "CreateMerchantResponse": {
        "type": "object",
        "properties": {
          "merchantId": {
            "type": "string",
            "description": "Identifier assigned to the Merchant.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Model returned when a Merchant is created."
      },
      "GetAllMerchantsResponse": {
        "type": "object",
        "properties": {
          "merchants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MerchantResponse"
            }
          }
        },
        "additionalProperties": false
      },
      "MerchantContact": {
        "required": [
          "email",
          "fullName",
          "remittanceEmail",
          "telephone"
        ],
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string",
            "description": "Full name of the contact."
          },
          "telephone": {
            "type": "string",
            "description": "Phone number of the contact."
          },
          "email": {
            "type": "string",
            "description": "Email of the contact"
          },
          "remittanceEmail": {
            "type": "string",
            "description": "Remittance email for the Merchant account."
          }
        },
        "additionalProperties": false,
        "description": "The contact associated with the Merchant"
      },
      "MerchantResponse": {
        "type": "object",
        "properties": {
          "merchantId": {
            "type": "string",
            "description": "Id of the Merchant.",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Legal entity name of the company."
          },
          "organisationUnitId": {
            "type": "string",
            "description": "Organisational unit identifier assigned by NewTech.",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "Merchant status, indicating whether it is i.e. Provisioned, Active, Suspended, Hold or Terminated."
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "vatNumber": {
            "type": "string",
            "description": "VAT registered number (required if vatApplicable is True).",
            "nullable": true
          },
          "primaryContact": {
            "$ref": "#/components/schemas/MerchantContact"
          },
          "alternativeContacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlternativeMerchantContact"
            },
            "description": "Optional list of alternative contacts of the Merchant.",
            "nullable": true
          },
          "retailer": {
            "$ref": "#/components/schemas/Retailer"
          },
          "bankDetails": {
            "$ref": "#/components/schemas/Bank"
          },
          "fcaNumber": {
            "type": "string",
            "description": "FCA assigned unique reference for the company.",
            "nullable": true
          },
          "companyRegistrationNumber": {
            "type": "string",
            "description": "Companies House registration number.",
            "nullable": true
          },
          "categoryCode": {
            "type": "string",
            "description": "Merchant category code for business classification based on the type of goods or services it provides.",
            "nullable": true
          },
          "industryType": {
            "type": "string",
            "description": "Description of Merchant category code.",
            "nullable": true
          },
          "averageTransactionValue": {
            "$ref": "#/components/schemas/Amount"
          },
          "brokerageStatus": {
            "type": "string",
            "description": "Brokerage status of the business entity i.e. Direct or IAR or Direct pending.",
            "nullable": true
          },
          "groupId": {
            "type": "string",
            "description": "Unique parent reference to identify the group of retailers within the company hierarchy.",
            "nullable": true
          },
          "contractStartDate": {
            "type": "string",
            "description": "Date the contract commences.",
            "format": "date-time",
            "nullable": true
          },
          "contractEndDate": {
            "type": "string",
            "description": "Date the contract will terminate.",
            "format": "date-time",
            "nullable": true
          },
          "vatApplicable": {
            "type": "boolean",
            "description": "VAT applicability flag for the Merchant.",
            "nullable": true
          },
          "externalCrmReference": {
            "type": "string",
            "description": "External CRM reference.Unique retailer reference ID supplied by the client.",
            "nullable": true
          },
          "externalMerchantReference": {
            "type": "string",
            "description": "Unique external Merchant reference ID.",
            "nullable": true
          },
          "marketingSource": {
            "type": "string",
            "description": "Marketing reference identifying the source origin of the Merchant.",
            "nullable": true
          },
          "signature": {
            "type": "string",
            "description": "Digital signature to check the integrity of the request (required if bankDetails are provided)",
            "nullable": true
          },
          "thirdPartyDetails": {
            "$ref": "#/components/schemas/ThirdPartyDetails"
          },
          "upfrontPaymentEnabled": {
            "type": "boolean",
            "description": "Indicates if upfront payment is enabled for the Merchant."
          }
        },
        "additionalProperties": false,
        "description": "Model returned when returning all Merchants for an Organisational Unit."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "Retailer": {
        "required": [
          "description",
          "tradingName",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "tradingName": {
            "type": "string",
            "description": "Company's trading name (if different from Legal entity name)."
          },
          "description": {
            "type": "string",
            "description": "Brief description for business type categorisation."
          },
          "customerFacingName": {
            "type": "string",
            "description": "User friendly name for consumer communications (if different from tradingName).",
            "nullable": true
          },
          "brandLogoUrl": {
            "type": "string",
            "description": "URL where the company logo is hosted.",
            "nullable": true
          },
          "websiteUrl": {
            "type": "string",
            "description": "URL of the retailer website."
          },
          "retailerChannel": {
            "$ref": "#/components/schemas/RetailerChannel"
          }
        },
        "additionalProperties": false,
        "description": "Retailer details of the Merchant."
      },
      "RetailerChannel": {
        "enum": [
          "InStore",
          "Online"
        ],
        "type": "string",
        "description": "Channel identifier for a retailer."
      },
      "RetailerRequest": {
        "required": [
          "description",
          "tradingName",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "tradingName": {
            "type": "string",
            "description": "Company's trading name (if different from Legal entity name)."
          },
          "description": {
            "type": "string",
            "description": "Brief description for business type categorisation."
          },
          "customerFacingName": {
            "type": "string",
            "description": "User friendly name for consumer communications (if different from tradingName).",
            "nullable": true
          },
          "brandLogoUrl": {
            "type": "string",
            "description": "URL where the company logo is hosted.",
            "nullable": true
          },
          "websiteUrl": {
            "type": "string",
            "description": "URL of the retailer website."
          },
          "retailerChannel": {
            "type": "string",
            "description": "Channel identifier for the retailer. Accepted values (case-insensitive): 'inStore', 'online'.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Retailer details supplied in a create or update Merchant request."
      },
      "ThirdPartyDetails": {
        "required": [
          "address",
          "companyRegistrationNumber",
          "legalEntityName"
        ],
        "type": "object",
        "properties": {
          "legalEntityName": {
            "type": "string",
            "description": "Third Party Legal Entity name."
          },
          "companyRegistrationNumber": {
            "type": "string",
            "description": "Third Party Company Registration Number."
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          }
        },
        "additionalProperties": false,
        "description": "Third party details for the Merchant"
      },
      "UpdateMerchantRequest": {
        "required": [
          "address",
          "averageTransactionValue",
          "companyRegistrationNumber",
          "contractStartDate",
          "industryType",
          "name",
          "primaryContact",
          "status"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Legal entity name of the company."
          },
          "status": {
            "type": "string",
            "description": "Merchant status, indicating whether it is i.e. Provisioned, Active, Suspended, Hold or Terminated."
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "vatNumber": {
            "type": "string",
            "description": "VAT registered number (required if vatApplicable is True).",
            "nullable": true
          },
          "primaryContact": {
            "$ref": "#/components/schemas/MerchantContact"
          },
          "alternativeContacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlternativeMerchantContact"
            },
            "description": "Optional list of alternative contacts of the Merchant.",
            "nullable": true
          },
          "retailer": {
            "$ref": "#/components/schemas/RetailerRequest"
          },
          "bankDetails": {
            "$ref": "#/components/schemas/Bank"
          },
          "fcaNumber": {
            "type": "string",
            "description": "FCA assigned unique reference for the company.",
            "nullable": true
          },
          "companyRegistrationNumber": {
            "type": "string",
            "description": "Companies House registration number."
          },
          "categoryCode": {
            "type": "string",
            "description": "Merchant category code for business classification based on the type of goods or services it provides.",
            "nullable": true
          },
          "industryType": {
            "type": "string",
            "description": "Description of Merchant category code."
          },
          "averageTransactionValue": {
            "$ref": "#/components/schemas/Amount"
          },
          "brokerageStatus": {
            "type": "string",
            "description": "Brokerage status of the business entity i.e. Direct or IAR or Direct pending.",
            "nullable": true
          },
          "groupId": {
            "type": "string",
            "description": "Unique parent reference to identify the group of retailers within the company hierarchy.",
            "format": "uuid",
            "nullable": true
          },
          "contractStartDate": {
            "type": "string",
            "description": "Date the contract commences.",
            "format": "date-time"
          },
          "contractEndDate": {
            "type": "string",
            "description": "Date the contract will terminate.",
            "format": "date-time",
            "nullable": true
          },
          "vatApplicable": {
            "type": "boolean",
            "description": "VAT applicability flag for the Merchant.",
            "nullable": true
          },
          "externalCrmReference": {
            "type": "string",
            "description": "Unique retailer reference ID supplied by the client.",
            "nullable": true
          },
          "externalMerchantReference": {
            "type": "string",
            "description": "Unique external Merchant reference ID.",
            "nullable": true
          },
          "marketingSource": {
            "type": "string",
            "description": "Marketing reference identifying the source origin of the Merchant.",
            "nullable": true
          },
          "thirdPartyDetails": {
            "$ref": "#/components/schemas/ThirdPartyDetails"
          },
          "signature": {
            "type": "string",
            "description": "Digital signature to check the integrity of the request (required if bankDetails are provided)",
            "nullable": true
          },
          "upfrontPaymentEnabled": {
            "type": "boolean",
            "description": "Indicates if upfront payment is enabled for the Merchant, defaults to False",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Model used when updating an existing Merchant."
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "additionalProperties": {}
      }
    }
  },
  "tags": [
    {
      "name": "Merchant"
    }
  ],
  "x-pub-settings": {
    "pub-ready": true,
    "team": "",
    "tags": [
      "Merchant Configuration",
      "NewPay",
      "Retailers"
    ],
    "commitDate": 1777993829000
  }
}