Plentymarkets interface documentation
Tag
Contracts
TagAvailabilityRepositoryContract
The TagAvailabilityRepositoryContract is the interface for the tag availability repository. This interface allows to update and create tag availabilities.
Namespace
Plenty\Modules\Tag\Contracts
Methods
public update($data, $tagId, $availabilityType):Plenty\Modules\Tag\Models\TagAvailabilityReturn type:        TagAvailability
| Name | Type | Description | 
| 
 | The availability data. The properties that are required to update an tag can be found in the TagAvailability model. | |
| 
 | The ID of the tag | |
| 
 | The type of the availability. The following types are available. <ul> <li>blog</li> <li>category</li> <li>content_page</li> <li>variation</li> <li>ticket</li> </ul> | 
public create($data):Plenty\Modules\Tag\Models\TagAvailabilityReturn type:        TagAvailability
| Name | Type | Description | 
| 
 | The availability data. The properties that are required to update an tag can be found in the TagAvailability model. | 
public clearCriteria():voidResets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():voidApplies criteria classes to the current repository.
TagNameRepositoryContract
The TagNameRepositoryContract is the interface for the tag name repository. This interface allows to update, create and list tag names.
Namespace
Plenty\Modules\Tag\Contracts
Methods
public update($data, $tagId, $lang):Plenty\Modules\Tag\Models\TagNameReturn type:        TagName
| Name | Type | Description | 
| 
 | The name data. The properties that are required to update an name can be found in the TagName model. | |
| 
 | The ID of the tag | |
| 
 | The language of the name | 
public create($data):Plenty\Modules\Tag\Models\TagNameReturn type:        TagName
| Name | Type | Description | 
| 
 | The name data. The properties that are required to update an name can be found in the TagName model. | 
public findByName($name, $lang):array| Name | Type | Description | 
| 
 | The name of the tag | |
| 
 | The language of the name | 
public clearCriteria():voidResets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():voidApplies criteria classes to the current repository.
TagRelationshipRepositoryContract
The TagRelationshipRepositoryContract is the interface for the tag relationship repository. This interface allows to update, create, delete and list tag relationships.
Namespace
Plenty\Modules\Tag\Contracts
Methods
public update($data, $tagId, $availabilityType, $relationshipValue):Plenty\Modules\Tag\Models\TagRelationshipReturn type:        TagRelationship
| Name | Type | Description | 
| 
 | The relationship data. The properties that are required to update a relationship can be found in the TagRelationship model. | |
| 
 | The ID of the tag | |
| 
 | The type of the availability. The following types are available: <ul> <li>category</li> <li>variation</li> <li>ticket</li> </ul> | |
| 
 | The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234. | 
public create($data):Plenty\Modules\Tag\Models\TagRelationshipReturn type:        TagRelationship
| Name | Type | Description | 
| 
 | The relationship data. The properties that are required to update a relationship can be found in the TagRelationship model. | 
public deleteRelation($relationshipValue, $tagId):void| Name | Type | Description | 
| 
 | The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234. | |
| 
 | The ID of the tag | 
public deleteOneRelation($relationshipValue, $relationshipType, $tagId):void| Name | Type | Description | 
| 
 | The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234. | |
| 
 | The type of the relationship, i.e. <b>category</b>, <b>item</b> or <b>ticket</b> | |
| 
 | The ID of the tag | 
public deleteOneRelationByUUID($relationshipUUID, $relationshipType, $tagId):intDelete a tag relationship by the uuid5 value.
| Name | Type | Description | 
| 
 | The uuid5 value of the relationship. | |
| 
 | The type of the relationship, i.e. <b>board</b> | |
| 
 | The ID of the tag | 
public findByValueId($valueId):array| Name | Type | Description | 
| 
 | The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234. | 
public findByTagId($tagId):array| Name | Type | Description | 
| 
 | The ID of the tag | 
public findRelationship($tagId, $relationshipValue, $relationshipType):Plenty\Modules\Tag\Models\TagRelationshipReturn type:        TagRelationship
Gets a specific tag relationship or returns null.
| Name | Type | Description | 
| 
 | The ID of the tag | |
| 
 | The value of the relationship | |
| 
 | The type of the relationship | 
public delete($relationshipValue, $relationshipType):Plenty\Repositories\Models\DeleteResponseReturn type:        DeleteResponse
Deletes tag links by reference value and relationship type.
| Name | Type | Description | 
| 
 | The value of the relationship | |
| 
 | The type of the relationship | 
public deleteByUUID($relationshipValue, $relationshipType):Plenty\Repositories\Models\DeleteResponseReturn type:        DeleteResponse
Deletes tag links by uuid5 reference value and relationship type.
| Name | Type | Description | 
| 
 | The value of the relationship | |
| 
 | The type of the relationship | 
public deleteBulk($data):Illuminate\Support\CollectionReturn type:        Collection
Deletes a list of tag relationships. The tag ID, tag type and relation value must be specified.
| Name | Type | Description | 
| 
 | The array containing the data. | 
