Documents Ticket
Documents can be applied to a specific ticket.
All ticket's documents
This endpoint returns all documents for a specific ticket, including reports, invoices, quotes, etc.
Route Parameters
- Name
ticket_id
- Type
- ObjectID
- Description
The ticket id
Properties of the response
- Name
documents
- Type
- Array
- Description
An array of documents
- Name
documents.url
- Type
- String
- Description
The document url
- Name
documents.name
- Type
- String
- Description
The document name
- Name
documents.tags
- Type
- Array
- Description
An array of tags
- Name
documents.tags._id
- Type
- ObjectID
- Description
The tag id
- Name
documents.tags.label
- Type
- String
- Description
The tag label
- Name
documents.reference
- Type
- String
- Description
The document reference (if the document is an invoice or a quote)
- Name
documents.price
- Type
- String
- Description
The price defined (if the document is an invoice or a quote)
Request
curl -G https://api.bob-desk.com/api/v3.0/tickets/:ticket_id/all-documents \
-H "Authorization: Bearer {token}" \
Response
{
"documents": [
{
"url": "url_to_document",
"name": "document.pdf",
"tags": [
{
"_id": "5f9b5b5b9ab7e72a4fb4ae69",
"label": "document"
}
]
},
{
"url": "url_to_document2",
"name": "dummy",
"tags": [
{
"_id": "632196677da0efb412092d62",
"label": "quote_label"
}
],
"reference": "121341",
"price": "413251342"
}
]
}
Upload a document
This endpoint allows you to upload a document for a specific ticket.
Route Parameters
- Name
ticket_id
- Type
- ObjectID
- Description
The ticket id
Properties of the request
- Name
file
- Type
- File
- Description
The document file
Request
curl -X POST https://api.bob-desk.com/api/v3.0/tickets/:ticket_id/upload-document \
-H "Authorization: Bearer {token}" \
-F "file=@/path/to/file"
Response
{
"message": "ok"
}
Quotes list
This endpoint returns all quotes for a specific ticket.
Route Parameters
- Name
ticket_id
- Type
- ObjectID
- Description
The ticket id
Properties of the response
- Name
quotes
- Type
- Array
- Description
An array of quotes
- Name
quotes.url
- Type
- String
- Description
The document url
- Name
quotes.name
- Type
- String
- Description
The document name
- Name
quotes.tags
- Type
- Array
- Description
An array of tags
- Name
quotes.tags._id
- Type
- ObjectID
- Description
The tag id
- Name
quotes.tags.label
- Type
- String
- Description
The tag label
- Name
quotes.reference
- Type
- String
- Description
The quote reference
- Name
quotes.price
- Type
- String
- Description
The price defined for this quote
Request
curl -G https://api.bob-desk.com/api/v3.0/tickets/:ticket_id/quotes \
-H "Authorization: Bearer {token}" \
Response
{
"quotes": [
{
"url": "url_to_document",
"name": "document.pdf",
"tags": [
{
"_id": "5f9b5b5b9ab7e72a4fb4ae69",
"label": "quote_label"
}
],
"reference": "JK123123",
"price": "7000"
}
]
}
Upload a quote
This endpoint allows you to upload a quote for a specific ticket.
Route Parameters
- Name
ticket_id
- Type
- ObjectID
- Description
The ticket id
Properties of the request (Required)
- Name
file
- Type
- File
- Description
The quote file
- Name
upload_to_client
- Type
- string
- Description
If set to false, the quote will not be uploaded to the client's account
(Allowed values:true
orfalse
) Default value istrue
- Name
reference
- Type
- string
- Description
The quote reference
- Name
price
- Type
- string
- Description
The quote price
- Name
reopen_ticket_if_closed
- Type
- string
- Description
If set to true, the ticket will be reopened if it is closed
Request
curl -X POST https://api.bob-desk.com/api/v3.0/tickets/:ticket_id/upload-quote \
-H "Authorization: Bearer {token}" \
-F "file=@/path/to/file"
-F "upload_to_client=false"
-F "reference=quote_reference"
-F "price=quote_price"
-F "reopen_ticket_if_closed=false"
Response
{
"message": "quote uploaded"
}
Invoices list
This endpoint returns all invoices for a specific ticket.
Route Parameters
- Name
ticket_id
- Type
- ObjectID
- Description
The ticket id
Properties of the response
- Name
invoices
- Type
- Array
- Description
An array of invoices
- Name
invoices.url
- Type
- String
- Description
The document url
- Name
invoices.name
- Type
- String
- Description
The document name
- Name
invoices.tags
- Type
- Array
- Description
An array of tags
- Name
invoices.tags._id
- Type
- ObjectID
- Description
The tag id
- Name
invoices.tags.label
- Type
- String
- Description
The tag label
- Name
invoices.reference
- Type
- String
- Description
The invoice reference
- Name
invoices.price
- Type
- String
- Description
The price defined for this invoice
Request
curl -G https://api.bob-desk.com/api/v3.0/tickets/:ticket_id/invoices \
-H "Authorization: Bearer {token}" \
Response
{
"invoices": [
{
"url": "url_to_document",
"name": "document.pdf",
"tags": [
{
"_id": "5f9b5b5b9ab7e72a4fb4ae69",
"label": "invoice_label"
}
],
"reference": "L0121341",
"price": "400"
}
]
}
Upload a invoice
This endpoint allows you to upload an invoice for a specific ticket.
Route Parameters
- Name
ticket_id
- Type
- ObjectID
- Description
The ticket id
Properties of the request (Required)
- Name
file
- Type
- File
- Description
The invoice file
- Name
upload_to_client
- Type
- string
- Description
If set to false, the quote will not be uploaded to the client's account
(Allowed values:true
orfalse
) Default value istrue
- Name
reference
- Type
- string
- Description
The invoice reference
- Name
price
- Type
- string
- Description
The invoice price
Request
curl -X POST https://api.bob-desk.com/api/v3.0/tickets/:ticket_id/upload-invoice \
-H "Authorization: Bearer {token}" \
-F "file=@/path/to/file"
-F "upload_to_client=false"
-F "reference=invoice_reference"
-F "price=invoice_price"
Response
{
"message": "invoice uploaded"
}
Reports list
This endpoint returns all reports for a specific ticket.
Route Parameters
- Name
ticket_id
- Type
- ObjectID
- Description
The ticket id
Properties of the response
- Name
reports
- Type
- Array
- Description
An array of reports
- Name
reports._id
- Type
- ObjectID
- Description
The document id
- Name
reports.url
- Type
- String
- Description
The document url
- Name
reports.name
- Type
- String
- Description
The document name
- Name
reports.tags
- Type
- Array
- Description
An array of tags
- Name
reports.tags._id
- Type
- ObjectID
- Description
The tag id
- Name
reports.tags.label
- Type
- String
- Description
The tag label
Request
curl -G https://api.bob-desk.com/api/v3.0/tickets/:ticket_id/reports \
-H "Authorization: Bearer {token}" \
Response
{
"reports": [
{
"_id": "5f9b5b5b9ab7e72a4fb4ae69",
"url": "url_to_document",
"name": "document.pdf",
"tags": [
{
"_id": "5f9b5b5b9ab7e72a4fb4ae69",
"label": "Rapport d'intervention"
}
]
}
]
}
Upload a report
This endpoint allows you to upload a report for a specific ticket.
Route Parameters
- Name
ticket_id
- Type
- ObjectID
- Description
The ticket id
Properties of the request (Required)
- Name
file
- Type
- File
- Description
The report file
Coming soon
This endpoint can allow you to upload a report and specify if this report is a reserve report and create a new ticket with the reserve report.
Request
curl -X POST https://api.bob-desk.com/api/v3.0/tickets/:ticket_id/upload-report \
-H "Authorization: Bearer {token}" \
-F "file=@/path/to/file"
Response
{
"message": "report uploaded"
}