zamoroka/module-webapi-documents

Magento 2 module: Working with documents, using REST API

0.1.2 2020-05-07 14:53 UTC

This package is auto-updated.

Last update: 2024-04-29 04:20:44 UTC


README

Upload PDF using curl
curl --location --request POST '<host>/rest/V1/webapidocuments/upload' \
--header 'Authorization: Bearer <bearer token>' \
--header 'Content-Type: multipart/form-data; boundary=----something' \
--form 'filename=@<directory>/<filename>.pdf'
Upload PDF using HTTP request
POST /rest/V1/webapidocuments/upload HTTP/1.1
Host: <host>
Authorization: Bearer <bearer token>
Content-Type: multipart/form-data; boundary=----something

----something
Content-Disposition: form-data; name="filename"; filename="<filename>.pdf"
Content-Type: application/pdf

(data)
----something