---
updatedAt: 2026-09-23T13:19:59.000Z
agentTools:
  projectIndex: https://docs.pci-proxy.com/llms.txt
---

# Patch alias

Update existing aliases and provision Network Tokens.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "PCI Proxy API Reference (Datatrans Endpoints)",
    "description": "OpenAPI Spec containing Datatrans endpoints for PCI Proxy customers",
    "contact": {
      "url": "https://docs.pci-proxy.com",
      "email": "support@pci-proxy.com"
    },
    "version": "${json.api.version}"
  },
  "servers": [
    {
      "url": "https://api.sandbox.datatrans.com",
      "description": "Sandbox"
    },
    {
      "url": "https://api.datatrans.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "/v1/aliases"
    }
  ],
  "paths": {
    "/v1/aliases/{alias}": {
      "patch": {
        "tags": [
          "/v1/aliases"
        ],
        "summary": "Patch alias",
        "description": "Update existing aliases and provision Network Tokens.",
        "operationId": "aliasesPatch",
        "parameters": [
          {
            "name": "alias",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AliasPatchRequest"
              },
              "examples": {
                "aliasPatchRequest": {
                  "summary": "Alias patch request example",
                  "description": "aliasPatchRequest",
                  "value": {
                    "removePlain": false,
                    "expiryMonth": "12",
                    "expiryYear": "30",
                    "createNetworkToken": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully patched alias",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AliasInfoResponse"
                },
                "examples": {
                  "aliasPatchResponse": {
                    "description": "aliasPatchResponse",
                    "value": {
                      "alias": "AFBWlDuSAAEAAAGhC1_9WTrJa_emAJRB",
                      "fingerprint": "F-fnlcOgqPqxSdNfyYY0vXHk",
                      "type": "CARD",
                      "masked": "434343xxxxxx4345",
                      "dateCreated": "2026-10-05T09:23:00Z",
                      "validUntil": "2031-09-09T09:23:00Z",
                      "card": {
                        "usage": "REGISTRATION",
                        "expiryMonth": "12",
                        "expiryYear": "30",
                        "last4": "4345",
                        "bin": "434343",
                        "panRemoved": false,
                        "cardInfo": {
                          "brand": "VISA",
                          "type": "credit",
                          "usage": "consumer",
                          "country": "UA",
                          "issuer": "JSC UKRSIBBANK"
                        },
                        "networkToken": {
                          "expiryMonth": "07",
                          "expiryYear": "27",
                          "status": "ACTIVE",
                          "paymentAccountReference": "V0010013021088278311713045741",
                          "tokenRequestorId": "40010080572",
                          "token": "4001290114959586"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AliasesResponseBase"
                },
                "examples": {
                  "aliasPatchErrorResponse": {
                    "description": "aliasPatchErrorResponse",
                    "value": {
                      "error": {
                        "code": "INVALID_EXPIRATION"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Alias not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AliasesResponseBase"
                },
                "examples": {
                  "aliasNotFoundPatchErrorResponse": {
                    "description": "aliasNotFoundPatchErrorResponse",
                    "value": {
                      "error": {
                        "code": "ALIAS_NOT_FOUND"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "curl",
            "source": "curl -i -X PATCH https://api.sandbox.datatrans.com/v1/aliases/AFBWlDuSAAEAAAGhC1_9WTrJa_emAJRB \n\t--user {merchantId}:{password} \n\t-H 'Content-Type: application/json; charset=UTF-8' \n\t-d '{\n    \"removePlain\": false,\n    \"expiryMonth\": \"12\",\n    \"expiryYear\": \"30\",\n    \"createNetworkToken\": true\n}'",
            "lang": "shell"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AliasInfoCardInfoDetail": {
        "type": "object",
        "properties": {
          "usage": {
            "type": "string",
            "enum": [
              "SIMPLE",
              "REGISTRATION"
            ]
          },
          "expiryMonth": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry month of the card behind the alias. Currently not available when the Convert API was used before."
          },
          "expiryYear": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry year of the card behind the alias. Currently not available when the Convert API was used before."
          },
          "last4": {
            "type": "string"
          },
          "bin": {
            "type": "string"
          },
          "panRemoved": {
            "type": "boolean",
            "description": "Indicates if PAN has been removed."
          },
          "cardInfo": {
            "$ref": "#/components/schemas/CardInfo"
          },
          "cardOnFile": {
            "$ref": "#/components/schemas/CardOnFile"
          },
          "networkToken": {
            "$ref": "#/components/schemas/TokenInfo"
          },
          "walletIndicator": {
            "type": "string",
            "enum": [
              "APL",
              "PAY",
              "C2P"
            ]
          },
          "applePay": {
            "$ref": "#/components/schemas/ApplePay"
          },
          "clickToPay": {
            "$ref": "#/components/schemas/ClickToPay"
          },
          "passkey": {
            "$ref": "#/components/schemas/Passkey"
          },
          "authenticationMethod": {
            "type": "string",
            "description": "The authentication method used.",
            "enum": [
              "PASSKEYS",
              "THREE_DS"
            ]
          },
          "3D": {
            "$ref": "#/components/schemas/ThreeDInfo"
          },
          "cardHolderNameVerification": {
            "$ref": "#/components/schemas/CardHolderNameVerificationResults"
          }
        },
        "description": "Information about the card behind the alias if available. For some cards (e.g. Boncard) no information will be returned."
      },
      "AliasInfoResponse": {
        "type": "object",
        "properties": {
          "alias": {
            "type": "string",
            "description": "The requested alias.",
            "example": "AAABeCBPbiHssdexyrAAAYkaznYWAPYt",
            "externalDocs": {
              "url": "https://docs.datatrans.ch/docs/tokenization#section-token-format"
            }
          },
          "fingerprint": {
            "maxLength": 24,
            "minLength": 24,
            "pattern": "F-[A-Za-z0-9_-]{22}",
            "type": "string",
            "description": "An unique identifier of the card number. Useful to identify multiple customers' or the same customer's transactions where the same card was used.",
            "example": "F-coGuJQ55tUk8CnKGI9PX1T"
          },
          "type": {
            "type": "string",
            "enum": [
              "CARD",
              "CERTIFICATE",
              "PFC",
              "REK",
              "IBAN",
              "TWI",
              "KLN",
              "INT",
              "PAP",
              "ESY",
              "MFX",
              "MPX",
              "SWP",
              "MDP",
              "ALP",
              "PLU",
              "PFP",
              "DMO"
            ]
          },
          "masked": {
            "type": "string",
            "description": "The nonsensitive masked representation of the value behind the alias (e.g. `490000xxxxxx0003` for aliases of type `CARD`)"
          },
          "dateCreated": {
            "type": "string",
            "description": "Creation date",
            "format": "date-time"
          },
          "validUntil": {
            "type": "string",
            "description": "Valid until",
            "format": "date-time"
          },
          "card": {
            "$ref": "#/components/schemas/AliasInfoCardInfoDetail"
          },
          "PFP": {
            "$ref": "#/components/schemas/PostfinancePayAliasInfoResponse"
          }
        }
      },
      "AliasesError": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/AliasesErrorCode"
          },
          "message": {
            "type": "string",
            "description": "A human readable message indicating what went wrong."
          }
        }
      },
      "AliasesErrorCode": {
        "type": "string",
        "enum": [
          "PLAIN_NOT_FOUND",
          "INVALID_EXPIRATION",
          "CLIENT_ERROR",
          "CONCURRENT_LIMIT_REACHED",
          "INVALID_CVV",
          "UNKNOWN_ERROR",
          "UNRECOGNIZED_PROPERTY",
          "SERVER_ERROR",
          "INVALID_FINGERPRINT",
          "ILLEGAL_ARGUMENT",
          "UNAUTHORIZED",
          "COULD_NOT_OBTAIN_NETWORK_TOKEN",
          "INVALID_PLAIN_VALUE_FOR_TEST_MODE",
          "MAX_REQUESTS_PER_CALL_EXCEEDED",
          "VELOCITY_ERROR",
          "INVALID_PLAIN_VALUE",
          "NOT_VERIFIED",
          "FINGERPRINT_NOT_FOUND",
          "NOT_FOUND",
          "INTERNAL_ERROR",
          "INVALID_JSON_PAYLOAD",
          "INVALID_CONFIGURATION",
          "COULD_NOT_DECRYPT_TOKEN",
          "ALIAS_NOT_FOUND",
          "COULD_NOT_DELETE_NETWORK_TOKEN",
          "DECLINED",
          "FORBIDDEN",
          "INVALID_ALIAS",
          "INVALID_STATE",
          "INVALID_PROPERTY",
          "TOKEN_PROVIDER_UNAVAILABLE",
          "INVALID_HEADER",
          "COULD_NOT_OBTAIN_CARD_ART",
          "DELETE_NOT_ALLOWED",
          "SERVICE_NOT_ALLOWED"
        ]
      },
      "ApplePay": {
        "type": "object",
        "properties": {
          "deviceManufacturerIdentifier": {
            "type": "string"
          }
        }
      },
      "CardHolderNameVerificationResults": {
        "type": "object",
        "properties": {
          "nameMatch": {
            "type": "string",
            "enum": [
              "NONE",
              "PARTIAL",
              "FULL"
            ]
          },
          "firstNameMatch": {
            "type": "string",
            "enum": [
              "NONE",
              "PARTIAL",
              "FULL"
            ]
          },
          "lastNameMatch": {
            "type": "string",
            "enum": [
              "NONE",
              "PARTIAL",
              "FULL"
            ]
          },
          "middleNameMatch": {
            "type": "string",
            "enum": [
              "NONE",
              "PARTIAL",
              "FULL"
            ]
          }
        },
        "description": "Cardholder name verification results"
      },
      "CardInfo": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string",
            "description": "The brand of the credit card (e.g. VISA CREDIT)."
          },
          "coBrand": {
            "type": "string",
            "description": "The coBrand of the card"
          },
          "type": {
            "type": "string",
            "description": "The type of the card (`credit`, `debit` or `prepaid`). The property will not be present if the card type is unknown."
          },
          "usage": {
            "type": "string",
            "description": "The usage of the card (`consumer`, `corporate` or `unknown`)."
          },
          "country": {
            "type": "string",
            "description": "2 letter ISO 3166-1 alpha-2 country code."
          },
          "issuer": {
            "type": "string",
            "description": "The issuer of the card."
          },
          "accountType": {
            "type": "string",
            "enum": [
              "PAN",
              "TOKEN"
            ]
          },
          "binLength": {
            "type": "integer",
            "description": "The bin length, if known.",
            "format": "int32"
          }
        },
        "description": "The card information if the request was done with a card object"
      },
      "CardOnFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Card on file Id"
          },
          "tlid": {
            "maxLength": 36,
            "minLength": 0,
            "type": "string",
            "description": "The TLID is a 36-character, scheme-generated identifier that Mastercard automatically assigns to every authorisation."
          }
        },
        "description": "Card On File"
      },
      "ClickToPay": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "The plain card token (DPAN) stored in the alias."
          },
          "expiryMonth": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry month of the token."
          },
          "expiryYear": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry year of the token."
          },
          "paymentAccountReference": {
            "type": "string",
            "description": "The Payment Account Reference (PAR) associated with the Click to Pay alias."
          }
        },
        "description": "Click to Pay data, if the alias originates from a Click to Pay transaction."
      },
      "MultiToken": {
        "type": "object",
        "properties": {
          "cavv": {
            "type": "string"
          },
          "merchantIdentifier": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "NetworkTokenError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "SERVICE_NOT_ALLOWED",
              "TOKEN_PROVIDER_UNAVAILABLE",
              "MISSING_FIELD",
              "DECLINED",
              "REQUIRE_ADDITIONAL_AUTHENTICATION",
              "WAITING_ACTIVATION",
              "INTERNAL_ERROR",
              "UNKNOWN_ERROR"
            ]
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Passkey": {
        "type": "object",
        "properties": {
          "eci": {
            "type": "string",
            "description": "The Electronic Commerce Indicator (ECI) for the Passkeys authentication."
          },
          "cryptogram": {
            "type": "string",
            "description": "The cryptogram for the Passkeys (FIDO2) authentication."
          }
        },
        "description": "Passkeys (FIDO2) authentication data if available."
      },
      "PostfinancePayAliasInfoResponse": {
        "type": "object",
        "properties": {
          "maskedIban": {
            "type": "string",
            "description": "The PostfinancePay masked IBAN of the according account to identify the token's account by the shopper."
          }
        },
        "description": "The PostfinancePay payload."
      },
      "ThreeDInfo": {
        "type": "object",
        "properties": {
          "cavv": {
            "type": "string",
            "description": "The cavv of the card."
          },
          "eci": {
            "type": "string",
            "description": "The eci of the card."
          },
          "multiToken": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MultiToken"
            }
          }
        },
        "description": "The 3D information of the card."
      },
      "TokenInfo": {
        "type": "object",
        "properties": {
          "expiryMonth": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry month of the scheme token."
          },
          "expiryYear": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry year of the scheme token."
          },
          "status": {
            "type": "string",
            "description": "The status of the scheme token",
            "enum": [
              "INACTIVE",
              "ACTIVE",
              "SUSPENDED",
              "DELETED",
              "PENDING",
              "FAILED"
            ]
          },
          "paymentAccountReference": {
            "maxLength": 29,
            "minLength": 0,
            "type": "string",
            "description": "The Payment Account Reference of the scheme token",
            "example": "5001a9f027e5629d11e3949a0800a"
          },
          "tokenRequestorId": {
            "type": "string",
            "description": "The token requestor id"
          },
          "token": {
            "type": "string",
            "description": "Scheme token"
          },
          "reason": {
            "$ref": "#/components/schemas/NetworkTokenError"
          }
        },
        "description": "Scheme token details. This information is only available if the card behind the alias has been tokenized."
      },
      "AliasesResponseBase": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/AliasesError"
          }
        }
      },
      "AliasPatchRequest": {
        "type": "object",
        "properties": {
          "removePlain": {
            "type": "boolean",
            "description": "Remove the pan from storage."
          },
          "expiryMonth": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry month of the card behind the alias."
          },
          "expiryYear": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry year of the card behind the alias."
          },
          "cardholder": {
            "$ref": "#/components/schemas/CardholderData"
          },
          "createNetworkToken": {
            "type": "boolean",
            "description": "Create a Network Token."
          },
          "cardOnFile": {
            "$ref": "#/components/schemas/CardOnFile"
          },
          "cardHolderNameVerification": {
            "$ref": "#/components/schemas/CardHolderNameVerification"
          }
        }
      },
      "CardHolderNameVerification": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "Cardholder firstname"
          },
          "lastName": {
            "type": "string",
            "description": "Cardholder lastname"
          },
          "middleName": {
            "type": "string",
            "description": "Cardholder middle name"
          }
        },
        "description": "Cardholder name"
      },
      "CardholderData": {
        "type": "object",
        "properties": {
          "ipAddress": {
            "type": "string",
            "description": "IP address."
          },
          "phoneNumber": {
            "maxLength": 50,
            "type": "string",
            "description": "Phone number."
          },
          "emailAddress": {
            "type": "string",
            "description": "Email address."
          }
        }
      }
    },
    "securitySchemes": {
      "Basic": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  },
  "x-tagGroups": [
    {
      "name": "Tokenizations",
      "tags": [
        "/v1/tokenizations"
      ]
    },
    {
      "name": "Vault API",
      "tags": [
        "/v1/aliases"
      ]
    },
    {
      "name": "Transactions",
      "tags": [
        "/v1/transactions"
      ]
    }
  ]
}
```