Open Food Network VINE - API Documentation

Postman collection → OpenAPI spec →

Introduction

The API documentation for Open Food Network VINE.

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_API_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

About API Credentials

When you receive API credentials, they will be made up of a token and an accompanying secret. Your secret should never be displayed in front end code, or in any version control repositories, for security.

Signing Your requests

All API requests must be signed, to improve API security. To do this, you must generate a JWT comprising your current request, signed with your API Token secret.

Send the JWT content in the X-Authorization header as follows

All JWTs must have the following claims:

  • iat - current timestamp, in UTC - must not be less than a minute ago
  • exp - expiry timestamp, in UTC - must not be more than a minute later than iat claim
  • iss - indicating issuer of the jwt

Generating a JWT

PHP


use Lcobucci\JWT\Encoding\ChainedFormatter;
use Lcobucci\JWT\Encoding\JoseEncoder;
use Lcobucci\JWT\Signer\Hmac\Sha256;
use Lcobucci\JWT\Signer\Key\InMemory;
use Lcobucci\JWT\Token\Builder;

$tokenBuilder       = (new Builder(new JoseEncoder(), ChainedFormatter::default()));
$algorithm          = new Sha256();
$signingKey         = InMemory::plainText(YOUR_API_SECRET);
$now                = new \DateTimeImmutable();
$token              = $tokenBuilder
    ->issuedBy(ISSUING_BODY)
    ->issuedAt(now()->toDateTimeImmutable())
    ->expiresAt(now()->addSeconds(30)->toDateTimeImmutable())
    ->getToken($algorithm, $signingKey);

$jwt = $token->toString();

Ruby

require 'jwt'

# Your secret signing key (must be a strong secret)
signing_key = YOUR_API_SECRET

# Define the payload (the data you want to encode in the token)
payload = {
  iss: YOUR_ISSUING_BODY,       # Your issuer
  iat: Time.now.to_i            # Token issued at time (now)
  exp: Time.now.to_i + 60       # Token expiration time (1 minute from now)
}

# Choose the algorithm for signing (HS256 is common for symmetric signing keys)
algorithm = 'HS256'

# Generate the JWT
token = JWT.encode(payload, signing_key, algorithm)

puts "Generated JWT: #{token}"

App Endpoints

/countries

Retrieve the available countries list.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/countries
requires authentication

