LogoLogo
  • Introduction
  • Overview
    • API request limits
    • Errors
    • Other references
  • Getting started
    • 🆕What's new in v4?
    • Transitioning from v3 to v4
  • 🔑Authentication
    • Requesting temporary credentials
    • Signing requests
    • User permissions
  • 🎬Entities
    • Char types
    • The entity object
    • Amount
      • Create an amount
      • Retrieve an amount
      • Update an amount
      • Delete an amount
      • Retrieve amount statuses
      • Retrieve amount workflow processes
      • Retrieve amount draft templates
      • Retrieve amount audit history
      • Switch amount template
      • Retrieve amount validation errors
    • Catalog item
      • Create a catalog item
      • Retrieve a catalog item
      • Update a catalog item
      • Delete a catalog item
      • Retrieve catalog item template list
      • Retrieve catalog item statuses
      • Retrieve catalog item workflow processes
      • Retrieve catalog item draft templates
      • Retrieve catalog item key art URL
      • Upload/update catalog item key art
      • Delete catalog item key art
      • Retrieve catalog item audit history
      • Switch catalog item template
      • Retrieve catalog item validation errors
      • Retrieve all rights in catalog hierarchy
      • Catalog item delete check
      • Retrieve catalog item worksheets
      • Overwrite catalog item parties
    • Contact
      • Create a contact
      • Retrieve a contact
      • Update a contact
      • Delete a contact
      • Retrieve contact statuses
      • Retrieve contact workflow processes
      • Retrieve contact draft templates
      • Retrieve contact audit history
      • Switch contact template
      • Contact delete check
      • Retrieve contact validation errors
    • Deal
      • Create a deal
      • Retrieve a deal
      • Update a deal
      • Delete a deal
      • Retrieve deal statuses
      • Retrieve deal workflow processes
      • Retrieve deal draft templates
      • Retrieve deal audit history
      • Switch deal template
      • Retrieve deal validation errors
      • Retrieve deal conflicts
      • Override deal conflict
      • Overwrite deal parties
    • File
      • Create a file
      • Retrieve a file
      • Retrieve File Version
      • Retrieve File Revisions
      • Retrieve file data
      • Retrieve File Version URL
      • Retrieve File Version Data
      • Delete a file
      • Retrieve file statuses
      • Retrieve file workflow processes
      • Retrieve file draft templates
      • Retrieve file validation errors
      • Grant Access To File
      • Revoke Access From File
    • Financial document
      • Create a financial document
      • Retrieve a financial document
      • Update a financial document
      • Delete a financial document
      • Retrieve financial document statuses
      • Retrieve financial document workflow processes
      • Retrieve financial document draft templates
      • Retrieve financial document audit history
      • Switch financial document template
      • Retrieve financial document validation errors
      • Overwrite financial document parties
    • Inventory
      • Create an inventory item
      • Retrieve an inventory item
      • Update an inventory item
      • Delete an inventory item
      • Retrieve inventory statuses
      • Retrieve inventory workflow processes
      • Retrieve inventory draft templates
      • Retrieve an inventory key art URL
      • Update an inventory key art
      • Delete an inventory key art
      • Retrieve inventory audit history
      • Switch inventory template
      • Retrieve inventory validation errors
      • Overwrite inventory parties
    • Project
      • Create a project
      • Retrieve a project
      • Update a project
      • Delete a project
      • Retrieve project statuses
      • Retrieve project workflow processes
      • Retrieve project draft templates
      • Retrieve project audit history
      • Switch project template
      • Retrieve project validation errors
      • Overwrite project parties
    • Job
      • Create a job
      • Retrieve a job
      • Update a job
      • Delete a job
      • Retrieve job statuses
      • Retrieve job workflow processes
      • Retrieve job draft templates
      • Retrieve job audit history
      • Switch job template
      • Retrieve job validation errors
      • Overwrite job parties
    • Right
      • Create a right
      • Retrieve a right
      • Update a right
      • Delete a right
      • Retrieve right statuses
      • Retrieve right workflow processes
      • Retrieve right draft templates
      • Retrieve relative rights profiles
      • Execute relative rights profile
      • Retrieve right audit history
      • Switch right template
      • Retrieve right validation errors
    • Table
      • Create a table row
      • Retrieve a table row
      • Update a table row
      • Delete a table row
      • Retrieve table statuses
      • Retrieve table workflow processes
      • Retrieve table draft templates
      • Retrieve table audit history
      • Switch table template
      • Retrieve table validation errors
  • 👬Relationships
    • The relationship object
    • Relationship types
    • Create a relationship
    • Delete a relationship
    • Create a party relationship
  • 🔎Search
    • Entity search
    • Relationship search
    • Pagination
      • Making paginated search requests
      • Sorting search responses
    • Search fields
    • Search functions
      • Single query functions
      • Multi-query functions
        • $and
        • $or
        • $not
      • Join functions
        • $join_parent_rel
        • $join_child_rel
        • $join
    • Searching for deleted entities or relationships
    • Examples
      • Find financial document by parent financial document
      • Search by template and status
      • Find catalog items on a deal
      • Find rights on catalog item
      • Find rights by child contact
      • Search for all records that don't have a value for a specific field
      • Search relationships, filtering by template of child record
  • 📦Batch
    • Overview
      • Limitations
      • Batch structure
      • Batch methods
      • Batch options
      • Batch statuses
      • Error handling
    • Create a batch
    • Retrieve a batch
  • 📊GRAPHQL
    • Overview
    • Entity
      • Parents
      • Children
      • Characteristics
      • Parties
      • DateMath
    • Errors
  • 🎯Data Defaults (Profiles)
    • Data default, aka Profiles
    • Create a data default
    • Retrieve data defaults
    • Apply data default
    • Delete data default
  • 🧰Workflow
    • Execute a workflow action
    • Execute document workflow action
    • Execute a workflow action with signature
    • Get workflow actions
    • Get workflow action details
    • Get workflow statuses
    • Get workflow notifications
  • 💲FINANCIAL
    • Create a royalty
      • Create a royalty set
      • Associate royalty set to deal
      • Associate royalty set to catalog
      • Create royalty split
      • Associate royalty split to royalty set
      • Associate contact to royalty split
    • Get amortization models
    • Calculate amortization
    • Get allocation models
    • Calculate allocations
    • Financial periods
      • Create financial period
      • Get financial periods
      • Get financial periods settings
      • Update financial period
      • Update financial period settings
      • Close financial period
      • Delete financial period
  • 📐Configuration
    • Lists
      • Retrieve master value list
      • Add value to master list
      • Update value in master list
      • Remove value from master list
      • Retrieve pick list
      • Retrieve pick list presets
      • Add values to pick list
      • Remove value from pick list
    • Currency conversion
      • Create a currency conversion
      • Retrieve a currency conversion
      • Retrieve all currency conversions
      • Update a currency conversion
      • Delete a currency conversion
    • Data types
      • Alphanumeric text
        • Free text
        • List of Values (LOVs)
      • Checkbox
        • Yes only
      • Date
      • Email
      • External Document
      • Four Digit Year
      • Internet Address
      • Money
      • Number
        • Percentage
      • SMPTETimeCode
      • Others
    • Templates
    • Fields
  • 📆Date Math
    • Overview
    • The date math object
    • Create date math
    • Retrieve date math
    • Update date math
    • Delete date math
  • ❗Alerts
    • Date alerts
      • Retrieve date alerts
  • 🧮AVAILS
    • Overview
    • Get dimension data
    • Get reason unavailable list
    • Get availability
      • Availability request vs Rights Explorer
    • Get unavailable reasons
    • Get available catalog items
    • Is catalog item available
    • Catalog last calculated
    • Get Snapshots
    • Get Snapshot Details
    • Delete Snapshot
  • 🧑Users
    • Get applications
    • Get roles
    • Get user
    • Create a user
    • Update user messaging
    • Apply user applications
    • Apply user roles
    • Delete user
    • Get user identity role
    • Get user activity policy
  • ⌨️Single sign-on
    • Overview
    • Retrieve SSO configuration
    • Update SSO configuration
    • Delete SSO configuration
  • 📦Starter Packs
    • Catalog metadata
    • Availability feed
  • Swagger
  • Postman
  • Message queue docs
  • Rightsline.com
