Definition: PATCH /v1/merchantsites/{id}
Where:
- {id} – GlobalPay Website ID
You can change the attributes of an already created Merchant Site by applying a PATCH, using the SiteId API Key.
Request:
PATCH https://paytest.smart2pay.com/v1/merchantsites/43078
Authorization: Basic NDMwNzg6YWFxb3NTd2lrd2R1SzJsNzJQQUdNYThrYUxxSHVCM2hIMzkvRUNjcWFENWhXNjlhU1g=
{
"MerchantSite": {
"URL": "http://www.testupdate.com",
"Active": true,
"NotificationURL": "http://www.test.com/notifications_update.node",
"IPList": "82.208.151.136",
"Alias": "Test website_1 update",
"Details": {
"Name": "Stichting Smart2Pay update",
"Country": "PL",
"City": "Warsaw update",
"Email": "test@test.com",
"Address": "BRINK 27C update",
"BankName": "ING",
"AccountIBAN": "PL641050008610000023537933350",
"AccountSWIFT": "1000002353794650",
"BankSWIFTID": "ABNDDEFFXXX",
"BankCode": "BTRLRO22",
"VATNumber": "34206701",
"RegistrationNumber": "NL 813236460B01",
"MCC": 7995,
"MainBusiness": "gaming"
}
}
}
{"MerchantSite":{"hint":"MerchantSite structure","regexp":"","type":"object","ID":{"hint":"GlobalPay website ID, a unique number that identifies the website in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"MerchantID":{"hint":"ID of merchant that owns the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the site was created.","regexp":"","type":"datetime"},"URL":{"hint":"The URL of the website","regexp":"^(http?s?:\\\/\\\/)?(www)?(([0-9a-zA-Z]+)([\\-_])*)+(\\.([\\-_0-9a-zA-Z]+)(\\\/)*)+(([\\\/?#\\?&=\\-_0-9a-zA-Z])\\.?)*$","type":"string"},"Active":{"hint":"A flag showing if the website is active or not, defaults to false if not sent.","regexp":"","type":"bool"},"NotificationURL":{"hint":"An URL where GlobalPay sends notifications when a transaction changes its status. HTTPS must be used!","regexp":"^(http?s?:\\\/\\\/)?(www)?(([0-9a-zA-Z]+)([\\-_])*)+(\\.([\\-_0-9a-zA-Z]+)(\\\/)*)+(([\\\/?#\\?&=\\-_0-9a-zA-Z])\\.?)*$","type":"string"},"Alias":{"hint":"Site alias, an alternative name that identifies the website in the GlobalPay system.","regexp":"^.{1,255}$","type":"string"},"ApiKey":{"hint":"The API key used to authenticate the requests to the REST API.","regexp":"^.+$","type":"string"},"IPList":{"hint":"A list of IPs that will be allowed to perform requests towards GlobalPay.\r\nAccepts single IPs, ranges and\/or CIDR notation.","regexp":"^(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3},?)?|^(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\\/\\d{1,2},?)?|^((\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})-(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}),?)?$","type":"string"},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"object","Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}},"Name":{"hint":"The name of the site","regexp":"^.{1,50}$","type":"string"},"Country":{"hint":"The country of the website. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^[a-zA-Z]{2}$","type":"string"},"City":{"hint":"City name","regexp":"^.{1,50}$","type":"string"},"Email":{"hint":"Site contact email address","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"Address":{"hint":"Site contact address","regexp":"^.{1,512}$","type":"string"},"BankName":{"hint":"The name of the Bank","regexp":"^.{1,50}$","type":"string"},"AccountIBAN":{"hint":"Site account IBAN","regexp":"^[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}$","type":"string"},"AccountSWIFT":{"hint":"Site account SWIFT","regexp":"^\\w{1,30}$","type":"string"},"BankSWIFTID":{"hint":"Swift ID, a unique identification code for a particular bank.","regexp":"^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$","type":"string"},"BankCode":{"hint":"Site\u2019s bank code. Also known as BIC or Swift_BIC. Bank Identifier Code (BIC), a unique identification code for a particular bank (consists of 8-11 alphanumeric characters).","regexp":"^[a-zA-Z]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[XXX0-9]{0,3}","type":"string"},"VATNumber":{"hint":"Site VAT number","regexp":"^.{1,50}$","type":"string"},"RegistrationNumber":{"hint":"Site registration number","regexp":"^.{1,50}$","type":"string"},"MCC":{"hint":"Merchant Category Code (MCC), a four-digit number listed in ISO 18245 for retail financial services, used to classify the business by the type of goods or services it provides.","regexp":"^[0-9]{1,10}$","type":"string"},"MainBusiness":{"hint":"Site company main business","regexp":"^.{1,100}$","type":"string"}}}}
Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"MerchantSite": {
"MerchantID": 1045,
"ID": 43078,
"Created": "20180104161226",
"URL": "http://www.testupdate.com",
"Active": true,
"NotificationURL": "http://www.test.com/notifications.node",
"ApiKey": "aaqosSwikwduK2l72PAGMa8kaLqHuB3hH39/ECcqaD5hW69aSX",
"Alias": "Test website_1 update",
"IPList": "82.208.151.136",
"Details": {
"Reasons": null,
"Name": "Stichting Smart2Pay",
"Country": "PL",
"City": "Warsaw",
"Email": "test@test.com",
"Address": "BRINK 27C",
"BankName": "ING",
"AccountIBAN": "PL641050008610000023537933350",
"AccountSWIFT": "1000002353794650",
"BankSWIFTID": "ABNDDEFFXXX",
"BankCode": "BTRLRO22",
"VATNumber": "34206701",
"RegistrationNumber": "NL 813236460B01",
"MCC": "7995",
"MainBusiness": "gaming"
}
}
}
{"MerchantSite":{"hint":"MerchantSite structure","regexp":"","type":"object","ID":{"hint":"GlobalPay website ID, a unique number that identifies the website in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"MerchantID":{"hint":"ID of merchant that owns the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the site was created.","regexp":"","type":"datetime"},"URL":{"hint":"The URL of the website","regexp":"^(http?s?:\\\/\\\/)?(www)?(([0-9a-zA-Z]+)([\\-_])*)+(\\.([\\-_0-9a-zA-Z]+)(\\\/)*)+(([\\\/?#\\?&=\\-_0-9a-zA-Z])\\.?)*$","type":"string"},"Active":{"hint":"A flag showing if the website is active or not, defaults to false if not sent.","regexp":"","type":"bool"},"NotificationURL":{"hint":"An URL where GlobalPay sends notifications when a transaction changes its status. HTTPS must be used!","regexp":"^(http?s?:\\\/\\\/)?(www)?(([0-9a-zA-Z]+)([\\-_])*)+(\\.([\\-_0-9a-zA-Z]+)(\\\/)*)+(([\\\/?#\\?&=\\-_0-9a-zA-Z])\\.?)*$","type":"string"},"Alias":{"hint":"Site alias, an alternative name that identifies the website in the GlobalPay system.","regexp":"^.{1,255}$","type":"string"},"ApiKey":{"hint":"The API key used to authenticate the requests to the REST API.","regexp":"^.+$","type":"string"},"IPList":{"hint":"A list of IPs that will be allowed to perform requests towards GlobalPay.\r\nAccepts single IPs, ranges and\/or CIDR notation.","regexp":"^(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3},?)?|^(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\\/\\d{1,2},?)?|^((\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})-(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}),?)?$","type":"string"},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"object","Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}},"Name":{"hint":"The name of the site","regexp":"^.{1,50}$","type":"string"},"Country":{"hint":"The country of the website. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^[a-zA-Z]{2}$","type":"string"},"City":{"hint":"City name","regexp":"^.{1,50}$","type":"string"},"Email":{"hint":"Site contact email address","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"Address":{"hint":"Site contact address","regexp":"^.{1,512}$","type":"string"},"BankName":{"hint":"The name of the Bank","regexp":"^.{1,50}$","type":"string"},"AccountIBAN":{"hint":"Site account IBAN","regexp":"^[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}$","type":"string"},"AccountSWIFT":{"hint":"Site account SWIFT","regexp":"^\\w{1,30}$","type":"string"},"BankSWIFTID":{"hint":"Swift ID, a unique identification code for a particular bank.","regexp":"^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$","type":"string"},"BankCode":{"hint":"Site\u2019s bank code. Also known as BIC or Swift_BIC. Bank Identifier Code (BIC), a unique identification code for a particular bank (consists of 8-11 alphanumeric characters).","regexp":"^[a-zA-Z]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[XXX0-9]{0,3}","type":"string"},"VATNumber":{"hint":"Site VAT number","regexp":"^.{1,50}$","type":"string"},"RegistrationNumber":{"hint":"Site registration number","regexp":"^.{1,50}$","type":"string"},"MCC":{"hint":"Merchant Category Code (MCC), a four-digit number listed in ISO 18245 for retail financial services, used to classify the business by the type of goods or services it provides.","regexp":"^[0-9]{1,10}$","type":"string"},"MainBusiness":{"hint":"Site company main business","regexp":"^.{1,100}$","type":"string"}}}}