# Errors and warnings

Every response carries an `Errors` array. **New feed**, **Update feed**,
**Update feed status**, **Upload authority form** and **Feed products** also carry a
`Warnings` array.
An **error** means the request was rejected and nothing was created or changed. A
**warning** does not reject the request, but it does mean something needs attention.
`Errors` frequently contains more than one entry, particularly for linked holdings,
where each invalid entry is reported separately. Surface all of them, not just the
first.


---

**Which operation returns what**
The `DATA_FEED_*` codes in the New feed tables below come from request validation on
**New feed**. **Update feed** runs much of the same validation, plus the update-only
checks in its own table. **Feed products** validates its own query parameters and
shares four of the New feed codes. The other read operations validate only their
parameters.
| Operation | Can return |
|  --- | --- |
| **New feed** | Every `DATA_FEED_*` code in the New feed tables below. Warnings as `{ Code, Message }` objects. |
| **Update feed** | The codes in the **Update feed** table, plus these New feed codes: `DATA_FEED_FIELD_REQUIRED`, `DATA_FEED_INVALID_VALUE`, `DATA_FEED_PRODUCT_NOT_FOUND`, `DATA_FEED_PRODUCT_KIND_MISMATCH`, `DATA_FEED_INVALID_DATE_RANGE`, `DATA_FEED_AUTHORISATION_TYPE_UNSUPPORTED`, `DATA_FEED_INVALID_DATA_SOURCE_TYPE`, `DATA_FEED_UNSUPPORTED_PROPERTY`, `DATA_FEED_INVALID_BSB`, `DATA_FEED_PRODUCT_BSB_MISMATCH`, `DATA_FEED_INVALID_CLASSIFICATION_CODE`, `DATA_FEED_FOREIGN_CASH_NOT_SUPPORTED`, `DATA_FEED_LINKED_HOLDINGS_NOT_ALLOWED`, `DATA_FEED_LINKED_TO_HOLDING_NOT_FOUND`, `DATA_FEED_INVALID_NPP_METHOD`, `DATA_FEED_NPP_PAYID_NOT_ALLOWED`, `DATA_FEED_INVALID_NPP_PAYID`, `DATA_FEED_INVALID_IDENTIFIER`, `DATA_FEED_LINKED_HOLDING_NOT_FOUND`, `DATA_FEED_LINKED_HOLDING_FIELD_MISMATCH`, `DATA_FEED_DUPLICATE_ACCOUNT` and `DATA_FEED_DUPLICATE_IDENTIFIER`. Warnings as `{ Code, Message }` objects. |
| **Update feed status** | `DATA_FEED_FIELD_REQUIRED`, `DATA_FEED_STATUS_TRANSITION_NOT_ALLOWED`, `API_INVALID_PARAMETER`, `API_MODEL_BINDING`. Warnings as `{ Code, Message }` objects. |
| **Upload authority form** | `REQUIRED`, `API_INVALID_PARAMETER`. Warnings as plain strings. |
| **Feeds** | `API_MODEL_BINDING` |
| **Feed detail** | `API_INVALID_PARAMETER`, `API_MODEL_BINDING` |
| **Feed products** | `DATA_FEED_INVALID_KIND`, `DATA_FEED_FIELD_REQUIRED`, `DATA_FEED_INVALID_BSB`, `DATA_FEED_UNSUPPORTED_PROPERTY`, `API_MODEL_BINDING` |

Every operation can also return `API_NOT_AUTHORISED` (401), `FORBIDDEN` (403),
`API_NOT_FOUND` (404) and `API_INTERNAL_ERROR` (500).


---

