Copper provides an API for all major CRUD operations related to Tickets.
GET /tickets/{id}
Retrieves an existing Ticket resource.
This API method only accepts a single parameter, the id
, via the URL path.
A Ticket resource if a valid id
was provided.
curl https://api.usecopper.com/next/tickets/someid \
-u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX:
GET /tickets
Returns one or more Ticket resources.
This API accepts the base pagination parameters. In addition, you may provide the following parameters to further refine your query:
Parameter | Type | Required? | Description |
---|---|---|---|
location |
string | Optional | A Location id to filter the response list to only Tickets at the specified Location. |
search_query |
string | Optional | Filters returned Tickets to those matching Ticket's reference property to the value of the search_query parameter. NOTE: this parameter is a post-hoc filter operation, that is, database query results' reference property is filtered after being retrieved from the database. As a result, depending on the volume of Tickets generated for your account, you may need to issue several of these queries before attaining results. Please make sure to pay attention to the has_more pagination result property to determine if you need to issue more queries using the pagination parameters. It is recommended to use post-hoc filtering as a last resort; it is more efficient to first narrow down your query using the location and created parameters this API provides. |
created[gte] |
string | Optional | Retrieves Tickets that have a created property that is greater-than-or-equal-to the specified ISO 8601-formatted value. |
created[gt] |
string | Optional | Retrieves Tickets that have a created property that is greater-than the specified ISO 8601-formatted value. |
created[lte] |
string | Optional | Retrieves Tickets that have a created property that is less-than-or-equal-to the specified ISO 8601-formatted value. |
created[lt] |
string | Optional | Retrieves Tickets that have a created property that is less-than the specified ISO 8601-formatted value. |
An object containing the matching Tickets, if any. The response data format is described in more detail in the pagination list response format documentation.
curl https://api.usecopper.com/next/tickets \
-u sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXX: \
-d limit=3 \
-d location=loc_XXXXXXXXXXXXXXXXXXXXXXXXXX \
-G