Agrifeed format

VegApps supports the Agrifeed format specification. In this documentation you will find guidelines for the format in its latest and accepted version (stable distribution)

Current stable version: 5.17
UE spec numbers: EN ISO/IEC 20000 i 98/6/WE

Through VegApps you can access all the services possible with this format. The documentation below contains the most frequently used functionalities. Contact us to learn about other functionalities.

Contents

Software requirements

The Agrifeed format is a JSON object containing data in a standardized form. It does not require additional tools beyond the standard JSON functions in a given programming language.

VegApps.com in the free version has the ability to bidirectionally convert to Agrifeed format from other formats such as csv, pdf, excel.

After correct implementation of the format, the system downloading the price list should return:

Request head
Status: 200 OK
Content type: application/json
Request body
{
    "status": "success"
}

Price list integration should be automatic, without the need for staff intervention.

After the update process is completed correctly, the prices and availability of products from a given company should automatically change sent. Any other processes should be started at this point.

Authorization

Authorization is optional. There are 2 options for securing or personalizing the price list for specific people.

Bearer Token
The key is passed in the header:

Request head
Authorization: Bearer {token}

Individual url address
The key is a unique, hard-to-guess URL address containing the data. You can use $_GET parameters for this purpose, e.g.:

GET
pricelist.json?token={token}

Personalization

Personalization is done using the methods used for authorization.

Boundary ranges of type INT signed / unsigned

Range INT signed = -2,147,483,648 to 2,147,483,647

Range INT unsigned = 0 to 4294 967 295

Range BIGINT singed = -9223372036854775808 to 9223372036854775807

Range BIGINT unsigned = 0 to 18446744073709551615

Date and time format

Date and time are recorded according to ISO8601 (ATOM)

Current date and time from the server: 2024-05-07T17:33:30+02:00

PHP Example
$objDateTime = new DateTime('NOW');
$isoDate = $objDateTime->format(DateTime::ATOM);
echo $isoDate;

Sample JSON file with all functionalities