public listRelationships($with = []):Illuminate\Support\CollectionReturn type:        Collection
Returns all tag relationships.
| Name | Type | Description | 
| 
 | An array with child instances to be loaded | 
public clearCriteria():voidResets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():voidApplies criteria classes to the current repository.
public setFilters($filters = []):voidSets the filter array.
| Name | Type | Description | 
| 
 | 
public getFilters():voidReturns the filter array.
public getConditions():voidReturns a collection of parsed filters as Condition object
public clearFilters():voidClears the filter array.
TagRepositoryContract
The TagRepositoryContract is the interface for the tag repository. This interface allows to create, update and delete tags.
Namespace
Plenty\Modules\Tag\Contracts
Methods
public create($name):Plenty\Modules\Tag\Models\TagReturn type:        Tag
Creates a new tag.
| Name | Type | Description | 
| 
 | The name of the tag | 
public update($data, $tagId):Plenty\Modules\Tag\Models\TagReturn type:        Tag
Updates a tag.
| Name | Type | Description | 
| 
 | The tag data. The properties that are required to update a tag can be found in the Tag model. | |
| 
 | The ID of the tag | 
public delete($tagId):voidDeletes a tag by the given tag ID.
| Name | Type | Description | 
| 
 | The ID of the tag | 
public getTagByName($name):Plenty\Modules\Tag\Models\TagReturn type:        Tag
| Name | Type | Description | 
| 
 | The name of the tag | 
| Name | Type | Description | 
| 
 | The IDs of the tags | 
public getTagById($id, $with = []):Plenty\Modules\Tag\Models\TagReturn type:        Tag
| Name | Type | Description | 
| 
 | The ID of the tag | |
| 
 | An array with child instances to be loaded | 
| Name | Type | Description | 
| 
 | The type of the availability. The following types are available. <ul> <li>blog</li> <li>category</li> <li>content_page</li> <li>variation</li> <li>ticket</li> <li>board</li> </ul> | 
| Name | Type | Description | 
| 
 | The relationship type | |
| 
 | The relationship value (string if UUID, otherwise int) | |
| 
 | Indicates whether the value is a UUID5 or not. | 
Return type:        Collection
Returns all tags.
| Name | Type | Description | 
| 
 | An array with child instances to be loaded | 
public createTag($data):Plenty\Modules\Tag\Models\TagReturn type:        Tag
Creates a new tag.
| Name | Type | Description | 
| 
 | The data as associative array | 
public createBulk($data):arrayCreates up to 50 new tags.
| Name | Type | Description | 
| 
 | The data as associative array | 
public updateBulk($data):arrayUpdates up to 50 tags.
| Name | Type | Description | 
| 
 | The data as associative array | 
public clearCriteria():voidResets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():voidApplies criteria classes to the current repository.
public setFilters($filters = []):voidSets the filter array.
| Name | Type | Description | 
| 
 | 
public getFilters():voidReturns the filter array.
public getConditions():voidReturns a collection of parsed filters as Condition object
public clearFilters():voidClears the filter array.
Models
Tag
The Tag model (deprecated)
Namespace
Plenty\Modules\Tag\Models
| Name | Type | Description | 
|---|---|---|
| id | The tag ID | |
| tagName | The name of the tag | |
| color | The color for the tag | |
| availabilities | The availabilities of the tag. | |
| names | The names of the tag. | |
| relationships | The relationships of the tag. | |
| clients | The clients of the tag. | |
| updatedAt | The updated at timestamp of the tag. | |
| createdAt | The created at timestamp of the tag. | 
Methods
public toArray()Returns this model as an array.
TagAvailability
The tag availability model (deprecated).
Namespace
Plenty\Modules\Tag\Models
| Name | Type | Description | 
|---|---|---|
| tagId | The Tag ID of the tag | |
| tagType | The type of the tag. The following types are available. <ul> <li>blog</li> <li>category</li> <li>content_page</li> <li>variation</li> <li>ticket</li> <li>board</li> <li>order</li> </ul> | 
Methods
public toArray()Returns this model as an array.
TagClient
The tag client model (deprecated).
Namespace
Plenty\Modules\Tag\Models
| Name | Type | Description | 
|---|---|---|
| id | The id of the relation | |
| tagId | The Tag ID of the tag | |
| plentyId | The PlentyId of the client | 
Methods
public toArray()Returns this model as an array.
TagName
The tag name model (deprecated).
Namespace
Plenty\Modules\Tag\Models
| Name | Type | Description | 
|---|---|---|
| id | The name ID of the tag | |
| tagId | The tag ID | |
| tagLang | The lang of the tag name. | |
| tagName | The name of the tag. | 
Methods
public toArray()Returns this model as an array.
TagRelationship
The tag relationship model (deprecated).
Namespace
Plenty\Modules\Tag\Models
| Name | Type | Description | 
|---|---|---|
| tagId | The ID of the tag | |
| tagType | The type of tag. | |
| relationshipValue | The ID of the data record for which a tag relationship is created | |
| relationshipUUID5 | The ID of the data record for which a tag relationship is created. For models with uuid5 as primary key | 
Methods
public toArray()Returns this model as an array.
V2
Contracts
TagNameRepositoryContract
The interface for the V2 TagNameRepository.
Namespace
Plenty\Modules\Tag\V2\Contracts
Methods
public delete($id):boolDeletes a tag name. The ID of the tag name must be specified.
| Name | Type | Description | 
| 
 | 