**Request and common field validation** — New feed
| Code | Severity | Raised when |
|  --- | --- | --- |
| `DATA_FEED_INVALID_KIND` | Error | The feed object is missing, or `FeedType` is absent, blank or not one of `Broker`, `Platform`, `Cash`. Validation stops here, because every later rule depends on a valid `FeedType`. |
| `DATA_FEED_INVALID_VALUE` | Error | A field that must be a GUID is not one — `ProductId`, `DataSource.ContainingFeedId`, `DataSource.AuthorityId`, `Cash.LinkedToHoldingAccountId` — or `DataSource.AuthorisationType` cannot be parsed, or a `LinkedHoldings` array contains a null item. Validation stops here on a malformed GUID. |
| `DATA_FEED_FIELD_REQUIRED` | Error | A required field is missing or blank. Can name any of `AccountName`, `DisplayName`, `ProductId`, `DataSource.DataSourceType`, `DataSource.ContainingFeedId`, `Cash.AccountNumber`, `Cash.Code`, `Cash.BsbCode`, `Cash.NewPaymentsPlatform`, `Cash.NewPaymentsPlatform.NPPMethod`, `Cash.NewPaymentsPlatform.PayID`, `Broker.AccountNumber`, `Broker.Hin`, `Platform.AccountNumber` or `Platform.Hin`. |
| `DATA_FEED_KIND_MISMATCH` | Error | The type-specific block does not match `FeedType` — the matching block is absent, or more than one of `Cash`/`Broker`/`Platform` is present. Also raised when `DataSourceType` is `IncludeInBrokerOrPlatformAccount` on a non-cash feed. |

Two required-field rules are easy to miss. `ProductId` is required for Broker and
Platform feeds. On a cash feed, `ProductId` and `Cash.BsbCode` go together: send both
or neither. Sending only one fails with `DATA_FEED_FIELD_REQUIRED` naming the other.


---

**Product validation** — New feed
| Code | Severity | Raised when |
|  --- | --- | --- |
| `DATA_FEED_PRODUCT_NOT_FOUND` | Error | A non-empty `ProductId` does not resolve to an existing product. |
| `DATA_FEED_PRODUCT_NOT_ALLOWED` | Error | The product is a placeholder such as Directly Held or No Product Required, or its product type is `TermDeposit`. |
| `DATA_FEED_PRODUCT_KIND_MISMATCH` | Error | The product type is incompatible with `FeedType`. |
| `DATA_FEED_UNSUPPORTED_SOURCE_TYPE` | Error | The product is the Open Banking product, or `DataSourceType` is `UseOpenBanking`. Open Banking feeds are not supported. |
| `DATA_FEED_OBSOLETE_PRODUCT` | Warning | The selected product is marked obsolete. The product is still valid and the feed is created. |

Each feed type accepts only certain product types.
| Feed type | Accepted product types |
|  --- | --- |
| Cash | `BankAccount` |
| Broker | `BrokerAccount`, `Other` |
| Platform | `WrapAccount` |

`TermDeposit` products and the placeholders Directly Held and No Product Required are
rejected on create. **Feed products** already excludes them, so this only applies when
passing a product ID obtained elsewhere.


---

**Data source and authorisation** — New feed
| Code | Severity | Raised when |
|  --- | --- | --- |
| `DATA_FEED_AUTHORISATION_TYPE_UNSUPPORTED` | Error | On an automated feed, the chosen `AuthorisationType` is not supported by the product's provider. Check `Authorisation.SupportedAuthorisationTypes` on **Feed products** first. |
| `DATA_FEED_UNSUPPORTED_PROPERTY` | Error | `DataSource.ContainingFeedId` was supplied when `DataSourceType` is not `IncludeInBrokerOrPlatformAccount`. |
| `DATA_FEED_INVALID_DATE_RANGE` | Error | `DoNotLoadAfter` is earlier than `DoNotLoadBefore`. Not checked for cash feeds using `ImportManually` or `IncludeInBrokerOrPlatformAccount`. |
| `DATA_FEED_INVALID_DATA_SOURCE_TYPE` | Error | `FeedType` is `Broker` and `DataSourceType` is neither `UseAutomatedFeed` nor `ImportManually`. |

