The API documentation for Open Food Network VINE.
This documentation aims to provide all the information you need to work with our API.
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.
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.
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:
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();
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}"
Retrieve the available countries list.
Retrieve the countries list.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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
}
}
Retrieve your team details.
Retrieve your team. Automatically filtered to your current team.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{"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}}
Teams you are a member of.
Retrieve your teams. Automatically filtered to your profile.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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.
Perform a search.
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\"
}"
cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthenticated."
}
Retrieve your team audit trail.
Retrieve your audit items. Automatically filtered to your current team.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{"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}}
Retrieve a single audit item for your team.
ID.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthenticated."
}
Manage your team's voucher sets. Returns voucher sets generated by your team or allocated to your team.
Retrieve voucher sets. Automatically filtered to your current team.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{"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}}
Retrieve a single voucher set.
Voucher Set ID.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
Retrieve voucher sets. Automatically filtered to your current team.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{"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}}
The ID of the my team voucher sets created.
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..."
cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthenticated."
}
Retrieve voucher sets. Automatically filtered to your current team.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{"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}}
The ID of the my team voucher sets allocated.
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..."
cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthenticated."
}
Manage your team's vouchers. Returns vouchers generated by your team, and allocated to your team.
Retrieve vouchers. Automatically filtered to your current team.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Retrieve a single voucher.
Voucher ID.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
API for managing shops
Create a new shop.
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\"
}"
{
"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"
}
}
Vine platform statistics.
Retrieve system statistics.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Retrieve a single system statistic based on ID.
ID.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
API for create voucher beneficiary distributions
Create a new beneficiary distribution.
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
}"
{
"meta": {
"responseCode": 200,
"limit": 50,
"offset": 0,
"message": "Saved.",
"cached": false,
"availableRelations": []
},
"data": {
"id": "1234"
}
}
API for validating a voucher
Verify the validity of a voucher. Throttled by VALIDATION_THROTTLE_MAX_PER_MINUTE configuration (default 60 requests per minute per API token)
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\"
}"
API for creating voucher redemptions. You must be a member of a team that is configured to be a merchant.
Create a new voucher redemption.
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
}"
{
"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
}
}
Retrieve voucher set merchant team approval request details.
Retrieve my voucher set merchant approval requests. Automatically filtered to you and your current team.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{"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}}
Retrieve audit log items.
Retrieve audit items.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Retrieve a single audit item.
Voucher ID.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
RPerform file uploads to the configured cloud storage system.
Create a new voucher set.
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\"
}"
Search for system objects as an admin.
Perform a search.
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\"
}"
cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthenticated."
}
Search for system objects as an admin.
Get a list of system stats.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Retrieve a single item.
The ID of the system statistic.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
API for managing teams
Retrieve teams.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Create a team.
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
}"
Retrieve a single team by ID.
The ID of the team.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
Update a team.
The ID of the team.
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
}"
Remove a team. WARNING: May have unintended side effects or cause data integrity issues.
The ID of the team.
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..."
API for managing a team's merchant teams
Retrieve team merchant team associations.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Create a new merchant team merchant association for a team.
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
}"
Remove a team's merchant association. {id} is the DB resource for the association
The ID of the team merchant team.
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..."
API for managing a team's service teams
Retrieve team service team associations.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Create a new service team association for a team.
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
}"
The ID of the team service team.
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..."
Remove a team's service association. {id} is the DB resource for the association
The ID of the team service team.
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..."
API for managing a team's user members
Retrieve team user associations.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Add a user to a team.
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
}"
Update a team user.
The ID of the team user.
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\"
}"
Remove a user's team association. {id} is the DB resource for the association
The ID of the team user.
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..."
API for managing a team's voucher templates
Retrieve team voucher templates
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Add a team voucher template.
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\"
}"
Retrieve a single voucher template by ID.
The ID of the team voucher template.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
Update a team voucher template.
The ID of the team voucher template.
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
}"
Remove a team voucher template.
The ID of the team voucher template.
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..."
API for managing a user personal access tokens
Retrieve personal access tokens (PATs).
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Add a PAT.
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\"
]
}"
Retrieve a single PAT by ID.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
Remove a PAT. The API access for the PAT will be revoked.
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..."
API for managing users
Create a user.
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
}"
Retrieve users.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
{
"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
}
}
Retrieve a single user by ID.
The ID of the user.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
Update a user.
The ID of the user.
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
}"
Retrieve a single user by ID.
The ID of the user.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
Update a user.
The ID of the user.
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 endpoint for unrestricted management of vouchers
Retrieve voucher sets.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
Retrieve a single voucher set.
Voucher Set ID.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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 endpoint for unrestricted management of voucher sets
Create a new voucher set.
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\"
}"
Retrieve vouchers.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
Retrieve a single voucher.
Voucher Set ID.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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 endpoint for unrestricted management of voucher redemptions
Retrieve voucher redemptions.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
Retrieve a single voucher redemption.
Voucher Set ID.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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 endpoint for management of voucher set merchant team associations
Create a new voucher set merchant team. Sends an email to team members to request involvement.
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
}"
Retrieve voucher set merchant teams.
Request the response to be cached. Default: true
.
The pagination page number.
The number of entries returned per pagination page.
Comma-separated list of database fields to return within the object.
Order the data by a given field. Comma-separated string.
Compound orderBy
. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy
.
Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.
Compound where
. Use when you need to filter on multiple where
's. Note only AND is possible; ORWHERE is not available.
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..."
Retrieve a single resource.
ID of the resource.
Request the response to be cached. Default: true
.
Comma-separated list of database fields to return within the object.
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..."
{
"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"
}
}
Remove a voucher set team merchant association. {id} is the DB resource for the association.
The ID of the voucher set merchant team.
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..."