# Migrating from API v1

We have put together some information to help users moving from API v1 to v2. In particular we highlight some of the main differences to anticipate when making the switch.

### Authentication

The API now uses simple API Tokens. See section on [authentication](/getting-started/quickstart-1.md).

### New Endpoints for Wholesaler Catalogs

In the new API users are able to access products in a wholesalers catalog using the [Wholesaler Catalog ](/api-reference/wholesaler-catalogs.md)endpoints. This provides a much easier way to access product data quickly for a *wholesaler*. These endpoints also allow you access a product specification directly using the wholesaler's own product code.

### Data Model Changes

The data model for Erudus has been expanded since v1 of the API. Please review the schema browser accessible from the API portal and the main Erudus application for the complete set of current fields, which are frequently being added to.&#x20;

In v2 each product *specification type* (schema) can have a different set of fields depending on its value. Please use the schema browser for reference.

When updating a product you must supply the entire product in the payload. In v1 it was possible to update an inner component as a separate process. This is no longer supported.

The changes listed below are concerned with changes to field names and mappings, to assist with migrating existing integrations with v2 of the API.

#### Product level fields that have changed

| Old Name                                    | New/Equivalent Name         | Notes                                                       |
| ------------------------------------------- | --------------------------- | ----------------------------------------------------------- |
| supplier\_id                                | manufacturer                |                                                             |
| wholesaler\_id                              | label                       |                                                             |
| case\_label\_name                           | manufacturer\_product\_name |                                                             |
| suppliers\_product\_code                    | manufacturer\_product\_code |                                                             |
| wholesaler\_code                            | label\_code                 |                                                             |
| <p>food\_drink\_id<br>food\_drink</p>       | product\_type               | API V2 returns id and description inside this single field. |
| <p>category\_id<br>category</p>             | storage\_type               | API V2 returns id and description inside this single field. |
| <p>generic\_field\_id<br>generic\_field</p> | product\_category           | API V2 returns id and description inside this single field. |
| supplier\_comments                          | manufacturer\_comments      |                                                             |
| outer\_case\_length                         | outer\_case\_depth          |                                                             |
| unit\_load\_layer\_items                    | cases\_per\_pallet\_layer   |                                                             |
| unit\_load\_layers                          | layers\_per\_pallet         |                                                             |
| traded\_items\_per\_unit\_load              | cases\_per\_pallet          |                                                             |
| unit\_load\_height                          | pallet\_height              |                                                             |
| unit\_load\_gross\_weight                   | pallet\_gross\_weight       |                                                             |
| max\_lifespan                               | max\_shelf\_life            |                                                             |
| is\_multipack                               | ---removed---               |                                                             |
| outer\_packaging\_plastic\_weight           | --removed---                |                                                             |
| outer\_packaging\_glass\_weight             | --removed---                |                                                             |
| outer\_packaging\_paper\_weight             | --removed---                |                                                             |
| outer\_packaging\_alu\_weight               | --removed---                |                                                             |
| outer\_packaging\_steel\_weight             | --removed---                |                                                             |
| outer\_packaging\_other\_weight             | --removed---                |                                                             |
| outer\_recycled\_plastic\_percentage        | --removed---                |                                                             |
| pmw\_plastic                                | --removed---                |                                                             |
| pmw\_paperboard                             | --removed---                |                                                             |
| pmw\_wood                                   | --removed---                |                                                             |
| transport\_recycled\_plastic\_percentage    | --removed---                |                                                             |

#### Component level fields that have changed

| Old Name                             | New/Equivelant Name                                            | Notes                                                        |
| ------------------------------------ | -------------------------------------------------------------- | ------------------------------------------------------------ |
| suppliers\_component\_code           | manufacturers\_component\_code                                 |                                                              |
| inner\_pack\_length                  | inner\_component\_depth                                        |                                                              |
| inner\_pack\_depth                   | inner\_component\_height                                       |                                                              |
| inner\_pack\_width                   | inner\_component\_width                                        |                                                              |
| inner\_product\_weight               | <p>inner\_component\_weight<br>inner\_component\_volume</p>    | This field has been split out into weight and volume fields. |
| inner\_product\_weight\_units        | inner\_component\_weight\_unitsinner\_component\_volume\_units |                                                              |
| artifical\_flavourings               | artificial\_flavourings                                        |                                                              |
| artifical\_flavour\_enhancers        | artificial\_flavour\_enhancers                                 |                                                              |
| artifical\_preservatives             | artificial\_preservatives                                      |                                                              |
| artifical\_sweeteners                | artificial\_sweeteners                                         |                                                              |
| contains\_alomond\_nuts              | contains\_almond\_nuts                                         |                                                              |
| contains\_queensland\_nuts           | ---removed---                                                  |                                                              |
| contains\_kamut                      | ---removed---                                                  |                                                              |
| contains\_spelt                      | ---removed---                                                  |                                                              |
| allergen\_statement                  | additional\_allergen\_information                              |                                                              |
| halal\_approved                      | halal\_suitable                                                |                                                              |
| kosher\_approved                     | kosher\_suitable                                               |                                                              |
| serving                              | serving\_size                                                  |                                                              |
| fat\_percentage\_dry                 | fat\_percentage\_dry\_100                                      |                                                              |
| non\_milk\_extrinsic\_sugars\_100g   | non\_milk\_extrinsic\_sugars\_100                              |                                                              |
| vitamin\_a\_100g                     | vitamin\_a\_100                                                |                                                              |
| vitamin\_c\_100g                     | vitamin\_c\_100                                                |                                                              |
| folate\_100g                         | folate\_100                                                    |                                                              |
| sodium\_100                          | sodium\_100                                                    | Now in **mg**                                                |
| calcium\_100g                        | calcium\_100                                                   |                                                              |
| iron\_100g                           | iron\_100                                                      |                                                              |
| zinc\_100g                           | zinc\_100                                                      |                                                              |
| count\_per\_pack                     | count\_per\_inner\_component                                   |                                                              |
| red\_tractor                         | acc\_red\_tractor                                              |                                                              |
| fair\_trade                          | acc\_fair\_trade                                               |                                                              |
| marine\_stewardship                  | acc\_msc                                                       |                                                              |
| organic                              | acc\_organic                                                   |                                                              |
| brc\_certified                       | acc\_brcgs\_certified                                          |                                                              |
| eec\_number                          | health\_marks                                                  |                                                              |
| inner\_packaging\_glass\_weight      | ---removed---                                                  |                                                              |
| inner\_packaging\_plastic\_weight    | ---removed---                                                  |                                                              |
| inner\_packaging\_paper\_weight      | ---removed---                                                  |                                                              |
| inner\_packaging\_alu\_weight        | ---removed---                                                  |                                                              |
| inner\_packaging\_steel\_weight      | ---removed---                                                  |                                                              |
| inner\_packaging\_other\_weight      | ---removed---                                                  |                                                              |
| inner\_recycled\_plastic\_percentage | ---removed---                                                  |                                                              |
| inner\_packaging\_type\_id           | ---removed---                                                  |                                                              |
| lactose\_intolerance\_suitable       | ---removed---                                                  |                                                              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.erudus.com/getting-started/migrating-from-api-v1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
