{
"name": "Fetch reservations",
"description": "Get all reservations",
"httpMethods": [
"POST",
"PATCH"
],
"publicUrl": "/v1/reservations",
"anyOf": {
"proxyUrl": "https://merchant.com/v2/reservations",
"trustedDestinationHosts": [
"stripe.com",
"example.com"
]
},
"rules": [
{
"action": "tokenization",
"config": {
"targetRecordType": "networkToken",
"targetContentType": "xml",
"fields": {
"cardNumber": {
"fieldSelector": "<string>",
"aliasFormat": "uuid",
"storagePolicy": "permanent",
"fieldRegex": "<unknown>",
"displayFormat": "last4",
"replacementFormat": "replaceWithAlias"
},
"expiryMonth": {
"fieldSelector": "<string>",
"aliasFormat": "keepOriginal",
"storagePolicy": "permanent",
"fieldRegex": "<unknown>",
"displayFormat": "<string>",
"replacementFormat": "replaceWithAlias"
},
"expiryYear": {
"fieldSelector": "<string>",
"aliasFormat": "keepOriginal",
"storagePolicy": "permanent",
"fieldRegex": "<unknown>",
"displayFormat": "<string>",
"replacementFormat": "replaceWithAlias"
},
"securityCode": {
"aliasFormat": "uuid",
"storagePolicy": "volatile"
},
"holderName": {
"fieldSelector": "<string>",
"aliasFormat": "keepOriginal",
"storagePolicy": "permanent",
"fieldRegex": "<unknown>",
"displayFormat": "<string>",
"replacementFormat": "replaceWithAlias"
}
},
"expiresIn": 5000,
"recordSelector": "/networkToken"
}
}
],
"status": "draft"
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.malformed",
"detail": "The request has malformed syntax",
"docUrl": "https://docs.payrails.com/docs/error-codes#requestmalformed"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "07a1d642-dbf5-47d3-8563-700514b38e46",
"code": "request.header.missing",
"detail": "The request is missing a required header",
"docUrl": "https://docs.payrails.com/docs/error-codes#requestheadermissing"
}
]
}Create a new version of a connection
Saves the connection version data and returns connection version with ID.
{
"name": "Fetch reservations",
"description": "Get all reservations",
"httpMethods": [
"POST",
"PATCH"
],
"publicUrl": "/v1/reservations",
"anyOf": {
"proxyUrl": "https://merchant.com/v2/reservations",
"trustedDestinationHosts": [
"stripe.com",
"example.com"
]
},
"rules": [
{
"action": "tokenization",
"config": {
"targetRecordType": "networkToken",
"targetContentType": "xml",
"fields": {
"cardNumber": {
"fieldSelector": "<string>",
"aliasFormat": "uuid",
"storagePolicy": "permanent",
"fieldRegex": "<unknown>",
"displayFormat": "last4",
"replacementFormat": "replaceWithAlias"
},
"expiryMonth": {
"fieldSelector": "<string>",
"aliasFormat": "keepOriginal",
"storagePolicy": "permanent",
"fieldRegex": "<unknown>",
"displayFormat": "<string>",
"replacementFormat": "replaceWithAlias"
},
"expiryYear": {
"fieldSelector": "<string>",
"aliasFormat": "keepOriginal",
"storagePolicy": "permanent",
"fieldRegex": "<unknown>",
"displayFormat": "<string>",
"replacementFormat": "replaceWithAlias"
},
"securityCode": {
"aliasFormat": "uuid",
"storagePolicy": "volatile"
},
"holderName": {
"fieldSelector": "<string>",
"aliasFormat": "keepOriginal",
"storagePolicy": "permanent",
"fieldRegex": "<unknown>",
"displayFormat": "<string>",
"replacementFormat": "replaceWithAlias"
}
},
"expiresIn": 5000,
"recordSelector": "/networkToken"
}
}
],
"status": "draft"
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.malformed",
"detail": "The request has malformed syntax",
"docUrl": "https://docs.payrails.com/docs/error-codes#requestmalformed"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "07a1d642-dbf5-47d3-8563-700514b38e46",
"code": "request.header.missing",
"detail": "The request is missing a required header",
"docUrl": "https://docs.payrails.com/docs/error-codes#requestheadermissing"
}
]
}Authorizations
You can use an OAuth2 JWT bearer token in the Authorization header of your API requests for supported endpoints: Authorization: Bearer <YOUR_JWT_HERE>.
These tokens are valid for 10 minutes and can be requested via the access token endpoint endpoint.
Path Parameters
Parameter connectionId is required for which connection version is created.
Body
The connection version data that need to be saved for connectionId.
Name of connection version.
"Fetch reservations"
Description of connection version.
"Get all reservations"
HTTP Methods this connection should be invoked by. You can create different connections that are invoked using same URL but which should behave differently depending on method. For example, there can be connection version that handles requests for "GET /orders" and another connection that handles requests for "POST /orders".
GET, POST, PUT, DELETE, PATCH ["POST", "PATCH"]
Public url that will be invoked by third party or merchant.
"/v1/reservations"
Hide child attributes
Hide child attributes
The proxy URL is primarily the URL where requests are forwarded after tokenization or de-tokenization. It applies to inbound connections.
"https://merchant.com/v2/reservations"
The destination hosts are a list of whitelisted hosts to which outbound connections can be proxied.
["stripe.com", "example.com"]
- Card tokenization
- Network token tokenization
- Card detokenization
- Network token detokenization
- Custom function
Hide child attributes
Hide child attributes
The action required by this rule. Examples of actions include tokenization and detokenization.
tokenization "tokenization"
Hide child attributes
Hide child attributes
RecordType that has to be parsed and tokenized from Payload.
card, networkToken "networkToken"
ContentType of target payload that need to be parsed.
xml, json, formurlencoded, xmlformurlencoded "xml"
Hide child attributes
Hide child attributes
Rule for parsing cardNumber from Payload.
Hide child attributes
Hide child attributes
Allows to parse the field from request or response payload.
1Alias format on how merchant receive this field.
uuid Storage policy for this field in vault.
permanent After a field is selected, specify how it should be stored or retrieved. You can use a regex expression to parse the field. For example, if a card number contains dashes in the payload and you need to remove them, you can use a regex expression to do so.
Display format on how this field we will displayed post tokenization.
last4 Defines with what value the field should be replaced with. By default or when replaceWithAlias selected, the tokenized value is replaced with its alias. When replaceWithDisplayableValue selected, the field value is replaced with its displayable value.
replaceWithAlias, replaceWithDisplayableValue Rule for parsing expiryMonth from Payload.
Hide child attributes
Hide child attributes
Allows to parse the field from request or response payload.
1uuid, keepOriginal permanent, volatile After a field is selected, specify how it should be stored or retrieved. You can use a regex expression to parse the field. For example, if a card number contains dashes in the payload and you need to remove them, you can use a regex expression to do so.
Defines with what value the field should be replaced with. By default or when replaceWithAlias selected, the tokenized value is replaced with its alias. When replaceWithDisplayableValue selected, the field value is replaced with its displayable value.
replaceWithAlias, replaceWithDisplayableValue Rule for parsing expiryYear from Payload.
Hide child attributes
Hide child attributes
Allows to parse the field from request or response payload.
1uuid, keepOriginal permanent, volatile After a field is selected, specify how it should be stored or retrieved. You can use a regex expression to parse the field. For example, if a card number contains dashes in the payload and you need to remove them, you can use a regex expression to do so.
Defines with what value the field should be replaced with. By default or when replaceWithAlias selected, the tokenized value is replaced with its alias. When replaceWithDisplayableValue selected, the field value is replaced with its displayable value.
replaceWithAlias, replaceWithDisplayableValue Rule for parsing securityCode from Payload.
Hide child attributes
Hide child attributes
Rule for parsing cardHolderName from Payload.
Hide child attributes
Hide child attributes
Allows to parse the field from request or response payload.
1uuid, keepOriginal permanent, volatile After a field is selected, specify how it should be stored or retrieved. You can use a regex expression to parse the field. For example, if a card number contains dashes in the payload and you need to remove them, you can use a regex expression to do so.
Defines with what value the field should be replaced with. By default or when replaceWithAlias selected, the tokenized value is replaced with its alias. When replaceWithDisplayableValue selected, the field value is replaced with its displayable value.
replaceWithAlias, replaceWithDisplayableValue ExpiresIn refers to the duration in seconds or time remaining before a record becomes invalid or deleted.
5000
XPath or JSONPath selector for parsing specified record.
"/networkToken"
"draft"
Response
Success.
Name of connection version.
"Fetch reservations"
Description of connection version.
"Get all reservations"
HTTP Methods this connection should be invoked by. You can create different connections that are invoked using same URL but which should behave differently depending on method. For example, there can be connection version that handles requests for "GET /orders" and another connection that handles requests for "POST /orders".
GET, POST, PUT, DELETE, PATCH ["POST", "PATCH"]
Public url that will be invoked by third party or merchant.
"/v1/reservations"
Hide child attributes
Hide child attributes
The proxy URL is primarily the URL where requests are forwarded after tokenization or de-tokenization. It applies to inbound connections.
"https://merchant.com/v2/reservations"
The destination hosts are a list of whitelisted hosts to which outbound connections can be proxied.
["stripe.com", "example.com"]
- Card tokenization
- Network token tokenization
- Card detokenization
- Network token detokenization
- Custom function
Hide child attributes
Hide child attributes
The action required by this rule. Examples of actions include tokenization and detokenization.
tokenization "tokenization"
Hide child attributes
Hide child attributes
RecordType that has to be parsed and tokenized from Payload.
card, networkToken "networkToken"
ContentType of target payload that need to be parsed.
xml, json, formurlencoded, xmlformurlencoded "xml"
Hide child attributes
Hide child attributes
Rule for parsing cardNumber from Payload.
Hide child attributes
Hide child attributes
Allows to parse the field from request or response payload.
1Alias format on how merchant receive this field.
uuid Storage policy for this field in vault.
permanent After a field is selected, specify how it should be stored or retrieved. You can use a regex expression to parse the field. For example, if a card number contains dashes in the payload and you need to remove them, you can use a regex expression to do so.
Display format on how this field we will displayed post tokenization.
last4 Defines with what value the field should be replaced with. By default or when replaceWithAlias selected, the tokenized value is replaced with its alias. When replaceWithDisplayableValue selected, the field value is replaced with its displayable value.
replaceWithAlias, replaceWithDisplayableValue Rule for parsing expiryMonth from Payload.
Hide child attributes
Hide child attributes
Allows to parse the field from request or response payload.
1uuid, keepOriginal permanent, volatile After a field is selected, specify how it should be stored or retrieved. You can use a regex expression to parse the field. For example, if a card number contains dashes in the payload and you need to remove them, you can use a regex expression to do so.
Defines with what value the field should be replaced with. By default or when replaceWithAlias selected, the tokenized value is replaced with its alias. When replaceWithDisplayableValue selected, the field value is replaced with its displayable value.
replaceWithAlias, replaceWithDisplayableValue Rule for parsing expiryYear from Payload.
Hide child attributes
Hide child attributes
Allows to parse the field from request or response payload.
1uuid, keepOriginal permanent, volatile After a field is selected, specify how it should be stored or retrieved. You can use a regex expression to parse the field. For example, if a card number contains dashes in the payload and you need to remove them, you can use a regex expression to do so.
Defines with what value the field should be replaced with. By default or when replaceWithAlias selected, the tokenized value is replaced with its alias. When replaceWithDisplayableValue selected, the field value is replaced with its displayable value.
replaceWithAlias, replaceWithDisplayableValue Rule for parsing securityCode from Payload.
Hide child attributes
Hide child attributes
Rule for parsing cardHolderName from Payload.
Hide child attributes
Hide child attributes
Allows to parse the field from request or response payload.
1uuid, keepOriginal permanent, volatile After a field is selected, specify how it should be stored or retrieved. You can use a regex expression to parse the field. For example, if a card number contains dashes in the payload and you need to remove them, you can use a regex expression to do so.
Defines with what value the field should be replaced with. By default or when replaceWithAlias selected, the tokenized value is replaced with its alias. When replaceWithDisplayableValue selected, the field value is replaced with its displayable value.
replaceWithAlias, replaceWithDisplayableValue ExpiresIn refers to the duration in seconds or time remaining before a record becomes invalid or deleted.
5000
XPath or JSONPath selector for parsing specified record.
"/networkToken"
"draft"