const profileName = 'SiteMinder';
const params = new URLSearchParams({
pathSegments: 'SiteMinderCustID=CUST001',
saveCVV: 'true',
ref: 'booking-12345'
});
const response = await fetch(
`https://service.pcibooking.net/api/booker/${profileName}/reservation?${params}`,
{
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/xml'
},
body: '<ReservationRequest><HotelCode>HOTEL01</HotelCode></ReservationRequest>'
}
);
const tokenUri = response.headers.get('X-pciBooking-cardUri');
console.log('Token URI:', tokenUri);
const data = await response.text();
console.log('Sanitized response:', data);
import requests
profile_name = 'SiteMinder'
response = requests.post(
f'https://service.pcibooking.net/api/booker/{profile_name}/reservation',
params={
'pathSegments': 'SiteMinderCustID=CUST001',
'saveCVV': 'true',
'ref': 'booking-12345'
},
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/xml'
},
data='<ReservationRequest><HotelCode>HOTEL01</HotelCode></ReservationRequest>'
)
token_uri = response.headers.get('X-pciBooking-cardUri')
print('Token URI:', token_uri)
print('Sanitized response:', response.text)
The third-party response body is returned with card details replaced by token placeholders.
The X-pciBooking-cardUri header contains the new token URI.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Couldn't fetch a valid pciShield profile:: <profileName>",
"errorList": null
}
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Invalid target Uri::",
"errorList": null
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected Temp Session or One-Time Accesss Token",
"errorList": null
}
Server-Side Tokenization
Tokenize on Response Using Preset Profiles
Send a request to a third party through a pre-configured profile that tokenizes card data in the response and returns the sanitized result.
POST
/
api
/
booker
/
{ProfileName}
/
reservation
const profileName = 'SiteMinder';
const params = new URLSearchParams({
pathSegments: 'SiteMinderCustID=CUST001',
saveCVV: 'true',
ref: 'booking-12345'
});
const response = await fetch(
`https://service.pcibooking.net/api/booker/${profileName}/reservation?${params}`,
{
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/xml'
},
body: '<ReservationRequest><HotelCode>HOTEL01</HotelCode></ReservationRequest>'
}
);
const tokenUri = response.headers.get('X-pciBooking-cardUri');
console.log('Token URI:', tokenUri);
const data = await response.text();
console.log('Sanitized response:', data);
import requests
profile_name = 'SiteMinder'
response = requests.post(
f'https://service.pcibooking.net/api/booker/{profile_name}/reservation',
params={
'pathSegments': 'SiteMinderCustID=CUST001',
'saveCVV': 'true',
'ref': 'booking-12345'
},
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/xml'
},
data='<ReservationRequest><HotelCode>HOTEL01</HotelCode></ReservationRequest>'
)
token_uri = response.headers.get('X-pciBooking-cardUri')
print('Token URI:', token_uri)
print('Sanitized response:', response.text)
The third-party response body is returned with card details replaced by token placeholders.
The X-pciBooking-cardUri header contains the new token URI.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Couldn't fetch a valid pciShield profile:: <profileName>",
"errorList": null
}
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Invalid target Uri::",
"errorList": null
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected Temp Session or One-Time Accesss Token",
"errorList": null
}
Universal Tokenization Guide
Tokenize cards from any source using preset profiles
| Header | Description |
|---|---|
X-pciBooking-cardUri | Semicolon-separated list of token URIs for each card tokenized. The header name can be customized per profile. |
X-pciBooking-Tokenization-Errors | Errors encountered during tokenization (e.g. invalid card number, missing fields). Present only if errors occurred. |
X-pciBooking-Tokenization-Warnings | Warnings encountered during tokenization (e.g. expired card accepted). Present only if warnings occurred. |
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
-1003 | 401 | Authorization token is missing or invalid (requires Access Token or Session Token). |
-1003 | 401 | User does not have CanTokenize permission. |
-125 | 400 | The specified profile name was not found. |
-150 | 500 | Failed to retrieve the profile configuration (internal error). |
Error detail
Each condition below gives the exactmoreInfo text, why it happens and how to resolve it. The full set is on the Error Handling page.
-125 Bad input data - profile not found
-125 Bad input data - profile not found
HTTP status: The first is returned by token replacement in a request (See also: Content Filters, Target Profiles
400message: Bad input datamoreInfo: the wording depends on which endpoint you called:Couldn't fetch a valid screening profile:: <profileName>
Couldn't fetch a valid pciShield profile:: <profileName>
paycard/relay). The second is returned by tokenization on response (paycard/capture). They mean the same thing.Reason. The profileName you passed could not be resolved for the account making the request. In almost every case the profile does exist, but on a different account than the one your credentials belong to. A misspelled profile name produces the same error.How to resolve.A PCI Shield profile belongs to the account, not to the sub-user that calls the API. When a sub-user makes a request, the profile is looked up against that sub-user’s parent account. A profile configured on one account is never visible to a sub-user of a different account, and sandbox and production accounts are separate.To check which profiles your credential can see:- Identify the parent account of the sub-user whose credentials you are using.
- Sign in to the PCI Booking portal as that account and open PCI Shield Settings > PCI Shield Profile Settings.
- Confirm the profile name appears there, spelled exactly as you send it. Profile names are matched exactly.
- If the profile is listed under a different account, switch your request to a sub-user of that account rather than copying the profile.
There is no API endpoint that lists the profiles on your own account.
GET /api/booker returns the platform-wide preset tokenization profiles, which are a different set. Your own profiles are visible in the portal only.-125 Bad input data - card data could not be substituted
-125 Bad input data - card data could not be substituted
HTTP status: Reason. The body parsed, but the profile’s selectors did not match anything in it, so no card data was substituted. The request was not relayed. This is a mismatch between the profile and the payload, not a problem with the token.How to resolve.
400message: Bad input datamoreInfo:Replacement of content failed
Could not apply token replacement onto content
- Compare the profile’s selectors against the exact payload you sent. A selector that assumes a different nesting depth or element name matches nothing.
- Check the namespaces. For XML and SOAP, a selector written without namespace handling will not match a namespaced document.
- Confirm the body is the format the profile was written for. A profile written for XML will not match a JSON body.
- Test the profile against a saved copy of a real request before using it in production.
Parameter Constraints
- ProfileName: Must match an existing profile name (see Get Tokenization Profiles).
- pathSegments: Required if the profile’s target URL has dynamic path segments. Provide key-value pairs in query string format.
- eliminateCardDuplication: When
true, a200status indicates the card already existed;201means a new token was created.
Parameters
Authentication
This is a browser-facing endpoint. Use one of the authentication methods below instead of the API key shown above.
string
Recommended. A long-lived token for browser-side calls. How to generate.
string
Alternative. Valid for 5 minutes. How to generate.
Path Parameters
string
required
The name of the profile as returned from the Get Tokenization Profiles method.
Query String
string
Dynamic path segments to append to the profile’s target URL. Some third-party endpoints include dynamic values in the URL path (e.g.
https://ws.mydomain.com/{customerName}). The Get Tokenization Profiles response lists the required path segments for each profile.string
Query string parameters to append to the profile’s target URL. Some third-party endpoints require additional parameters (e.g.
?param1=value1¶m2=value2). Provide the full query string as needed.boolean
default:"false"
Whether to save the CVV in the database.
true: save the CVV. false: discard the CVV.string
A reference value which can be used to query for this card token.
string
The user ID of the property to associate the token with. Found under “Property settings” in the user’s site.
boolean
default:"false"
Controls whether PCI Booking checks if the card already exists as a token in your account. A duplicate is a card with the same card number and expiration date as an existing token in your account; differences in cardholder name or CVV do not matter.
true: PCI Booking looks up the card in your stored tokens. If a match is found, the existing token URI is returned instead of creating a new one. The response status will be200instead of201.false(default): A new token is always created, even if the same card was previously stored.
Request Body
The request body and headers are passed through to the third party as-is. Include any body content and headers that the third party requires.
const profileName = 'SiteMinder';
const params = new URLSearchParams({
pathSegments: 'SiteMinderCustID=CUST001',
saveCVV: 'true',
ref: 'booking-12345'
});
const response = await fetch(
`https://service.pcibooking.net/api/booker/${profileName}/reservation?${params}`,
{
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/xml'
},
body: '<ReservationRequest><HotelCode>HOTEL01</HotelCode></ReservationRequest>'
}
);
const tokenUri = response.headers.get('X-pciBooking-cardUri');
console.log('Token URI:', tokenUri);
const data = await response.text();
console.log('Sanitized response:', data);
import requests
profile_name = 'SiteMinder'
response = requests.post(
f'https://service.pcibooking.net/api/booker/{profile_name}/reservation',
params={
'pathSegments': 'SiteMinderCustID=CUST001',
'saveCVV': 'true',
'ref': 'booking-12345'
},
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/xml'
},
data='<ReservationRequest><HotelCode>HOTEL01</HotelCode></ReservationRequest>'
)
token_uri = response.headers.get('X-pciBooking-cardUri')
print('Token URI:', token_uri)
print('Sanitized response:', response.text)
Response
200 - The card already exists in your account (wheneliminateCardDuplication is true). The response body contains the third-party response with card details masked. The existing token URI is returned in the X-pciBooking-cardUri header.
201 - A new card was tokenized. The response body contains the third-party response with card details masked. The new token URI is returned in the X-pciBooking-cardUri header.
Remember to set the CVV Retention Policy on the token.
The third-party response body is returned with card details replaced by token placeholders.
The X-pciBooking-cardUri header contains the new token URI.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Couldn't fetch a valid pciShield profile:: <profileName>",
"errorList": null
}
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Invalid target Uri::",
"errorList": null
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected Temp Session or One-Time Accesss Token",
"errorList": null
}

