Skip to main content

order/{orderid}/files/all/zip

This method lets you download all the files of an order. This includes both the original files as well as any translations or reference material.

All files will are added to a single ZIP archive. The ZIP maintains the exact folder structure as it also appears in the order.

The method supports up to 2000 files. If an order contains more than that amount of files, an error message will be returned.

URL

CODE
(POST) /api/orders/{orderid}/files/all/zip

PARAMETERS

The URL parameters are:

orderid

The order ID.

Tip:

See orders/list for enumerating or finding orders and getting an order’s numeric ID.

To find orders with reference starting with “abc”, use this BODY in orders/list:

CODE
{ "query": "{reference}.Matches(\"abc\", \"prefix\")" }

int, Mandatory

The (optional) body is a JSON object with these properties:

excludeNames

Optional. Lets you define regular expressions to exclude files / folders from the ZIP archive.

Example:

CODE
{
	"excludeNames": [
		"^Reference folder",
		"\\.zip$"
	]
}

The first pattern excludes any file paths starting with “Reference folder” (the ^ character is important here). This specifically excludes any files contained in the folder.

The second pattern excludes any .zip files in the order (at the root or in any subfolder). Note that in JSON you must escape the backslash character.

string[]?, Optional

includeNames

Optional. Lets you define regular expressions to only include files / folders that match at least one of the patterns.

Example:

CODE
{
	"includeNames": [
        "\\.doc$",
		"\\.docx$",
	]
}

The ZIP archive will only contain Microsoft Word documents.

string[]?, Optional

callbackurl, callback

Specify a URL which will be called upon success or failure of operation. This makes polling for operation status unnecessary. See Callbacks (with asynchronous operations)

Optional


RESULTS

The API method returns an Asynchronous operation result:

JS
{
  "trm": {
    "requestid":32230,
    "status":"Waiting",
    "statusText":"Waiting..."
  }
}


You can poll the status or use the callback parameter. When the operation is complete, the results are in the custom property:

JSON
{
    "trm": {
        "requestid": 32230,
        "isbatch": false,
        "status": "Finished",
        "statusText": "Finished!"
    },
    "custom": {
       "filetoken": "178eee3996bd4898b31da69a4fe5b206",
       "count": 6
    }
}


The custom property is a JSON object:

filetoken

The token to download the ZIP file.

Usemedia/get/{token} or media/get/{token}/stream

string

count

Total files in ZIP archive.

int

If the operation fails then status is “Failed” and statusText contains the error description.

FOLDER NAMES

When downloading files, the folder hierarchy shown in the order will be maintained in the ZIP archive. The folder names will be identical.

However, there is one exception to this rule. When the “Reference material” folder was automatically created at one point in a process, then it will be named in a very specific way in the ZIP:

CODE
___ref___

If this folder was created “by hand” in the order then it will be named exactly as displayed.

ACCESS RIGHTS

An order can only be accessed by an authorized user:

  • The person (client) who submitted the order.

  • A manager at the client and who can access any order submitted by a client user.

  • An internal manager.

  • The administrator.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.