Happy Business Starts Here

CRUD: Create Usage Endpoint fails with BATCH_FAIL_ERROR

Highlighted
Honor Student

CRUD: Create Usage Endpoint fails with BATCH_FAIL_ERROR

I have been happily using the Zuora REST API today - creating and retrieving objects, executing ZOQL queries using the v1/action/query endpoint, etc. However, I have been unable to create usage using the REST interface. In particular, I am invoking the following:

 

Endpoint: https://rest.apisandbox.zuora.com/v1/object/usage

Application/JSON Body:

{
"AccountNumber": "A00000458",
"SubscriptionNumber": "A-S00000386",
"ChargeNumber": "C-00001418",
"StartDateTime": "2019-04-16T16:41:36.000+01:00",
"Description": "test",
"Quantity": 5,
"UOM": "Request"
}

... and I receive the following error response. The specified Account, Subscription, and RatePlanCharge all exist. Any clues as to what I am doing wrong? (Note - this is the first time I have tried to use this API, so I am probably doing something dumb.) Thanks in advance!!

 

Response:

HTTP Code: 400

Body:

{
"Success": false,
"Errors": [
{
"Code": "BATCH_FAIL_ERROR",
"Message": "Failed to call usage service"
}
]
} 
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Honor Student

Re: CRUD: Create Usage Endpoint fails with BATCH_FAIL_ERROR

Zuora Support worked with me on this issue. For the record, their support team was excellent - responsive and helpful.

 

Now to the solution ... It turns out that the Usage API does not coexist with the Limited Availability feature called "Active Rating". You must have Active Rating disabled to use the Usage API.

View solution in original post

1 REPLY 1
Highlighted
Honor Student

Re: CRUD: Create Usage Endpoint fails with BATCH_FAIL_ERROR

Zuora Support worked with me on this issue. For the record, their support team was excellent - responsive and helpful.

 

Now to the solution ... It turns out that the Usage API does not coexist with the Limited Availability feature called "Active Rating". You must have Active Rating disabled to use the Usage API.

View solution in original post