Skip to content

createCreditor

Mutation

Create a creditor using the creditor name. Return the creditor ID. If the creditor already exists then the existing creditor ID will be returned.

Mutation Signature

mutation {
createCreditor(input: CreateCreditorInput!): CreateCreditorResponse!
}

Example Request

mutation CreateCreditor($input: CreateCreditorInput!) {
createCreditor(input: $input) {
# Add fields you want to retrieve
}
}

Example Variables:

{
"input": {
"creditorName": "New Financial Services LLC"
}
}

Example Response

{
"data": {
"createCreditor": {
"data": {
"creditorId": "cred-new-456",
"creditorName": "New Financial Services LLC",
"parentCreditorId": "cred-parent-123",
"parentCreditorName": "New Financial Holdings"
},
"errors": null
}
}
}

Arguments

ArgumentTypeDescription
inputCreateCreditorInput!Input containing the creditor name to create or lookup

Input Types

CreateCreditorInput

Input for creating a new creditor entry by using the creditor name

Required Fields:

FieldTypeDescription
creditorNameString!Creditor name

Response Type

Returns: CreateCreditorResponse!

CreateCreditorResponse

FieldTypeDescription
dataCreateCreditorResultSuccess message
errors[CreateCreditorError]List of error messages

CreateCreditorResult

Result of creating or looking up a creditor

FieldTypeDescription
creditorNameString!Name of the creditor
creditorIdString!Unique identifier for the creditor
parentCreditorNameStringName of the parent creditor (if applicable)
parentCreditorIdStringUnique identifier for the parent creditor (if applicable)

CreateCreditorError

FieldTypeDescription
messageStringError message

Error Types

The response may include the following error types:

CreateCreditorError

FieldTypeDescription
messageStringError message

Common Errors

Error CodeDescriptionResolution
VALIDATION_ERRORInput validation failedCheck required fields and formats
UNAUTHORIZEDInvalid or expired tokenRe-authenticate and retry
NOT_FOUNDResource not foundVerify the ID or reference