Documents
Upload and organise documents in the library, produce and email PDFs such as quotes, bills of lading and invoices, and work with attachments.
Paths are relative to https://api.rushhourapp.com/api/v1. See the API reference overview for how to read each entry.
Documents library
| Method | Path | Summary |
|---|---|---|
GET | /CompanyDocuments | List documents. |
GET | /CompanyDocuments/{id} | Get a document. |
PUT | /CompanyDocuments/{id} | Renames the document (display name only). |
DELETE | /CompanyDocuments/{id} | Permanently delete a document and its file. |
GET | /CompanyDocuments/{id}/activity | Get a document's activity history. |
PUT | /CompanyDocuments/{id}/archive | Archive. |
PUT | /CompanyDocuments/{id}/categories | Replaces the full category set. |
GET | /CompanyDocuments/{id}/content | Download a document's original file. |
PUT | /CompanyDocuments/{id}/content | Save new content for a document written in the documents editor. |
GET | /CompanyDocuments/{id}/editable | Get the editable content of a document written in the documents editor. |
POST | /CompanyDocuments/{id}/email | Emails the document as an attachment. |
GET | /CompanyDocuments/{id}/links | List the records a document is linked to, such as orders and customers. |
GET | /CompanyDocuments/{id}/markdown | Get the text extracted from a document, as Markdown. |
PUT | /CompanyDocuments/{id}/markdown | Correct the text extracted from a document. |
POST | /CompanyDocuments/{id}/reprocess | Run text extraction for a document again. |
PUT | /CompanyDocuments/{id}/tags | Replaces the full tag set. |
PUT | /CompanyDocuments/{id}/unarchive | Unarchive. |
POST | /CompanyDocuments/{id}/version | Replace a document's file with a new version. |
POST | /CompanyDocuments/bulk | Apply one action to up to 200 documents at once. |
POST | /CompanyDocuments/create | Creates a document from the in-app rich-text editor. |
GET | /CompanyDocuments/filters | Get the categories, tags and document types available for filtering documents. |
GET | /CompanyDocuments/retention/preview | Preview which documents the retention settings would affect, without changing anything. |
GET | /CompanyDocuments/stats | Get summary figures for the documents library. |
POST | /CompanyDocuments/upload | Upload one to ten files to the documents library. |
GET /CompanyDocuments
List documents.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ArchivedOnly | query | boolean | No | |
Categories | query | string | No | |
DocumentTypes | query | string | No | |
From | query | string (date-time) | No | |
IncludeArchived | query | boolean | No | |
IncludeContent | query | boolean | No | |
ItemsPerPage | query | integer (int32) | No | |
NeedsImport | query | boolean | No | |
NeedsReviewOnly | query | boolean | No | |
Page | query | integer (int32) | No | |
SearchTerm | query | string | No | |
SortBy | query | string | No | |
SortDirection | query | integer (int32) | No | One of: 0 (Ascending), 1 (Descending). |
Sources | query | string | No | |
Statuses | query | string | No | |
Tags | query | string | No | |
To | query | string (date-time) | No |
Response: envelope; data is CompanyDocumentDtoPagedList.
GET /CompanyDocuments/{id}
Get a document.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: envelope; data is CompanyDocumentDto.
PUT /CompanyDocuments/{id}
Renames the document (display name only).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Request body: RenameCompanyDocumentDto (JSON).
Response: envelope; data is CompanyDocumentDto.
DELETE /CompanyDocuments/{id}
Permanently delete a document and its file.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: envelope; data has no documented shape.
GET /CompanyDocuments/{id}/activity
Get a document's activity history.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: envelope; data is array of DocumentAuditEventDto.
PUT /CompanyDocuments/{id}/archive
Archive.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: envelope; data is CompanyDocumentDto.
PUT /CompanyDocuments/{id}/categories
Replaces the full category set.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Request body: SetCompanyDocumentCategoriesDto (JSON).
Response: envelope; data is CompanyDocumentDto.
GET /CompanyDocuments/{id}/content
Download a document's original file.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: a file download, not JSON.
PUT /CompanyDocuments/{id}/content
Save new content for a document written in the documents editor.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Request body: UpdateCompanyDocumentContentDto (JSON).
Response: envelope; data is CompanyDocumentDto.
GET /CompanyDocuments/{id}/editable
Get the editable content of a document written in the documents editor.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: envelope; data is EditableCompanyDocumentDto.
POST /CompanyDocuments/{id}/email
Emails the document as an attachment.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Request body: EmailCompanyDocumentDto (JSON).
Response: envelope; data is CompanyDocumentEmailResultDto.
GET /CompanyDocuments/{id}/links
List the records a document is linked to, such as orders and customers.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: envelope; data is array of CompanyDocumentLinkDto.
GET /CompanyDocuments/{id}/markdown
Get the text extracted from a document, as Markdown.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: envelope; data is CompanyDocumentMarkdownDto.
PUT /CompanyDocuments/{id}/markdown
Correct the text extracted from a document.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Request body: UpdateCompanyDocumentMarkdownDto (JSON).
Response: envelope; data is CompanyDocumentDto.
POST /CompanyDocuments/{id}/reprocess
Run text extraction for a document again.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Request body: ReprocessCompanyDocumentDto (JSON).
Response: envelope; data is CompanyDocumentDto.
PUT /CompanyDocuments/{id}/tags
Replaces the full tag set.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Request body: SetCompanyDocumentTagsDto (JSON).
Response: envelope; data is CompanyDocumentDto.
PUT /CompanyDocuments/{id}/unarchive
Unarchive.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: envelope; data is CompanyDocumentDto.
POST /CompanyDocuments/{id}/version
Replace a document's file with a new version.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Request body: form data (multipart/form-data).
| Field | Type |
|---|---|
file | file |
Response: envelope; data is CompanyDocumentDto.
POST /CompanyDocuments/bulk
Apply one action to up to 200 documents at once.
Request body: CompanyDocumentBulkRequestDto (JSON).
Response: envelope; data is CompanyDocumentBulkResultDto.
POST /CompanyDocuments/create
Creates a document from the in-app rich-text editor.
Request body: CreateCompanyDocumentDto (JSON).
Response: envelope; data is CompanyDocumentDto.
GET /CompanyDocuments/filters
Get the categories, tags and document types available for filtering documents.
Response: envelope; data is CompanyDocumentFiltersDto.
GET /CompanyDocuments/retention/preview
Preview which documents the retention settings would affect, without changing anything.
Response: envelope; data is DocumentRetentionPreviewDto.
GET /CompanyDocuments/stats
Get summary figures for the documents library.
Response: envelope; data is CompanyDocumentStatsDto.
POST /CompanyDocuments/upload
Upload one to ten files to the documents library.
Request body: form data (multipart/form-data).
| Field | Type |
|---|---|
files | array of file |
source | string |
agentConversationId | integer (int32) |
Response: envelope; data is array of CompanyDocumentDto.
Generated documents
| Method | Path | Summary |
|---|---|---|
GET | /Documents/BillOfLanding/{orderId}/{mode} | Download bill of lading. |
PUT | /Documents/BillOfLanding/email/{orderId} | Email bill of lading. |
GET | /Documents/BillOfLandingBulk/{mode} | Get the bills of lading of several orders. |
GET | /Documents/DispatchSheet/{orderId}/{mode} | Get the order sheet of an order. |
POST | /Documents/EmailQuotes | Email quotes. |
GET | /Documents/Invoice/{invoiceId}/{mode} | Download invoice. |
PUT | /Documents/Invoice/email/{invoiceId} | Email invoice. |
GET | /Documents/Labels/{orderId}/{mode} | Download labels. |
GET | /Documents/LabelsBulk | Get the labels of several orders. |
GET | /Documents/Quote/{orderId}/{mode} | Download quote. |
PUT | /Documents/Quote/email/{orderId} | Email quote. |
PUT | /Documents/SendBillOfLandingAndLabels/{orderId} | Email the bill of lading and labels of an order. |
GET /Documents/BillOfLanding/{orderId}/{mode}
Download bill of lading.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mode | path | integer (int32) | Yes | One of: 0 (Pdf), 1 (Html). |
orderId | path | integer (int32) | Yes | |
deliveryId | query | integer (int32) | No | |
highlightItems | query | boolean | No | Default: false. |
requestCustomerId | query | integer (int32) | No | |
splitOrderStopItems | query | boolean | No | Default: false. |
Response: a file download, not JSON.
PUT /Documents/BillOfLanding/email/{orderId}
Email bill of lading.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orderId | path | integer (int32) | Yes | |
highlightItems | query | boolean | No | Default: false. |
splitOrderStopItems | query | boolean | No | Default: false. |
Request body: EmailSendRequest (JSON).
Response: envelope; data is string.
GET /Documents/BillOfLandingBulk/{mode}
Get the bills of lading of several orders.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mode | path | integer (int32) | Yes | One of: 0 (Pdf), 1 (Html). |
ids | query | array of integer (int32) | No |
Response: a file download, not JSON.
GET /Documents/DispatchSheet/{orderId}/{mode}
Get the order sheet of an order.
Required access: the View Order Sheet permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mode | path | integer (int32) | Yes | One of: 0 (Pdf), 1 (Html). |
orderId | path | integer (int32) | Yes |
Response: a file download, not JSON.
POST /Documents/EmailQuotes
Email quotes.
Required access: the Email Quotes permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
email | query | string | No |
Request body: array of integer (int32) (JSON).
Response: envelope; data has no documented shape.
GET /Documents/Invoice/{invoiceId}/{mode}
Download invoice.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
invoiceId | path | integer (int32) | Yes | |
mode | path | integer (int32) | Yes | One of: 0 (Pdf), 1 (Html). |
Response: a file download, not JSON.
PUT /Documents/Invoice/email/{invoiceId}
Email invoice.
Required access: the Email Invoice/Payment permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
invoiceId | path | integer (int32) | Yes |
Request body: EmailSendRequest (JSON).
Response: envelope; data is string.
GET /Documents/Labels/{orderId}/{mode}
Download labels.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mode | path | integer (int32) | Yes | Default: 0. One of: 0 (Pdf), 1 (Html). |
orderId | path | integer (int32) | Yes | |
requestCustomerId | query | integer (int32) | No |
Response: a file download, not JSON.
GET /Documents/LabelsBulk
Get the labels of several orders.
Required access: the Send and download BOL permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ids | query | array of integer (int32) | No |
Response: a file download, not JSON.
GET /Documents/Quote/{orderId}/{mode}
Download quote.
Required access: the Email Quotes permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mode | path | integer (int32) | Yes | One of: 0 (Pdf), 1 (Html). |
orderId | path | integer (int32) | Yes |
Response: a file download, not JSON.
PUT /Documents/Quote/email/{orderId}
Email quote.
Required access: the Email Quotes permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orderId | path | integer (int32) | Yes |
Request body: EmailSendRequest (JSON).
Response: envelope; data is string.
PUT /Documents/SendBillOfLandingAndLabels/{orderId}
Email the bill of lading and labels of an order.
Required access: the Send and download BOL permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orderId | path | integer (int32) | Yes | |
splitOrderStopItems | query | boolean | No | Default: false. |
Request body: EmailSendRequest (JSON).
Response: envelope; data is string.
Attachments
| Method | Path | Summary |
|---|---|---|
GET | /Attachments/{id} | Download attachment. |
DELETE | /Attachments/{id} | Delete attachment. |
GET | /Attachments/Driver/{driverId} | Get attachments by driver. |
GET | /Attachments/Invoice/{invoiceId} | Get attachments by invoice. |
GET | /Attachments/Order/{orderId} | Get attachments by order. |
POST | /Attachments/upload/{entityType}/{entityId} | Upload attachment. |
GET | /Attachments/View/{id} | Preview attachment. |
GET /Attachments/{id}
Download attachment.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: a file download, not JSON.
DELETE /Attachments/{id}
Delete attachment.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: envelope; data has no documented shape.
GET /Attachments/Driver/{driverId}
Get attachments by driver.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
driverId | path | integer (int32) | Yes |
Response: envelope; data is array of Attachment.
GET /Attachments/Invoice/{invoiceId}
Get attachments by invoice.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
invoiceId | path | integer (int32) | Yes |
Response: envelope; data is array of Attachment.
GET /Attachments/Order/{orderId}
Get attachments by order.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orderId | path | integer (int32) | Yes |
Response: envelope; data is array of Attachment.
POST /Attachments/upload/{entityType}/{entityId}
Upload attachment.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
entityId | path | integer (int32) | Yes | |
entityType | path | integer (int32) | Yes | One of: 1 (Customer), 2 (Order), 3 (OrderItem), 4 (OrderStop), 5 (CustomerContact), 6 (CustomerPaymentMethod), 7 (RouteTransfer), 8 (Quotes), 9 (Orders), 10 (Warehouse), 11 (Driver), 12 (TenantPaymentMethod), 13 (Payment), 14 (Invoice), 15 (Route), 16 (Truck), 17 (OutsourceCompany), 18 (OutsourceCompanyContact), 19 (Goods), 20 (Document), 21 (DrivingLog), 22 (Barcode), 23 (Check), 24 (DriverLicense), 25 (InsuranceCard), 26 (RegistrationCard: use the number), 27 (LoadUnit), 28 (LoadUnitContent), 29 (Violation), 30 (DriverStatusCheck), 31 (DriverIssue), 32 (Damage), 33 (FreightPayment). |
Request body: form data (multipart/form-data).
| Field | Type | Values |
|---|---|---|
file | file | |
pageType | string | One of: MainPage, BackPage, SignaturePage, Other. |
pageNumber | integer (int32) | |
pageLabel | string |
Response: envelope; data is Attachment.
GET /Attachments/View/{id}
Preview attachment.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer (int32) | Yes |
Response: a file download, not JSON.
Images
| Method | Path | Summary |
|---|---|---|
POST | /Images/upload | Upload image. |
POST /Images/upload
Upload image.
Request body: form data (multipart/form-data).
| Field | Type |
|---|---|
file | file |
Response: envelope; data is string.