Ticket

get
Fetch Tickets

https://api.clubcollect.com/api/v2/invoices/:id/tickets
Request
Response
Request
Path Parameters
id
required
string
ID of Invoice for which Tickets wish to be fetched.
Headers
Authorization
required
string
ApiKey <api_key>
Content-Type
required
string
Must be application/json.
Query Parameters
api_key
optional
string
Partner API Key (Deprecated)
Response
200: OK
"tickets": [
{
"ticket_id": "...",
"message": "I don't want to pay",
"sender": "CUSTOMER",
"date": "..."
},
{
"ticket_id": "...",
"message": "Please pay before the 30th",
"sender": "COMPANY",
"date": "..."
}
]
404: Not Found
{
"error": "invalid_invoice_id"
}

post
Create Ticket

https://api.clubcollect.com/api/v2/invoices/:id/tickets
Create a support Ticket for an Invoice.
Request
Response
Request
Path Parameters
id
required
string
ID for the Invoice to which the Ticket should be attached.
Headers
Authorization
required
string
ApiKey <api_key>
Content-Type
required
string
Must be application/json.
Query Parameters
api_key
optional
string
Partner API Key (Deprecated)
Body Parameters
message
required
string
Contents of the Ticket.
Response
200: OK
{
"ticket_id": "...",
"message": "Please pay before the 30th",
"sender": "COMPANY",
"date": "..."
}
404: Not Found
Invoice not found.
{
"error": "invalid_invoice_id"
}
422: Unprocessable Entity
{
"error": "invalid_message"
}

post
Archive Ticket

https://api.clubcollect.com/api/v2/invoices/:id/tickets/actions/archive
Archive all Tickets for an Invoice.
Request
Response
Request
Path Parameters
id
required
string
ID of the Invoice for which Tickets should be archived.
Headers
Authorization
required
string
ApiKey <api_key>
Content-Type
required
string
Must be application/json.
Query Parameters
api_key
optional
string
Partner API Key (Deprecated)
Response
204: No Content
404: Not Found
{
"error": "invalid_invoice_id"
}

post
Assign Ticket to Support

https://api.clubcollect.com/api/v2/invoices/:id/tickets/actions/assign_to_support
Assign Tickets for an Invoice to ClubCollect Support Team.
Request
Response
Request
Path Parameters
id
required
string
ID of Invoice for which Tickets should be assigned to Support.
Headers
Authorization
required
string
ApiKey <api_key>
Content-Type
required
string
Must be application/json.
Query Parameters
api_key
optional
string
Partner API Key (Deprecated)
Response
204: No Content
404: Not Found
{
"error": "invalid_invoice_id"
}

get
Fetch All Tickets

https://api.clubcollect.com/api/v2/companies/:id/tickets/:status
Returns the list of tickets linked to a company, filtered by Ticket status, paginated and sorted in ascending order, i.e. from oldest to newest.
Request
Response
Request
Path Parameters
status
required
string
One of: { unanswered answered archived }
id
required
string
ID of Company for which Tickets should be fetched.
Headers
Authorization
required
string
ApiKey <api_key>
Query Parameters
api_key
optional
string
Partner API Key (Deprecated)
page_number
optional
integer
Page number. If it's not given, default to 1.
page_size
optional
integer
Number of results per page. If it's not given, defaults to 30. Maximum permitted value is 100.
Response
200: OK
"tickets": [
{
"invoice_id": "...",
"ticket_id": "...",
"message": "I don't want to pay",
"sender": "CUSTOMER",
"date": "..."
},
{
"invoice_id": "...",
"ticket_id": "...",
"message": "Please pay before the 30th",
"sender": "COMPANY",
"date": "..."
}
]
"page": {
"page_number": 1,
"page_size": 12,
"total_entries": 53,
"total_pages": 5
}
404: Not Found
Company with supplied ID does not exist.
{
"error": "not_found"
}
422: Unprocessable Entity
Supplied status value is invalid.
{
"error": "invalid_action"
}