Retrieve the countries list.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/countries?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-09-13 05:05:29",
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "name": "Afghanistan",
                "alpha2": "AF",
                "alpha3": "AFG",
                "numeric": "004",
                "currency_code": "AFN",
                "created_at": "2024-09-13T05:05:28.000000Z",
                "updated_at": "2024-09-13T05:05:28.000000Z",
                "deleted_at": null
            },
            {
                "id": 2,
                "name": "Åland Islands",
                "alpha2": "AX",
                "alpha3": "ALA",
                "numeric": "248",
                "currency_code": "EUR",
                "created_at": "2024-09-13T05:05:28.000000Z",
                "updated_at": "2024-09-13T05:05:28.000000Z",
                "deleted_at": null
            },
            {
                "id": 3,
                "name": "Albania",
                "alpha2": "AL",
                "alpha3": "ALB",
                "numeric": "008",
                "currency_code": "ALL",
                "created_at": "2024-09-13T05:05:28.000000Z",
                "updated_at": "2024-09-13T05:05:28.000000Z",
                "deleted_at": null
            },
            {
                "id": 4,
                "name": "Algeria",
                "alpha2": "DZ",
                "alpha3": "DZA",
                "numeric": "012",
                "currency_code": "DZD",
                "created_at": "2024-09-13T05:05:28.000000Z",
                "updated_at": "2024-09-13T05:05:28.000000Z",
                "deleted_at": null
            },
            {
                "id": 5,
                "name": "American Samoa",
                "alpha2": "AS",
                "alpha3": "ASM",
                "numeric": "016",
                "currency_code": "USD",
                "created_at": "2024-09-13T05:05:28.000000Z",
                "updated_at": "2024-09-13T05:05:28.000000Z",
                "deleted_at": null
            },
            {
                "id": 6,
                "name": "Andorra",
                "alpha2": "AD",
                "alpha3": "AND",
                "numeric": "020",
                "currency_code": "EUR",
                "created_at": "2024-09-13T05:05:28.000000Z",
                "updated_at": "2024-09-13T05:05:28.000000Z",
                "deleted_at": null
            },
            {
                "id": 7,
                "name": "Angola",
                "alpha2": "AO",
                "alpha3": "AGO",
                "numeric": "024",
                "currency_code": "AOA",
                "created_at": "2024-09-13T05:05:28.000000Z",
                "updated_at": "2024-09-13T05:05:28.000000Z",
                "deleted_at": null
            },
            {
                "id": 8,
                "name": "Anguilla",
                "alpha2": "AI",
                "alpha3": "AIA",
                "numeric": "660",
                "currency_code": "XCD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 9,
                "name": "Antarctica",
                "alpha2": "AQ",
                "alpha3": "ATA",
                "numeric": "010",
                "currency_code": "ARS",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 10,
                "name": "Antigua And Barbuda",
                "alpha2": "AG",
                "alpha3": "ATG",
                "numeric": "028",
                "currency_code": "XCD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 11,
                "name": "Argentina",
                "alpha2": "AR",
                "alpha3": "ARG",
                "numeric": "032",
                "currency_code": "ARS",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 12,
                "name": "Armenia",
                "alpha2": "AM",
                "alpha3": "ARM",
                "numeric": "051",
                "currency_code": "AMD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 13,
                "name": "Aruba",
                "alpha2": "AW",
                "alpha3": "ABW",
                "numeric": "533",
                "currency_code": "AWG",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 14,
                "name": "Australia",
                "alpha2": "AU",
                "alpha3": "AUS",
                "numeric": "036",
                "currency_code": "AUD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 15,
                "name": "Austria",
                "alpha2": "AT",
                "alpha3": "AUT",
                "numeric": "040",
                "currency_code": "EUR",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 16,
                "name": "Azerbaijan",
                "alpha2": "AZ",
                "alpha3": "AZE",
                "numeric": "031",
                "currency_code": "AZN",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 17,
                "name": "Bahamas",
                "alpha2": "BS",
                "alpha3": "BHS",
                "numeric": "044",
                "currency_code": "BSD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 18,
                "name": "Bahrain",
                "alpha2": "BH",
                "alpha3": "BHR",
                "numeric": "048",
                "currency_code": "BHD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 19,
                "name": "Bangladesh",
                "alpha2": "BD",
                "alpha3": "BGD",
                "numeric": "050",
                "currency_code": "BDT",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 20,
                "name": "Barbados",
                "alpha2": "BB",
                "alpha3": "BRB",
                "numeric": "052",
                "currency_code": "BBD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 21,
                "name": "Belarus",
                "alpha2": "BY",
                "alpha3": "BLR",
                "numeric": "112",
                "currency_code": "BYN",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 22,
                "name": "Belgium",
                "alpha2": "BE",
                "alpha3": "BEL",
                "numeric": "056",
                "currency_code": "EUR",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 23,
                "name": "Belize",
                "alpha2": "BZ",
                "alpha3": "BLZ",
                "numeric": "084",
                "currency_code": "BZD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 24,
                "name": "Benin",
                "alpha2": "BJ",
                "alpha3": "BEN",
                "numeric": "204",
                "currency_code": "XOF",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 25,
                "name": "Bermuda",
                "alpha2": "BM",
                "alpha3": "BMU",
                "numeric": "060",
                "currency_code": "BMD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 26,
                "name": "Bhutan",
                "alpha2": "BT",
                "alpha3": "BTN",
                "numeric": "064",
                "currency_code": "BTN",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 27,
                "name": "Bolivia (plurinational State Of)",
                "alpha2": "BO",
                "alpha3": "BOL",
                "numeric": "068",
                "currency_code": "BOB",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 28,
                "name": "Bonaire, Sint Eustatius And Saba",
                "alpha2": "BQ",
                "alpha3": "BES",
                "numeric": "535",
                "currency_code": "USD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 29,
                "name": "Bosnia And Herzegovina",
                "alpha2": "BA",
                "alpha3": "BIH",
                "numeric": "070",
                "currency_code": "BAM",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 30,
                "name": "Botswana",
                "alpha2": "BW",
                "alpha3": "BWA",
                "numeric": "072",
                "currency_code": "BWP",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 31,
                "name": "Bouvet Island",
                "alpha2": "BV",
                "alpha3": "BVT",
                "numeric": "074",
                "currency_code": "NOK",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 32,
                "name": "Brazil",
                "alpha2": "BR",
                "alpha3": "BRA",
                "numeric": "076",
                "currency_code": "BRL",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 33,
                "name": "British Indian Ocean Territory",
                "alpha2": "IO",
                "alpha3": "IOT",
                "numeric": "086",
                "currency_code": "GBP",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 34,
                "name": "Brunei Darussalam",
                "alpha2": "BN",
                "alpha3": "BRN",
                "numeric": "096",
                "currency_code": "BND",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 35,
                "name": "Bulgaria",
                "alpha2": "BG",
                "alpha3": "BGR",
                "numeric": "100",
                "currency_code": "BGN",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 36,
                "name": "Burkina Faso",
                "alpha2": "BF",
                "alpha3": "BFA",
                "numeric": "854",
                "currency_code": "XOF",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 37,
                "name": "Burundi",
                "alpha2": "BI",
                "alpha3": "BDI",
                "numeric": "108",
                "currency_code": "BIF",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 38,
                "name": "Cabo Verde",
                "alpha2": "CV",
                "alpha3": "CPV",
                "numeric": "132",
                "currency_code": "CVE",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 39,
                "name": "Cambodia",
                "alpha2": "KH",
                "alpha3": "KHM",
                "numeric": "116",
                "currency_code": "KHR",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 40,
                "name": "Cameroon",
                "alpha2": "CM",
                "alpha3": "CMR",
                "numeric": "120",
                "currency_code": "XAF",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 41,
                "name": "Canada",
                "alpha2": "CA",
                "alpha3": "CAN",
                "numeric": "124",
                "currency_code": "CAD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 42,
                "name": "Cayman Islands",
                "alpha2": "KY",
                "alpha3": "CYM",
                "numeric": "136",
                "currency_code": "KYD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 43,
                "name": "Central African Republic",
                "alpha2": "CF",
                "alpha3": "CAF",
                "numeric": "140",
                "currency_code": "XAF",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 44,
                "name": "Chad",
                "alpha2": "TD",
                "alpha3": "TCD",
                "numeric": "148",
                "currency_code": "XAF",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 45,
                "name": "Chile",
                "alpha2": "CL",
                "alpha3": "CHL",
                "numeric": "152",
                "currency_code": "CLP",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 46,
                "name": "China",
                "alpha2": "CN",
                "alpha3": "CHN",
                "numeric": "156",
                "currency_code": "CNY",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 47,
                "name": "Christmas Island",
                "alpha2": "CX",
                "alpha3": "CXR",
                "numeric": "162",
                "currency_code": "AUD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 48,
                "name": "Cocos (keeling) Islands",
                "alpha2": "CC",
                "alpha3": "CCK",
                "numeric": "166",
                "currency_code": "AUD",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 49,
                "name": "Colombia",
                "alpha2": "CO",
                "alpha3": "COL",
                "numeric": "170",
                "currency_code": "COP",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            },
            {
                "id": 50,
                "name": "Comoros",
                "alpha2": "KM",
                "alpha3": "COM",
                "numeric": "174",
                "currency_code": "KMF",
                "created_at": "2024-09-13T05:05:29.000000Z",
                "updated_at": "2024-09-13T05:05:29.000000Z",
                "deleted_at": null
            }
        ],
        "first_page_url": "https://vine.test/api/v1/countries?page=1",
        "from": 1,
        "last_page": 5,
        "last_page_url": "https://vine.test/api/v1/countries?page=5",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://vine.test/api/v1/countries?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://vine.test/api/v1/countries?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://vine.test/api/v1/countries?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "https://vine.test/api/v1/countries?page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "https://vine.test/api/v1/countries?page=5",
                "label": "5",
                "active": false
            },
            {
                "url": "https://vine.test/api/v1/countries?page=2",
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": "https://vine.test/api/v1/countries?page=2",
        "path": "https://vine.test/api/v1/countries",
        "per_page": 50,
        "prev_page_url": null,
        "to": 50,
        "total": 249
    }
}

