Submit a data labeling job
Authentication
Use Bearer {{token}} in the Authorization header for authentication.
Headers
Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.
If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.
Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.
An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.
A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.
The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').
The minor API version.
For a list of available minor versions, see API upgrades.
Request
The object type of the data labeling job.
Currently, the following objects are supported:
-
User -
AccountAll the associated transaction objects of the account being labeled will automatically inherit the org label of the account.
-
ProductYou have to label the Account object first, make sure all accounts have been labeled, then you can proceed with the Product object.
You can get all the unlabeled accounts by running a Data Source export job, with the following query:
SELECT Id, Name FROM Account WHERE Organization.Id IS NULLAll the ProductRatePlanS of the product will be automatically labeled with the same
orgs.When labeling products, you can omit the
orgsparameter, i.e, leave it empty, the system will find all the subscriptions that include the product and get the org list of those subscriptions, then label the product with thoseorgs, aka, thederived orgs.You can also explicitly specify the orgs parameter, in that case, you will need to provide a super set of the
derived orgs. -
BillRunYou don’t need to specify the
orgsparameter, we will label theBillRunwith all the orgs because existing runs could pick up all accounts. You can definitely create new bill run with certainorgsto operate separately byorgs. -
PaymentRunSame as BillRun.
-
ForecastRun
Specifies the type of query that the data labeling job will run to fetch the data to be labeled.
ByZoql- The data labeling job will run a ZOQL query which is specified in thequeryfield to fetch the data to be labeled.ById- The data labeling job will fetch the data to be labeled by the IDs specified in theidsfield.
The IDs of the objects to be labeled, only required if the queryType is ById.
There is a 4MB limit of the JSON payload, so in case of a large number of IDs, please make sure the payload is less than 4MB.
The IDs of the organizations that the data labeling job will associate with the data to be labeled. Either the orgIds or orgs field is required.
For Account object, one and only one org Id is required.
For configuration objects, null and [] are treated differently, use null to unlabel the object, [] to label it with all orgs.
The names of the organizations that the data labeling job will associate with the data to be labeled. Either the orgIds or orgs field is required.
For Account object, one and only one org name is required.
For configuration objects, null and [] are treated differently, use null to unlabel the object, [] to label it with all orgs.
The query that the data labeling job will run to fetch the data to be labeled, only required if the queryType is ByZoql.
Response headers
This header is returned if you specify the Accept-Encoding: gzip request header and the response contains over 1000 bytes of data.
Note that only the following MIME types support gzipped responses:
application/jsonapplication/xmltext/htmltext/csvtext/plain
The request limit quota for the time window closest to exhaustion. See rate limits for more information.
The number of requests remaining in the time window closest to quota exhaustion. See rate limits for more information.
The number of seconds until the quota resets for the time window closest to quota exhaustion. See rate limits for more information.
The type of the concurrency limit, which can be Default, High-volume transactions, or Object Query.
For more information, see Concurrent request limits.
The total number of the permitted concurrent requests.
For more information, see Concurrent request limits.
The remaining number of the permitted concurrent requests.
For more information, see Concurrent request limits.
Response
Status of the data labeling job.
Accepted- The data labeling job has been accepted by the system.Dispatched- The data labeling job is dispatched to the data labeling service.Completed- The data labeling job has completed. Please note thatCompletedsimply means the data labeling job has completed, but it does not mean the data labeling job has labeled all the data. You can check theprogressfield to see how many data have beenlabeled,failedortimeout.