List packages on a deal
Returns a cursor-paginated list of packages for a deal in the specified organization. Works on a template deal as well as a live deal; when the deal is a template, each package in packages includes isTemplate=true (an empty page has no isTemplate fields).
Requires one of api_deals_list or api_deals_create.
Authorization
bearerAuth Bearer token using a Clai API key secret (clai_live_*).
In: header
Path Parameters
| Name | Type | Description |
|---|---|---|
orgIdrequired | string | Organization ID the key is operating in |
dealIdrequired | string | Deal ID that owns the packages Format uuid |
Query Parameters
| Name | Type | Description |
|---|---|---|
orderBy | string | Allowed "created_at""updated_at""name"Default"created_at" |
ascending | string | Allowed "true""false"Default"false" |
limit | integer | Default 50Range1 <= value <= 100 |
cursor | string |
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://app.goclai.com/api/v1/orgs/org_2abc123/deals/550e8400-e29b-41d4-a716-446655440010/packages"{
"packages": [
{
"packageId": "471cc1d4-ec27-4504-b7c2-949af95662bc",
"dealId": "f480fdfe-5c44-458b-b537-f3d9f40f9678",
"name": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"isTemplate": true
}
],
"hasMore": true,
"nextCursor": "string"
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}POSTReject a task execution
Records a rejection and opens a new execution for rework. Requires `api_tasks_approve` and a required `Idempotency-Key` header.
POSTCreate a package on a deal
Creates a new package on an existing deal for the API key bound user. Works on a template deal as well as a live deal; the response then includes isTemplate=true. Requires the `api_deals_create` scope.