/my-team

Retrieve your team details.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team
requires authentication

Retrieve your team. Automatically filtered to your current team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{"meta": {"responseCode": 200, "limit": 50, "offset": 0, "message": "", "cached": false, "availableRelations": []}, "data": {"current_page": 1, "data": {"id": 1, "name": "Team A", "created_at": "2024-08-16T06:54:28.000000Z", "updated_at": "2024-08-16T06:54:28.000000Z", "deleted_at": null}], "first_page_url": "https:\/\/vine.openfoodnetwork.org.au\/api\/v1\/my-team?page=1", "from": 1, "last_page": 1, "last_page_url": "https:\/\/vine.openfoodnetwork.org.au\/api\/v1\/my-team?page=1", "links": [{"url": null, "label": "« Previous", "active": false}, {"url": "https:\/\/vine.openfoodnetwork.org.au\/api\/v1\/my-team?page=1", "label": "1", "active": true}, {"url": null, "label": "Next »", "active": false}], "next_page_url": null, "path": "https:\/\/vine.openfoodnetwork.org.au\/api\/v1\/my-team", "per_page": 50, "prev_page_url": null, "to": 2, "total": 2}}

/my-teams

Teams you are a member of.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-teams
requires authentication

Retrieve your teams. Automatically filtered to your profile.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-teams?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "name": "Team A",
                "created_at": "2024-08-16T06:54:28.000000Z",
                "updated_at": "2024-08-16T06:54:28.000000Z",
                "deleted_at": null
            },
            {
                "id": 2,
                "name": "Team B",
                "created_at": "2024-08-16T06:54:29.000000Z",
                "updated_at": "2024-08-16T06:54:29.000000Z",
                "deleted_at": null
            }
        ],
        "first_page_url": "https://vine.openfoodnetwork.org.au/api/v1/my-teams?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://vine.openfoodnetwork.org.au/api/v1/my-teams?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://vine.openfoodnetwork.org.au/api/v1/my-teams?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://vine.openfoodnetwork.org.au/api/v1/my-teams",
        "per_page": 50,
        "prev_page_url": null,
        "to": 2,
        "total": 2
    }
}