public clearCriteria():voidResets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():voidApplies criteria classes to the current repository.
public setFilters($filters = []):voidSets the filter array.
| Name | Type | Description | 
| 
 | 
public getFilters():voidReturns the filter array.
public getConditions():voidReturns a collection of parsed filters as Condition object
public clearFilters():voidClears the filter array.
TagRelationshipRepositoryContract
The interface for the V2 TagRelationshipRepository.
Namespace
Plenty\Modules\Tag\V2\Contracts
Methods
public search($with = [], $perPage = 50, $page = 1, $sorting = []):voidGets a list of tag relationships. Filter can be specified.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public count():intCount the tag relationships
public create($data):Plenty\Modules\Tag\V2\Models\TagRelationshipReturn type:        TagRelationship
Creates a new tag relationship.
| Name | Type | Description | 
| 
 | 
public delete($id):boolDeletes a tag relationship. The ID of the relationship must be specified.
| Name | Type | Description | 
| 
 | 
public clearCriteria():voidResets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():voidApplies criteria classes to the current repository.
public setFilters($filters = []):voidSets the filter array.
| Name | Type | Description | 
| 
 | 
public getFilters():voidReturns the filter array.
public getConditions():voidReturns a collection of parsed filters as Condition object
public clearFilters():voidClears the filter array.
TagRepositoryContract
The interface for the V2 TagRepository.
Namespace
Plenty\Modules\Tag\V2\Contracts
Methods
public search($with = [], $perPage = 50, $page = 1, $sorting = [], $lang = null):voidGets a list of tags. Filter can be specified.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public count():intCount the tags.
public create($data):Plenty\Modules\Tag\V2\Models\TagReturn type:        Tag
Creates a tag.
| Name | Type | Description | 
| 
 | 
public update($data, $tagId):Plenty\Modules\Tag\V2\Models\TagReturn type:        Tag
Updates a tag. The ID of the tag must be specified.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public delete($tagId):boolDeletes a tag. The ID of the tag must specified.
| Name | Type | Description | 
| 
 | 
public getById($tagId, $with = []):Plenty\Modules\Tag\V2\Models\TagReturn type:        Tag
Gets a tag. The ID of the tag must be specified.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public clearCriteria():voidResets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():voidApplies criteria classes to the current repository.
public setFilters($filters = []):voidSets the filter array.
| Name | Type | Description | 
| 
 | 
public getFilters():voidReturns the filter array.
public getConditions():voidReturns a collection of parsed filters as Condition object
public clearFilters():voidClears the filter array.
Models
Tag
The V2 tag model.
Namespace
Plenty\Modules\Tag\V2\Models
| Name | Type | Description | 
|---|---|---|
| id | The ID of the tag | |
| name | The backend name of the tag | |
| color | The color for the tag | |
| createdAt | The time the tag was created | |
| updatedAt | The time the tag was last updated | |
| names | The names of the tag | |
| clients | The clients of the tag | |
| availabilities | The availabilities of the tag | 
Methods
public toArray()Returns this model as an array.
TagAvailability
The V2 tag availability model.
Namespace
Plenty\Modules\Tag\V2\Models
| Name | Type | Description | 
|---|---|---|
| tagId | The ID of the tag | |
| type | The type of the availability | |
| createdAt | The time the tag availability was created | |
| tag | The related tag | 
Methods
public toArray()Returns this model as an array.
TagClient
The V2 tag client model.
Namespace
Plenty\Modules\Tag\V2\Models
| Name | Type | Description | 
|---|---|---|
| id | The unique ID of the tag client | |
| tagId | The unique ID of the tag | |
| plentyId | The unique ID of the plenty store | |
| createdAt | The time the tag client was created | |
| updatedAt | The time the tag client was last updated | |
| tag | The related tag | 
Methods
public toArray()Returns this model as an array.
TagName
The V2 tag name model.
Namespace
Plenty\Modules\Tag\V2\Models
| Name | Type | Description | 
|---|---|---|
| id | The unique ID of the tag name | |
| tagId | The unique ID of the tag | |
| name | The name of the tag name | |
| lang | The language of the tag name | |
| createdAt | The time the tag was created | |
| updatedAt | The time the tag was last updated | |
| tag | The related tag | 
Methods
public toArray()Returns this model as an array.
TagRelationship
The V2 tag relationship model.
Namespace
Plenty\Modules\Tag\V2\Models
| Name | Type | Description | 
|---|---|---|
| tagId | The ID of the tag | |
| type | The type of the relationship | |
| value | The value of the relationship | |
| UUID5 | The UUID5 of the relationship | |
| createdAt | The time the relationship was created | |
| updatedAt | The time the relationship was last updated | |
| tag | The related tag | 
Methods
public toArray()Returns this model as an array.