Some providers attach an advisory warning to every automated feed created against their
products, covering things like restricted eligibility or an activation route that is
temporarily unavailable. These are provider-specific and do not prevent the feed being
created. See the warnings table below.


---

**Cash feeds** — New feed
| Code | Severity | Raised when |
|  --- | --- | --- |
| `DATA_FEED_INVALID_BSB` | Error | `Cash.BsbCode` is not a valid BSB. Format is `XXX-XXX` or six digits. |
| `DATA_FEED_INVALID_CLASSIFICATION_CODE` | Error | `AssetAllocation` is not `Cash` or `FixedInterest`, or a GL, tax return, CG or market type code cannot be resolved. See **Classification codes**. |
| `DATA_FEED_FOREIGN_CASH_NOT_SUPPORTED` | Error | `Cash.IsForeign` is `true`. Foreign cash accounts are not supported. |
| `DATA_FEED_LINKED_HOLDINGS_NOT_ALLOWED` | Error | Linked holdings were supplied on a cash feed. An empty array counts — omit the property entirely. |
| `DATA_FEED_CONTAINING_FEED_NOT_FOUND` | Error | `ContainingFeedId` does not reference an active broker or platform feed in the same fund. |
| `DATA_FEED_PRODUCT_BSB_MISMATCH` | Error | The product and BSB do not belong to the same financial institution. |
| `DATA_FEED_INVALID_ACCOUNT` | Error | The account fails bank account or BSB-to-institution rules. |
| `DATA_FEED_DEFAULT_ACCOUNT_FORBIDDEN` | Error | `DefaultAccount: true` was sent, but the business restricts who may set a default account and the caller is not permitted to. |
| `DATA_FEED_LINKED_TO_HOLDING_NOT_FOUND` | Error | `Cash.LinkedToHoldingAccountId` does not reference a holding account in the same fund. Distinct from `DATA_FEED_LINKED_HOLDING_NOT_FOUND`, which applies to broker and platform linked holdings. |
| `DATA_FEED_INVALID_NPP_METHOD` | Error | `NPPMethod` is not `Disabled`, `PayId`, `PayTo` or `Osko`. |
| `DATA_FEED_NPP_PAYID_NOT_ALLOWED` | Error | `PayID` was supplied while `NPPMethod` is not `PayId`. |
| `DATA_FEED_INVALID_NPP_PAYID` | Error | `NPPMethod` is `PayId` and `PayID` is over 256 characters, contains a space, or does not match the permitted format. |



---

**Linked holdings** — New feed
These apply to `Broker.LinkedHoldings` and `Platform.LinkedHoldings`. Comparisons are
case-insensitive.
| Code | Severity | Raised when |
|  --- | --- | --- |
| `DATA_FEED_LINKED_HOLDING_NOT_FOUND` | Error | `HoldingAccountId` is missing, or does not resolve to an active holding account in the same fund. |
| `DATA_FEED_LINKED_HOLDING_FIELD_MISMATCH` | Error | `InvestmentCode` and `InstalmentReceiptNumber` are inconsistent with the product. Covers supplying both, supplying either where the product does not accept it, and omitting `InstalmentReceiptNumber` where the product requires it. Check `LinkedHoldings.AcceptsInvestmentCode` and `LinkedHoldings.RequiresInstalmentReceiptNumber` on **Feed products**. |
| `DATA_FEED_LINKED_HOLDING_IR_NON_UNIQUE` | Error | The same `InstalmentReceiptNumber` appears twice among linked holdings of the same type. |
| `DATA_FEED_LINKED_HOLDING_TD_NON_UNIQUE` | Error | Two linked holding accounts that are term deposits have the same account code. |
| `DATA_FEED_LINKED_HOLDING_CODE_NON_UNIQUE` | Error | Two eligible linked holdings are for the same security and have the same `InvestmentCode` and `ManagedAccountCode`. Bank accounts, foreign bank accounts, term deposits and holdings with an `InstalmentReceiptNumber` are excluded. |
| `DATA_FEED_LINKED_HOLDING_TOO_MANY_BANKS` | Error | More than one bank account with the same currency was linked, and the product does not support multiple cash accounts. |