Search for system objects your team owns or is associated to.


GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-search
requires authentication

Perform a search.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-search" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"query\": \"eayhfqplyerfsitb\"
}"
Example response:

/my-team-audit-items

Retrieve your team audit trail.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-audit-items
requires authentication

Retrieve your audit items. Automatically filtered to your current team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{"meta": {"responseCode": 200, "limit": 50, "offset": 0, "message": "", "cached": false, "availableRelations": []}, "data": {"current_page": 1, "data": {"id": 1, "name": "Team A", "created_at": "2024-08-16T06:54:28.000000Z", "updated_at": "2024-08-16T06:54:28.000000Z", "deleted_at": null}], "first_page_url": "https:\/\/vine.openfoodnetwork.org.au\/api\/v1\/my-team-audit-items?page=1", "from": 1, "last_page": 1, "last_page_url": "https:\/\/vine.openfoodnetwork.org.au\/api\/v1\/my-team-audit-items?page=1", "links": [{"url": null, "label": "« Previous", "active": false}, {"url": "https:\/\/vine.openfoodnetwork.org.au\/api\/v1\/my-team-audit-items?page=1", "label": "1", "active": true}, {"url": null, "label": "Next »", "active": false}], "next_page_url": null, "path": "https:\/\/vine.openfoodnetwork.org.au\/api\/v1\/my-team-audit-items", "per_page": 50, "prev_page_url": null, "to": 2, "total": 2}}

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-audit-items/{id}
requires authentication

Retrieve a single audit item for your team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
integer
required

ID.

Example:
1234

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/1234?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

/my-team-voucher-sets

Manage your team's voucher sets. Returns voucher sets generated by your team or allocated to your team.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-voucher-sets
requires authentication

Retrieve voucher sets. Automatically filtered to your current team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-voucher-sets?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"","cached":false,"availableRelations":[]},"data":{"current_page":1,"data":[{"id": "2e9978b3-130a-3291-bd8f-246215c6d04d","created_by_team_id": 1, "created_at": "2024-01-01 00:00:00"}],"first_page_url": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","from":null,"last_page":1,"last_page_url": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","links":[{"url":null,"label":"« Previous","active":false},{"https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"next_page_url":null,"path": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets","per_page":1,"prev_page_url":null,"to":null,"total":0}}

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-voucher-sets/{id}
requires authentication

Retrieve a single voucher set.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
uuid
required

Voucher Set ID.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-voucher-sets/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-voucher-sets-created
requires authentication

Retrieve voucher sets. Automatically filtered to your current team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-voucher-sets-created?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"","cached":false,"availableRelations":[]},"data":{"current_page":1,"data":[{"id": "2e9978b3-130a-3291-bd8f-246215c6d04d","created_by_team_id": 1, "created_at": "2024-01-01 00:00:00"}],"first_page_url": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","from":null,"last_page":1,"last_page_url": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","links":[{"url":null,"label":"« Previous","active":false},{"https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"next_page_url":null,"path": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets","per_page":1,"prev_page_url":null,"to":null,"total":0}}

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-voucher-sets-created/{id}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the my team voucher sets created.

Example:
distinctio
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-voucher-sets-created/distinctio" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-voucher-sets-allocated
requires authentication

Retrieve voucher sets. Automatically filtered to your current team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-voucher-sets-allocated?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"","cached":false,"availableRelations":[]},"data":{"current_page":1,"data":[{"id": "2e9978b3-130a-3291-bd8f-246215c6d04d","created_by_team_id": 1, "created_at": "2024-01-01 00:00:00"}],"first_page_url": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","from":null,"last_page":1,"last_page_url": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","links":[{"url":null,"label":"« Previous","active":false},{"https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"next_page_url":null,"path": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets","per_page":1,"prev_page_url":null,"to":null,"total":0}}

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-voucher-sets-allocated/{id}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the my team voucher sets allocated.

Example:
quidem
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-voucher-sets-allocated/quidem" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

/my-team-vouchers

Manage your team's vouchers. Returns vouchers generated by your team, and allocated to your team.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-vouchers
requires authentication

Retrieve vouchers. Automatically filtered to your current team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-vouchers/{id}
requires authentication

Retrieve a single voucher.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
uuid
required

Voucher ID.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

/shops

API for managing shops


POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/shops
requires authentication

Create a new shop.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/shops" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"shop_name\": \"eos\",
    \"user_email\": \"nicklaus31@example.net\",
    \"user_name\": \"perferendis\"
}"
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "token": "123|kjfhsgiufsghkjsfghkfgsjh"
    }
}

