Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Monitoring Cart Status with the Status API

  • You have performed an operation that returns 202 Accepted and a polling URL, such as cart activation or migration.
  • You have a bearer token for accessing status endpoints.

As cart operations are asynchronous, to track their progress, you must poll the status endpoint to determine when the operation completes and whether any errors occurred.

  1. Identify the status endpoint to poll using polling URL provided in the asynchronous operation response .
    
    GET /api/cart/v1/carts/{cartId}/status
    Authorization: Bearer token
            

    You can add optional query parameters such as true or includeDetails=true if required.

  2. Request the current status.
    
    GET /api/cart/v1/carts/{cartId}/status?verbose=true
    Authorization: Bearer <token>
            

    A successful response typically includes status flags and pricing information.

    
    {
      "CartId": "cartId_123abc",
      "Status": "Active",
      "LastUpdated": "2025-03-05T10:45:00Z",
      "IsPricingPending": false,
      "IsPriceProcessingPending": false,
      "IsPriceTotalingPending": false,
      "IsCartProcessingPending": false,
      "IsCartFinalizationPending": false,
      "IsCollaborationPending": true,
      "ErrorMessage": null,
      "PricingDetails": {
        "TotalPrice": 150000.00,
        "Discount": 15000.00,
        "NetPrice": 135000.00,
        "Currency": "USD"
      }
    }
            
  3. Implement polling with exponential backoff. Start polling immediately after you receive the initial 202 Accepted response.
    • Use the initial interval from NextPollIntervalMs if present, or start at 500 ms.
    • Increase the interval by a factor of 1.5 up to a maximum, such as 5000 ms.
    • Enforce an overall timeout, such as 60 seconds, to avoid infinite polling.
  4. Determine when processing is complete. Continue polling until the flags that matter to your use case are false.
    • For pricing completion, wait until IsPriceProcessingPending and IsPriceTotalingPending are false.
    • For general cart processing, wait until IsCartProcessingPending is false.
    • You can ignore IsCollaborationPending if your flow does not depend on approvals completing.
  5. Handle errors reported in status.

    If ErrorMessage is not null, stop polling and treat the operation as failed.

    • Log the error message and any additional details.
    • Surface the error in your user interface, if applicable.
    • Do not continue to poll indefinitely when an error is already reported.

You have monitored the cart operation until completion or failure and can safely proceed with downstream processing such as proposal generation or further updates.