---

**Duplicates and identifiers** — New feed
| Code | Severity | Raised when |
|  --- | --- | --- |
| `DATA_FEED_DUPLICATE_ACCOUNT` | Error | The account code (`Cash.Code`), or the BSB and account number pair, is already used within the fund. |
| `DATA_FEED_DUPLICATE_IDENTIFIER` | Error | The HIN or account number is already used by another feed. The message names the conflicting feed. |
| `DATA_FEED_INVALID_IDENTIFIER` | Error | The HIN or account number contains characters outside the permitted format. |



---

**Update feed**
These are specific to **Update feed**, which also returns many of the New feed codes
above.
| Code | Severity | Raised when |
|  --- | --- | --- |
| `DATA_FEED_FIELD_NOT_ALLOWED` | Error | `Status`, top-level `AuthorisationVerified` or `DataSource.AuthorisationVerified` was supplied. These cannot be changed through **Update feed**. Use **Update feed status** to request a status transition. |
| `DATA_FEED_FIELD_IMMUTABLE` | Error | A value that cannot be changed on an existing feed was changed, such as `Cash.ManagedAccountCode`. |
| `DATA_FEED_KIND_MISMATCH` | Error | `FeedType` differs from the existing feed's type, is not a valid feed type, or does not match the type-specific block supplied. On this operation an invalid `FeedType` returns this code, not `DATA_FEED_INVALID_KIND`. |
| `PRODUCT_NOT_ALLOWED_IN_NON_DEMO_FUND` | Error | The selected product can only be used in a demo fund. |



---

**Update feed status**
| Code | Severity | Raised when |
|  --- | --- | --- |
| `DATA_FEED_FIELD_REQUIRED` | Error | `Status` is missing, null or blank. |
| `DATA_FEED_STATUS_TRANSITION_NOT_ALLOWED` | Error | The feed cannot move from its current status to the requested status. |



---

**Request-level errors.** Raised before feed validation runs.
| Code | Severity | Raised when |
|  --- | --- | --- |
| `API_INVALID_PARAMETER` | Error | A path parameter is not in the expected format, such as a `feedId` that is not a GUID. |
| `API_MODEL_BINDING` | Error | A query parameter or the request body cannot be bound to its type, such as a non-boolean `includeHoldingAccounts` or malformed JSON. |
| `API_INVALID_FUND_TYPE` | Error | The fund is not eligible. A fund must be Active and must not be a Consolidated entity. |
| `REQUIRED` | Error | A required part of the request is absent. Returned by **Upload authority form** when no file name is supplied. |
| `API_NOT_AUTHORISED` | Error | The token is missing, expired or does not carry the required scope. |
| `FORBIDDEN` | Error | The token is valid but lacks permission for this resource. |
| `API_NOT_FOUND` | Error | The resource does not exist, or the user has no access to the fund. |
| `API_INTERNAL_ERROR` | Error | An unexpected server error. |
| `DATA_FEED_VALIDATION_FAILED` | Error | A downstream validation failure with no more specific code. Treat as a generic rejection and read `Message`. |



---

**Warnings on a successful create**
These are returned in `Warnings` on a `200`. The feed **was** created — check
`Data.FeedId`. They never appear in `Errors`.
| Code | Raised when |
|  --- | --- |
| `DATA_FEED_NO_AUTHORITY_SET` | `AdviserOrDealer` was used without a linked authority. The feed is created with status `NoAuthoritySet` and will not receive data until an authority is attached. Expect this whenever `AuthorisationType` is `AdviserOrDealer` and `AuthorityId` is omitted. |
| `DATA_FEED_OBSOLETE_PRODUCT` | The selected product is marked obsolete. The product still works. |
| `DATA_FEED_HOLDING_CODE_REGENERATED` | Saving linked holdings caused one or more holding account codes to be regenerated. If you store holding account codes, read them again with **Feed detail** and `includeHoldingAccounts=true`. |
| Provider advisories | Certain providers attach a standing advisory to every automated feed created against their products. |



