Usage

Record bulk usage events

Changed on

Same persistence rules as POST /sdk/usages for each item: validate batch first, then one insert per event.

post/v1/sdk/usages/bulk

Request

Request body

Response

Bulk usage events processed

insertednumber required

Number of usage events inserted

successboolean required

Example response

{
  "inserted": 2,
  "results": [
    {
      "creditDebit": {
        "amount": 100,
        "autoRecharge": {
          "triggered": true
        },
        "remainingUnits": 99,
        "unitsRemaining": 99
      },
      "reference": "usage_A1B2C3D4"
    }
  ],
  "success": true
}

Changes

    • warning

      added the new not_credit_drawn enum value to the /////// response property for the response status

    • warning

      added the new within_included enum value to the /////// response property for the response status

    • info

      removed the plan_billed_at_period_end enum value from the /////// response property for the response status

    • warning

      added the new plan_billed_at_period_end enum value to the /////// response property for the response status

    • info

      response property results/items/creditDebit/oneOf[CreditDebitSuccessResponse]/unitsRemaining deprecated

    • info

      added the required property /////// to the response with the status