Validate API Model
/ValidateAPIModel
import requests
import json
url = “https://stageapi.cfsemoney.com/v1/ValidateAPIModel“
payload = json.dumps({
“requestBody”: {<<payload of API>>},
“apiName”: <<API NAME>>
})
headers = {
‘x-api-key’: ‘<<API KEY>>’,
‘Authorization’: ‘Bearer <<TOKEN VALUE>>’,
‘Content-Type’: ‘application/json’
}
response = requests.request(“POST”, url, headers=headers, data=payload)
print(response.text)
curl –location ‘https://stageapi.cfsemoney.com/v1/ValidateAPIModel‘ \
–header ‘<<API KEY>>’ \
–header ‘Authorization: Bearer <<TOKEN VALUE>>’ \
–header ‘Content-Type: application/json’ \
–data ‘{
“requestBody”: {<<REQUEST BODY>>},
“apiName”:”<<API NAME>>”
}’
{
“requestBody”: {
“companyName”: “API Out payload”,
“companyEmail”: “m8qZ4t47####@mailinator.com”,
“tradingName”: “xxxxx”,
“tinNumber”: “1234567890”,
“regNumber”: “1234567890”,
“phoneNumber”: “+448090392325”,
“country”: “United Kingdom”,
“companyUrl”: “http://www.company.com”,
“whiteLabel”: “v2wallet.zippcard.net”,
“entityType”: “corporate”
},
“apiName”:”CreateCorporateEntity”
}
{
“statusCode”: 200,
“body”: “{\”status\”: true, \”message\”: \”Request is valid.\”}”
}
{
“statusCode”: 400,
“body”: “{\”message\”: \”xxx”}”
}