Link counterparty
POST
https://api.invunion.com/api/v1/payment-methods/:code/counterparties payment_methods:write Markdown Associate a counterparty with a shared payment method.
Adds a counterparty to a shared catalog instrument. The payment method must already be in shared association_mode. Parked instruments cannot be shared. Linking an already-associated counterparty is idempotent.
Path parameters
| Name | Type | Required |
|---|---|---|
codePayment method code (`code`). Example: PM-001 | string Max 50 | Required |
Body parameters
| Name | Type | Required |
|---|---|---|
counterparty_idCounterparty code (`account_code`) to associate. Example: CPT-042 | string No maximum | Required |
Errors
This operation can return the following errors in addition to generic HTTP failures.
| Error | HTTP code | Description |
|---|---|---|
Missing Bearer token | 401 | The Authorization header is missing or is not a Bearer token. |
Invalid or revoked API key | 401 | The API key is unknown, malformed, expired, or has been revoked. |
API key is missing scope payment_methods:write | 403 | The key does not include payment_methods:write. A write scope does not imply the matching read scope. |
Too many requests, please try again later | 429 | Wait and retry. The Retry-After header is the number of seconds to wait. |
counterparty_id is required | 400 | The body does not include counterparty_id. |
Tenant ID required | 400 | The authenticated credential is not bound to a tenant. |
Payment method is not shareable | 409 | The instrument is exclusive, parked, or otherwise cannot accept another association. |
Internal server error | 500 | Unexpected server error. The JSON body includes correlationId. Retry with backoff. |