Migrate to AWS Partner Central 3.0 in 30 minutes.

Migrate now (opens in a new tab)
Skip to main content
POST
/api/subscriptions/importbatchusage

Imports many usage records for a subscription in one call.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Opaque bearer token obtained from POST /api/token (password grant). Send as Authorization: Bearer <token>.

Request Body

application/json
  1. body
[key: string]?any

Response Body

Success. The business payload is returned in the Data field of the standard envelope.

application/json
  1. response

Standard response envelope returned by every endpoint except the token endpoint.

Data*unknown

The business payload. Shape depends on the operation; occasionally a JSON-encoded string.

Status*string

Business outcome. Check this, not just the HTTP code.

Value in"SUCCESS""ERROR"
StatusCode?|

Optional numeric status code.

ErrorDetail?||array<any>|

Raw error detail when Status is ERROR. Not a stable contract.

ErrorMessage?string

Human-readable error message when Status is ERROR.

OperationType?|

Reserved; usually null.

RequestCorrelationID?string

Correlation id for the request, useful for support.

Example Request
curl -X POST 'https://api-demo.saasify.ai/api/subscriptions/importbatchusage' \  -H 'Content-Type: application/json' \  -d '{  "usageRecords": [    {      "quantity": 5,      "dimension": "users"    }  ],  "subscriptionId": "SUB-001"}'
Example Response
{  "Data": {    "accepted": 1,    "rejected": 0  },  "Status": "SUCCESS",  "StatusCode": 200,  "ErrorDetail": null,  "ErrorMessage": "",  "OperationType": null,  "RequestCorrelationID": "9f1c2d3e-4b5a-6789-0abc-def012345678"}

Was this page helpful?