POST files/{code}
Upload a print file for an order.
Request
URL parameters
These parameters are specified as part of the URL.
Property | Description | Type | Details |
---|---|---|---|
code | A unique upload code. You don't need to construct this URL manually: the "POST /orders" and "GET /orders/{id}" responses contain the neccessary fully qualified URLs to this endpoint. | string | Required |
Body
For books, you must include a PDF file in the request body. For many other products, PNG and JPEG are also supported. You can supply the file as byte content directly in the request body, or as part of a multipart/form-data request, whichever you prefer. Make sure you set the appropriate Content-Type header: "application/pdf", "image/png" or "image/jpeg".
Response
Body
Some metadata about the upload.
Property | Description | Type | Details |
---|---|---|---|
FileName | The name of the file. E.g. "content" or "cover". | string | - |
FileType | The file type that was determined. | FileType | - |
{
"fileName": "cover",
"fileType": "PNG"
}
<?xml version="1.0"?>
<UploadResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FileName>cover</FileName>
<FileType>PNG</FileType>
</UploadResult>