---

**Warnings on a successful update**
These are returned in `Warnings` on a `200`. The change **was** applied, and
`Data.Status` holds the feed's effective status. They never appear in `Errors`.
| Code | Operation | Raised when |
|  --- | --- | --- |
| `DATA_FEED_NO_AUTHORITY_SET` | **Update feed** | `AdviserOrDealer` was used without a linked authority. The feed is updated with status `NoAuthoritySet` and will not receive data until an authority is attached. |
| `DATA_FEED_AUTHORITY_CLEARED` | **Update feed** | `AuthorisationType` was changed without a replacement `AuthorityId`, so the previously linked authority was cleared. |
| `DATA_FEED_STATUS_ADJUSTED` | **Update feed status** | The system adjusted the requested status. `Data.Status.Status` holds the effective status, which differs from the one requested. |
| `DATA_FEED_AUTHORISATION_CONFIRMED` | **Update feed status** | An online feed was moved to `WaitingOnProvider`, confirming that your business is authorised to receive its data. |



---

**Warning shapes differ between operations.** Handle both.
**New feed**, **Update feed** and **Update feed status** return objects at the top
level of the envelope:

```json
"Warnings": [
  { "Code": "DATA_FEED_OBSOLETE_PRODUCT", "Message": "The selected product is obsolete." }
]
```
**Upload authority form** returns plain strings, nested inside `Data`:

```json
"Data": {
  "Warnings": [
    "Verification Required: The uploaded authority form for this account was not recognised..."
  ]
}
```


---

**Feed status codes and labels**
**New feed**, **Update feed** and **Update feed status** return the status **code**.
**Feeds** and **Feed detail** return the **label** for the same state. `Category` is
returned by all of them and has the same meaning in each, so use it to decide how to
handle a feed. **Update feed status** also takes a status code, never a label.
| Code (write) | Label (read) | Category |
|  --- | --- | --- |
| `Bonza` | OK | `Working` |
| `ManuallyImported` | Manually imported data | `Manual` |
| `FeedNotAvailable` | Feed not supported | `NoFeed` |
| `AuthoriserDeclined` | Declined by authoriser | `NoFeed` |
| `WaitingForVerification` | Waiting for verification | `ActionRequired` |
| `WaitingOnAuthoriser` | Waiting on authoriser | `Waiting` |
| `WaitingOnProvider` | Waiting on provider | `Waiting` |
| `FollowUpRequested` | Follow-up requested | `Waiting` |
| `ReceivedByProvider` | Received by provider | `Waiting` |
| `ActivatedByProvider` | Activated by provider | `Waiting` |
| `ActivationOverdue` | Activation Overdue | `Waiting` |
| `NoProductSet` | Product not set | `ActionRequired` |
| `AuthorityNotRequested` | Authority not sent | `ActionRequired` |
| `NoAuthoritySet` | Adviser not set | `ActionRequired` |
| `NoHoldingReferenceSet` | Platform/Broker account not set | `ActionRequired` |
| `AccountNumberNotSet` | Account Number not set | `ActionRequired` |
| `BsbNotValid` | BSB not valid | `ActionRequired` |
| `RejectedByProvider` | Rejected by provider | `ActionRequired` |
| `UnlinkedAssets` | Unlinked holdings | `ActionRequired` |
| `FeedNoLongerActive` | Feed no longer active | `Error` |
| `AccountSuspended` | Account suspended | `Error` |
| `Srn` | SRN not supported | `NoFeed` |
| `AccountClosed` | Account Closed | `NoFeed` |
| `NonBankAccount` | Non-bank account |  |
| `LinkedToWrapOrBroker` | Linked to platform/broker account |  |