/system-statistics

Vine platform statistics.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/system-statistics
requires authentication

Retrieve system statistics.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,sum_voucher_value_total
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=sum_voucher_value_total,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,>,123
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/system-statistics?cached=1&page=1&limit=50&fields=id%2Csum_voucher_value_total&orderBy=orderBy%3Dsum_voucher_value_total%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2C%3E%2C123&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/system-statistics/{id}
requires authentication

Retrieve a single system statistic based on ID.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
integer
required

ID.

Example:
12

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,num_users
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/system-statistics/12?cached=1&fields=id%2Cnum_users" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1,
        "num_users": 3,
        "num_teams": 2,
        "num_voucher_sets": 0,
        "num_vouchers": 0,
        "num_voucher_redemptions": 0,
        "sum_voucher_value_total": 0,
        "sum_voucher_value_redeemed": 0,
        "sum_voucher_value_remaining": 0,
        "created_at": "2024-08-13T07:56:17.000000Z",
        "updated_at": "2024-08-13T07:56:17.000000Z"
    }
}

/voucher-beneficiary-distribution

API for create voucher beneficiary distributions


POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/voucher-beneficiary-distributions
requires authentication

Create a new beneficiary distribution.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/voucher-beneficiary-distributions" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"voucher_id\": \"velit\",
    \"beneficiary_email\": \"abbey99@example.com\",
    \"resend_beneficiary_distribution_id\": 6
}"
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "Saved.",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "id": "1234"
    }
}

/voucher-validation

API for validating a voucher


POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/voucher-validation
requires authentication

Verify the validity of a voucher. Throttled by VALIDATION_THROTTLE_MAX_PER_MINUTE configuration (default 60 requests per minute per API token)

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/voucher-validation" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"type\": \"maxime\",
    \"value\": \"voluptates\"
}"
Example response:

/voucher-redemptions

API for creating voucher redemptions. You must be a member of a team that is configured to be a merchant.


POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/voucher-redemptions
requires authentication

