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" }}Open in Apollo Studio Explorer →
Click the link above to open this mutation in Apollo Studio Explorer with the query pre-filled. You’ll need to authenticate with your sandbox credentials.
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
| Argument | Type | Description |
|---|---|---|
input | CreateCreditorInput! | 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:
| Field | Type | Description |
|---|---|---|
creditorName | String! | Creditor name |
Response Type
Returns: CreateCreditorResponse!
CreateCreditorResponse
| Field | Type | Description |
|---|---|---|
data | CreateCreditorResult | Success message |
errors | [CreateCreditorError] | List of error messages |
CreateCreditorResult
Result of creating or looking up a creditor
| Field | Type | Description |
|---|---|---|
creditorName | String! | Name of the creditor |
creditorId | String! | Unique identifier for the creditor |
parentCreditorName | String | Name of the parent creditor (if applicable) |
parentCreditorId | String | Unique identifier for the parent creditor (if applicable) |
CreateCreditorError
| Field | Type | Description |
|---|---|---|
message | String | Error message |
Error Types
The response may include the following error types:
CreateCreditorError
| Field | Type | Description |
|---|---|---|
message | String | Error message |
Common Errors
| Error Code | Description | Resolution |
|---|---|---|
VALIDATION_ERROR | Input validation failed | Check required fields and formats |
UNAUTHORIZED | Invalid or expired token | Re-authenticate and retry |
NOT_FOUND | Resource not found | Verify the ID or reference |