# Withdraw credits and create retirements Allows the combination of withdrawal of credits and creation of retirements in bulk Endpoint: POST /exchanges/{ExchangeCode}/account/{AccountIdentifier}/program/{RetirementProgramCode}/action/withdraw-and-retire Version: 1.0.0-beta Security: bearerToken ## Path parameters: - `ExchangeCode` (string, required) Exchange code Example: "CBL , RVCMC" - `AccountIdentifier` (string, required) Account identifier Example: "098B0A25" - `RetirementProgramCode` (string, required) Program code allowed for retirements Enum: "ACR", "CAR", "VCS", "NEPOOL", "NAR", "NYGATS", "M_RETS", "MIRECS", "NCRETS" ## Request fields (application/json): - `dryRun` (boolean, required) If true it will only do the validation of the request but not to create the retirements - `retirements` (array, required) - `retirements.ein` (string, required) - `retirements.quantity` (integer, required) - `retirements.externalIdentifier` (string) - `attributes` (object) ## Response 200 fields (application/json): - `retirements` (array, required) - `retirements.instrument` (any, required) - `retirements.lastUpdatedDate` (string, required) Last updated date. - `retirements.createdDate` (string, required) Creation date. - `retirements.quantity` (integer, required) Retirement quantity. - `retirements.status` (string, required) Status of the retirement. Enum: "NEW", "PENDING_RETIREMENT", "PENDING_CUSTODIAN_RETIREMENT", "RETIRED", "FAILED", "CANCELLED", "REJECTED", "NOT_FOUND" - `retirements.batchIdentifier` (string, required) XPC Retirement batch identifier - `retirements.identifier` (string, required) XPC Retirement identifier - `retirements.externalIdentifier` (string) Retirement identifier provided by API client when creating the retirement - `retirements.registryTransferIdentifier` (string) Retirement identifier generated by the program - `retirements.registryPositionId` (string) Id of the retired registry credits - `retirements.attributes` (object) - `batchIdentifier` (string, required) EMA retirement batch identifier ## Response 400 fields (application/json): - `code` (string) Enum: "INVALID_PROGRAM", "INVALID_REQUEST", "EMPTY_REQUEST", "INVALID_ATTRIBUTES", "INVALID_RETIREMENTS", "INVALID_EXCHANGE", "INVALID_ACCOUNT" - `message` (string) - `errors` (array) - `attributeErrors` (array) - `attributeErrors.field` (string) - `attributeErrors.value` (string) - `retirementErrors` (array) ## Response 401 fields (application/json): - `message` (string) ## Response 500 fields (application/json): - `message` (string)