Skip to main content

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​

MethodPathSummary
GET/CompanyDocumentsList 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}/activityGet a document's activity history.
PUT/CompanyDocuments/{id}/archiveArchive.
PUT/CompanyDocuments/{id}/categoriesReplaces the full category set.
GET/CompanyDocuments/{id}/contentDownload a document's original file.
PUT/CompanyDocuments/{id}/contentSave new content for a document written in the documents editor.
GET/CompanyDocuments/{id}/editableGet the editable content of a document written in the documents editor.
POST/CompanyDocuments/{id}/emailEmails the document as an attachment.
GET/CompanyDocuments/{id}/linksList the records a document is linked to, such as orders and customers.
GET/CompanyDocuments/{id}/markdownGet the text extracted from a document, as Markdown.
PUT/CompanyDocuments/{id}/markdownCorrect the text extracted from a document.
POST/CompanyDocuments/{id}/reprocessRun text extraction for a document again.
PUT/CompanyDocuments/{id}/tagsReplaces the full tag set.
PUT/CompanyDocuments/{id}/unarchiveUnarchive.
POST/CompanyDocuments/{id}/versionReplace a document's file with a new version.
POST/CompanyDocuments/bulkApply one action to up to 200 documents at once.
POST/CompanyDocuments/createCreates a document from the in-app rich-text editor.
GET/CompanyDocuments/filtersGet the categories, tags and document types available for filtering documents.
GET/CompanyDocuments/retention/previewPreview which documents the retention settings would affect, without changing anything.
GET/CompanyDocuments/statsGet summary figures for the documents library.
POST/CompanyDocuments/uploadUpload one to ten files to the documents library.

GET /CompanyDocuments​

List documents.

Parameters

NameInTypeRequiredDescription
ArchivedOnlyquerybooleanNo
CategoriesquerystringNo
DocumentTypesquerystringNo
Fromquerystring (date-time)No
IncludeArchivedquerybooleanNo
IncludeContentquerybooleanNo
ItemsPerPagequeryinteger (int32)No
NeedsImportquerybooleanNo
NeedsReviewOnlyquerybooleanNo
Pagequeryinteger (int32)No
SearchTermquerystringNo
SortByquerystringNo
SortDirectionqueryinteger (int32)NoOne of: 0 (Ascending), 1 (Descending).
SourcesquerystringNo
StatusesquerystringNo
TagsquerystringNo
Toquerystring (date-time)No

Response: envelope; data is CompanyDocumentDtoPagedList.

GET /CompanyDocuments/{id}​

Get a document.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: envelope; data is CompanyDocumentDto.

PUT /CompanyDocuments/{id}​

Renames the document (display name only).

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Request body: RenameCompanyDocumentDto (JSON).

Response: envelope; data is CompanyDocumentDto.

DELETE /CompanyDocuments/{id}​

Permanently delete a document and its file.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: envelope; data has no documented shape.

GET /CompanyDocuments/{id}/activity​

Get a document's activity history.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: envelope; data is array of DocumentAuditEventDto.

PUT /CompanyDocuments/{id}/archive​

Archive.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: envelope; data is CompanyDocumentDto.

PUT /CompanyDocuments/{id}/categories​

Replaces the full category set.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Request body: SetCompanyDocumentCategoriesDto (JSON).

Response: envelope; data is CompanyDocumentDto.

GET /CompanyDocuments/{id}/content​

Download a document's original file.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: a file download, not JSON.

PUT /CompanyDocuments/{id}/content​

Save new content for a document written in the documents editor.

Parameters

NameInTypeRequiredDescription
idpathinteger (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

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: envelope; data is EditableCompanyDocumentDto.

POST /CompanyDocuments/{id}/email​

Emails the document as an attachment.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Request body: EmailCompanyDocumentDto (JSON).

Response: envelope; data is CompanyDocumentEmailResultDto.

List the records a document is linked to, such as orders and customers.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: envelope; data is array of CompanyDocumentLinkDto.

GET /CompanyDocuments/{id}/markdown​

Get the text extracted from a document, as Markdown.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: envelope; data is CompanyDocumentMarkdownDto.

PUT /CompanyDocuments/{id}/markdown​

Correct the text extracted from a document.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Request body: UpdateCompanyDocumentMarkdownDto (JSON).

Response: envelope; data is CompanyDocumentDto.

POST /CompanyDocuments/{id}/reprocess​

Run text extraction for a document again.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Request body: ReprocessCompanyDocumentDto (JSON).

Response: envelope; data is CompanyDocumentDto.

PUT /CompanyDocuments/{id}/tags​

Replaces the full tag set.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Request body: SetCompanyDocumentTagsDto (JSON).

Response: envelope; data is CompanyDocumentDto.

PUT /CompanyDocuments/{id}/unarchive​

Unarchive.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: envelope; data is CompanyDocumentDto.

POST /CompanyDocuments/{id}/version​

Replace a document's file with a new version.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Request body: form data (multipart/form-data).

FieldType
filefile

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).

