This rest API follows the same model as all APIs for RightsZone. Please Familiarize yourself with these articles to start:



What this API does

This API inserts or updates Project (Work) records only. 


End Point

/dataload/project


Input

The input is an array of projectDtos records where either the projectId or the extSysProjectId fields are sent. They populate the RZone__Project__c object in RightsZone


JSON Structure

The JSON wrapper is projectDetailList and you can send one or many records


"projectDetailList":[

    {projectDto1},

    {projectDto1},

    ...

    ]

}   


Data can be: 

  • Boolean fields are ‘true’ or ‘false’
  • Ids are Salesforce Ids
  • Ext Sys Ids are an Id in your system integrating to RightsZone, e.g. your Title Management system.
  • String is any text


Required Parameters

At least one of these is parameters is required.

  • projectId: the Salesforce record ID
  • extSysProjectId: the unique Id of the project in your own system (generally Title Management System) - can be the primary format ISBN for example or a system uniqueId if you have one. But something that uniquely identifies this Project (title) over time i.e. is persistent.
  • In addition: productShortTitle: Short Title, division: Publisher Division, authorStringInverted Author String Inverted, authorString Author String, legalEntity Legal Entity and productStatus Project Status ARE MANDATORY.  mainFormat Populate Primary Format should also be set to TRUE.

Responses  

  • All records you send are returned in the same exact order
  • Each row is associated with a success or a failure

  • ObjectList will contain all the records inserted for the corresponding row

  • In this case, there will only be one record as it is the Project only API so only a Project record is created

  • ProjectId is the corresponding Salesforce Id of the record you inserted/updated.

{

            "status":"Success",

            "row":"0",

            "objectList":[{

                        "source":"Project Upsert”,

                        "sfId":"a0K0O00000YGufuUAD",

                        "externalId":"Project1TestInsert"

            }],

            "error":"",

            "projectId":"a0K0O00000YGufuUAD",

            "projectExternalId":"Project1TestInsert"

}

 


General Error

There is a problem with the API usage/format, the JSON is invalid or the data type of a field is incorrect:

Request example:

{

"TEST":[ { 

 

}]

}

Response:

{

            [{

                        "status":"failure",

                        "row":"0",

                        "objectList":null,

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

            }]

}


Data Errors

The API usage is correct however something is wrong with the data. This happens when the data itself is not properly set to be inserted/updated against the project record. For example, if the DivisionId is incorrect then RZ returns this error (Note: sometimes the error doesn’t mention the name of the field failing due to SF limitations).  

Response:

   "responseList": [

        {

             "status": "Success",

            "row": "0",

             "objectList": [

                {

                    "source": "Project Upsert",

                     "sfId": "a0K0O00000YGufuUAD",

                     "externalId": "Project1TestInsert"

                }

            ],

            "error": "",

             "projectId": "a0K0O00000YGufuUAD",

             "projectExternalId": "Project1TestInsert"

        }

    ]

}


Common Issues

See Common API Issues for details of common errors and queries


ProjectDto definition


JSON

Field Type 

Salesforce

Comment

projectDetailList

N/a (object)

PSProject__c

PSProject__c is an object in Salesforce.

This is an array in Json and you can send one or as many as 200, comma separated.

projectId

Primary Key

Id

SF id of the project. Either projectId or extSysProjectId is required.

productShortTitle

String

Name

Required on insert, and trimmed to 80 chars if more than 80 characters

extSysProjectId

String

ExtSysId__c

Unique id of the project as known in your own system

longTitle

 String

LongTitle__c

 

translationRights

Boolean

TranslationRight

 

themaSubjectCodes

String

ThemaSubjectCodes__c

Comma separated list

territory

Id 

FK to PSTerritory__c obj)

PSTerritory__c

This is the Salesforce Id of the territory.

Can be null. It can be left blank.

targetMarket

String

TargetMarket__c

 

rightsReverted

Boolean

RightsReverted__c

 

publicationDate

String

ProjectPubDate__c

UTC format e.g. 2015-09-08

productURL

String

ProjectURL__c

 

productStatus

String

ProjectStatus__c

 

previousEditionTitle

String

PreviousEditionTitle__c

 

payOnGross

Boolean

ProjectPayOnGross__c

 

payEarly

Boolean

ProjectEarlyPayment__c

 

mainFormat

Boolean

Populate_from_primary_format__c

 

levelAudience

String

LevelAudience__c

 

legalEntity

String

LegalEntity__c,

 

languageTerms

Id 

FK to PSLanguageTerms__c obj.

PSLanguageTerms__c

SF ID of PSLanguageTerms__c type.

