const response = await fetch(
'https://service.pcibooking.net/api/ftps/ftps.gateway.com:21/uploads/batch/PCIBTST.xml?filter=GBT',
{
method: 'PUT',
headers: {
'Authorization': 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=',
'X-PciBooking-carduri': '555fd7b49f134b42a5dbe4d576b2e527,1d12f1d2b51f489f811d4f4176fde5f2[2]',
'Content-Type': 'text/plain'
},
body: fileContent // the file to upload, in the format named by the filter parameter
}
);
console.log(response.status);
import requests
response = requests.put(
'https://service.pcibooking.net/api/ftps/ftps.gateway.com:21/uploads/batch/PCIBTST.xml',
params={'filter': 'GBT'},
headers={
'Authorization': 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=',
'X-PciBooking-carduri': '555fd7b49f134b42a5dbe4d576b2e527,1d12f1d2b51f489f811d4f4176fde5f2[2]',
'Content-Type': 'text/plain'
},
data=file_content # the file to upload, in the format named by the filter parameter
)
print(response.status_code)
File uploaded successfully. No content returned.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "...",
"errorList": null
}
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.
Token Replacement
Token Replacement to FTPS
Replace card tokens in a document and upload the result to an FTPS server.
PUT
/
api
/
ftps
/
{serverAddress}
/
{folderPath}
/
{fileName}
const response = await fetch(
'https://service.pcibooking.net/api/ftps/ftps.gateway.com:21/uploads/batch/PCIBTST.xml?filter=GBT',
{
method: 'PUT',
headers: {
'Authorization': 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=',
'X-PciBooking-carduri': '555fd7b49f134b42a5dbe4d576b2e527,1d12f1d2b51f489f811d4f4176fde5f2[2]',
'Content-Type': 'text/plain'
},
body: fileContent // the file to upload, in the format named by the filter parameter
}
);
console.log(response.status);
import requests
response = requests.put(
'https://service.pcibooking.net/api/ftps/ftps.gateway.com:21/uploads/batch/PCIBTST.xml',
params={'filter': 'GBT'},
headers={
'Authorization': 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=',
'X-PciBooking-carduri': '555fd7b49f134b42a5dbe4d576b2e527,1d12f1d2b51f489f811d4f4176fde5f2[2]',
'Content-Type': 'text/plain'
},
data=file_content # the file to upload, in the format named by the filter parameter
)
print(response.status_code)
File uploaded successfully. No content returned.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "...",
"errorList": null
}
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.
File Transfer Token Replacement Guide
Replace tokens with card data in FTPS file transfers
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
| none | 401 | Authorization token is missing or invalid. The response body is empty. |
-125 | 400 | Invalid host format (e.g. multiple colons in the server address). |
-125 | 400 | Invalid or missing Basic Auth credentials in the Authorization header. |
-125 | 400 | The requested filter name is not recognized. |
-125 | 400 | Token replacement could not be applied to the file content. |
-1003 | 401 | FTPS login failed (invalid server credentials). |
-160 | 404 | File upload failed on the remote server. |
Parameter Constraints
- serverAddress: Format is
hostnameorhostname:port. Only one colon is allowed. Without a port, PCI Booking connects on port 22. Most FTPS servers listen on port 21, so you will usually add:21. - filter: Must be one of:
GBT,SIMPLECSV,SIMPLEJSON,AIR,IUR,TADC,CSV. Case-insensitive. - Authorization header: Must contain valid Basic Auth credentials (
username:password) for the FTPS server.
Parameters
Authentication
Access token or session token. This endpoint does not accept the API key. Generate a token with your API key and pass it as a query parameter. Send one of the two.string
Generated on your side. Single use, and valid for up to 72 hours. How to generate.
string
Returned by an API call. Valid for 5 minutes, and can be used more than once within that time. How to generate.
Path Parameters
string
required
The FTPS server address: an IP address or domain name, optionally followed by a colon and the port. For example:
ftps.gateway.com:21 or 10.200.1.10:21. PCI Booking connects with explicit TLS; implicit TLS (port 990) is not supported.string
required
The folder path where the file should be uploaded to. This can be an individual folder or a full path.
string
required
The file name for the content being uploaded, including extension. For example:
PCIBTST.xml.Query String
string
required
Indicates the format of the file being sent. Read more on Supported Formats.
string
The timeout, in seconds, for the FTPS server to respond.
Headers
string
required
Comma-separated token values to insert into the file. Tokens should be listed in the order of their appearance. For tokens appearing multiple times, include the number of occurrences in square brackets. Full token URIs or bare 32-character token IDs are both accepted. If fewer tokens are listed than there are card locations in the file, the last token is repeated for all remaining locations.
string
required
The authorization parameter used to authenticate to the FTPS server.
string
Supported compression formats:
gzip and deflate. Omit this header if no compression is needed.Request Body
The request body contains the raw file content as text, in the format named by thefilter parameter. The preset filter determines where card data belongs in that format; PCI Booking inserts the card details of the tokens listed in X-PciBooking-carduri, in order, then uploads the result to the FTPS server.
const response = await fetch(
'https://service.pcibooking.net/api/ftps/ftps.gateway.com:21/uploads/batch/PCIBTST.xml?filter=GBT',
{
method: 'PUT',
headers: {
'Authorization': 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=',
'X-PciBooking-carduri': '555fd7b49f134b42a5dbe4d576b2e527,1d12f1d2b51f489f811d4f4176fde5f2[2]',
'Content-Type': 'text/plain'
},
body: fileContent // the file to upload, in the format named by the filter parameter
}
);
console.log(response.status);
import requests
response = requests.put(
'https://service.pcibooking.net/api/ftps/ftps.gateway.com:21/uploads/batch/PCIBTST.xml',
params={'filter': 'GBT'},
headers={
'Authorization': 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=',
'X-PciBooking-carduri': '555fd7b49f134b42a5dbe4d576b2e527,1d12f1d2b51f489f811d4f4176fde5f2[2]',
'Content-Type': 'text/plain'
},
data=file_content # the file to upload, in the format named by the filter parameter
)
print(response.status_code)
Response
File uploaded successfully. No content returned.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "...",
"errorList": null
}
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.