FieldType
filesarray of file
sourcestring
agentConversationIdinteger (int32)

Response: envelope; data is array of CompanyDocumentDto.

Generated documents​

MethodPathSummary
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/EmailQuotesEmail quotes.
GET/Documents/Invoice/{invoiceId}/{mode}Download invoice.
PUT/Documents/Invoice/email/{invoiceId}Email invoice.
GET/Documents/Labels/{orderId}/{mode}Download labels.
GET/Documents/LabelsBulkGet 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

NameInTypeRequiredDescription
modepathinteger (int32)YesOne of: 0 (Pdf), 1 (Html).
orderIdpathinteger (int32)Yes
deliveryIdqueryinteger (int32)No
highlightItemsquerybooleanNoDefault: false.
requestCustomerIdqueryinteger (int32)No
splitOrderStopItemsquerybooleanNoDefault: false.

Response: a file download, not JSON.

PUT /Documents/BillOfLanding/email/{orderId}​

Email bill of lading.

Parameters

NameInTypeRequiredDescription
orderIdpathinteger (int32)Yes
highlightItemsquerybooleanNoDefault: false.
splitOrderStopItemsquerybooleanNoDefault: false.

Request body: EmailSendRequest (JSON).

Response: envelope; data is string.

GET /Documents/BillOfLandingBulk/{mode}​

Get the bills of lading of several orders.

Parameters

NameInTypeRequiredDescription
modepathinteger (int32)YesOne of: 0 (Pdf), 1 (Html).
idsqueryarray 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

NameInTypeRequiredDescription
modepathinteger (int32)YesOne of: 0 (Pdf), 1 (Html).
orderIdpathinteger (int32)Yes

Response: a file download, not JSON.

POST /Documents/EmailQuotes​

Email quotes.

Required access: the Email Quotes permission.

Parameters

NameInTypeRequiredDescription
emailquerystringNo

Request body: array of integer (int32) (JSON).

Response: envelope; data has no documented shape.

GET /Documents/Invoice/{invoiceId}/{mode}​

Download invoice.

Parameters

NameInTypeRequiredDescription
invoiceIdpathinteger (int32)Yes
modepathinteger (int32)YesOne 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

NameInTypeRequiredDescription
invoiceIdpathinteger (int32)Yes

Request body: EmailSendRequest (JSON).

Response: envelope; data is string.

GET /Documents/Labels/{orderId}/{mode}​

Download labels.

Parameters

NameInTypeRequiredDescription
modepathinteger (int32)YesDefault: 0. One of: 0 (Pdf), 1 (Html).
orderIdpathinteger (int32)Yes
requestCustomerIdqueryinteger (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

NameInTypeRequiredDescription
idsqueryarray of integer (int32)No

Response: a file download, not JSON.

GET /Documents/Quote/{orderId}/{mode}​

Download quote.

Required access: the Email Quotes permission.

Parameters

NameInTypeRequiredDescription
modepathinteger (int32)YesOne of: 0 (Pdf), 1 (Html).
orderIdpathinteger (int32)Yes

Response: a file download, not JSON.

PUT /Documents/Quote/email/{orderId}​

Email quote.

Required access: the Email Quotes permission.

Parameters

NameInTypeRequiredDescription
orderIdpathinteger (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

NameInTypeRequiredDescription
orderIdpathinteger (int32)Yes
splitOrderStopItemsquerybooleanNoDefault: false.

Request body: EmailSendRequest (JSON).

Response: envelope; data is string.

Attachments​

MethodPathSummary
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

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: a file download, not JSON.

DELETE /Attachments/{id}​

Delete attachment.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: envelope; data has no documented shape.

GET /Attachments/Driver/{driverId}​

Get attachments by driver.

Parameters

NameInTypeRequiredDescription
driverIdpathinteger (int32)Yes

Response: envelope; data is array of Attachment.

GET /Attachments/Invoice/{invoiceId}​

Get attachments by invoice.

Parameters

NameInTypeRequiredDescription
invoiceIdpathinteger (int32)Yes

Response: envelope; data is array of Attachment.

GET /Attachments/Order/{orderId}​

Get attachments by order.

Parameters

NameInTypeRequiredDescription
orderIdpathinteger (int32)Yes

Response: envelope; data is array of Attachment.

POST /Attachments/upload/{entityType}/{entityId}​

Upload attachment.

Parameters

NameInTypeRequiredDescription
entityIdpathinteger (int32)Yes
entityTypepathinteger (int32)YesOne 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).

FieldTypeValues
filefile
pageTypestringOne of: MainPage, BackPage, SignaturePage, Other.
pageNumberinteger (int32)
pageLabelstring

Response: envelope; data is Attachment.

GET /Attachments/View/{id}​

Preview attachment.

Parameters

NameInTypeRequiredDescription
idpathinteger (int32)Yes

Response: a file download, not JSON.

Images​

MethodPathSummary
POST/Images/uploadUpload image.

POST /Images/upload​

Upload image.

Request body: form data (multipart/form-data).

FieldType
filefile

Response: envelope; data is string.