Enforced if provided. Does not need to be included.

jacketImageURL

String

ProjectJacketImageURL__c

 

isbn13

String

ProjectIsbn__c

 Do not include hyphens

internalSubjectCodes

String

SubjectCodes__c

 

imprint

String

ProjectImprint__c, Imprint__c

 

illustrationsSummary

String

ProjectIllustrationsSummary__c

 

extSysProjectId

String

ExtSysId__c

 

extent

String

ProjectExtent__c, Extent__c

 

englishLanguageReprintRights

Boolean

EnglishLanguageReprintRights__c

 

editionStatement

String

EditionStatement__c

 

editionNumber

integer

EditionNumber__c

 

editedProject

boolean

EditedProject__c

 

division

Id

FK to Account 

Account__c 

SF ID of the Publisher (Account record in Salesforce) type enforced and required. Ext Ids can be used instead - these need to be set up in RightsZone in advance

copyrightYear

String

CopyrightYear__c

 

bicSubjectString

String

BicSubjectString__c

As comma separated

authorStringInverted

String

Author_String_Inverted__c

 

authorString

String

AuthorString__c

As comma separated

approvalOrNotificationRequired

String

ApprovalRequired__c

 

bisacSubjectString

String

BisacSubjectString__c

 

genre

String

Genre__c

 

keywords

String

Keywords__c

 

originalPublisher

String

OriginalPublisher__c

 

projectIssn

String

ProjectIssn__c

 

projectOrigin

String

ProjectOrigin__c

 

projectSeries

String

ProjectSeries__c

 

publisherEditor

String

PublisherEditor__c

 

volumeNumber

Integer

VolumeNumber__c

This should be used if the field is numeric in the source system

volume

String

Volume__c

This field should be used if the field can contain additional (non-numeric) characters in addition to the number

proprietorName

String

ProprietorName__c

 

noRightsEB

Boolean

NoRightsEB__c

 

noRightsHB

Boolean

NoRightsHB__c

 

noRightsPB

Boolean

NoRightsPB__c

 

noRightsAllFormats

Boolean

NoRightsAllFormats__c

 

subjectGroup

String

SubjectGroup__c

 

pmgCode

String

PMGCode__c

 

titleCode

String

TitleCode__c

 

audienceText

String

AudienceText__c

 

openAccessStatusStringOpenAccessStatus__c
openAccessfundingBodyStringOpenAccessFundingBody__c
openAccesslicenseTypeStringOpenAccessLicenseType__c
editorialAssistant

String


EditorialAssistant__c
Editorial assistant name
onSaleDate
String

ProjectOnSaleDate__c
OnSaleDate__c
UTC format e.g. 2015-09-08



Request Example:

 {

 "projectDetailList":[{   

 "translationRights":true,

"themaSubjectCodes":"Anthropology",

"territory":null,

"targetMarket":null,

"subtitle":null,

"rightsReverted":true,

"publicationDate":null,

"projectId":null,

"productURL":"URLP",

"productStatus":"Forthcoming",

"productShortTitle":"Test Book",

"previousEditionTitle":null,

"payOnGross":null,

"payEarly":null,

"mainFormat":null,

"longTitle":"LONG",

"levelAudience":"College/higher education",

"legalEntity":"Default",

"languageTerms":null,

"jacketImageURL":null,

"isbn13":"randomISBN",

"internalSubjectCodes":"Anthropology",

"imprint":"CHC Classics",

"illustrationsSummary":null,

"extSysProjectId":"Project1TestInsert",

"extent":null,

"englishLanguageReprintRights":true,

"editionStatement":null,

"editionNumber":1,

"editedProject":true,

"division":null,

"copyrightYear":2010,

"bicSubjectString":null,

"authorStringInverted":null,

"authorString":"EEEE",

"approvalOrNotificationRequired":"Approval Required",

"bisacSubjectString": "", 

"genre": "Historic", 

"keywords": "", 

"originalPublisher": "", 

"projectIssn": "", 

"projectOrigin": "", 

"projectSeries": "", 

"publisherEditor": "", 

"volumeNumber": 4, 

"proprietorName": "",

"noRightsEB": true,

"noRightsHB": false,

"noRightsPB": true,

"noRightsAllFormats": false,

"subjectGroup": "Subject Example"

“pmgCode” : "some pmg code",

“titleCode”: "Title 101",

“audienceText”: "some text about the audience",

 openAccessStatus : Open Access,

openAccessfundingBody some academic institution,

openAccesslicenseType : CC BY-NC-ND

"editorialAssistant": "Assistant Name"

"onSaleDate": "string"


}]

}