Request body
{
    "id": 1, // optional
    "sandbox": false, // optional
    "title": {
        "default": "Price list",
        "en": "Price list" // optional
    },
    "description": { // optional
        "default": "Our latest prices",
        "en": "Our latest prices"
    },
    "url": "https://example.com/pricelist", // optional
    "company" : {
        "id": 1, // optional
        "name" : "The Best Company",
        "address" : "10 Downing Street", // optional
        "city" : "London", // optional
        "postcode" : "SW1A 2AA", // optional
        "country" : "United Kingdom", // optional
        "taxId" : "GB123123123", // optional
        "url" : "https://example.com", // optional
        "email": "hello@example.com" // optional
    },
    "validTo": "2025-06-13T12:51:01+02:00", // optional
    "update" : {
        "dateAt": "2024-04-24T07:11:03+02:00",
        "url": "https://example.com/update" // optional
    },
    "categories": [ // optional
        {
            "id": 1,
            "parentId" : 0, // optional
            "name" : {
                "default": "Vegetables",
                "en": "Vegetables" // optional
            },
            "path": [ // optional
                0
            ],
            "url": "https://example.com/vegetables", // optional
            "custom1": "aaa",  // optional
            "custom2": "bbb",  // optional
            "custom3": "ccc",  // optional
            "custom4": "ddd",  // optional
            "custom5": "eee"  // optional
        }
    ],
    "products" : [
        {
            "id": 1, // optional
            "ean": "5411683231004", // optional
            "name" : {
                "default": "Broccoli",
                "en": "Broccoli"  // optional
            },
            "description": { // optional
                "default": "Broccoli is classified in the Italica cultivar group of the species Brassica oleracea.",
                "en": "Broccoli is classified in the Italica cultivar group of the species Brassica oleracea."
            },
            "variants": {  // optional
                "current": {
                    "variantId": 1, // optional
                    "priceNet": 1.55, // optional
                    "priceGross": 1.90,// optional
                    "tax": "23", // optional
                    "currency": "EUR", // optional
                    "isPromotion" : true, // optional
                    "regularPriceGross" : 2.90, // optional
                    "lowestPriceGrossBeforeDiscount" : 1.70, // optional
                    "unit": { // optional
                        "type": "KG", // optional
                        "value" : 1, // optional
                        "id": 1, // optional
                        "name": {
                            "default": "1 kg",
                            "en": "1 kg." // optional
                        }
                    },
                    "packaging": [ // optional
                        {
                            "type": "EPS", // optional
                            "id": 1, // optional
                            "name": { // optional
                                "default": "EPS tray (plastic)",
                                "en": "EPS tray (plastic)" // optional
                            },
                            "custom_1" : "", // optional
                            "custom_2" : "" // optional

                        }
                    ],
                    "validFrom": "2025-05-13T12:51:01+02:00", // optional
                    "validTo": "2025-07-13T12:51:01+02:00", // optional
                    "countriesOrigin": ["GB","ES"], // optional
                    "countryTransportFrom": "GB", // optional
                    "postcodeTransportFrom": "SW1A 2AA", // optional
                    "cityTransportFrom": "London", // optional
                    "addressTransportFrom": "10 Downing Street", // optional
                    "nameTransportFrom": "The Best Company Warehouse", // optional
                    "stock": 77, // optional
                    "maxQuantity": 51, // optional
                    "warehouses": [// optional
                        {
                            "id": 1,
                            "stock": 77,// optional
                            "maxQuantity": 51 // optional
                        }
                    ],
                    "suppliers": [// optional
                        {
                            "id": 1,
                            "stock": 77, // optional
                            "maxQuantity": 51 // optional
                        }
                    ],
                    "manufaktrurers": [// optional
                        {
                            "id": 1,
                            "stock": 77, // optional
                            "maxQuantity": 51 // optional
                        }
                    ],
                    "brandId" : 1,// optional
                    "custom1": "",// optional
                    "custom2": "",// optional
                    "custom3": "",// optional
                    "custom4": "",// optional
                    "custom5": ""// optional
                },
                "options": [  // optional

                ]
            },
            "url" : "https://example.com/broc",  // optional
            "categoriesIds" : [ // optional
                1
            ],

            "isAvailable": true, // optional
            "isPromotion" : true, // optional
            "isNew" : true // optional
        }
    ],
    "warehouses": [  // optional
        {
            "id" : 1,
            "name" : "BestWarehouse",
            "address" : "10 Downing Street", // optional
            "city" : "London", // optional
            "postcode" : "SW1A 2AA", // optional
            "country" : "United Kingdom", // optional
            "url" : "https://example.com", // optional
            "email": "hello@example.com" // optional
            "custom1": "",// optional
            "custom2": "",// optional
            "custom3": "",// optional
            "custom4": "",// optional
            "custom5": ""// optional
        }
    ],
    "manufaktrurers" : [// optional
        {
            "id": 1,
            "name" : "BestManufaktrurer",
            "address" : "10 Downing Street", // optional
            "city" : "London", // optional
            "postcode" : "SW1A 2AA", // optional
            "country" : "United Kingdom", // optional
            "taxId" : "GB123123123", // optional
            "url" : "https://example.com", // optional
            "email": "hello@example.com" // optional
            "custom1": "",// optional
            "custom2": "",// optional
            "custom3": "",// optional
            "custom4": "",// optional
            "custom5": ""// optional
        }
    ],

    "suppliers" : [ // optional
        {
            "id": 1,
            "name" : "BestSupplier",
            "address" : "10 Downing Street", // optional
            "city" : "London", // optional
            "postcode" : "SW1A 2AA", // optional
            "country" : "United Kingdom", // optional
            "taxId" : "GB123123123", // optional
            "url" : "https://example.com", // optional
            "email": "hello@example.com" // optional
            "custom1": "",// optional
            "custom2": "",// optional
            "custom3": "",// optional
            "custom4": "",// optional
            "custom5": ""// optional
        }
    ],
    "brands" : [ // optional
        {
            "id" : 1,
            "default": "BestBrand",
            "en": "BestBrand"  // optional
        }
    ],

    "custom1": "aaa",  // optional
    "custom2": "bbb",  // optional
    "custom3": "ccc",  // optional
    "custom4": "ddd",  // optional
    "custom5": "eee",  // optional
    "formatName" : "agrifeed",
    "formatVersion" : "5.17",
    "formatDocumentation" : "https://vegapps.com/auto/agrifeed/spec?v=5.17"
}

