商人
POST
https://api.forter-secure.com/merchants
Header Parameters
- api-versionstringrequiredExampleDescriptionDefault10.1
- x-forter-siteidstringrequiredExampleDescriptionDefault8b47c6d423ba
Body Parameters
- bodymerchantCreationRequestrequiredDescription
- defaultMerchantCategoryCodestringrequiredDescriptionDefault5655
- merchantAccountCreationobject
- MerchantAccountCreationFields
- ipstringDescriptionDefault10.0.0.128
- timestampnumberDescriptionDefault1415273179
- merchantIdstringrequiredDescriptionDefaulteh629dK9
- namestringrequiredDescriptionDefaultT-Shirts Express
Responses
200
- merchantCreationResponseDescription
- defaultMerchantCategoryCodestringrequiredDescriptionDefault5655
- idstringrequiredDescriptionDefaultaab42345bba2
- merchantAccountCreationobject
- MerchantAccountCreationFields
- ipstringDescriptionDefault10.0.0.128
- timestampnumberDescriptionDefault1415273179
- merchantIdstringrequiredDescriptionDefaulteh629dK9
- namestringrequiredDescriptionDefaultT-Shirts Express
400
401
404
500
curl
curl --request POST \
--url https://api.forter-secure.com/merchants \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'api-version: 10.1' \
--header 'x-forter-siteid: 8b47c6d423ba' \
--header 'authorization: Basic <base64-encoded-api-key:>' \
--data '{
"defaultMerchantCategoryCode": "5655",
"merchantAccountCreation": {
"ip": "10.0.0.128",
"timestamp": 1415273179
},
"merchantId": "eh629dK9",
"name": "T-Shirts Express"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("api-version", "10.1");
myHeaders.append("x-forter-siteid", "8b47c6d423ba");
myHeaders.append("authorization", "Basic <base64-encoded-api-key:>");
var raw = JSON.stringify({
"defaultMerchantCategoryCode": "5655",
"merchantAccountCreation": {
"ip": "10.0.0.128",
"timestamp": 1415273179
},
"merchantId": "eh629dK9",
"name": "T-Shirts Express"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.forter-secure.com/merchants", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.forter-secure.com/merchants")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["api-version"] = "10.1"
request["x-forter-siteid"] = "8b47c6d423ba"
request["authorization"] = "Basic <base64-encoded-api-key:>"
request.body = JSON.dump({
"defaultMerchantCategoryCode": "5655",
"merchantAccountCreation": {
"ip": "10.0.0.128",
"timestamp": 1415273179
},
"merchantId": "eh629dK9",
"name": "T-Shirts Express"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.forter-secure.com/merchants"
payload = json.dumps({
"defaultMerchantCategoryCode": "5655",
"merchantAccountCreation": {
"ip": "10.0.0.128",
"timestamp": 1415273179
},
"merchantId": "eh629dK9",
"name": "T-Shirts Express"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'api-version': '10.1',
'x-forter-siteid': '8b47c6d423ba',
'authorization': 'Basic <base64-encoded-api-key:>'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Example merchantCreationResponse
{
"defaultMerchantCategoryCode": "",
"id": "",
"merchantAccountCreation": {},
"merchantId": "",
"name": ""
}400
// Bad Request (Often missing a required parameter)
401
// Unauthorized (No valid API key provided)
404
// Not Found (The requested item doesn't exist)
500
// Server Error (Something went wrong on Forter's end)
Forterアカウント内に新しいマーチャントを作成します。レスポンスには、今後のリクエストのAPIヘッダーに含めるForterが割り当てたマーチャントサブサイトIDが含まれます。