Once you have successfully authenticated against the Salesforce API all subsequent calls to the RighsZone custom API will follow the same pattern.


URL

Pattern: URL Prefix + Name of the API

URL Prefix:
https://{instance_url}/services/apexrest/RZone/{APIName} where {instance_url} is retrieved from the response to the authentication call and {APIName} is the end point of the URL and one of the API name options below.


APIName (end point)
The following custom APIs are supported by RightsZone:

  • /dataload/project
  • /dataload/project/projectcomponents
  • /dataload/project/descriptions

Example URL

https://ribbonfish-testorg.cloudforce.com/services/apexrest/RZone/dataload/project/projectcomponents


DO NOT FORGET the /RZone/ part in the URL above after /apexrest. This is required due to the fact our API is part of the RZone managed package


Header

NameValueComment
Content-Typeapplication/json
Authorization'Bearer' + {access_token}where {access_token} is is retrieved from the response to the authentication call, e.g.
Bearer 00D2z0000008l2S!AQMAQIu0JppEUivrjmNBCQXsoo
Body{JSON}Array of JSON records to insert/update in RightsZone

Body

The JSON pertaining to creating/updating projects, projectAndComponents or descriptions (Blurbs related to projects) to load as JSON.

See details of each API for JSON


Output


NameValueComment
Status200Always return 200. If any processing errors are encountered they displayed in the body of the response
BodyresponseList": [
{
"status": "failure",
"row": "0",
"objectList": null,
"error": "Your attempt to use the service is not valid"
} ]
}
All answers from the RightsZone service are embedded in a reponseList

Example:


Headers

ExampleCallToRZAPI.png


Input Body

Example Input From Call to RightsZone API


Output Body

Example Output From Call to RightsZone API


Input Body as JSON

{

    "projectAndComponentDetailList": [

        {

            "extSysProjectId": "e5c7ae5e-b387-41ca-b2b8-00b1cf75f45f",

            "extSysProductId": "9781493051731",

            "mainFormat": false,

            "productShortTitle": "SHARKS OF LAKE NICARAGUA: TRUE TALES OF ",

            "longTitle": "The Sharks of Lake Nicaragua",

            "subtitle": "True Tales of Adventure, Travel, and Fishing",

            "productFormat": "Paperback / softback",

            "editionStatement": "",

            "extent": 216,

            "division": "Globe Pequot",

            "imprint": "Lyons Press",

            "ISBN": "9781493051731",

            "publicationDate": "1/17/2020",

            "productStatus": "Active",

            "availabilityStatus": "Available",

            "authorString": "Randy White",

            "bisacSubjectString": "Travel / Special Interest / Adventure;Sports",

            "keywords": "Alaska; dog sled; F-16; Fighter Pilots USA; Fiji; fish house",

            "price": 19.9500,

            "priceCurrency": "USD",

            "levelAudience": "General/trade"

        }

    ]

}



Output Body as JSON

{

    "responseList": [

        {

            "status": "failure",

            "row": "0",

            "objectList": null,

            "error": "Your attempt to use the service is not valid"

        }

    ]

}


See here for full details on the Project or Project and Component (Product Format) APIs:

Create Project

Create Project & Component