Sample JSON file with only the required functionalities

Request body
{
    "title": {
        "default": "Price list"
    },
    "company" : {
        "name" : "The Best Company"
    },
    "update" : {
        "dateAt": "2024-04-24T07:11:03+02:00"
    },
    "products" : [
        {
            "name" : {
                "default": "Broccoli"
            }
        }
    ],
    "formatName" : "agrifeed",
    "formatVersion" : "5.17",
    "formatDocumentation" : "https://vegapps.com/auto/agrifeed/spec?v=5.17"
}

Sample JSON file recommended for deployment

Request body
{
    "title": {
        "default": "Price list",
    },
    "company" : {
        "id": 1,
        "name" : "The Best Company",
        "address" : "10 Downing Street",
        "city" : "London",
        "postcode" : "SW1A 2AA",
        "country" : "United Kingdom",
        "taxId" : "GB123123123",
        "url" : "https://example.com",
        "email": "hello@example.com"
    },
    "update" : {
        "dateAt": "2024-04-24T07:11:03+02:00"
    },
    "products" : [
        {
            "name" : {
                "default": "Broccoli"
            },
            "variants": {
                "current": {
                    "priceNet": 1.55,
                    "priceGross": 1.90,
                    "tax": 23,
                    "currency": "EUR",
                    "unit": {
                        "name": {
                            "default": "1 kg"
                        }
                    }
                }
            },
            "isAvailable": true
        }
    ],
    "formatName" : "agrifeed",
    "formatVersion" : "5.17",
    "formatDocumentation" : "https://vegapps.com/auto/agrifeed/spec?v=5.17"
}

Production and sandbox environment

We specify the test environment using the optional sandbox value in the main object.
Request body
{
...
    "sandbox": false
...
}

Basic data

object

General info about pricelist

id integer

Pricelist ID

title required object

Pricelist title object:

default required string

Default value of name

en string

Key is the language code by ISO 639.
The value is representation for key language

description object

Pricelist description object:

default required if object set string

Default value of name

en string

Key is the language code by ISO 639.
The value is representation for key language

url string

Url address to current pricelist

validTo date in ISO8601 (ATOM) format

Date until which the pricelist is valid

update required object

Information about update as object:

dateAt required date in ISO8601 (ATOM) format

Last update date

url string

Url address to send new pricelist object to update this pricelist

custom1..5 string

place for customs variables

formatName required string

Format name

formatVersion required string

Format version

formatDocumentation required string

Url to this format current documentation

Request body
{
...
    "id": 1, // optional
    "title": {
        "default": "Price list",
        "en": "Price list" // optional
    },
    "description": { // optional
        "default": "Our latest prices",
        "en": "Our latest prices"
    },
    "url": "https://example.com/pricelist", // optional
    "validTo": "2025-06-13T12:51:01+02:00", // optional
    "update" : {
        "dateAt": "2024-04-24T07:11:03+02:00",
        "url": "https://example.com/update" // optional
    },
    "custom1": "aaa",  // optional
    "custom2": "bbb",  // optional
    "custom3": "ccc",  // optional
    "custom4": "ddd",  // optional
    "custom5": "eee",  // optional
    "formatName" : "agrifeed",
    "formatVersion" : "5.17",
    "formatDocumentation" : "https://vegapps.com/auto/agrifeed/spec?v=5.17"
...
}

