Allocation Example

The Explore Allocation (add payment - allocate to orders) example is an advanced example. This example uses the Sample API and illustrates business logic. Use the information in this article to learn how to execute rules in the REST Lab.
lac52
The Explore Allocation (add payment - allocate to orders) example is an advanced example. This example uses the 
Sample
 API and illustrates business logic. Use the information in this article to learn how to execute rules in the REST Lab.
In this article:
 
 
Verify the Prerequisites
Open the 
Sample
 API and ensure that the 
Sample1
 authentication token is active.
Issue the Request
Issue the request with a JSON request.
Follow these steps:
 
  1. In API Creator, open the 
    Sample
     API.
  2. In the Tools section, click 
    REST Lab
    .
  3. Issue a POST request to the 
    payments
     table with the 
    Sample1
     auth token by selecting the 
    Table
     endpoint and then the payments ( 
    sample:payments
     ) table.
  4. Enter the following JSON snippet into the request body: 
    {
    "customer_name": "Gloria's Garden",
    "amount": 111
    }
  5. Select the 
    Sample1
     authentication token that you activated from the 
    Auth Token
     drop-down, and then click 
    POST
    .
The transaction completes.
Check the Transaction Log
Check to see how the 
CA Live API Creator
 executed the rule using the log.
For more information about how to use the log, see View Logging Information.
Generate a More Detailed Log
  1. In the Tools section, click 
    Logs
    .
    The Logs page appears.
  2. Expand the 
    Log levels
     section, select 
    Finer debug
     from the 
    Minimum log level filter
     drop-down, and then filter out the loggers by clearing the following checkboxes:
    Admin, Extensions, Security, Dependencies, User logic, System, Resources.
  3. Click 
    Refresh
    .