Skip to content

Create credit agency

Request

Creates a new credit agency.

Security
oauth2(Required scopes: credit.agency:create) or bearerAuth or apiKeyHeader
Path
companyIdstringrequired

The unique company identifier.

Bodyapplication/jsonrequired
agencyNamestring(AgencyName)required

The credit agency name.

Enum:"experian""equifax""transUnion""innovis"
countrystring, <= 2 charactersrequired

The credit agency country.

dataFormatstringrequired

The format of the reported data and file.

Value:"metro2"
encryptionMethodstring or null

The encryption method that Peach system with use to encrypt the files.

Value:"GPG"
fileNamePrefixstring

The file name prefix. Must be provided if agencyName=experian and nameFilePerAgencyConvention=true. Only used if agencyName=experian and nameFilePerAgencyConvention=true.

isPeachAggregatorboolean

DEPRECATED ATTRIBUTE

This field is deprecated, and is only included to remain backward compatible. Only send false.

Default:false
nameFilePerAgencyConventionboolean

If true Peach system will name the file based on the credit agency convention.

Equifax: Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt. For example: PEACHFINANCEINCCPYL69X5Z1EQUIFAX20211021.txt.

Experian: fileNamePrefix + . + today's date MMDDYYYY + .txt. For example: MKFRT.10262021.txt.

TransUnion: Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt. For example: PEACHFINANCEINCCPYL69X5Z1TRANSUNION20211213.txt.

If false Peach system will name the file as: Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt For example: PEACHFINANCEINCCPYL69X5Z1EXPERIAN20211021.txt

Default:true
publicKeystring or null

The lender's public key to use to encrypt the files. A value must be passed if encryptionMethod is set.

sftpAccessMethodstring

If usernamePassword, then sftpUsername and sftpPassword must be provided.

If keys, then sftpSSHPeachPrivateKey and sftpSSHPeachPublicKey will be created by peach.

Default:"usernamePassword"
Enum:"usernamePassword""keys"
sftpCdDirstring

Change directory into this folder before performing the upload.

sftpHostnamestring or null^[^/]+$

The SFTP hostname. If SFTP hostname, username, and password are set, they will be used instead of the default credit bureau credentials. Host name should not contain a scheme, so don't put sftp:// on the front. You may optionally specify a port like so: example.com:222. If no port is supplied a default of 22 will be used.

sftpPasswordstring or null

The password for SFTP.

sftpUsernamestring or null

The username for SFTP.

specificDaysArray of integers

Specific days designate the day(s) when to upload the credit reporting file. Only the 1st day of the month is currently supported.

The allowed values for specific day(s) depends on the uploadFrequency. monthly - provide one number in the valid range 1-31. 1=first day of a month. Use 31 to indicate the last day of a month.

For example: [1].

uploadFrequencystring

The credit reporting file creation frequency. Only monthly is currently supported.

Value:"monthly"
useLoanExternalIdboolean

Indicates what identifier to use as an account identifier for credit reporting.

If true, the system will use loan externalId as an account identifier for credit reporting. If externalId doesn't exist the system will use loan Peach Public ID.

If false, the system will use loan Peach Public ID (e.g. LN-JFU3-ER3S) as an account identifier for credit reporting.

Default:true
copyKeysFromstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-only

The identifier of the agency to copy keys from.

enrollExistingLoansboolean

Automatically enroll existing active loans for credit reporting with this agency.

Default:false
POST
/companies/{companyId}/credit-agencies
curl -i -X POST \
  'https://sandboxapi.peach.finance/api/companies/{companyId}/credit-agencies' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "agencyName": "experian",
    "country": "st",
    "dataFormat": "metro2",
    "encryptionMethod": "GPG",
    "fileNamePrefix": "string",
    "isPeachAggregator": false,
    "nameFilePerAgencyConvention": true,
    "publicKey": "string",
    "sftpAccessMethod": "usernamePassword",
    "sftpCdDir": "string",
    "sftpHostname": "string",
    "sftpPassword": "string",
    "sftpUsername": "string",
    "specificDays": [
      1
    ],
    "uploadFrequency": "monthly",
    "useLoanExternalId": true,
    "copyKeysFrom": "string",
    "enrollExistingLoans": false
  }'

Responses

Success

Bodyapplication/json
messagestring

Description of the server action or error.

statusinteger

HTTP status code.

dataobject(CreditAgency)
Response
{ "message": "string", "status": 0, "data": { "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "id": "string", "updatedAt": "2019-08-24T14:15:22Z", "agencyName": "experian", "companyId": "string", "country": "st", "dataFormat": "metro2", "encryptionMethod": "GPG", "fileNamePrefix": "string", "isPeachAggregator": false, "nameFilePerAgencyConvention": true, "publicKey": "string", "sftpAccessMethod": "usernamePassword", "sftpCdDir": "string", "sftpHostname": "string", "sftpPassword": "string", "sftpSSHPeachPrivateKey": "string", "sftpSSHPeachPublicKey": "string", "sftpUsername": "string", "specificDays": [ … ], "uploadFrequency": "monthly", "useLoanExternalId": true } }