Company object

object

Owner of pricelist

id integer

Company ID

name required string

Company name

address string

Street and numbers

city string

Name of city

postcode string

Post code

country string

Country - full name

taxId string

Tax id if needed then with country code (for ue countries)

url string

Webiste url

email string

Contact email address

Request body
{
...
    "company" : {
        "id": 1, // optional
        "name" : "The Best Company",
        "address" : "10 Downing Street", // optional
        "city" : "London", // optional
        "postcode" : "SW1A 2AA", // optional
        "country" : "United Kingdom", // optional
        "taxId" : "GB123123123", // optional
        "url" : "https://example.com", // optional
        "email": "hello@example.com" // optional
    },
...
}

Categories

array of objects ref: productObject.categoriesIds[] = object.id

Categories list used in products

id required if object set integer

Object ID

parentId required if has parent integer

Parent category ID

name required if object set object

Object name object:

default required string

Default value of name

en string

Key is the language code by ISO 639.
The value is representation for key language

path array

Parents categories id sorted from the top categories

url string

Webiste url

custom1..5 string

place for customs variables

Request body
{
...
    "categories": [ // optional
        {
            "id": 1,
            "parentId" : 0,
            "name" : {
                "default": "Vegetables",
                "en": "Vegetables" // optional
            },
            "path": [ // optional
                0
            ],
            "url": "https://example.com/vegetables", // optional
            "custom1": "aaa",  // optional
            "custom2": "bbb",  // optional
            "custom3": "ccc",  // optional
            "custom4": "ddd",  // optional
            "custom5": "eee"  // optional
        }
    ],
...
}

Products

array of objects

Products objects lists

id integer

Object ID

ean string

EAN number

name required object

Product name object:

default required string

Default value of name

en string

Key is the language code by ISO 639.
The value is representation for key language.
You can add as many languages as you need.

description object

Product description object:

default required if set string

Default value of name

en string

Key is the language code by ISO 639.
The value is representation for key language.
You can add as many languages as you need.

variants.current object

Check products[].variants.current documentation

variants.options array

This is other variants of this products for eg. if you want to set other price for other unit/size of product.