Powered by GitBook
On this page
  • Create batch
  • Sample Create Batch request - Retrieve records
  • Sample Create Batch Request - Create contact records
  • Sample Create Batch Request - Copy Record
  • Sample Create Batch Request - Copy To
  • Sample Create Batch Request - Execute Workflow
  • Sample Create Batch Request - Create Relationship
  • Sample Create Batch request - Delete relationships
  • Sample Create Batch Request - Calculate Amortization

Was this helpful?

  1. Batch

Create a batch

Create batch

POST https://ris.rightsline.com/v4/batch

Create a new batch for processing.

Headers

Name
Type
Description

x-api-key

string

Your company's API key.

Authentication

string

Authentication token.

Request Body

Name
Type
Description

method

string

GET/POST/PUT/DELETE. See Batch methods.

batchOptions

object

Options for processing. See Batch options.

records

keyed collection

The records to process. A key-value collection of the char type ID and an array of records.

relationships

array

The relationships to process.

{
    "batchId": 48865381,
    "batchStatus": "Created"
}
{
    "message": "Too many batches in queued status. Please wait and try again."
}

Sample Create Batch request - Retrieve records

{
    "method": "GET",
    "batchOptions": {
        "cancelIfRecordFails": false
    },
    "records": {
        "1": [
            {
                "id": 100
            },
            {
                "id": 101
            }
        ],
        "3": [
            {
                "id": 200
            },
            {
                "id": 201
            }
        ]
    },
    "relationships": [
        {
            "id": 301
        }
    ]
}

Sample Create Batch Request - Create contact records

When creating records in a batch, you can include an optional string parameter referenceId in the request body. If a record in the batch fails to create for any reason, the referenceId will be returned for that record so you are able to map the record in the request to the errored record in the response.

