Plentymarkets interface documentation
Document
Contracts
DocumentRepositoryContract
Download and list order documents as well as download, list, upload and delete category documents.
Namespace
Plenty\Modules\Document\Contracts
Methods
public getDocumentPath($id):void
Get the path to a document
Name |
Type |
Description |
|
The ID of the document |
public findById($id, $columns = [], $with = []):Plenty\Modules\Document\Models\Document
Return type: Document
Get a document
Name |
Type |
Description |
|
The ID of the document |
|
|
The columns to be loaded |
|
|
The relations to be loaded. Possible value is "references". |
public find($page = 1, $itemsPerPage = 50, $columns = [], $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List documents
Name |
Type |
Description |
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of orders to be displayed per page. The default number of orders per page is 50. |
|
|
The columns to be loaded |
|
|
The relations to be loaded. Possible value is "references". |
public uploadOrderDocuments($orderId, $type, $data):array
Upload order documents
Name |
Type |
Description |
|
The ID of the order |
|
|
The document type. Supported types are 'invoiceExternal', 'deliveryNote', 'poDeliveryNote', 'orderConfirmation', 'offer', 'dunningLetter', 'returnNote', 'successConfirmation', 'correction', 'creditNoteExternal', 'reorder', 'uploaded'. |
|
|
The request data |
public deleteOrderDocument($orderId, $documentId):bool
Delete order document
Name |
Type |
Description |
|
The ID of the order |
|
|
The ID of the document |
public archiveOrderDocument($orderId, $documentId):void
Archive order document
Name |
Type |
Description |
|
The ID of the order |
|
|
The ID of the document |
public uploadCategoryDocuments($categoryId, $data):array
Upload category documents
Name |
Type |
Description |
|
The ID of the category |
|
|
The request data |
public deleteCategoryDocument($categoryId, $documentId):bool
Delete a category document.
Name |
Type |
Description |
|
The ID of the category |
|
|
The ID of the document |
public uploadOrderShippingPackageDocuments($packageId, $type, $document):array
Uploads documents
Name |
Type |
Description |
|
||
|
||
|
base64 encoded document |
public findOrderShippingPackageDocuments($packageId, $type):array
Find documents
Name |
Type |
Description |
|
||
|
public findCurrentOrderDocument($orderId, $type, $includePending = false):Plenty\Modules\Document\Models\Document
Return type: Document
Finds the current order document
Name |
Type |
Description |
|
||
|
||
|
public findRecentOrderDocument($orderId, $type, $includePending = false):Plenty\Modules\Document\Models\Document
Return type: Document
Finds order document.
Name |
Type |
Description |
|
||
|
||
|
public deleteOrderShippingPackageDocuments($packageId):bool
Delets a document.
Name |
Type |
Description |
|
public getDocumentStorageObject($key):void
Gets a document storage object.
Name |
Type |
Description |
|
public uploadOrderReturnsDocuments($returnsId, $document):Plenty\Modules\Document\Models\Document
Return type: Document
Uploads a specific document.
Name |
Type |
Description |
|
||
|
public getOrderReturnsDocumentById($returnsId, $withLabel = false):Plenty\Modules\Document\Models\Document
Return type: Document
Finds a document.
Name |
Type |
Description |
|
||
|
public generateOrderDocument($orderId, $type, $data):bool
Generate order document
Name |
Type |
Description |
|
The ID of the order |
|
|
The document type |
|
|
The request data |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Models
Document
The document model contains information about actual documents.
Namespace
Plenty\Modules\Document\Models
Name | Type | Description |
---|---|---|
id |
The ID of the document |
|
type |
The type of the document. The following types are available: <ul> <li>admin</li> <li>blog</li> <li>category</li> <li>correction_document</li> <li>credit_note</li> <li>credit_note_external</li> <li>customer</li> <li>delivery_note</li> <li>dunning_letter</li> <li>ebics_hash</li> <li>facet</li> <li>invoice</li> <li>invoice_external</li> <li>pos_invoice</li> <li>pos_invoice_cancellation</li> <li>item</li> <li>multi_credit_note</li> <li>multi_invoice</li> <li>offer</li> <li>order_confirmation</li> <li>pickup_delivery</li> <li>receipt</li> <li>refund_reversal</li> <li>reorder</li> <li>repair_bill</li> <li>return_note</li> <li>reversal_document</li> <li>settlement_report</li> <li>success_confirmation</li> <li>ticket</li> <li>webshop</li> <li>webshop_customer</li> <li>z_report</li> <li>shipping_label</li> <li>shipping_export_label</li> <li>returns_label</li> <li>reversal_dunning_letter</l> </ul> |
|
number |
The document number |
|
numberWithPrefix |
The document number with prefix |
|
path |
The path to the document |
|
userId |
The ID of the user |
|
source |
The source where the document was generated. Possible sources are 'klarna', 'soap', 'admin', 'hitmeister', 'paypal' and 'rest'. |
|
displayDate |
The date displayed on the document |
|
status |
The generation status of the document ("pending", "faulty" or "done" |
|
content |
The base64 encoded content of the document. |
|
createdAt |
The time the document was created |
|
updatedAt |
The time the document was last updated |
|
references |
Collection of document references. The references available are: <ul> <li>contacts</li> <li>orders</li> <li>webstores = refers to clients</li> <li>categories</li> </ul> |
|
comment |
The manual comment |
|
cancelledBy |
The reference document that cancelled the current document, if any |
|
cancels |
The reference document that is cancelled by the current document, if any |
|
contacts |
Collection of contacts that are associated with the document |
|
orders |
Collection of orders that are associated with the document |
|
webstores |
Collection of webstores that are associated with the document |
|
categories |
Collection of categories that are associated with the document |
Methods
public toArray()
Returns this model as an array.
DocumentComment
The manual comment model for the document model .
Namespace
Plenty\Modules\Document\Models
Name | Type | Description |
---|---|---|
documentId |
The id of the document. |
|
type |
The type of the text (comment). |
|
value |
The text value |
|
document |
The related document. |
Methods
public toArray()
Returns this model as an array.
DocumentReference
The document reference model. A document reference allows you to assign a document to other models.
Namespace
Plenty\Modules\Document\Models
Name | Type | Description |
---|---|---|
documentId |
The ID of the document |
|
type |
The reference type. The following reference types are available: <ul> <li>blog</li> <li>cash_register</li> <li>category</li> <li>customer</li> <li>facet</li> <li>facet_value</li> <li>item</li> <li>multishop</li> <li>order</li> <li>reorder</li> <li>ticket</li> <li>warehouse</li> <li>order_shipping_package</li> </ul> |
|
value |
The reference value (e.g. the ID of another model) |
Methods
public toArray()
Returns this model as an array.