Create a new voucher redemption.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/voucher-redemptions" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"voucher_id\": \"omnis\",
    \"voucher_set_id\": \"nemo\",
    \"amount\": 72
}"
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "Saved"
    },
    "data": {
        "voucher_id": "ec70cf3b-f4ab-3ce0-9201-c10362aa2f07",
        "voucher_set_id": "6f644113-b836-3e34-8ed7-27c40c10d2c1",
        "redeemed_by_user_id": 1,
        "redeemed_by_team_id": 1,
        "redeemed_amount": 1,
        "is_test": 0,
        "updated_at": "2024-09-06T03:31:20.000000Z",
        "created_at": "2024-09-06T03:31:20.000000Z",
        "id": 1
    }
}
{"meta":{"responseCode":400,"limit":50,"offset":0,"message":"Invalid merchant team."},"data":{}
{"meta":{"responseCode":400,"limit":50,"offset":0,"message":"This voucher has already been fully redeemed, no redemption made this time."},"data":{}
{"meta":{"responseCode":400,"limit":50,"offset":0,"message":"Requested amount is greater than voucher value remaining, no redemption made this time."},"data":{}
{"meta":{"responseCode":404,"limit":50,"offset":0,"message":"Not found."},"data":{}
{"meta":{"responseCode":429,"limit":50,"offset":0,"message":"Too many redemption attempts, please wait."},"data":{}
{"meta":{"responseCode":500,"limit":50,"offset":0,"message":"Error"},"data":{}

/voucher-set-merchant-team-approval-request

Retrieve voucher set merchant team approval request details.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/my-team-vsmtar
requires authentication

Retrieve my voucher set merchant approval requests. Automatically filtered to you and your current team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-vsmtar?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"","cached":false,"availableRelations":[]},"data":{"current_page":1,"data":[{"id": "2e9978b3-130a-3291-bd8f-246215c6d04d","created_by_team_id": 1, "created_at": "2024-01-01 00:00:00"}],"first_page_url": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","from":null,"last_page":1,"last_page_url": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","links":[{"url":null,"label":"« Previous","active":false},{"https:\/\/vine.test\/api\/v1\/my-team-voucher-sets?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"next_page_url":null,"path": "https:\/\/vine.test\/api\/v1\/my-team-voucher-sets","per_page":1,"prev_page_url":null,"to":null,"total":0}}

Admin Endpoints

/admin/audit-items

Retrieve audit log items.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/audit-items
requires authentication

Retrieve audit items.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/audit-items?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/audit-items/{id}
requires authentication

Retrieve a single audit item.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
uuid
required

Voucher ID.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/audit-items/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

/admin/file-uploads

RPerform file uploads to the configured cloud storage system.


POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/file-uploads
requires authentication

Create a new voucher set.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/file-uploads" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"acceptedFileTypes\": \"autem\",
    \"folder\": \"aut\",
    \"files\": [
        \"ygxurgvbhqpfpmughrlgjd\"
    ],
    \"visibility\": \"nemo\",
    \"returnFilePathOnly\": \"saepe\"
}"

/admin/search

Search for system objects as an admin.


GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/search
requires authentication

Perform a search.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/search" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"query\": \"vqsproru\"
}"
Example response:

/admin/system-statistics

Search for system objects as an admin.


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/system-statistics
requires authentication

Get a list of system stats.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/system-statistics?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/system-statistics/{id}
requires authentication

Retrieve a single item.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the system statistic.

Example:
quo

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/system-statistics/quo?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

/admin/teams

API for managing teams


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/teams
requires authentication

Retrieve teams.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/teams?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/teams
requires authentication

Create a team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/teams" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"name\": \"cupiditate\",
    \"country_id\": 8
}"

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/teams/{id}
requires authentication

Retrieve a single team by ID.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team.

Example:
ad

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/teams/ad?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

PUT /{id}

PUT
PATCH
https://vine.openfoodnetwork.org.au
/api/v1/admin/teams/{id}
requires authentication

Update a team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team.

Example:
et

Body Parameters

Example request:
curl --request PUT \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/teams/et" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"name\": \"non\",
    \"country_id\": 7
}"

Delete /{id}

DELETE
https://vine.openfoodnetwork.org.au
/api/v1/admin/teams/{id}
requires authentication

Remove a team. WARNING: May have unintended side effects or cause data integrity issues.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team.

Example:
voluptates
Example request:
curl --request DELETE \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/teams/voluptates" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."

/admin/team-merchant-teams

API for managing a team's merchant teams


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-merchant-teams
requires authentication

Retrieve team merchant team associations.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/team-merchant-teams?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-merchant-teams
requires authentication

Create a new merchant team merchant association for a team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-merchant-teams" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"team_id\": 19,
    \"merchant_team_id\": 4
}"

Delete /{id}

DELETE
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-merchant-teams/{id}
requires authentication

Remove a team's merchant association. {id} is the DB resource for the association

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team merchant team.

Example:
provident
Example request:
curl --request DELETE \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-merchant-teams/provident" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."

/admin/team-service-teams

API for managing a team's service teams


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-service-teams
requires authentication

Retrieve team service team associations.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/team-service-teams?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-service-teams
requires authentication

Create a new service team association for a team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-service-teams" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"team_id\": 13,
    \"service_team_id\": 7
}"

PUT/ {id}

PUT
PATCH
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-service-teams/{id}
requires authentication

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team service team.

Example:
modi
Example request:
curl --request PUT \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-service-teams/modi" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."

Delete /{id}

DELETE
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-service-teams/{id}
requires authentication

Remove a team's service association. {id} is the DB resource for the association

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team service team.

Example:
delectus
Example request:
curl --request DELETE \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-service-teams/delectus" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."

/admin/team-users

API for managing a team's user members


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-users
requires authentication

Retrieve team user associations.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/team-users?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-users
requires authentication

Add a user to a team.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-users" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"team_id\": 11,
    \"user_id\": 19
}"

PUT /{id}

PUT
PATCH
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-users/{id}
requires authentication

Update a team user.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team user.

Example:
ea

Body Parameters

Example request:
curl --request PUT \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-users/ea" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"send_invite_email\": \"gwitting@example.com\"
}"

