Developers
Set your API contextPick a region and space ID once. Every sample fills in your base URL.
Where do I find these?

In Coevera: open your space's API application and choose Show Access. It shows the space ID and the base URL, whose host starts with your region.

From the API: if you know the space ID, the discovery endpoint GET /api/discovery/spaces/{space_id} returns its region and base URLs, without credentials.

Only the region and space ID are kept, in this browser. Never paste a key or password here.

More in the quickstart

GraphQLRepositoriesapproval

entities.approval

Read approval records with the approval repository, and change them with the approval mutations. Same records as the REST Approvals entity.

Queries

Fields of entities { approval { … } }.

KindFieldReturns
QUERYgetById(entityId: ID!)
Returns the record with the given id, or null when there is none. Deleted records are returned as well.
ApprovalEntity
QUERYgetByIds(entityIds: [ID!]!)
Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
[ApprovalEntity!]!
QUERYgetAll(limit: Int, offset: Int, filter: ApprovalFilterInput, orderBy: [ApprovalOrderByInput!], includeDeleted: Boolean)
Returns the records that match the filter, paged with limit and offset.
[ApprovalEntity!]!
QUERYgetByCriteria(filter: ApprovalFilterInput, orderBy: [ApprovalOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)
Returns the records that match the filter as a cursor-paginated connection.
ApprovalEntityConnection
QUERYgetChangedFieldsSinceRevision(id: UUID!, revision: Int!)
Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.
[UUID!]!
QUERYgetDownloadUrl(approvalProcessId: UUID!, name: String!, filter: ApprovalFilterInput, days: Int)
Exports the approval log of an approval process to a zipped text file and returns a URL to download it.
String!
QUERYgetRecentApprovals(entityId: UUID!, entityName: EntityNameEnum!, limit: Int!)
Returns the completed approvals (approved or rejected) of a record, most recently decided first.
[RecentApprovalItem!]!

Mutations

KindMutationDoesReturns
MUTATIONcreateApproval(input: CreateApprovalInput!, validationLevel: [ValidationLevel!])Create one recordCreateApprovalPayload
MUTATIONupdateApproval(input: UpdateApprovalInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String)Update fieldsUpdateApprovalPayload
MUTATIONbulkUpdateApproval(input: [CreateOrUpdateApprovalInput!]!, deleteInput: [DeleteApprovalInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput)Create or update many; per-item resultsBulkUpdateApprovalPayload
MUTATIONdeleteApproval(input: DeleteApprovalInput!)Soft-deleteDeleteApprovalPayload

Types

The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.

ApprovalEntity object 33 fields: isDeleteProtected, id, isDeleted, …

Approval request that an approval process raised for a record, such as a quote or an opportunity, waiting for the decision of its approvers.

FieldTypeDescription
isDeleteProtectedBoolean!True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only.
idID!Unique identifier of entity.
isDeletedBooleanSpecifies if the entity is considered deleted.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
accountAccountEntityAccount the approval is requested on, when the trigger record is an Account.
actorClientEntityUser who triggered the approval, or empty when triggered automatically.
applicationApplicationEntityApplication context the approval was triggered in.
approvalProcessApprovalProcessEntityApproval process this approval was raised from.
contactContactEntityContact the approval is requested on, when the trigger record is a Contact.
leadLeadEntityLead the approval is requested on. Set when leadOpptyId resolves to a Lead.
opptyOpportunityEntityOpportunity the approval is requested on. Set when leadOpptyId resolves to an Opportunity.
quoteQuoteEntityQuote the approval is requested on, when the trigger record is a Quote.
accountIdIDId of the linked account.
actorIdIDId of the triggering user.
applicationIdID!Id of the application (e.g. browser, automation, third-party integration) the approval was triggered in.
approvalProcessIdID!Id of the approval process this approval was raised from.
approvalStatusApprovalStatusEnumDecision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made.
commentStringComment the requester attached when raising the approval.
contactIdIDId of the linked contact.
endTimeDateTimeTimestamp the approval reached a final status (Approved/Rejected/Cancelled). Empty while the approval is still pending.
leadOpptyIdIDId of the linked lead or opportunity, or empty when not linked.
quoteIdIDId of the linked quote.
settingsJSONString!Snapshot of the approval process schema at the time the approval was raised. Frozen so subsequent changes to the parent approval process do not affect this run.
statusProcessStatusEnumResult of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus.
revisionIntRevision when entity was lastly changed.
approversApprovalApproverEntityConnection (7 args)Users who must respond to the approval, with their individual responses.
linesApprovalProcessActivityLogLineEntityConnection (7 args)Activity log lines describing the steps taken on this approval (visible only).
nameStringDisplay name of the approval, derived from the underlying record being approved (e.g. the quote name). Empty when the underlying record has been deleted.
ownerIdUUIDId of the user who owns the record being approved (the record's owner, not the approver). Empty when the underlying record has been deleted.
entityTypeBaseEntityTypeEnumType identifier (e.g. account type, quote type) of the underlying record being approved. Empty when the underlying record has no type or has been deleted.
startTimeDateTimeTimestamp the approval was raised (alias of created).
instancePermissions[EntityPermsEnum!]! (1 args)Permissions the current user has on this record, out of the requested ones.
ApprovalEntityConnection object pageInfo: PageInfo!, edges: [ApprovalEntityEdge]!, totalCount: Int

Paginated list of Approval records.

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[ApprovalEntityEdge]!Contains the nodes in this connection.
totalCountIntTotal number of items in the connection.
ApprovalEntityEdge object node: ApprovalEntity, cursor: String!

A Relay edge containing a ApprovalEntity and its cursor.

FieldTypeDescription
nodeApprovalEntityThe item at the end of the edge
cursorString!A cursor for use in pagination
ApprovalFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field

Filter conditions for Approval records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.

Input fieldTypeDescription
OR[ApprovalFilterInput!]Matches records that meet at least one of the listed filters.
AND[ApprovalFilterInput!]Matches records that meet all of the listed filters.
NOTApprovalFilterInputMatches records that do not meet this filter.
globalSearchQueryStringSearch term matched against the fields that the global search covers for this entity.
idEntityFilterStringFieldUnique identifier of entity.
isDeletedBooleanSpecifies if the entity is considered deleted.
modifiedEntityFilterDateTimeFieldLast modification time.
createdEntityFilterDateTimeFieldCreation time.
accountIdEntityFilterStringFieldId of the linked account.
actorIdEntityFilterStringFieldId of the triggering user.
applicationIdEntityFilterStringFieldId of the application (e.g. browser, automation, third-party integration) the approval was triggered in.
approvalProcessIdEntityFilterStringFieldId of the approval process this approval was raised from.
approvalStatusApprovalStatusEnumFilterInputDecision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made.
commentEntityFilterStringFieldComment the requester attached when raising the approval.
contactIdEntityFilterStringFieldId of the linked contact.
endTimeEntityFilterDateTimeFieldTimestamp the approval reached a final status (Approved/Rejected/Cancelled). Empty while the approval is still pending.
leadOpptyIdEntityFilterStringFieldId of the linked lead or opportunity, or empty when not linked.
quoteIdEntityFilterStringFieldId of the linked quote.
statusProcessStatusEnumFilterInputResult of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus.
revisionEntityFilterNumberFieldRevision when entity was lastly changed.
nameStringDisplay name of the approval, derived from the underlying record being approved (e.g. the quote name). Empty when the underlying record has been deleted.
ownerIdUUIDId of the user who owns the record being approved (the record's owner, not the approver). Empty when the underlying record has been deleted.
entityTypeBaseEntityTypeEnumType identifier (e.g. account type, quote type) of the underlying record being approved. Empty when the underlying record has no type or has been deleted.
startTimeEntityFilterDateTimeFieldTimestamp the approval was raised (alias of created).
accountAccountFilterInputAccount the approval is requested on, when the trigger record is an Account. Matches records where a related record meets these conditions.
actorClientFilterInputUser who triggered the approval, or empty when triggered automatically. Matches records where a related record meets these conditions.
applicationApplicationFilterInputApplication context the approval was triggered in. Matches records where a related record meets these conditions.
approvalProcessApprovalProcessFilterInputApproval process this approval was raised from. Matches records where a related record meets these conditions.
contactContactFilterInputContact the approval is requested on, when the trigger record is a Contact. Matches records where a related record meets these conditions.
leadLeadFilterInputLead the approval is requested on. Set when leadOpptyId resolves to a Lead. Matches records where a related record meets these conditions.
opptyOpportunityFilterInputOpportunity the approval is requested on. Set when leadOpptyId resolves to an Opportunity. Matches records where a related record meets these conditions.
quoteQuoteFilterInputQuote the approval is requested on, when the trigger record is a Quote. Matches records where a related record meets these conditions.
approversApprovalApproverFilterInputUsers who must respond to the approval, with their individual responses. Matches records where a related record meets these conditions.
linesApprovalProcessActivityLogLineFilterInputActivity log lines describing the steps taken on this approval (visible only). Matches records where a related record meets these conditions.
ApprovalOrderByInput input Asc or Desc per field

Sorting of Approval records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.

Input fieldTypeDescription
idOrderByEnumUnique identifier of entity.
isDeletedOrderByEnumSpecifies if the entity is considered deleted.
modifiedOrderByEnumLast modification time.
createdOrderByEnumCreation time.
account[AccountOrderByNestedInput!]Account the approval is requested on, when the trigger record is an Account. Sorts by fields of the related record, listed in order of priority.
actor[ClientOrderByNestedInput!]User who triggered the approval, or empty when triggered automatically. Sorts by fields of the related record, listed in order of priority.
application[ApplicationOrderByNestedInput!]Application context the approval was triggered in. Sorts by fields of the related record, listed in order of priority.
approvalProcess[ApprovalProcessOrderByNestedInput!]Approval process this approval was raised from. Sorts by fields of the related record, listed in order of priority.
contact[ContactOrderByNestedInput!]Contact the approval is requested on, when the trigger record is a Contact. Sorts by fields of the related record, listed in order of priority.
lead[LeadOrderByNestedInput!]Lead the approval is requested on. Set when leadOpptyId resolves to a Lead. Sorts by fields of the related record, listed in order of priority.
oppty[OpportunityOrderByNestedInput!]Opportunity the approval is requested on. Set when leadOpptyId resolves to an Opportunity. Sorts by fields of the related record, listed in order of priority.
quote[QuoteOrderByNestedInput!]Quote the approval is requested on, when the trigger record is a Quote. Sorts by fields of the related record, listed in order of priority.
accountIdOrderByEnumId of the linked account.
actorIdOrderByEnumId of the triggering user.
applicationIdOrderByEnumId of the application (e.g. browser, automation, third-party integration) the approval was triggered in.
approvalProcessIdOrderByEnumId of the approval process this approval was raised from.
approvalStatusOrderByEnumDecision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made.
commentOrderByEnumComment the requester attached when raising the approval.
contactIdOrderByEnumId of the linked contact.
endTimeOrderByEnumTimestamp the approval reached a final status (Approved/Rejected/Cancelled). Empty while the approval is still pending.
leadOpptyIdOrderByEnumId of the linked lead or opportunity, or empty when not linked.
quoteIdOrderByEnumId of the linked quote.
statusOrderByEnumResult of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus.
revisionOrderByEnumRevision when entity was lastly changed.
nameOrderByEnumDisplay name of the approval, derived from the underlying record being approved (e.g. the quote name). Empty when the underlying record has been deleted.
ownerIdOrderByEnumId of the user who owns the record being approved (the record's owner, not the approver). Empty when the underlying record has been deleted.
startTimeOrderByEnumTimestamp the approval was raised (alias of created).
CreateApprovalApproverNoApprovalBackrefInput input 6 fields: modified, created, clientId, …

Field values of a new ApprovalApprover record, created together with the record it belongs to.

Input fieldTypeDescription
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
clientIdID!Id of the assigned user.
commentStringComment the user attached when responding to the approval.
statusApprovalStatusEnumResponse of this approver to the approval request: Pending until the user approves or rejects it.
revisionIntRevision when entity was lastly changed.
CreateApprovalInput input 15 fields: clientMutationId, modified, created, …

Field values of a new Approval record.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
accountIdIDId of the linked account.
actorIdIDId of the triggering user.
applicationIdID!Id of the application (e.g. browser, automation, third-party integration) the approval was triggered in.
approvalProcessIdID!Id of the approval process this approval was raised from.
approvalStatusApprovalStatusEnumDecision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made.
commentStringComment the requester attached when raising the approval.
contactIdIDId of the linked contact.
leadOpptyIdIDId of the linked lead or opportunity, or empty when not linked.
quoteIdIDId of the linked quote.
statusProcessStatusEnumResult of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus.
revisionIntRevision when entity was lastly changed.
approvers[CreateApprovalApproverNoApprovalBackrefInput!]Users who must respond to the approval, with their individual responses.
CreateOrUpdateApprovalInput input 16 fields: clientMutationId, id, modified, …

Field values of an Approval record to create, or to update when its id is set.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
idIDUnique identifier of entity.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
accountIdIDId of the linked account.
actorIdIDId of the triggering user.
applicationIdIDId of the application (e.g. browser, automation, third-party integration) the approval was triggered in.
approvalProcessIdIDId of the approval process this approval was raised from.
approvalStatusApprovalStatusEnumDecision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made.
commentStringComment the requester attached when raising the approval.
contactIdIDId of the linked contact.
leadOpptyIdIDId of the linked lead or opportunity, or empty when not linked.
quoteIdIDId of the linked quote.
statusProcessStatusEnumResult of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus.
revisionIntRevision when entity was lastly changed.
approvers[CreateApprovalApproverNoApprovalBackrefInput!]Users who must respond to the approval, with their individual responses.
DeleteApprovalInput input clientMutationId: String, id: ID!, leadOpptyId: ID

Id of the Approval record to delete.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
idID!Unique identifier of entity.
leadOpptyIdIDId of the linked lead or opportunity, or empty when not linked.
UpdateApprovalInput input 16 fields: clientMutationId, id, modified, …

Id of an Approval record and the field values to change.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
idID!Unique identifier of entity.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
accountIdIDId of the linked account.
actorIdIDId of the triggering user.
applicationIdIDId of the application (e.g. browser, automation, third-party integration) the approval was triggered in.
approvalProcessIdIDId of the approval process this approval was raised from.
approvalStatusApprovalStatusEnumDecision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made.
commentStringComment the requester attached when raising the approval.
contactIdIDId of the linked contact.
leadOpptyIdIDId of the linked lead or opportunity, or empty when not linked.
quoteIdIDId of the linked quote.
statusProcessStatusEnumResult of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus.
revisionIntRevision when entity was lastly changed.
approvers[CreateApprovalApproverNoApprovalBackrefInput!]Users who must respond to the approval, with their individual responses.
BulkUpdateApprovalPayload object result: BulkUpdateResults!

Result of the bulkUpdateApproval mutation.

FieldTypeDescription
resultBulkUpdateResults!Ids of the created, updated and deleted records, and the items that failed.
CreateApprovalPayload object approval: ApprovalEntity, clientMutationId: String

Result of the createApproval mutation.

FieldTypeDescription
approvalApprovalEntityThe created record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
DeleteApprovalPayload object approval: ApprovalEntity, clientMutationId: String

Result of the deleteApproval mutation.

FieldTypeDescription
approvalApprovalEntityThe deleted record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
UpdateApprovalPayload object approval: ApprovalEntity, clientMutationId: String

Result of the updateApproval mutation.

FieldTypeDescription
approvalApprovalEntityThe updated record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
RecentApprovalItem object 6 fields: id, status, completedDatetime, …

Completed approval of a record, with its outcome and approval process.

FieldTypeDescription
idUUID!Id of the approval.
statusApprovalStatusEnum!Outcome of the approval: Approved or Rejected.
completedDatetimeDateTime!When the last approver responded.
approvalProcessIdUUID!Id of the approval process that raised the approval.
approvalProcessNameString!Name of the approval process that raised the approval.
approvalProcessDescriptionStringFree-text description of the approval process; null when it has none.