A user is authenticated with the API by providing their API key. The API Key can be provided by the following 2 methods:
The header Authorization: Bearer-Token [TOKEN]
may be set in order
to authenticate a user.
For easier discovery in the Browser and for environments, where a Authorization header cannot be used (e.g. When the page is already using the header for Basic-Auth) a request may be performed by using the parameter `&api_token=[TOKEN]`
The default language of the system is german. This means that if no parameter is specified german records will be returned and german language labels.
Valid languages are the following:
de
en
fr
it
nl
es
cz
dk
The record language can be changed by providing the &language=[LANGUAGE]
GET-Parameter.
This will set the language for all retrieved and saved records.
Note however, that the fallback language is german. Thus if you request detailed information about a
certain entity in a language that it is not available in (say &language=foobar
) then the
german record will be returned.
Every API-Response (no matter if sucessful or not) will be wrapped in a common wrapper containing some meta-data and the complete payload.
All properties starting with an underscore contain meta information about the request.
The _links
property contains URLs of other API-Endpoints that might be relevant to the
developer issuing the current request.
If a List view is being requested the links nextPage
and previousPage
will
contain URLs to the next / previous page in the paginated result list.
The _attributes
relays the properties given to the endpoint (via GET-Parameter or
POST-Body)
back to the requester. This can be useful when debugging a request in order to ensure the server has
correctly received the request.
Additionally some properties may be populated with sane defaults or additional meta data (such as
_attributes.pagination
).
The _errors
attribute contains information about errors that occurred during execution.
Most (but not all) errors result in no payload being present.
Every error contains the following properties:
code
: Code that uniquely identifies the Error that occurred. This can either be the
HTTP
status code or a string such as "ERR_NO_CATEGORY"
message
: A message that is meant to be displayed to the user. This message contains
information about the error and may change depending on the `locale` parameter supplied with the
request.
trace
: Stack trace of where the error occurred. Only present in development mode.
The _warnings
attribute contains warnings about the current request. These warnings are
meant as hints to the developer, not for user facing output.
The payload
property contains the data returned by the endpoint or null
if
the endpoint does not return any data.
{
"_links": {
"documentation.html": "GET /api/v1/docs",
"documentation.json": "GET /api/v1",
"api.v1.article.index": "GET api/v1/article",
"api.v1.article.update": "PUT api/v1/article/{article}",
"api.v1.article.store": "POST api/v1/article",
"api.v1.article.destroy": "DELETE api/v1/article/{article}",
"api.v1.article.show": "GET api/v1/article/{article}",
"api.v1.article.media": "GET api/v1/article/{article}/media",
"api.v1.article.tags": "GET api/v1/article/{article}/tags",
"api.v1.article.links": "GET api/v1/article/{article}/links",
"api.v1.article.emails": "GET api/v1/article/{article}/emails",
"api.v1.article.fieldBlueprints": "GET api/v1/article/{article}/fieldBlueprints",
"api.v1.article.fieldValues": "GET api/v1/article/{article}/fieldValues",
"api.v1.article.seo": "GET api/v1/article/{article}/seo",
"api.v1.article.openingTimes": "GET api/v1/article/{article}/openingTimes",
"api.v1.article.phoneNumbers": "GET api/v1/article/{article}/phoneNumbers",
"api.v1.article.files": "GET api/v1/article/{article}/files",
"api.v1.article.additionalAddress": "GET api/v1/article/{article}/additionalAddress",
"previousPage": null,
"nextPage": "http://toubiz.local/api/v1/article?api_token=admin_token&invisible=0&private=0&pagination[page]=2"
},
"_warning": [
"No page number given. Assuming first page. You can set a page by using the pagination[page] parameter.",
"No page size given. Assuming default page size of 10. Use the parameter pagination[pageSize] to supply a custom page size."
],
"_attributes": {
"pagination": {
"pageSize": 10,
"page": 1,
"total": 294,
"lastPage": 30
}
},
"_errors": [],
"payload": [ ... ]
}
article.show
license
up to article.index
author
up to article.index
article.index
license
author
copyright
sourceInformationLink
event.show
license
up to event.index
author
up to event.index
event.index
author
copyright
sourceInformationLink
media.show
and media.index
sourceInformationLink
This time we provide a list of changes since 2020-07-01.
The following request and response parameters are the main changes between these releases. Minor changes are not listed and should not be breaking. Please refer to the current API documentation for a more detailed description.
article.index
area
community
area
and city
awards
and classifications
geocoordinates
article.show
changes)article.show
changes)article.show
changes)article.update
copyright
locationIdentifier
(connect the article with a standardized location)tour.trackType
tour.popularity
renamed to tour.experience
tour.beauty
renamed to tour.landscape
tour.terrain
now describes the following segments: 'unknown', 'asphalt', 'gravelPath', 'nature', 'miscellaneous'tour.gpsTracks.items[].trackType
removedtour.gpsTracks.items[].tourStages
added (counts the number of stages)tour.manualTrackInformation.properties[].trackType
removedtour.manualTrackInformation.properties[].tourStages
added (counts the number of stages)tour.recommendedTimeOfTravel
addedarea.properties.gettingThere
addedarea.properties.communalLink
addedarea.properties.zipCodes
addedarea.properties.communalLogo
addedmedia.caption
addedmedia.hasCustomCaption
addedmedia.author
addedmedia.sourceInformationLink
addedmedia.main
addedfiles.items[].file
documentation addedcontactInformation.blog
addedopeningTimes.properties.definitions.items.repeatsEveryYear
addedrelatedArticles
types added:tourStages
tourStagesVariants
tourInfrastructure
experienceMeetingPoint
article.show
includes[]
values:nearbyArticles
nearbyEvents
tourStageRelations
awards
classification
locationIdentifiers
media.colors
added (describes a minimal color profile of the image, useful for generating placeholders)event.index
include[]
values:distance
awards
externalId
categoryWithSecondary
location
locationArea
area
city
eventType
element
distanceFrom
dynamicFieldValueSelect
tag
eventType
added (event
and experience
)mergeDates
added (merge repeating dates of a single event into one result)onDemand
addedgeocoordinates
addedevent.update
copyright
addedsecondaryCategories
addedrelatedArticles
addedmedia
(see article.update
)dateIntervals[].bookingUrl
addeddateIntervals[].canceled
added (cancel single intervals. canceling the entire event still works.)dateIntervals[].soldOut
locationData.type
addedevent.show
include[]
values:awardValues
regular
, interval
and merged
since those 3 concepts do no longer exist.
dates
now is an array of dates at which the event is being held generated out of the dateIntervals
.event.show
endpoint now returns less data with previous additions being split off into subroutes. The following information which was previously available directly on an article can now be fetched via subroutes (or include[]=...
):
location
host
category
client
seo
price
event.index
endpoint now does no longer contain information about the client. If you want information about the client of an article, please use the new event.client
endpoint (or event.show
with include[]=client
).event.index
endpoint now contains only very little information for categories instead of all of it.article
and event
endpoints now include more detailed client data (id, name, url and logo).
Before:
{
"client": "123456-1234-1234-1234-123456789012"
}
After:
{
"client": {
"id": "123456-1234-1234-1234-123456789012",
"name": "Foo client",
"url": "https://www.foo-client.tld/",
"logo": {
"id": "758985f4-d45e-3aeb-9c47-123456789012",
"name": "The name of this image",
"description": "Lorem ipsum",
"url": "http://mein.toubiz.de/path/to/file/3500f550d0605ea7393e22227eb7fa50a__5c6c3f1869123.png",
"preview": {
"image/png": "http://mein.toubiz.de/path/to/file/550x367q75.png",
"image/jpeg": "http://mein.toubiz.de/path/to/file/550x367q75.jpg",
"image/webp": "http://mein.toubiz.de/path/to/file/550x367q75.webp"
},
"license": null,
},
}
}
client.dynamicFieldGroups
endpoint now also contains information about the category
that the field group is associated with.client.articlePermissions
and client.modulePermissions
endpoints now include the name of the
related entity (module or article) and it's permissions. All content previously directly under these
objects has been moved into a permissions
key.
Before
{
"payload": {
{moduleId}: { read: true, write: true, delete: true }
}
}
// After:
{
"payload": {
{moduleId}: {
name: "Foo bar",
permissions: { read: true, write: true, delete: true }
}
}
}
typeOfTour
on the tour attributes of an article.client.show
endpoint now has been split up in the following sub-endpoints.
The include
parameter can be used on the main detail route to pull in data from
the sub-endpoints similar to articles and events. The string "current"
can be used
to refer to the client of the current User.
/api/v1/client/{ID}
/api/v1/client/{ID}/users
/api/v1/client/{ID}/articles
/api/v1/client/{ID}/dynamicFieldGroups
/api/v1/client/{ID}/dynamicFieldSets
/api/v1/client/{ID}/modules
/api/v1/client/{ID}/managedClients
/api/v1/client/{ID}/articlePermissions
/api/v1/client/{ID}/modulePermissions
relatedArticles
has been added to articles.license
property containing the license under which
they are available.gpsTrack
and the values generated from it are now combined into a new
relation in order to have easy access to both, automatically generated values
as well as manual overrides. Additionally combinedTrackInformation
is available
when reading from the API, combining automatically extracted track information with
manual overrides.
Before:
{
"gpsTracks": [
{ "url": "..." }
],
"kilometers": 12,
"elevationUp": 200,
"elevationDown": 200,
"highestPoint": 400,
"lowestPoint": 200
}
After:
{
"gpsTracks": [{
"kilometers": 12.55,
"elevationUp": 200,
"elevationDown": 200,
"highestPoint": 400,
"lowestPoint": 200
}],
"manualTrackInformation": {
"kilometers": 12,
"elevationUp": null,
"elevationDown": null,
"highestPoint": null,
"lowestPoint": null
},
"combinedTrackInformation": {
"kilometers": 12,
"elevationUp": 200,
"elevationDown": 200,
"highestPoint": 400,
"lowestPoint": 200
}
}
The price table on priceInformation
will be replaced by more structured
fields.
Old:
{
"priceTable": [
[ "Normalpreis", "15", "€" ],
[ "", "20", "CHF"],
[ "Kinder", "10", "€" ],
[ "", "14", "CHF" ]
]
}
New:
{
"priceGroups": [{
"title": "Sommerpreise",
"comment": "Gültig April - September",
"priceEntries": [
{
"title": "Normalpreis",
"comment": "",
"eur": 15,
"chf": 20
}, {
"title": "Kinder",
"comment": "0-12 Jahre",
"eur": 10,
"chf": 14
}
]
}]
}
The links
on both articles and events has been replaced with a new
contactInformation
model that provides more straight forward fields.
Old:
{
"links": [
{
"id": "...",
"link": "https://twitter.com/foobar",
"type": {
"id": "...",
"name": "Twitter"
}
},
{
"id": "...",
"link": "https://facebook.com/foobar",
"type": {
"id": "...",
"name": "Facebook"
}
}
]
}
New:
{
"contactInformation": {
"id": "...",
"website": "",
"twitter": "https://twitter.com/foobar",
"facebook": "https://facebook.com/foobar",
"flickr": "",
"youtube": "",
"instagram": ""
}
}
media.relations
endpoint has been added that returns
information about articles and events with relations to the given media element.article.permissions
endpoint has been added that returns
information about the permissions that the current user has on the article. This
data can also be accessed using &include[]=permissions
on the article detail route.article.index
endpoint now also returns the address of a point if available.Home view: Lists all endpoints with their documentation as JSON.
`$ curl -X GET http://localhost:8000/api/v1?api_token=TOKEN`
Docs view: Lists all endpoints with their documentation as HTML.
Lists all articles visible to the user
By default invisible and unlicensed articles are hidden and can be enabled
using the invisible=1
and unlicensed=1
request parameters.
include[]=permissions | Includes the permission details of the article if supplied |
include[]=languages | Includes the language details of the article if supplied |
include[]=mainImage | Includes the main image of the article if supplied |
include[]=distance | Includes the distance to the requested coordinates.
Requires the |
include[]=awards | Includes the currently valid awards with minimal award blueprint and award set data. |
include[]=externalIds | Also includes the ids from other services for this article |
include[]=openingTimes | Also includes the opening times definition. Only for points. |
include[]=tourStages | Also includes the stage information for tours. |
sizes | Specifies size classes to generate for the image where the key specifies the names of the size
class and the value the size to generate. This can either be a single number, indicating the width of the
image or a string containing width & height separated with an |
minimal=1 | Returns an unpaginated object of id => name for all results. |
withAggregates=1 | Return aggregation numbers for the results. |
withResults=0 | (default: 1) Suppress the actual results. |
applyChannelToQuery | |
unlicensed | |
invisible | Also includes invisible articles of the current client in the API response. NOTE: Only articles that are visible to the current user will be returned. |
sorting | Allows to sort article list using allowed properties and sort directions: ascending (asc), descending (desc). The following attributes may be provided:
Random SortingTo use random sorting you may set |
search | Adds searching capabilities. |
filter[category] | Filters articles to only include those that are associated to the primary category with the given id(s). This property can either contain a comma-separated string of category ids or an array of category ids. Examples
|
filter[license] | Filters articles by license. This property can either contain a comma-separated string of licenses or just one license. Examples
|
filter[categoryWithSecondary] | Filters articles to only include those that are associated to a category (primary or secondary) with the given id(s). This property can either contain a comma-separated string of category ids or an array of category ids. Examples
|
filter[categoryTypes] | Filters articles to only include those that are associated to the primary category of a certain type. This property can either contain a comma-separated string of category ids or an array of category types. Examples
|
filter[element] | Filters the articles to only include those matching the given element. Examples
|
filter[typeOfTour] | Filters articles to only include those that are associated to the primary category with the given id(s). This property can either contain a comma-separated string of category ids or an array of category ids. Examples
|
filter[excludeCategory] | Excludes articles that have the categories with the given ids or a child as primary categories. On it's own this filter is not incredibly useful, but it can be used in combination with |
filter[secondaryCategory] | Filters articles to only include those that are associated to the secondary category with the given id(s). This property can either contain a comma-separated string of category ids or an array of category ids. Examples
|
filter[client] | Allows filtering for client to only return articles that belong to the given client directly (ignores managed clients). This property can either be set to the id of a client or to the string |
filter[clientIncludingManaged] | Allows filtering for client to only return articles that belong to the given client or any of it's managed clients. This property can either be set to the id of a client or to the string |
filter[createdBy] | Allows filtering for the creator of an article. This filter can be specified in one of the following formats if multiple users are filtered for:
|
filter[location] | Allows filtering for articles by their location. This property must always be specified as 3 subproperties:
|
filter[type] | Filters articles by their type. The following types exist:
Examples
|
filter[categoryType] | Filters articles to only includes those who have a category with the given category type. This search includes primary- and secondary categories. The following category types exist:
If you want to search for the article type use Examples
|
filter[updatedBefore] | Filters the articles to only return those that have been edited before the given timestamp. Use in combination with Examples
|
filter[updatedAfter] | Filters for articles that have been edited since the given timestamp. Use in combination with Examples
|
filter[highlight] | Filter for articles that are marked as highlights. This property can be set to |
filter[inCollection] | Filter for articles that are in the given collection with the given id. Examples
|
filter[area] | Filter for articles that are in the areas with the given ids. Examples
|
filter[city] | Filter for articles that are connected to cities with the given ids. Examples
|
filter[notInCollection] | Filter for articles that are not in the given collection with the given id. This is the opposite of Examples
|
filter[externalId] | Filters articles by the externalId(s). You can give one or multiple externalIds formatted like Examples
|
filter[areaZipCode] | Filters for areas that contain the given zip code(s). Examples
|
filter[id] | Only fetches entities with the given ids. Examples
|
filter[excludeId] | Only fetches entities not within the given ids. Examples
|
filter[dynamicFieldValueSelect] | Examples
|
filter[tag] | Filters for one or more tags that must be present on the article. If multiple tags are given, then results are guaranteed to have at least one of the tags but not necessarily all of them. Examples
|
Array Items
|
$ curl -g -X GET \
http://toubiz.local/api/v1/article?api_token=TOKEN&pagination[pageSize]=5&filter[primaryCategory]=20ab716a-406c-3bcf-a133-b54b5dcc1e72
{
"_links": {
"api.v1.article.index": "GET api/v1/article",
"api.v1.article.update": "PUT api/v1/article/{article}",
"api.v1.article.store": "POST api/v1/article",
"api.v1.article.destroy": "DELETE api/v1/article/{article}",
"api.v1.article.show": "GET api/v1/article/{article}",
"api.v1.article.media": "GET api/v1/article/{article}/media",
"api.v1.article.tags": "GET api/v1/article/{article}/tags",
"api.v1.article.contactInformation": "GET api/v1/article/{article}/contactInformation",
"api.v1.article.emails": "GET api/v1/article/{article}/emails",
"api.v1.article.fieldBlueprints": "GET api/v1/article/{article}/fieldBlueprints",
"api.v1.article.fieldValues": "GET api/v1/article/{article}/fieldValues",
"api.v1.article.seo": "GET api/v1/article/{article}/seo",
"api.v1.article.openingTimes": "GET api/v1/article/{article}/openingTimes",
"api.v1.article.phoneNumbers": "GET api/v1/article/{article}/phoneNumbers",
"api.v1.article.files": "GET api/v1/article/{article}/files",
"api.v1.article.additionalAddress": "GET api/v1/article/{article}/additionalAddress",
"api.v1.article.permissions": "GET api/v1/article/{article}/permissions",
"documentation.html": "GET /api/v1/docs",
"documentation.json": "GET /api/v1",
"previousPage": null,
"nextPage": "http://toubiz.ddev.site/api/v1/article?q=%2Fapi%2Fv1%2Farticle&api_token=%242y%2410%24uWEpfM.YINolDOvThZf6NOGWd0vnp6%2F8Aj9cArpqBf8iE19nGxuTG&pagination[pageSize]=3&filter[category]=20ab716a-406c-3bcf-a133-b54b5dcc1e72&invisible=0&private=0&pagination[page]=2"
},
"_warning": [
"No page number given. Assuming first page. You can set a page by using the pagination[page] parameter.",
"No page number given. Assuming first page. You can set a page by using the pagination[page] parameter."
],
"_attributes": {
"q": "/api/v1/article",
"pagination": {
"pageSize": 3,
"page": 1,
"total": 19,
"lastPage": 7
},
"filter": {
"category": "20ab716a-406c-3bcf-a133-b54b5dcc1e72"
}
},
"_errors": [],
"payload": [
{
"id": "c86ef64e-6667-3899-ad17-6e9c5f49abe2",
"name": "Haus Pluto",
"abstract": "",
"description": "<p>Das ist ein Test. Wird mein Name in der Revision angezeigt? Auch wenn der User gel\u00f6scht wird?\u00a0</p>\n<p><strong>Das ist ein Test. Wird mein Name in der Revision angezeigt? Auch wenn der User gel\u00f6scht wird?\u00a0</strong></p>\n<p>Das ist ein Test. Wird mein Name in der Revision angezeigt? Auch wenn der User gel\u00f6scht wird?\u00a0</p>",
"generalInformation": "",
"type": "point",
"primaryCategory": {
"id": "18192c0a-c88d-36e3-8778-bdc5d91bc7f1",
"name": "Pension",
"nameWithParents": "\u00dcbernachten \u00bb Gasth\u00f6fe und Pensionen \u00bb Pension",
"type": "point",
"invisible": false
},
"private": false,
"invisible": false,
"updatedAt": "2018-11-05T10:46:06",
"highlight": false,
"address": {
"id": "62858f76-55f6-372c-8c8e-b9744e3eadb3",
"name": "",
"nameWithParents": "",
"type": "",
"invisible": false
}
},
{
"id": "c33c065f-9322-382a-acd4-abcdf11f3956",
"name": "Das Haus f\u00fcr Naturfreunde",
"abstract": "",
"description": "",
"generalInformation": "",
"type": "point",
"primaryCategory": {
"id": "1a041b7b-9dcf-395c-9e06-ffa8f64c0942",
"name": "Naturfreundehaus",
"nameWithParents": "\u00dcbernachten \u00bb Sammelunterk\u00fcnfte \u00bb Naturfreundehaus",
"type": "point",
"invisible": false
},
"private": false,
"invisible": false,
"updatedAt": "2018-09-19T14:36:30",
"highlight": false,
"address": {
"id": "73188077-978c-3cf1-9038-6cc4f6e0d310",
"name": "LIS 6",
"nameWithParents": "",
"type": "",
"invisible": false
}
},
{
"id": "98bf6eb8-e7d0-3ed7-a9b9-b15305ad8e57",
"name": "Merkmals Typ Test",
"abstract": "",
"description": "",
"generalInformation": "",
"type": "point",
"primaryCategory": {
"id": "1d27e9c6-63bc-3e7c-9068-5db51df44808",
"name": "Ferienhaus",
"nameWithParents": "\u00dcbernachten \u00bb Ferienwohnungen/-h\u00e4user \u00bb Ferienhaus",
"type": "point",
"invisible": false
},
"private": false,
"invisible": false,
"updatedAt": "2018-10-23T08:22:32",
"highlight": false,
"address": {
"id": "bbd44950-113d-3b21-a518-343b66d5f88f",
"name": "Merkmals Typ Test",
"nameWithParents": "",
"type": "",
"invisible": false
}
}
]
}
Updates an existing article in the database. The data structure that must be given as POST Body is the same as for the store route.
Beware: changing primaryCategory may cause losing all fieldValues which already have been set, only fields which exist in both (old and new) primaryCategory are kept. If fieldValues are set in the current request, only these ones are considered to be stored. All others will be discarded.
An article that is being created and edited. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
abstract |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
internalProtocol |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
invisible |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
highlight |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
license |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currentInformation |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
author |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
copyright |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sourceInformationLink |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
primaryCategory | Associates a primary category with the article. The given data can either be a single id or an object containing the id of the category that should be associated. Both of the following are valid formats:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
client | Associates a client with the article. The client can either be specified using a single id or an object that contains the id as a property. Therefor both of the following formats are valid:.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fieldValues | Interprets the
Examples
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tags | Updates the list of tags that are associated with the article. Tags are passed using an array of strings. Examples
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locationIdentifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
externalIds | Examples
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
secondaryCategories | Associates secondary categories with the article. The items of the given array can either be a single id or objects containing the id of the category that should be associated. Both of the following are valid formats:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
point
Saves point specific attributes for the article.
If the value Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tour
Saves tour specific attributes for the article.
If the value Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
area
Saves area specific attributes for the article.
If the value Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
seo
Update the seo information of the article. Examples
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
media
Modifies the media elements associated with the article.
The values of the array passed may contain the All media elements that are not in the array will be deleted. Examples
Array Items
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
files
Associates files with the article.
A combination of the two cases above can be used to update the file of an existing object. All files not in the given array will be deleted. Examples
Array Items
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
contactInformation
Modifies the contact information related to this article. Examples
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
openingTimes
Updates the opening times of the article. This property should only be specified if the article is a point since opening times are specific to points. Examples
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
phoneNumbers
Allows filling of the phone number relation. If a phone number is specified with an id then it is assumed that this phone number already exists in the system and is updated. If not, then a new phone number is created. All phone numbers that are not in the given data will be deleted. Examples
Array Items
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
additionalAddress
Array Items
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
emails
Modifies the relation to email addresses of the article.
Every email address must contain the properties Examples
Array Items
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
relatedArticles
Updates the related articles on the current article. The passed value must be a 2-dimensional array that uses the relation type as a key of the first level and articles as keys of the second level. RelationType can be one of the enum values listed below. Articles can either be passed as simple ids or objects containing ids. Examples
Enum:
|
$ curl -g \
-X PATCH \
-d '{ "name": "updated", "tags": ["foo", "bar", "baz"] }' \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31?api_token=admin_token'
{
"_links": {
"api.v1.article.index": "GET api/v1/article",
"api.v1.article.update": "PUT api/v1/article/{article}",
"api.v1.article.store": "POST api/v1/article",
"api.v1.article.destroy": "DELETE api/v1/article/{article}",
"api.v1.article.show": "GET api/v1/article/{article}",
"api.v1.article.media": "GET api/v1/article/{article}/media",
"api.v1.article.tags": "GET api/v1/article/{article}/tags",
"api.v1.article.contactInformation": "GET api/v1/article/{article}/contactInformation",
"api.v1.article.emails": "GET api/v1/article/{article}/emails",
"api.v1.article.fieldBlueprints": "GET api/v1/article/{article}/fieldBlueprints",
"api.v1.article.fieldValues": "GET api/v1/article/{article}/fieldValues",
"api.v1.article.seo": "GET api/v1/article/{article}/seo",
"api.v1.article.openingTimes": "GET api/v1/article/{article}/openingTimes",
"api.v1.article.phoneNumbers": "GET api/v1/article/{article}/phoneNumbers",
"api.v1.article.files": "GET api/v1/article/{article}/files",
"api.v1.article.additionalAddress": "GET api/v1/article/{article}/additionalAddress",
"api.v1.article.permissions": "GET api/v1/article/{article}/permissions",
"documentation.html": "GET /api/v1/docs",
"documentation.json": "GET /api/v1"
},
"_warning": [],
"_attributes": {
"name": "updated",
"tags": [
"foo",
"bar",
"baz"
],
"q": "/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31"
},
"_errors": [],
"payload": {
"id": "942b91db-ee64-4f2c-99ae-bdef5f592db7",
"name": "updated",
"abstract": "",
"description": "",
"generalInformation": "",
"type": "point",
"primaryCategory": {
"id": "886a3ecb-77ce-3b3f-86be-52aaa27383ca",
"name": "Stadt",
"nameWithParents": "POI und Infrastruktur \u00bb Ort \u00bb Stadt",
"type": "point",
"invisible": false
},
"private": false,
"invisible": false,
"updatedAt": "2019-10-17T16:38:31",
"highlight": false,
"address": null,
"secondaryCategories": [],
"owner": "5bc2fc99-1007-3667-aa20-16afb34cc0d0",
"internalProtocol": "",
"emails": [],
"contactInformation": null,
"permissions": {
"read": true,
"write": true,
"delete": true
},
"fieldValues": { ... },
"fieldBlueprints": [ ... ],
"phoneNumbers": [],
"tags": [
"foo",
"bar",
"baz"
],
"media": [],
"seo": {
"id": null,
"metaDescription": "",
"noIndex": false,
"openGraphDescription": "",
"openGraphTitle": "",
"openGraphImage": null
},
"openingTimes": {
"mode": "times",
"definitions": []
},
"files": []
}
}
# NOTE: multipart/form-data file uploads must always use POST.
$ curl -g \
-X POST \
-F media[0][file]=@test_image.png \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31?api_token=admin_token'
{
"_links": { ... },
"_warning": [],
"_attributes": { ... },
"_errors": [],
"payload": {
...
"media": [
{
"id": "c841291e-d6e6-4989-8613-f747a260b9f9",
"name": "Test image",
"copyright": "",
"altText": "",
"caption": "",
"preview": {
"image/png": "http://toubiz.local/storage/cache/file/public/2905/373916000c77fa98f55d09fad09c4063__5ba9fc90e54b5.png/450x300q75.png",
"image/jpeg": "http://toubiz.local/storage/cache/file/public/2905/373916000c77fa98f55d09fad09c4063__5ba9fc90e54b5.png/450x300q75.jpg",
"image/webp": "http://toubiz.local/storage/cache/file/public/2905/373916000c77fa98f55d09fad09c4063__5ba9fc90e54b5.png/450x300q75.webp"
},
"url": "http://toubiz.local/file/public/373916000c77fa98f55d09fad09c4063__5ba9fc90e54b5.png",
"hasCustomCaption": false,
"description": "",
"main": false,
"client": 1,
"fileType": "PNG"
}
],
}
}
Creates a new Article in the database based on the given attributes. The POST Body may contain any of the articles attributes as well as it's relations.
This action accepts the same POST Body attributes as api.v1.article.update
.
$ curl -g \
-X POST \
-d '{ "name": "New article", "primaryCategory": "886a3ecb-77ce-3b3f-86be-52aaa27383ca", "type": "point" }' \
'http://toubiz.local/api/v1/article?api_token=TOKEN'
{
"_links": {
"api.v1.article.index": "GET api/v1/article",
"api.v1.article.update": "PUT api/v1/article/{article}",
"api.v1.article.store": "POST api/v1/article",
"api.v1.article.destroy": "DELETE api/v1/article/{article}",
"api.v1.article.show": "GET api/v1/article/{article}",
"api.v1.article.media": "GET api/v1/article/{article}/media",
"api.v1.article.tags": "GET api/v1/article/{article}/tags",
"api.v1.article.contactInformation": "GET api/v1/article/{article}/contactInformation",
"api.v1.article.emails": "GET api/v1/article/{article}/emails",
"api.v1.article.fieldBlueprints": "GET api/v1/article/{article}/fieldBlueprints",
"api.v1.article.fieldValues": "GET api/v1/article/{article}/fieldValues",
"api.v1.article.seo": "GET api/v1/article/{article}/seo",
"api.v1.article.openingTimes": "GET api/v1/article/{article}/openingTimes",
"api.v1.article.phoneNumbers": "GET api/v1/article/{article}/phoneNumbers",
"api.v1.article.files": "GET api/v1/article/{article}/files",
"api.v1.article.additionalAddress": "GET api/v1/article/{article}/additionalAddress",
"api.v1.article.permissions": "GET api/v1/article/{article}/permissions",
"documentation.html": "GET /api/v1/docs",
"documentation.json": "GET /api/v1"
},
"_warning": [],
"_attributes": {
"name": "New article",
"primaryCategory": "886a3ecb-77ce-3b3f-86be-52aaa27383ca",
"type": "point",
"q": "/api/v1/article"
},
"_errors": [],
"payload": {
"id": "942b91db-ee64-4f2c-99ae-bdef5f592db7",
"name": "New article",
"abstract": "",
"description": "",
"generalInformation": "",
"type": "point",
"primaryCategory": {
"id": "886a3ecb-77ce-3b3f-86be-52aaa27383ca",
"name": "Stadt",
"nameWithParents": "POI und Infrastruktur \u00bb Ort \u00bb Stadt",
"type": "point",
"invisible": false
},
"private": false,
"invisible": false,
"updatedAt": "2019-10-17T16:38:31",
"highlight": false,
"address": null,
"secondaryCategories": [],
"owner": "5bc2fc99-1007-3667-aa20-16afb34cc0d0",
"internalProtocol": "",
"emails": [],
"contactInformation": null,
"permissions": {
"read": true,
"write": true,
"delete": true
},
"fieldValues": { ... },
"fieldBlueprints": [ ... ],
"phoneNumbers": [],
"tags": [],
"media": [],
"seo": {
"id": null,
"metaDescription": "",
"noIndex": false,
"openGraphDescription": "",
"openGraphTitle": "",
"openGraphImage": null
},
"openingTimes": {
"mode": "times",
"definitions": []
},
"files": []
}
}
Delete the specified article.
$ curl -X DELETE \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31?api_token=TOKEN'
{
"_links": { ... },
"_warning": [],
"_attributes": [],
"_errors": [],
"payload": null
}
Fetch an article. It is possible to include relational data using the include
parameter.
This will add an attribute to the response payload that has the same name
as the parameter (files
for &include=files
) that contains the response
payload of the corresponding subroutes (e.g. /api/v1/article/[ID]/files
).
include[]=emails | Also includes the results of the |
include[]=contactInformation | Also includes the results of the
|
include[]=files | Also includes the results of the |
include[]=fieldValues | Also includes the results of the |
include[]=fieldBlueprints | Also includes the results of the |
include[]=phoneNumbers | Also includes the results of the |
include[]=tags | Also includes the results of the |
include[]=media | Also includes the results of the |
include[]=seo | Also includes the results of the |
include[]=languages | Also includes the languages |
include[]=collections | Also includes the results of the |
include[]=externalIds | Also includes the ids from other services for this article |
include[]=eventsAtThisLocation | Also includes all events for which this is the location |
include[]=nearbyArticles | Also includes all articles that are nearby |
include[]=nearbyEvents | Also includes all events for which the location is nearby |
include[]=tourStageRelations | Also includes the parent tour and all other stages of the parent tour |
include[]=client | Include a minimal client object instead of the id |
include[]=awards | Include the awards of type |
include[]=classifications | Include the awards of type |
include[]=locationIdentifiers | Include the location identifier for this area |
emails | Contains the payload of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
contactInformation | Contains the payload of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
files | Contains the payload of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fieldValues | Contains the payload of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fieldBlueprints | Contains the payload of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
phoneNumbers | Contains the payload of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tags | Contains the payload of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
media | Contains the payload of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
seo | Contains the payload of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
abstract |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
invisible |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
highlight |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
author |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
copyright |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sourceInformationLink |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
license
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locale |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updatedAt | The date at which the article was last updated. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
primaryCategory
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
address
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
client
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
externalIds |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
geocoordinates |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
point
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
area
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tour
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auditor |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currentInformation |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
secondaryCategories
Array Items
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
languages |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
permissions
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
eventsAtThisLocation
Array Items
|
$ curl -X GET \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31?api_token=admin_token'
{
"_links": {
"api.v1.article.index": "GET api/v1/article",
"api.v1.article.update": "PUT api/v1/article/{article}",
"api.v1.article.store": "POST api/v1/article",
"api.v1.article.destroy": "DELETE api/v1/article/{article}",
"api.v1.article.show": "GET api/v1/article/{article}",
"api.v1.article.media": "GET api/v1/article/{article}/media",
"api.v1.article.tags": "GET api/v1/article/{article}/tags",
"api.v1.article.contactInformation": "GET api/v1/article/{article}/contactInformation",
"api.v1.article.emails": "GET api/v1/article/{article}/emails",
"api.v1.article.fieldBlueprints": "GET api/v1/article/{article}/fieldBlueprints",
"api.v1.article.fieldValues": "GET api/v1/article/{article}/fieldValues",
"api.v1.article.seo": "GET api/v1/article/{article}/seo",
"api.v1.article.openingTimes": "GET api/v1/article/{article}/openingTimes",
"api.v1.article.phoneNumbers": "GET api/v1/article/{article}/phoneNumbers",
"api.v1.article.files": "GET api/v1/article/{article}/files",
"api.v1.article.additionalAddress": "GET api/v1/article/{article}/additionalAddress",
"api.v1.article.permissions": "GET api/v1/article/{article}/permissions",
"documentation.html": "GET /api/v1/docs",
"documentation.json": "GET /api/v1"
},
"_warning": [],
"_attributes": {
"q": "/api/v1/article/5b223e7b-250a-3379-9183-38d5943b557d"
},
"_errors": [],
"payload": {
"id": "5b223e7b-250a-3379-9183-38d5943b557d",
"name": "Testort",
"abstract": "Cras mattis consectetur purus sit amet fermentum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.",
"description": "kjfjeijfiej",
"generalInformation": "",
"type": "point",
"primaryCategory": {
"id": "886a3ecb-77ce-3b3f-86be-52aaa27383ca",
"name": "Stadt",
"nameWithParents": "POI und Infrastruktur \u00bb Ort \u00bb Stadt",
"type": "point",
"invisible": false
},
"private": false,
"invisible": false,
"updatedAt": "2019-05-13T07:24:37",
"highlight": false,
"address": {
"id": "ea8870ac-8451-3235-b22b-b08deb23a667",
"name": "",
"nameWithParents": "",
"type": "",
"invisible": false
},
"secondaryCategories": [],
"owner": "5bc2fc99-1007-3667-aa20-16afb34cc0d0",
"point": {
"price": {
"freeEntry": false,
"priceComment": "",
"priceTable": [
[ "", "", "" ],
[ "", "", "" ],
[ "", "", "" ]
]
},
"longitude": 8.0931399999999485,
"latitude": 47.90455,
"address": {
"id": "ea8870ac-8451-3235-b22b-b08deb23a667",
"name": "",
"street": "Windeck",
"streetNumber": "2",
"zip": "79856",
"city": "Hinterzarten-Windeck",
"country": "DE"
}
}
}
}
Lists all media of the given article. It is possible to access this information with include=media
on the show route.
sizes | Specifies size classes to generate for the image where the key specifies the names of the size
class and the value the size to generate. This can either be a single number, indicating the width of the
image or a string containing width & height separated with an |
Array Items
|
$ curl -X GET \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31/media?api_token=admin_token&preview=320x240
{
"_links": {
"documentation.html": "GET /api/v1/docs",
"documentation.json": "GET /api/v1",
"api.v1.article.index": "GET api/v1/article",
"api.v1.article.update": "PUT api/v1/article/{article}",
"api.v1.article.store": "POST api/v1/article",
"api.v1.article.destroy": "DELETE api/v1/article/{article}",
"api.v1.article.show": "GET api/v1/article/{article}",
"api.v1.article.media": "GET api/v1/article/{article}/media",
"api.v1.article.tags": "GET api/v1/article/{article}/tags",
"api.v1.article.emails": "GET api/v1/article/{article}/emails",
"api.v1.article.fieldValues": "GET api/v1/article/{article}/fieldValues",
"api.v1.article.fieldBlueprints": "GET api/v1/article/{article}/fieldBlueprints",
"api.v1.article.seo": "GET api/v1/article/{article}/seo",
"api.v1.article.openingTimes": "GET api/v1/article/{article}/openingTimes",
"api.v1.article.phoneNumbers": "GET api/v1/article/{article}/phoneNumbers",
"api.v1.article.files": "GET api/v1/article/{article}/files"
},
"_warning": [],
"_attributes": {
"preview": "320x240"
},
"_errors": [],
"payload": [
{
"id": "30d65e19-5e27-4b60-8803-0905442fc20a",
"name": "Jenkins 300x300",
"copyright": "",
"altText": "",
"caption": "",
"preview": {
"image/png": "http://toubiz.local/storage/cache/file/public/2905/373916000c77fa98f55d09fad09c4063__5ba9fc90e54b5.png/320x240q75.png",
"image/jpeg": "http://toubiz.local/storage/cache/file/public/2905/373916000c77fa98f55d09fad09c4063__5ba9fc90e54b5.png/320x240q75.jpg",
"image/webp": "http://toubiz.local/storage/cache/file/public/2905/373916000c77fa98f55d09fad09c4063__5ba9fc90e54b5.png/320x240q75.webp"
},
"url": "http://toubiz.local/storage/2905/373916000c77fa98f55d09fad09c4063__5ba9fc90e54b5.png",
"hasCustomCaption": false,
"description": "",
"main": false,
"client": 1,
"fileType": "PNG"
}
]
}
List of all tags associated with the given article. It is possible to access this information with include=tags
on the show route.
* |
|
$ curl -X GET \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31/tags?api_token=admin_token'
{
"_links": { ... },
"_warning": [],
"_attributes": [],
"_errors": [],
"payload": [
"foo",
"bar",
"baz"
]
}
Displays the contact information for the article.
contactPersonTitle |
|
contactPersonFirstName |
|
contactPersonLastName |
|
website |
|
|
|
|
|
flickr |
|
youtube |
|
|
|
aerial3d |
|
webcam |
|
camera360 |
|
vimeo |
|
|
|
|
|
|
|
wikipedia |
|
youtubeVideo |
|
vimeoVideo |
|
blog |
|
id |
|
createdAt |
|
updatedAt |
|
pivot |
|
casts |
|
hidden |
|
fillable |
|
attributes |
|
locale |
|
Displays all emails associated to an article. It is possible to access this information with include=emails
on the show route.
Array Items
|
$ curl -X GET \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31/emails?api_token=admin_token'
{
"_links": {
"api.v1.article.index": "GET api/v1/article",
"api.v1.article.update": "PUT api/v1/article/{article}",
"api.v1.article.store": "POST api/v1/article",
"api.v1.article.destroy": "DELETE api/v1/article/{article}",
"api.v1.article.show": "GET api/v1/article/{article}",
"api.v1.article.media": "GET api/v1/article/{article}/media",
"api.v1.article.tags": "GET api/v1/article/{article}/tags",
"api.v1.article.contactInformation": "GET api/v1/article/{article}/contactInformation",
"api.v1.article.emails": "GET api/v1/article/{article}/emails",
"api.v1.article.fieldBlueprints": "GET api/v1/article/{article}/fieldBlueprints",
"api.v1.article.fieldValues": "GET api/v1/article/{article}/fieldValues",
"api.v1.article.seo": "GET api/v1/article/{article}/seo",
"api.v1.article.openingTimes": "GET api/v1/article/{article}/openingTimes",
"api.v1.article.phoneNumbers": "GET api/v1/article/{article}/phoneNumbers",
"api.v1.article.files": "GET api/v1/article/{article}/files",
"api.v1.article.additionalAddress": "GET api/v1/article/{article}/additionalAddress",
"api.v1.article.permissions": "GET api/v1/article/{article}/permissions",
"documentation.html": "GET /api/v1/docs",
"documentation.json": "GET /api/v1"
},
"_warning": [],
"_attributes": {
"q": "/api/v1/article/740a127e-61ee-37c0-abc7-756fd80333f8/emails"
},
"_errors": [],
"payload": [
{
"id": "bb5a2982-def7-31c2-901c-0e4fb19b5b2f",
"name": "General Information",
"email": "info@test.com",
"primary": true
},
{
"id": "a0133f7d-6634-4b94-8f74-5a41a41ff73f",
"name": "Tour specific questions",
"email": "tours@test.com",
"primary": false
},
]
}
Some data is not defined directly on a model - rather in what is called a 'dynamic field' which is displayed to the user depending on the context of the article and the user. This allows us to display some fields only to some users or some, very specific field only for articles in very specific categories.
This endpoint returns the field blueprints: The definitions of which dynamic fields are available
for the current article. This endpoint does not yet contain any values which have been entered
into these fields: These are available using the article.fieldValues
endpoint.
Array Items
|
$ curl -X GET \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31/fieldBlueprints?api_token=TOKEN'
{
"_links": {},
"_warning": [],
"_attributes": [],
"_errors": [],
"payload": [
{
"id": "97cd7a3c-b532-4cb0-8625-20dc32ed2605",
"name": "Gastro Details",
"isGenerallyApplicable": true,
"sorting": 0,
"fieldSets": [
{
"id": "920fada4-4487-47bb-aec4-f41abc3ddb8b",
"name": "Barrierefreiheit",
"isGenerallyApplicable": true,
"sorting": 0,
"replicatable": false,
"icon": null,
"fields": [
{
"id": "8aab102d-9538-3994-9871-63c1c73124c4",
"name": "Sanitärräume/WC's: Sitzhöhe des WC-Beckens",
"type": "input",
"sorting": 37,
"configuration": {
"type": "number",
"uploadType": "",
"placeholder": "cm"
}
},
{
"id": "e46d6a10-0864-3ed9-8cfb-99769344c331",
"name": "Personal & Sonstiges",
"type": "check",
"sorting": 38,
"configuration": {
"type": "text",
"options": [
"Gebärdensprache wird verstanden",
"Personal im Umgang mit gehörlosen/hörgeschädigten Personen geschult",
"Führungen in Begleitung eines Gebärdensprachdolmetschers",
"Akustische Verstärkungsanlagen (Induktionsschleife) bei Veranstaltungen, Führungen, an Kassen, Infostellen",
"Gedruckte Informationen in Großschrift/Blindenschrift/kontrastreich",
"Hörkassetten, Audioguides, sonstige akustische Medien",
"Infotafeln/Wegweiser in Blindenschrift/Relief/Großschrift/kontrastreich",
"Personal im Umgang mit blinden Menschen geschult",
"Spezielle Führungen für blinde/sehbehinderte Menschen",
"Führhunde erlaubt",
"Akustische Alarmsignale",
"Barrierefreier Nahverkehrsanschluss (Niederflurbusse, optische und akustische Anzeigen)",
"Dolmetscherdienste und/oder besondere optische Informationen für gehörlose Menschen bei Veranstaltungen",
"Dienstleistungen für Sehbehinderte",
"Dienstleistungen für Gehörlose und Schwerhörige",
"Rollstuhlverleih",
"Hilfen für Menschen mit Lernbehinderung"
]
}
}
]
}
]
}
]
}
Contains the values of the dynamic fields associated with the current article. The payload is an object which uses the id
of the blueprint as a key and
an array of field values as the value.
It is possible to access this information with include=fieldValues
on the article.show
route.
Array Items
|
$ curl -X GET \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31/fieldValues?api_token=TOKEN'
{
"_links": { ... },
"_warning": [],
"_attributes": [],
"_errors": [],
"payload": {
"heightOfToilet": [{
"value": { "text": "50" }
}],
"staffAndVarious": [{
"value": { "selected": [ 0, 2, 4 ] }
}]
}
}
List of all SEO Information associated with the given article. It is possible to access this information with include=seo
on the show route.
metaDescription |
|
||||||||||||
canonicalLink |
|
||||||||||||
openGraphDescription |
|
||||||||||||
openGraphTitle |
|
||||||||||||
noIndex |
|
||||||||||||
searchKeywords |
|
||||||||||||
openGraphImage
Properties
|
$ curl -X GET \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31/seo?api_token=admin_token'
{
"_links": { ... },
"_warning": [],
"_attributes": [],
"_errors": [],
"payload": {
"id": "fff2a63a-b323-4828-9b61-f9fcb426d565",
"metaDescription": "",
"noIndex": false,
"openGraphDescription": "",
"openGraphImage": null,
"openGraphTitle": ""
}
}⏎
Get all types of opening times for an article. The article needs to be a point to be able to use this endpoint.
mode |
|
||||||||||||||||||||||||||||||||||||||
definitions
Array Items
|
$ curl -X \
GET 'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31/openingTimes?api_token=TOKEN'
{
"_links": { ... },
"_warning": [],
"_attributes": [],
"_errors": [],
"payload": {
"mode": "times",
"definitions": [{
"id": "412c2c18-a4d8-40f5-aa1b-9a9070222d7e",
"comment": "",
"type": "regular",
"openState": "times",
"title": "",
"timeRanges": [{
"id": "18e3c17a-f92f-4e5e-adcc-3cb71bc392af",
"openAt": "09:00",
"closeAt": "12:00",
"comment": "Morgens"
},{
"id": "4312ab88-314b-4431-a81e-efeb9882a6e4",
"openAt": "14:00",
"closeAt": "17:00",
"comment": "Mittags"
}],
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": false,
"sunday": false
}, {
"id": "acc72afd-af45-468b-a8d3-981f06271bfd",
"comment": "",
"type": "special",
"openState": "closed",
"title": "",
"appliesOn": "2018-06-05"
}]
}
}
Fetches the phone numbers that are associated with an article.
Array Items
|
$ curl -X GET \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31/phoneNumbers?api_token=admin_token'
{
"_links": { ... },
"_warning": [],
"_attributes": [],
"_errors": [],
"payload": [
{
"id": "a63a4ab1-e1ae-4572-8d5a-76f0e1e799a9",
"name": "Primary number",
"type": "phone",
"primary": true,
"iso5008": "+49 12345 6890"
},
{
"id": "81efceac-4689-47ec-90de-763997a2d451",
"name": "Secondary number",
"type": "phone",
"primary": false,
"iso5008": "+49 3456 789"
},
{
"id": "2808b3d7-5aff-4a20-8ffa-a12f1d87af4a",
"name": "Fax",
"type": "fax",
"primary": true,
"iso5008": "+49 1234 8976"
}
]
}
Lists all files of the given article.
Array Items
|
$ curl -X GET \
'http://toubiz.local/api/v1/article/94cba5bd-4413-4546-9d25-d9b4e338ce31/files?api_token=TOKEN'
{
"_links": { ... },
"_warning": [],
"_attributes": [],
"_errors": [],
"payload": [
{
"id": "30d65e19-5e27-4b60-8803-0905442fc20a",
"name": "index.pdf",
"description": "",
"url": "https://toubiz.local/storage/article/18d1f95ba1fdaf717edcca80d577ebb6__5baa054503436.pdf",
"preview": {
"image/png": "/dist/img/filetypes/pdf.png"
}
}
]
}
Fetches the additional address that are associated with an article.
Array Items
|