{
    "method": "POST",
    "records": {
        "2": [
            {
                "title":"Person 1",
                "template":{
                    "templateId": 1
                },
                "characteristics":{
                    "first_name": "John",
                    "last_name": "Smith",
                    "department": "Sales"
                },
                "referenceId": "contact1"
            },
            {
                "title":"Person 2",
                "template":{
                    "templateId": 1
                },
                "characteristics":{
                    "first_name": "Susan",
                    "last_name": "Williams",
                    "department": "Accounting"
                },
                "referenceId": "contact2"
            }
        ]
    },
    "batchOptions":{
        "cancelIfRecordFails": true
    }
}

Sample Error Response

{
    "batchId": 188181886,
    "batchStatus": "Errored",
    "batchResults": {
        "records": {
            "2": [
                {
                    "code": 400,
                    "message": "{\"IsValid\":false,\"IsLocked\":false,\"IsDeletable\":false,\"Errors\":[{\"Key\":\"CharDataValidation\",\"Value\":[\"Invalid field found fake_field.\"]}],\"HasConflicts\":false,\"HasBlockingConflicts\":false,\"DbValidationErrors\":[]}",
                    "id": 0,
                    "referenceId": "contact1"
                }
            ]
        },
        "relationships": []
    }
}

Sample Create Batch Request - Copy Record

To copy a record or multiple records, you can use the "COPY" method. Copying a record creates an identical record to the one being copied, with the same char type, template, status, and characteristics. The new record will have a new ID, and you can specify the following options:

  • title - The title for the new record

  • dateMathOption (optional, default = Default) - Use one of the following options:

    • Default - All fields with date math on module records will refer to copied record dates; all fields with date math on component record dates will refer to original record dates.

    • Original Record - All date math on module record and child components being copied should refer to original record dates.

    • Copied Record - All date math on module record and child components being copied should refer to copied record dates.

  • copyRelationships - include the relationships that you want to copy over to the new record,

  • copyParties - set to false to discard all parties when copying record. Defaults to true.

{
    "method": "COPY",
    "records": {
        "2": [
            {
                "copyRelationships": [
                    {
                        "id": 971252653,
                        "relationshipType": {
                            "relationshipTypeId": 0,
                            "relationshipTypeName": "Default"
                        },
                        "parentCharTypeId": 4,
                        "parentRecordId": 4123,
                        "parentTemplate": {
                            "templateId": 1,
                        },
                        "childCharTypeId": 2,
                        "childRecordId": 402
                    }
                ],
                "title":"New Title of Record",
                "id": 402,
                "template":{
                    "templateId": 1
                },
                "dateMathOption": "Default", // "Default", "OriginalRecord", or "CopiedRecord"
                "copyParties": true // Defaults to true, set to false to discard parties
            }
        ]
    },
    "batchOptions":{
        "cancelIfRecordFails": true
    }
}

Sample Create Batch Request - Copy To

The Copy To functionality allows you to copy records to a new char type. The request is the same as the Copy functionality, but including the new charTypeId and the new templateId for the copied record. The example below copies a catalog item with ID 402 into a new deal.

{
    "method": "COPY",
    "records": {
        "1": [
            {
                "copyRelationships": [],
                "charTypeId": 4,
                "title":"New Title of Record",
                "id": 402,
                "template":{
                    "templateId": 12
                },
                "characteristics":{},
                "dateMathOption": "Default", // "Default", "OriginalRecord", or "CopiedRecord"
                "copyParties": true // Defaults to true, set to false to discard parties
            }
        ]
    },
    "batchOptions":{
        "cancelIfRecordFails": true
    }
}

Sample Create Batch Request - Execute Workflow

{
    "method": "EXECUTE-WORKFLOW",
    "records": {
        "1": [
            {
                "id": 100,
                "actionId": 1
            },
            {
                "id": 101,
                "actionId": 1
            }
        ],
        "3": [
            {
                "id": 200,
                "actionId": 2
            },
            {
                "id": 201,
                "actionId": 4
            }
        ]
    }
}

Sample Create Batch Request - Create Relationship

{
    "method": "POST",
    "relationships": [
        {
            "parentCharTypeId": 4,
            "parentRecordId": 4156,
            "childCharTypeId": 3,
            "childRecordId": 131262
        },
        {
            "parentCharTypeId": 4,
            "parentRecordId": 4156,
            "childCharTypeId": 3,
            "childRecordId": 131604
        },
        {
            "parentCharTypeId": 4,
            "parentRecordId": 4156,
            "childCharTypeId": 3,
            "childRecordId": 1324213
        }
    ]
}

Sample Create Batch request - Delete relationships

{
    "method": "DELETE",
    "batchOptions": {
        "cancelIfRecordFails": false
    },
    "relationships": [
        {
            "id": 44809801
        },
        {
            "id": 55489923
        }
    ]
}

Sample Create Batch Request - Calculate Amortization

{
    "method": "CALCULATE-AMORTIZATION",
    "amortizationModelId": 1,
    "records": {
        "5": [
            {
                "id": 200
            },
            {
                "id": 201
            }
        ]
    }
}
PreviousError handlingNextRetrieve a batch

Last updated 1 month ago

Was this helpful?

📦