Of course you don`t have to use this. You can add each size as standalone product.

List of objects with format this same like in object variants.current.

url string

Webiste url

categoriesIds array

Products categories ids

isAvailable bool

Information about product available.
true - is available
false - is NOT available
no set - is available (by default or we dont know and we use stock to know)

isPromotion bool

Information about product promotion.
true - is promoted
false - is NOT promoted
no set - is NOT promoted (by default)

isNew bool

Information if product is new.
true - is new
false - is NOT new
no set - is NOT new (by default)

Request body
{
...
"products" : [
        {
            "id": 1, // optional
            "ean": "5411683231004", // optional
            "name" : {
                "default": "Broccoli",
                "en": "Broccoli"  // optional
            },
            "description": { // optional
                "default": "Broccoli is classified in the Italica cultivar group of the species Brassica oleracea.",
                "en": "Broccoli is classified in the Italica cultivar group of the species Brassica oleracea."
            },
            "variants": {  // optional
                "current": {

                },
                "options": [  // optional

                ]
            },
            "url" : "https://example.com/broc",  // optional
            "categoriesIds" : [ // optional
                1
            ],

            "isAvailable": true, // optional
            "isPromotion" : true, // optional
            "isNew" : true // optional
        }
    ],
...
}

products[].variants.current

object

Product current variant object

variantId integer

Object ID

priceNet decimal

Net price

priceGross decimal

Gross price

tax string

Tax percente number or code of exempt

currency string

Currency code in ISO 4217 format

isPromotion bool

Information about product promotion.
true - is promoted
false - is NOT promoted
no set - is NOT promoted (by default)

regularPriceGross decimal

Standard price

lowestPriceGrossBeforeDiscount decimal

Last lowest price before discount start

unit object

Unit object:

type string

Code of type - see units types in documentation

id integer

id of type - see units types in documentation

value decimal

Value of type

name.default required if object set string

String description of value

name.en string

Key is the language code by ISO 639.
The value is representation for key language

packaging object

Packaging object:

type string

Code of packaging - see packagings types in documentation

id integer

id of type - see packagings types in documentation

value decimal

Value of type

name.default required if object set string

String description of value

name.en string

Key is the language code by ISO 639.
The value is representation for key language

custom1..2 string

place for customs variables

validFrom date in ISO8601 (ATOM) format

Date from which the variant is valid

validTo date in ISO8601 (ATOM) format

Date until which the variant is valid

countriesOrigin array

List of countries in ISO 3166 format

countryTransportFrom string

Country from transport will be

postcodeTransportFrom string

Post code from transport will be

cityTransportFrom string

City from transport will be

addressTransportFrom string

Address from transport will be

nameTransportFrom string

Address Name from transport will be

stock integer

How many on stock

maxQuantity integer

How many available to buy

warehouses array

Object list of warehouses:

id required if set integer

Ref to warehouses list object

stock integer

How many on stock

maxQuantity integer

How many available to buy

suppliers array

Object list of suppliers:

id required if set integer

Ref to suppliers list object

stock integer

How many on stock

maxQuantity integer

How many available to buy

manufaktrurers array

Object list of manufaktrurers:

id required if set integer

Ref to manufaktrurers list object

stock integer

How many on stock

maxQuantity integer

How many available to buy

brandId integer

Ref to brand list object

custom1..5 string

place for customs variables

Request body
{
...
"products" : [
        {
            "variants": {  // optional
                "current": {
                    "variantId": 1, // optional
                    "priceNet": 1.55, // optional
                    "priceGross": 1.90, // optional
                    "tax": "23", // optional
                    "currency": "EUR", // optional
                    "isPromotion" : true, // optional
                    "regularPriceGross" : 2.90, // optional
                    "lowestPriceGrossBeforeDiscount" : 1.70, // optional
                    "unit": { // optional
                        "type": "KG", // optional
                        "value" : 1, // optional
                        "id": 1, // optional
                        "name": {
                            "default": "1 kg",
                            "en": "1 kg." // optional
                        }
                    },
                    "packaging": [ // optional
                        {
                            "type": "EPS", // optional
                            "id": 1, // optional
                            "name": { // optional
                                "default": "EPS tray (plastic)",
                                "en": "EPS tray (plastic)" // optional
                            }
                        }
                    ],
                    "validFrom": "2025-05-13T12:51:01+02:00", // optional
                    "validTo": "2025-07-13T12:51:01+02:00", // optional
                    "countriesOrigin": ["GB","ES"], // optional
                    "countryTransportFrom": "GB", // optional
                    "postcodeTransportFrom": "SW1A 2AA", // optional
                    "cityTransportFrom": "London", // optional
                    "addressTransportFrom": "10 Downing Street", // optional
                    "nameTransportFrom": "The Best Company Warehouse", // optional
                    "stock": 77, // optional
                    "maxQuantity": 51, // optional
                    "warehouses": [// optional
                        {
                            "id": 1,
                            "stock": 77,// optional
                            "maxQuantity": 51 // optional
                        }
                    ],
                    "suppliers": [// optional
                        {
                            "id": 1,
                            "stock": 77, // optional
                            "maxQuantity": 51 // optional
                        }
                    ],
                    "manufaktrurers": [// optional
                        {
                            "id": 1,
                            "stock": 77, // optional
                            "maxQuantity": 51 // optional
                        }
                    ],
                    "brandId" : 1,// optional
                    "custom1": "",// optional
                    "custom2": "",// optional
                    "custom3": "",// optional
                    "custom4": "",// optional
                    "custom5": ""// optional
                }
            }
        }
    ],
...
}

Warehouses

array of objects ref: productObject.warehouses[].id = object.id

Warehouses list used in products

id required if object set integer

Object ID

name required if object set string

Object name

address string

Street and numbers

city string

Name of city

postcode string

Post code

country string

Country - full name

taxId string

Tax id if needed then with country code (for ue countries)

url string

Webiste url

email string

Contact email address

custom1..5 string

place for customs variables

Request body
{
...

    "warehouses": [  // optional
        {
            "id" : 1,
            "name" : "BestWarehouse",
            "address" : "10 Downing Street", // optional
            "city" : "London", // optional
            "postcode" : "SW1A 2AA", // optional
            "country" : "United Kingdom", // optional
            "url" : "https://example.com", // optional
            "email": "hello@example.com" // optional
            "custom1": "",// optional
            "custom2": "",// optional
            "custom3": "",// optional
            "custom4": "",// optional
            "custom5": ""// optional
        }
    ],
...
}

Manufaktrurers

array of objects ref: productObject.manufaktrurers[].id = object.id

Manufaktrurers list used in products

id required if object set integer

Object ID

name required if object set string

Object name

address string

Street and numbers

city string

Name of city

postcode string

Post code

country string

Country - full name

taxId string

Tax id if needed then with country code (for ue countries)

url string

Webiste url

email string

Contact email address

custom1..5 string

place for customs variables

Request body
{
...

    "manufaktrurers" : [// optional
        {
            "id": 1,
            "name" : "BestManufaktrurer",
            "address" : "10 Downing Street", // optional
            "city" : "London", // optional
            "postcode" : "SW1A 2AA", // optional
            "country" : "United Kingdom", // optional
            "taxId" : "GB123123123", // optional
            "url" : "https://example.com", // optional
            "email": "hello@example.com" // optional
            "custom1": "",// optional
            "custom2": "",// optional
            "custom3": "",// optional
            "custom4": "",// optional
            "custom5": ""// optional
        }
    ],
...
}

Suppliers list

array of objects ref: productObject.suppliers[].id = object.id

Suppliers list used in products

id required if object set integer

Object ID

name required if object set string

Object name

address string

Street and numbers

city string

Name of city

postcode string

Post code

country string

Country - full name

taxId string

Tax id if needed then with country code (for ue countries)

url string

Webiste url

email string

Contact email address

custom1..5 string

place for customs variables

Request body
{
...
    "suppliers" : [ // optional
        {
            "id": 1,
            "name" : "BestSupplier",
            "address" : "10 Downing Street", // optional
            "city" : "London", // optional
            "postcode" : "SW1A 2AA", // optional
            "country" : "United Kingdom", // optional
            "taxId" : "GB123123123", // optional
            "url" : "https://example.com", // optional
            "email": "hello@example.com" // optional
            "custom1": "",// optional
            "custom2": "",// optional
            "custom3": "",// optional
            "custom4": "",// optional
            "custom5": ""// optional
        }
    ],
...
}

Brands list

array of objects ref: productObject.brandId = object.id

Brand list used in products

id required if object set integer

Brand ID

default required if object set string

Default value of name

en string

Key is the language code by ISO 639.
The value is representation for key language

Request body
{
...

    "brands" : [ // optional
        {
            "id" : 1,
            "default": "BestBrand",
            "en": "BestBrand"  // optional
        }
    ],
...
}

Unit types

ID Code Name
1 OTHER other unit
2 KG kilogram
3 G gram
4 UNIT unit (price for each product)
5 L liter
6 ML milliliter

Packages types

ID Code Name
1 OTHER other packaging
2 WOODEN Wooden tray
3 CARTON Carton tray
4 EPS EPS tray (plastic)
5 IFCO IFCO tray (plastic)
6 PALLETAINER Palletainer
7 NETSKG kg nets
8 BIGBAG big bag
9 BULK bulk