- •The Get Access Token action creates a bearer token that enables an OAuth client to authenticate with the Zuora REST API. You must create an OAuth client in the Zuora UI to obtain the client ID and secret before using the Get Access Token action to create an OAuth token.
You must enter the grant_type input field value as client_credentials. Avoid using this operation to generate a large number of bearer tokens in a short period of time. You must use each token until it expires.
The following snippet is a sample to build a requestBody object:
<root>
<access_token>170ca2ab632b4f08823b7d07b65c2615</access_token>
<scope>service.usage.write service.events.write entity.bfa53c1e-a283-4471-9ce0-704862d7d81e service.usage.update platform.write service.notifications.read service.usage.delete service.notifications.write user.d5321eafec654260b0bafa750687925a service.events.read tenant.10004016</scope>
<token_type>bearer</token_type>
<expires_in>3598</expires_in>
<jti>170ca2ab632b4f08823b7d07b65c2615</jti>
</root>
- •The Create Objects action creates one or more objects of a specific type. You can specify different types in different create calls, but each create call must apply to only one object type.
The following snippet is a sample to build a requestBody object:
<root>
<type>Product</type>
<objects>
<Description>Portable tablet designed for kids' learning with pre-installed educational apps and games. </Description>
<EffectiveEndDate>2034-11-01</EffectiveEndDate>
<EffectiveStartDate>2024-11-01</EffectiveStartDate>
<Name>SmartLearn Tablet</Name>
<SKU>SmartLearnTablet-SKU1</SKU>
<Category>Base Products</Category>
</objects>
</root>
The following snippet is a sample response:
<root>
<_1>
<Id>8a8aa38092f6570f019306a0fd9f06fc</Id>
<Success>true</Success>
</_1>
</root>
- •The Delete Objects action deletes one or more objects of the same type. You can specify different types in different delete calls, but each delete call must apply only to one object type.
The following information applies to this call:
- - You must identify the object IDs that you want to delete.
- - You can't pass null IDs.
The following snippet is a sample to build a requestBody object:
<root>
<type>Product</type>
<ids>8a8aa38092f6570f019306a0fd9f06fc</ids>
</root>
The following snippet is a sample response:
<root>
<_1>
<success>true</success>
<id>8a8aa38092f6570f019306a0fd9f06fc</id>
</_1>
</root>
- •The Fetch Objects action allows you to fetch objects using Zuora Object Query Language (ZOQL) queries and retrieve additional results. It sends a query with the object to query, the fields to retrieve from that object, and the filters to determine whether a given object must be queried. It also requests additional results from a previous fetch call if it returns more than 2000 results.
To use this action, specify the fetchObjectType field as a query to send a query expression. You must specify the object to query, the fields to retrieve from that object, and the filters to determine whether a given object must be queried.
The following snippet is a sample to build a requestBody object:
<root>
<queryString>select Name, EffectiveEndDate from Product where Id = '8a8aa38092f6570f019306a0fd9f06fc'</queryString>
</root>
If the initial query call returns more than 2000 results, you can use the queryMore value in the fetchObjectType field to query for additional results.
The following snippet is a sample to build a requestBody object to query for additional results:
<root>
<queryLocator>8a8aa06d932a0b8201932fef8c3a4015-2000</queryLocator>
</root>
The following snippet is a sample response:
<root>
<size>1</size>
<records>
<EffectiveEndDate>2044-11-01</EffectiveEndDate>
<Id>8a8aa38092f6570f019306a0fd9f06fc</Id>
<Name>SmartLearn Tablet</Name>
</records>
<done>true</done>
</root>
- •The Update Objects action updates the information in one or more objects of a specific type. You can specify different types in different update calls, but each update call must apply to only one object type.
The following snippet is a sample to build a requestBody object:
<root>
<type>Product</type>
<objects>
<Id>8a8aa38092f6570f019306a0fd9f06fc</Id>
<EffectiveEndDate>2044-11-01</EffectiveEndDate>
</objects>
</root>
The following snippet is a sample response:
<root>
<_1>
<Id>8a8aa38092f6570f019306a0fd9f06fc</Id>
<Success>true</Success>
</_1>
</root>
- •The Modify Order action creates and modifies customer orders, including new subscriptions, amendments, and related charges.
To create or modify an order specify the requestBody input field.
The following snippet is a sample to build a requestBody object:
<root>
<orderDate>2024-11-07</orderDate>
<processingOptions>
<runBilling>true</runBilling>
<collectPayment>true</collectPayment>
<billingOptions>
<targetDate>2024-11-07</targetDate>
</billingOptions>
</processingOptions>
<existingAccountNumber>A00000024</existingAccountNumber>
<subscriptions>
<orderActions>
<type>CreateSubscription</type>
<triggerDates>
<name>ContractEffective</name>
<triggerDate>2024-11-07</triggerDate>
</triggerDates>
<triggerDates>
<name>ServiceActivation</name>
<triggerDate>2024-11-07</triggerDate>
</triggerDates>
<triggerDates>
<name>CustomerAcceptance</name>
<triggerDate>2024-11-07</triggerDate>
</triggerDates>
<createSubscription>
<terms>
<initialTerm>
<startDate>2024-11-07</startDate>
<period>12</period>
<periodType>Month</periodType>
<termType>TERMED</termType>
</initialTerm>
<renewalSetting>RENEW_WITH_SPECIFIC_TERM</renewalSetting>
<renewalTerms>
<period>12</period>
<periodType>Month</periodType>
</renewalTerms>
</terms>
<subscribeToRatePlans>
<productRatePlanId>8a3692f28805d79501880999a7971cc8</productRatePlanId>
</subscribeToRatePlans>
</createSubscription>
</orderActions>
</subscriptions>
</root>
The following snippet is a sample response:
<root>
<orderNumber>O-00000062</orderNumber>
<orderId>244baafa56a92f656ee3071ec53eefe3</orderId>
<invoiceNumbers>INV00000038</invoiceNumbers>
<accountNumber>A00000024</accountNumber>
<subscriptionNumbers>A-S00000035</subscriptionNumbers>
<accountId>8a8aa052927933d801928be9e4324e20</accountId>
<success>true</success>
<subscriptionIds>244baafa56a92f656ee3071ec57cefe7</subscriptionIds>
<paymentId>8a8aa2bb92f657070193071ec7f43352</paymentId>
<paidAmount>3459.69</paidAmount>
<paymentNumber>P-00000036</paymentNumber>
<status>Completed</status>
<invoiceIds>8a8aa14a92d671dc0192d87f676e2ce0</invoiceIds>
</root>
- •The Query Objects action queries objects in your Zuora tenant in an efficient, consistent, and flexible manner.
You must specify the object type in the queryObjectType field of the objects you want to query, such as products, product-rate-plans, and orders.
To retrieve the details of a specific object, set an ID or a number for the object.
The expand input field values, such as productrateplans and productrateplans.productrateplancharges, and filter input field values, such as name.IN:[SmartLearn Tablet] and category.EQ:Base Products, allow you to retrieve related object information in a single call and define the returned response as required. The sort input field value, such as name.ASC, allows you to sort the results in ascending or descending order based on the specified field.
The following snippet is a sample response:
<root>
<effectiveEndDate>2044-11-01</effectiveEndDate>
<description>Portable tablet designed for kids' learning with pre-installed educational apps and games.</description>
<productNumber>PC-00000021</productNumber>
<updatedDate>2024-11-07T13:36:41Z</updatedDate>
<updatedById>0530b5f1f68142069c6eee8d41fedc37</updatedById>
<createdDate>2024-11-07T13:36:41Z</createdDate>
<effectiveStartDate>2024-11-01</effectiveStartDate>
<name>SmartLearn Tablet</name>
<allowFeatureChanges>false</allowFeatureChanges>
<id> 8a8aa38092f6570f019306a0fd9f06fc </id>
<category>Base Products</category>
<sKU>SmartLearnTablet-SKU1</sKU>
<createdById>0530b5f1f68142069c6eee8d41fedc37</createdById>
</root>
- •The Create Attachment action attaches a document file to an account, a subscription, an invoice, a credit memo, or a debit memo.
You can specify an associatedObjectType, number or ID of the associatedObjectKey object to which you want to attach a document file and optionally a description.
The following snippet is a sample response:
<root>
<success>true</success>
<id>8a8aa2c292f65709019306e5641240ef</id>
<fileId>8a8aa2c292f65709019306e5640c40ee</fileId>
</root>
- •The Get Attachments Information action retrieves information about an attachment or attachments on an account, an invoice, a subscription, a credit memo, or a debit memo.
To retrieve the attachment information, specify the attachmentId.
To get a list of attachments of an account, an invoice, a subscription, a credit memo, or a debit memo, specify the objectType and the number or ID of the objectKey.
The following snippet is a sample response for retrieving attachment information by attachmentId:
<root>
<fileName>Test.csv</fileName>
<updatedBy>0530b5f1f68142069c6eee8d41fedc37</updatedBy>
<createdBy>0530b5f1f68142069c6eee8d41fedc37</createdBy>
<success>true</success>
<description>An Attachment for Account</description>
<updatedOn>2024-11-07 13:51:56</updatedOn>
<id>8a8aa2c292f65709019306e5641240ef</id>
<createdOn>2024-11-07 13:51:56</createdOn>
<fileContentType>text/csv</fileContentType>
<fileId>8a8aa2c292f65709019306e5640c40ee</fileId>
</root>
- •The Get File Content action retrieves files, such as export results, invoices, and accounting period reports.
In the fileId field, specify the ID of the file that you want to retrieve. The response content type depends on the type of file that you retrieve.
- •The Delete Attachment action deletes an attachment from a Zuora object.
In the attachmentId field, specify the ID of the attachment that you want to delete.
The following snippet is a sample response:
<root>
<success>true</success>
</root>
- •The Modify Order Async action creates or modifies an order asynchronously.
To create or modify an order asynchronously specify the requestBody input field.
The following snippet is a sample to build a requestBody object:
<root>
<orderDate>2024-11-07</orderDate>
<processingOptions>
<runBilling>true</runBilling>
<collectPayment>true</collectPayment>
<billingOptions>
<targetDate>2024-11-07</targetDate>
</billingOptions>
</processingOptions>
<existingAccountNumber>A00000024</existingAccountNumber>
<subscriptions>
<orderActions>
<type>CreateSubscription</type>
<triggerDates>
<name>ContractEffective</name>
<triggerDate>2024-11-07</triggerDate>
</triggerDates>
<triggerDates>
<name>ServiceActivation</name>
<triggerDate>2024-11-07</triggerDate>
</triggerDates>
<triggerDates>
<name>CustomerAcceptance</name>
<triggerDate>2024-11-07</triggerDate>
</triggerDates>
<createSubscription>
<terms>
<initialTerm>
<startDate>2024-11-07</startDate>
<period>12</period>
<periodType>Month</periodType>
<termType>TERMED</termType>
</initialTerm>
<renewalSetting>RENEW_WITH_SPECIFIC_TERM</renewalSetting>
<renewalTerms>
<period>12</period>
<periodType>Month</periodType>
</renewalTerms>
</terms>
<subscribeToRatePlans>
<productRatePlanId>8a3692f28805d79501880999a7971cc8</productRatePlanId>
</subscribeToRatePlans>
</createSubscription>
</orderActions>
</subscriptions>
</root>
The following snippet is a sample response:
<root>
<jobId>8a8aa16b933ef1b70193439219af176f</jobId>
<success>true</success>
</root>
- •The Get Async Job Status action retrieves the asynchronous job status and response.
To get the status and response of an asynchronous job, specify an asynchronous jobId.
The following snippet is a sample response:
<root>
<result>
<orderNumber>O-00000078</orderNumber>
<invoiceNumbers>INV00000051</invoiceNumbers>
<accountNumber>A00000024</accountNumber>
<subscriptionNumbers>A-S00000050</subscriptionNumbers>
<paidAmount>154.84</paidAmount>
<paymentNumber>P-00000050</paymentNumber>
<status>Completed</status>
</result>
<success>true</success>
<errors/>
<status>Completed</status>
</root>
- •The Update Attachment action makes changes to the descriptive fields of an attachment, such as the description and the file name.
You can specify a request body and the attachment ID of the attachment to be updated in the requestBody and the attachmentId fields.
The following snippet is a sample response:
<root>
<success>true</success>
</root>