Delete /{id}

DELETE
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-users/{id}
requires authentication

Remove a user's team association. {id} is the DB resource for the association

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team user.

Example:
ut
Example request:
curl --request DELETE \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-users/ut" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."

/admin/team-voucher-templates

API for managing a team's voucher templates


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-voucher-templates
requires authentication

Retrieve team voucher templates

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/team-voucher-templates?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-voucher-templates
requires authentication

Add a team voucher template.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-voucher-templates" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"team_id\": 19,
    \"voucher_template_path\": \"quia\",
    \"voucher_qr_size_px\": 7,
    \"voucher_qr_x\": 14,
    \"voucher_qr_y\": 6,
    \"voucher_code_size_px\": 14,
    \"voucher_code_x\": 7,
    \"voucher_code_y\": 6,
    \"voucher_expiry_size_px\": 6,
    \"voucher_expiry_x\": 4,
    \"voucher_expiry_y\": 12,
    \"voucher_value_size_px\": 20,
    \"voucher_value_x\": 19,
    \"voucher_value_y\": 6,
    \"overlay_font_path\": \"quo\"
}"

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-voucher-templates/{id}
requires authentication

Retrieve a single voucher template by ID.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team voucher template.

Example:
aliquam

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/team-voucher-templates/aliquam?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

PUT /{id}

PUT
PATCH
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-voucher-templates/{id}
requires authentication

Update a team voucher template.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team voucher template.

Example:
beatae

Body Parameters

Example request:
curl --request PUT \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-voucher-templates/beatae" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"voucher_template_path\": \"temporibus\",
    \"voucher_qr_size_px\": 7,
    \"voucher_qr_x\": 15,
    \"voucher_qr_y\": 10,
    \"voucher_code_size_px\": 11,
    \"voucher_code_x\": 1,
    \"voucher_code_y\": 7,
    \"voucher_code_prefix\": \"aut\",
    \"voucher_expiry_size_px\": 10,
    \"voucher_expiry_x\": 17,
    \"voucher_expiry_y\": 19,
    \"voucher_expiry_prefix\": \"qui\",
    \"voucher_value_size_px\": 13,
    \"voucher_value_x\": 4,
    \"voucher_value_y\": 9,
    \"voucher_value_prefix\": \"accusantium\",
    \"overlay_font_path\": \"officia\",
    \"archive\": false
}"

Delete /{id}

DELETE
https://vine.openfoodnetwork.org.au
/api/v1/admin/team-voucher-templates/{id}
requires authentication

Remove a team voucher template.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the team voucher template.

Example:
nemo
Example request:
curl --request DELETE \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/team-voucher-templates/nemo" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."

/admin/user-personal-access-tokens

API for managing a user personal access tokens


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/user-personal-access-tokens
requires authentication

Retrieve personal access tokens (PATs).

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/user-personal-access-tokens?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/user-personal-access-tokens
requires authentication

Add a PAT.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/user-personal-access-tokens" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"user_id\": 3,
    \"name\": \"accusamus\",
    \"token_abilities\": [
        \"sed\"
    ]
}"

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/user-personal-access-tokens/{user_personal_access_token}
requires authentication

Retrieve a single PAT by ID.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

user_personal_access_token
string
required
Example:
molestiae

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/user-personal-access-tokens/molestiae?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

Delete /{id}

DELETE
https://vine.openfoodnetwork.org.au
/api/v1/admin/user-personal-access-tokens/{user_personal_access_token}
requires authentication

Remove a PAT. The API access for the PAT will be revoked.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

user_personal_access_token
string
required
Example:
necessitatibus
Example request:
curl --request DELETE \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/user-personal-access-tokens/necessitatibus" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."

/admin/users

API for managing users


POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/users
requires authentication

Create a user.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/users" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"name\": \"ea\",
    \"email\": \"oreilly.alberta@example.com\",
    \"current_team_id\": 7
}"

GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/users
requires authentication

Retrieve users.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/users?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": false,
        "availableRelations": []
    },
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2024-01-01 00:00:00"
            }
        ],
        "first_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://open-food-network-vouchers.test/api/v1/admin/system-statistics",
        "per_page": 1,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/users/{id}
requires authentication

Retrieve a single user by ID.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the user.

Example:
commodi

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/users/commodi?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

PUT /{id}

PUT
https://vine.openfoodnetwork.org.au
/api/v1/admin/users/{id}
requires authentication

Update a user.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the user.

Example:
architecto

Body Parameters

Example request:
curl --request PUT \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/users/architecto" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"is_admin\": true
}"

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/users/{id}
requires authentication

