Ticket

Last updated 5 months ago

get
Fetch Tickets

https://api.clubcollect.com/api
/v2/invoices/:id/tickets
Request
Response
Path Parameters
id
required
string
ID of Invoice for which Tickets wish to be fetched.
Headers
Content-Type
required
string
Must be application/json.
Query Parameters
api_key
required
string
Partner API Key
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
Path Parameters
id
required
string
ID for the Invoice to which the Ticket should be attached.
Headers
Content-Type
required
string
Must be application/json.
Query Parameters
api_key
required
string
Partner API Key.
Body Parameters
message
required
string
Contents of the Ticket.
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
Path Parameters
id
required
string
ID of the Invoice for which Tickets should be archived.
Headers
Content-Type
required
string
Must be application/json.
Query Parameters
api_key
required
string
Partner API Key
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
Path Parameters
id
required
string
ID of Invoice for which Tickets should be assigned to Support.
Headers
Content-Type
required
string
Must be application/json.
Query Parameters
api_key
required
string
Partner API Key.
204: No Content
404: Not Found
{
"error": "invalid_invoice_id"
}

get
Fetch All Tickets

https://api.clubcollect.com/api
/v2/companies/:id/:status
Fetch all Tickets for a Company, filtered by Ticket status.
Request
Response
Path Parameters
status
required
string
One of: { unanswered answered archived }
id
required
string
ID of Company for which Tickets should be fetched.
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"
}