Order API

Write Call

UpdateSubscriptions1

Bulk sync of subscription snapshots: status, lines, billing cycles, pause, cancel and churn times, coupon codes. Drives subscription milestones and rewards.

Kind Write API call
Method POST
URL https://app.bubblehouse.com/api/v2023061/<shop>/UpdateSubscriptions1
Authentication Shop Token

Send the full current snapshot whenever a subscription is created or changes. Bubblehouse processes up to 500 subscriptions and 10,000 combined lines, cycles, and coupon codes per request using the same subscription logic as its first-party integrations.

Bubblehouse assigns the Custom API integration source. Use id for the stable primary ID assigned by the subscription system. Send ecomm_id only when a separate ecommerce system assigns a distinct ID to the same subscription.

When Bubblehouse uses your subscription data to calculate milestone progress, each changed subscription snapshot must have a newer updated_at. The same timestamp with different progress is rejected. See update timestamps and refunds for the ordering rules and a refund example.

A success response confirms that batch processing finished, not that every subscription update was accepted. Bubblehouse skips a subscription that cannot be processed, including a conflicting same-timestamp snapshot, and continues with later items. This processing conflict does not produce a request-level 422 response; the batch can still return {"ok": true} while that subscription's progress stays unchanged.

Retry the entire batch with exponential backoff after a network error, 429, or 5xx response. Replaying the same subscription snapshot is safe. Preserve its original updated_at on retries; do not give an old snapshot a new timestamp to force acceptance.

See the custom subscription programs guide for integration design and cycle-reporting choices.

Input

  • subscriptions array of Subscription1 required

    Full current subscription snapshots to process.

Output

A successful response has no meaningful properties and only contains an ok property always set to true:

{"ok": true}

Usage Examples

ID-only subscription referral

Capture the Bubblehouse referral correlation code from the referral link and return it with the subscription. No email, discount code, or synthetic order is required. Configure the referral reward delay separately. Send subsequent cancellation snapshots with status cancelled to void pending rewards; rewards already released are not reversed.

Request

{
  "subscriptions": [
    {
      "created_at": "2026-10-12T10:00:00Z",
      "customer": {
        "id": "CUSTOMER-501"
      },
      "id": "SUB-REFERRAL-1001",
      "lines": [],
      "referral_code": "REFERRAL-CORRELATION-CODE",
      "status": "active",
      "updated_at": "2026-10-12T10:00:00Z"
    }
  ]
}

Response

{
  "ok": true
}

Completed-cycle counts

This batch reports one subscription with a known count and another whose cycle progress is unknown. The first subscription also has a distinct ID in a separate ecommerce system.

Request

{
  "subscriptions": [
    {
      "created_at": "2026-01-08T10:00:00Z",
      "customer": {
        "email": "alice@example.com",
        "id": "CUSTOMER-501"
      },
      "cycles_completed": 4,
      "ecomm_id": "gid://shopify/SubscriptionContract/1001",
      "id": "SUB-1001",
      "lines": [],
      "status": "active",
      "updated_at": "2026-08-10T14:30:00Z"
    },
    {
      "created_at": "2026-07-01T10:00:00Z",
      "customer": {
        "id": "CUSTOMER-502"
      },
      "id": "SUB-1002",
      "lines": [],
      "status": "paused",
      "updated_at": "2026-08-10T14:31:00Z"
    }
  ]
}

Response

{
  "ok": true
}

Specific Errors

Status Error Reason & Examples
422 invalid_request_data

A subscription is null, lacks required snapshot data, contains invalid or contradictory cycle data, or the batch exceeds its item limits. Bubblehouse rejects the batch before processing any subscriptions.

Global Errors

Status Error Reason & Examples
429 rate_limit_exceeded

Your usage is over the rate limit. Ensure that you're not making duplicate calls, and contact our team for a rate limit increase.

For example: You are over the read limit per second for this customer

400 inaccessible_global_api_version

The global API version you are trying to use is not enabled on your account.

400 invalid_global_api_version

The global API version you are trying to use has never existed.

400 obsolete_global_api_version

The global API version you are trying to use is no longer supported.

401 invalid_token

The provided authentication token is invalid or has expired.

For example: The token has expired

Previous
UpdateProducts3