Retrieve a single user by ID.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the user.

Example:
delectus

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/users/delectus?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

PUT /{id}

PUT
PATCH
https://vine.openfoodnetwork.org.au
/api/v1/admin/users/{id}
requires authentication

Update a user.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the user.

Example:
alias

Body Parameters

Example request:
curl --request PUT \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/users/alias" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"is_admin\": true
}"

/admin/vouchers

Admin endpoint for unrestricted management of vouchers


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/vouchers
requires authentication

Retrieve voucher sets.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/vouchers?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/vouchers/{id}
requires authentication

Retrieve a single voucher set.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
uuid
required

Voucher Set ID.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/vouchers/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

/admin/voucher-sets

Admin endpoint for unrestricted management of voucher sets


POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/voucher-sets
requires authentication

Create a new voucher set.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/voucher-sets" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"is_test\": false,
    \"allocated_to_service_team_id\": 17,
    \"merchant_team_ids\": [
        \"praesentium\"
    ],
    \"funded_by_team_id\": 20,
    \"voucher_template_id\": 2,
    \"total_set_value\": 17,
    \"denominations\": [
        \"nulla\"
    ],
    \"expires_at\": \"sit\",
    \"voucher_set_type\": \"accusantium\"
}"
Example response:

GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/voucher-sets
requires authentication

Retrieve vouchers.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/voucher-sets?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/voucher-sets/{id}
requires authentication

Retrieve a single voucher.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
uuid
required

Voucher Set ID.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/voucher-sets/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

/admin/voucher-redemptions

Admin endpoint for unrestricted management of voucher redemptions


GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/voucher-redemptions
requires authentication

Retrieve voucher redemptions.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/voucher-redemptions?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/voucher-redemptions/{id}
requires authentication

Retrieve a single voucher redemption.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
uuid
required

Voucher Set ID.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/voucher-redemptions/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

/admin/voucher-set-merchant-teams

Admin endpoint for management of voucher set merchant team associations


POST /

POST
https://vine.openfoodnetwork.org.au
/api/v1/admin/voucher-set-merchant-teams
requires authentication

Create a new voucher set merchant team. Sends an email to team members to request involvement.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Body Parameters

Example request:
curl --request POST \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/voucher-set-merchant-teams" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..." \
    --data "{
    \"voucher_set_id\": \"assumenda\",
    \"merchant_team_id\": 8
}"
Example response:

GET /

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/voucher-set-merchant-teams
requires authentication

Retrieve voucher set merchant teams.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
true
page
integer

The pagination page number.

Example:
1
limit
integer

The number of entries returned per pagination page.

Example:
50
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
orderBy
comma-separated

Order the data by a given field. Comma-separated string.

Example:
orderBy=id,desc
orderBy[]
comma-separated

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

Example:
orderBy[]=id,desc&orderBy[]=created_at,asc
where
comma-separated

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

Example:
where=id,like,*550e*
where[]
comma-separated

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/voucher-set-merchant-teams?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:

GET /{id}

GET
https://vine.openfoodnetwork.org.au
/api/v1/admin/voucher-set-merchant-teams/{id}
requires authentication

Retrieve a single resource.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
integer
required

ID of the resource.

Example:
1234

Query Parameters

cached
boolean

Request the response to be cached. Default: true.

Example:
1
fields
string

Comma-separated list of database fields to return within the object.

Example:
id,created_at
Example request:
curl --request GET \
    --get "https://vine.openfoodnetwork.org.au/api/v1/admin/voucher-set-merchant-teams/1234?cached=1&fields=id%2Ccreated_at" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."
Example response:
{
    "meta": {
        "responseCode": 200,
        "limit": 50,
        "offset": 0,
        "message": "",
        "cached": true,
        "cached_at": "2024-08-13 08:58:19",
        "availableRelations": []
    },
    "data": {
        "id": 1234,
        "created_at": "2024-01-01 00:00:00"
    }
}

Delete /{id}

DELETE
https://vine.openfoodnetwork.org.au
/api/v1/admin/voucher-set-merchant-teams/{id}
requires authentication

Remove a voucher set team merchant association. {id} is the DB resource for the association.

Headers

Authorization
Example:
Bearer {YOUR_API_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
X-Authorisation
Example:
JWT eyJ0eXAiOiJKV...

URL Parameters

id
string
required

The ID of the voucher set merchant team.

Example:
eum
Example request:
curl --request DELETE \
    "https://vine.openfoodnetwork.org.au/api/v1/admin/voucher-set-merchant-teams/eum" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Authorisation: JWT eyJ0eXAiOiJKV..."