Skip to main content
Pending operations is the queue your Storefront keeps of everything that is waiting on someone: buys waiting for your approval, creatives waiting for your review, buys that failed to reach a source, work a source needs from you, and failed GAM orders the platform could not remove. The Pending operations page in the web app and in chat shows it. A seller account can read the same queue with get_status, and can read and resolve the failed GAM orders in it with the same tools an agent uses for any other work item.

Read the queue

Call get_status with include: ["pendingOperations"]. Only a seller account takes it. A buyer, organization or developer account that sends it is refused with VALIDATION_ERROR on the field include.
The answer is the usual status plus a pendingOperations object. A group appears only when something is in it, so an empty object means nothing is waiting on anyone. null means the read failed: pendingOperationsDiagnostic says so, and the rest of the status is still returned. When the call does not ask for it, the key is absent and the status is exactly what it was before. Each group carries count, and each item says who it is waiting on and since when. manualSourceWork is the one group that pages. It returns up to 200 items; count and mediaBuyCount cover the whole backlog, and nextOffset is where the next page starts. Send manualWorkTake (1 to 200) and manualWorkSkip with include: ["pendingOperations"] to read it a page at a time. Sending either without the include is refused. The answer is the same one the Pending operations page reads. It is not a copy, so the two cannot disagree.

Read a failed GAM order

When a booking fails after the platform created an order in your GAM, the platform tries to clear the order. When it cannot, the order waits on you. It is a work item of the kind gam_cleanup.
Call search with that to list them, or get with kind: "work_item", workItemKind: "gam_cleanup" and the item’s id to read one. A cleanup is pending until you resolve it, and a resolved cleanup leaves the list, so pending is the only status you can filter for. A read of one that is resolved, or that the platform archived, answers NOT_FOUND.

Resolve a failed GAM order

Call save_work_item with kind: "gam_cleanup", status: "completed" and a gamCleanup object. There are two ways to resolve a cleanup. Ask the platform to archive the order. It checks again that the order is safe to archive, then archives it in your GAM:
Or record that you cleaned the order up in GAM yourself. A note of up to 500 characters, saying what you did, is required for manual and is not allowed for archive:
The rules:
  • Only an administrator of the Storefront account can resolve a cleanup. Anyone else is refused with ACCESS_DENIED.
  • orderId must match the order of that cleanup, or the call is refused with VALIDATION_ERROR and nothing changes.
  • A resolution needs no approval on our site. The order is yours, you have already read it, and the platform archives only an order it verified is an unbooked draft. This is not a billing or access change.
  • An archive the platform could not complete does not resolve the cleanup. The answer is an error with the code GAM_CLEANUP_NOT_RESOLVED and an attempt object (outcome, retryDisposition, safeNextAction and requiredPermission) that says what to do next. The cleanup stays pending.
  • Repeating the same resolution succeeds again and does nothing a second time. Resolving an order a second time by the other method is refused with CONFLICT.
  • A successful answer has action: "created" and an object with status: "completed", and the cleanup no longer appears in the queue.