Oracle Responsys REST API Developer's Guide (PDF)



Comments



Description

Oracle ResponsysREST API Developer’s Guide Release 6.27 Copyright © 2016 Oracle Responsys, Inc. All rights reserved. Information in this document is subject to change without notice. Data used as examples in this document is fictitious. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, without prior written permission of Oracle Responsys. Address permission requests, comments, or suggestions about Oracle Responsys documentation by creating a MOS Service Request at https://support.oracle.com. Oracle Responsys REST API Developer’s Guide © 2016 Page ii Contents Changes and Enhancements in 6.27 Release ................................................................................................ 1 Overview ....................................................................................................................................................... 1 Processing Responsys REST API requests ..................................................................................................... 1 Access Controls ............................................................................................................................................. 2 Organizational access control ................................................................................................................... 2 Functional access control.......................................................................................................................... 2 Throttling the Frequency of API Requests .................................................................................................... 3 Authenticating .............................................................................................................................................. 3 Login with username and password ......................................................................................................... 3 Login with username and certificates ....................................................................................................... 4 Refresh token ............................................................................................................................................ 4 Managing Profile List Tables ......................................................................................................................... 5 Retrieving all profile lists for an account .................................................................................................. 5 Merge or update members in a profile list table .................................................................................... 10 Retrieve a member of a profile list using RIID ........................................................................................ 12 Retrieve a member of a profile list based on query attribute ................................................................ 13 Delete Profile List Recipients based on RIID ........................................................................................... 15 Managing Profile Extension Tables ............................................................................................................. 17 Retrieve all profile extensions of a profile list ........................................................................................ 17 Create a new profile extension table ...................................................................................................... 19 Merge or update members in a profile extension table......................................................................... 19 Retrieve a member of a profile extension table based on RIID .............................................................. 21 Retrieve a member of a profile extension table based on a query attribute ......................................... 22 Delete a member of a profile extension table based on RIID ................................................................. 24 Managing Supplemental Tables .................................................................................................................. 26 Create a new supplemental table ........................................................................................................... 26 Merge supplemental table records using primary key ........................................................................... 26 Merge supplemental table records without primary key ....................................................................... 29 Retrieve supplemental table records with primary key ......................................................................... 33 Delete supplemental table records ........................................................................................................ 34 Oracle Responsys REST API Developer’s Guide Page a Triggering Email Messages.......................................................................................................................... 36 Merge members into a profile list and trigger email messages to them ............................................... 36 Trigger email message ............................................................................................................................ 38 Triggering SMS Messages ........................................................................................................................... 39 Merge members into a profile list and trigger SMS messages to them ................................................. 39 Triggering Mobile Push Messages .............................................................................................................. 40 Trigger Push Messages............................................................................................................................ 40 Raising Custom Events for Cross-channel Marketing Programs ................................................................. 42 Trigger a custom event ........................................................................................................................... 42 Managing Email Campaigns ........................................................................................................................ 43 Schedule email campaign ....................................................................................................................... 43 Get email campaign schedule ................................................................................................................. 45 Get All Campaign Schedules ................................................................................................................... 46 Update email campaign schedule ........................................................................................................... 48 Delete email campaign schedule ............................................................................................................ 49 Managing Content Library Folders.............................................................................................................. 50 Create content library folder .................................................................................................................. 50 Delete content library folder .................................................................................................................. 51 List contents of a content library folder ................................................................................................. 51 Managing Content Library Documents ....................................................................................................... 54 Create content library document ........................................................................................................... 54 Retrieve contents of a content library document .................................................................................. 55 Update contents of a content library document .................................................................................... 56 Delete a content library document......................................................................................................... 57 Create a copy of a content library document ......................................................................................... 58 Managing Content Library Media Files ....................................................................................................... 59 Create content library media file ............................................................................................................ 59 Retrieve contents of a content library media file ................................................................................... 60 Update contents of a content library media file..................................................................................... 62 Delete a content library media file ......................................................................................................... 64 Create a copy of a content library media file.......................................................................................... 64 Managing Images of Content Library Documents ...................................................................................... 65 Set images in a content library document .............................................................................................. 66 Oracle Responsys REST API Developer’s Guide © 2016 Page b .................Get images in a content library document ............................................................................................... 75 Oracle Responsys REST API Developer’s Guide © 2016 Page c ................................. 69 Definitions of Rule Parameters for Merging Members into a Profile List ...................................... 67 Handling Errors .................................................................................................... content library media files.27 Release The following is a summary of changes and enhancements in this release of Responsys REST API:         API version is updated from v1 to v1.org/wiki/HATEOAS.slideshare. Therefore. content library documents. get and update an email campaign now are only available on a case-by-case basis after review and approval by Responsys senior executive team – These interfaces are removed from this document and available in a separate document. The error description is now prepended with the error code so that the API developer can look up the error code from the errorMessage attribute: “ERROR_CODE: error description”. Responsys SOAP and REST API are two separate sets of APIs. events. for example. please visit http://www. content library folders. when the response returns an error for a recipient then the success attribute is false. Responsys REST APIs are JSON-aware for accepting or returning a payload. The description used to be like “Recipient deliverability status is undeliverable”. supplemental data. This release supports several resources including: profile lists. a REST client needs no prior knowledge about how to interact with any particular application or server beyond a generic understanding of hypermedia. the response payloads returned by most of the Responsys REST interfaces contain additional information (specifically “links”) to allow the client application to transition through application states. To learn more about REST vs. More information about HATEAOS is available at https://en.net/Muratakal/rest-vssoap-15854355 Processing Responsys REST API requests The sequence of steps required for processing the Responsys REST API requests is: Oracle Responsys REST API Developer’s Guide Page 1 . Overview This document provides a guide for software developers to use the Responsys REST API. campaigns. As a result. but they use the same underlying object model.wikipedia. These REST APIs also comply with the HATEAOS principle such that a client interacts with a network application entirely through hypermedia provided dynamically by application servers. New interface to trigger mobile push message New interface to get all scheduled launches for a given email campaign New interface to get all profile lists in an account New interface to delete a member of a profile list given its RIID Enhanced interface to merge records into a PET using up to two merge keys For requests to trigger a message. “RECIPIENT_STATUS_UNDELIVERABLE: Recipient deliverability status is undeliverable”. profile extensions. and content library document images. SOAP.Changes and Enhancements in 6.1 – Responsys will continue to support v1 until March 2017 Interfaces to create. The previous version of the API used to return the error description as part of the attribute errorMessage. Access Controls This section presents Responsys capabilities for controlling user access to APIs.net (for interact5 pod). Organizational Access Control determines whether the API user has access to a particular object. Depending on the pod that hosts the Responsys account the end points could be either login2. 2. Functional access control API user’s access level to a specific object is determined by functional roles that are assigned to that user. If needed. Organizational access control When Organizational Access Control is enabled for a Responsys account. 4. or List Web Services Manager) to ensure adequate access level to the appropriate set of objects. Similarly. Please contact your Responsys account administrator to set up access control. objects created through the API will inherit organizational membership of the API user. take the next action. Please contact your Responsys account administrator to setup access controls. Repeat step 3-5 as needed. Oracle Responsys REST API Developer’s Guide © 2016 Page 2 . A JSON response is returned with a token and an API endpoint to be used for subsequent API requests. that API user should be assigned to the Root node in the organizational hierarchy.responsys. API user should be assigned one or more functional roles (Campaign Web Services Manager. By default. Best practice recommendation is to use a dedicated user for API operations. including API users. and Functional Access Control determines what operations the user can perform with that object. Table Web Services Manager. Organizational Access Control is configured through "Account | Manage Users | Organization Assignment". 5. Folder Web Services Manager. Functional Access Control and Organizational Access Control work together. Depending on the success or failure of the previous API request. Functional Access Control is configured through "Account | Manage Users | Role Assignment". For the API user to access all objects within the account. Otherwise. an error payload is returned for interpretation.responsys. 7.1.net (for interact2 pod) or login5. 6. 3. Client issues desired HTTP POST to the API endpoint along with the token in the HTTP HEADER. If the API request is successfully processed. refresh the token to avoid having to re-authenticate. a specific JSON response is returned according to the specification of the processed API. Content Web Services Manager. tokens last for two hours. Note that the API endpoint must be crafted from the URL endpoint of step 2 and the specific path of the desired API. it will be enforced for all users in that account. Client issues an HTTP POST request to authenticate via the login endpoint. This means that the API user’s access to Responsys objects will be limited by the organizational units to which the user is assigned. the API function for triggering email messages can be called more times per minute than the API function for launching a campaign. Depending on the type of API function.” If a specific user of an account is blocked from using selected API functions. you must NOT use the URL string for passing in the authentication credentials. you see the error code API_LIMIT_EXCEEDED and this message “You exceeded your allowable limit to call the <function_name> API function. Upon successful authentication. Login with username and password Important Note: For security reasons you must pass username and password as parameters in the POST request body only with the correct content type ('Content-Type': 'application/x-www-form-urlencoded'). the user sees the error code API_BLOCKED with this message: “The <function_name> is currently not available to this user. Responsys provides multiple tiers that accommodate standard. Therefore. a specific frequency rate limit is imposed on the basis of an account's total number of requests made per minute for that function. Service URL: /rest/api/v1. a token and an endpoint are returned that you must use for any subsequent REST API request. medium. Please try again in a minute.Throttling the Frequency of API Requests Responsys monitors and throttles the frequency of API requests that are submitted from each Oracle Responsys account.1/auth/token Request Method: POST Request Parameters: user_name=<USER_NAME> password=<PASSWORD> auth_type=password Sample Login Request: URL: /rest/api/v1. This is to ensure that the best possible level of service is offered to API clients in a shared environment.1/auth/token Sample Request Body: user_name=<USER_NAME>&password=<PASSWORD>&auth_type=password Response: { Oracle Responsys REST API Developer’s Guide © 2016 Page 3 . Please contact tech support. When an account exceeds its allowable frequency rate limit for an API request. For example.” Authenticating The very first REST API request must be to authenticate to a specific Responsys account using a username and a password or certificates. or high volume API usage. "endPoint" : "<ENDPOINT_URI>" } Login with username and certificates Instead of using a password."authToken" : "<AUTH_TOKEN>". An existing token can be refreshed within that period without having to authenticate again. "serverChallenge" : "<BASE_64_ENCODED_SERVER_CHALLENGE>". two hours). Oracle Responsys REST API Developer’s Guide © 2016 Page 4 . "issuedAt" : < TIMESTAMP > . "issuedAt" : <TIMESTAMP > .1/auth/token Request Method: POST Request Parameters: user_name=<USER_NAME> auth_type=server client_challenge=<BASE_64_ENCODED_CLIENT_CHALLENGE> Response: { "authToken" : "<TEMP_AUTH_TOKEN>". Service URL: /rest/api/v1.1/auth/token Request Method: POST Request Parameters: user_name=<USER_NAME> auth_type=client server_challenge=<ENCRYPTED_AND_THEN_BASE_64_ENCODED_SERVER_CHALLENGE> Request Header: Authorization=<TEMP_AUTH_TOKEN> (this is obtained from the above call) Response: { "authToken" : "<AUTH_TOKEN>". "clientChallenge" : "<ENCRYPTED_AND_THEN_BASE_64_ENCODED_CLIENT_CHALLENGE>" } 2. The following two REST requests must be processed in sequence for authenticating with certificates: 1. a server and a client certificate can be used for authenticating with a username. Service URL: /rest/api/v1. "endPoint" : "<ENDPOINT_URI>" } Refresh token A token expires after a certain period of time (by default. a member of a profile list can be deleted using its RIID. "endPoint" : "<ENDPOINT_URI>" } Managing Profile List Tables All profile lists in an account can be retrieved. Also. [ { "name": "DemoProfileList". and new members can be added to a list or attribute values of existing members can be updated. "folderName": "Demo".Service URL: /rest/api/v1. Each of the individual objects in the collection represents a Profile List Object.1/auth/token Request Method: POST Request Parameters: auth_type=token Request Header: Authorization=<AUTH_TOKEN> Response: { "authToken" : "<AUTH_TOKEN>". Finally. "fieldType": "INTEGER" Oracle Responsys REST API Developer’s Guide © 2016 Page 5 . "issuedAt" : <TIMESTAMP > .1/lists Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Sample Response in case of success: Note: The response is a collection of Profile Lists. Service URL: /rest/api/v1. "fields": [ { "fieldName": "RIID_". members of a list can be retrieved. Retrieving all profile lists for an account To retrieve all profile lists for an account. "fieldType": "CHAR" }. { "fieldName": "MOBILE_NUMBER_". { "fieldName": "MOBILE_COUNTRY_". { "fieldName": "EMAIL_PERMISSION_REASON_". { "fieldName": "EMAIL_DELIVERABILITY_STATUS_". "fieldType": "STR255" }. { "fieldName": "CREATED_SOURCE_IP_".}. { "fieldName": "EMAIL_PERMISSION_STATUS_". { "fieldName": "EMAIL_SHA256_HASH_". { "fieldName": "EMAIL_ISP_". { "fieldName": "EMAIL_ADDRESS_". "fieldType": "CHAR" }. { "fieldName": "MOBILE_PERMISSION_REASON_". Oracle Responsys REST API Developer’s Guide © 2016 Page 6 . "fieldType": "STR255" }. { "fieldName": "CUSTOMER_ID_". { "fieldName": "MOBILE_PERMISSION_STATUS_". "fieldType": "STR255" }. "fieldType": "STR25" }. "fieldType": "STR100" }. "fieldType": "STR255" }. "fieldType": "CHAR" }. "fieldType": "STR50" }. "fieldType": "STR255" }. { "fieldName": "EMAIL_MD5_HASH_". { "fieldName": "EMAIL_FORMAT_". "fieldType": "STR50" }. { "fieldName": "EMAIL_DOMAIN_". { "fieldName": "MOBILE_DELIVERABILITY_STATUS_". "fieldType": "STR500" }. "fieldType": "CHAR" }. "fieldType": "CHAR" }. { "fieldName": "CREATED_DATE_". { "fieldName": "COUNTRY_". "fieldType": "STR255" }. { "fieldName": "POSTAL_PERMISSION_REASON_". "fieldType": "STR50" }. { "fieldName": "MODIFIED_DATE_". { "fieldName": "CUSTOMER_ID_". { "name": "DemoList". { "fieldName": "POSTAL_PERMISSION_STATUS_"."fieldType": "STR255" }. { "fieldName": "POSTAL_DELIVERABILITY_STATUS_". "fieldType": "STR50" }. "fieldType": "CHAR" }. "fieldType": "STR255" }. { "fieldName": "STATE_". { "fieldName": "POSTAL_STREET_1_". "fieldType": "TIMESTAMP" }. "fieldType": "STR255" Oracle Responsys REST API Developer’s Guide © 2016 Page 7 . "fieldType": "STR25" }. "folderName": "Demo". "fieldType": "STR255" }. { "fieldName": "CITY_". { "fieldName": "POSTAL_CODE_". "fieldType": "INTEGER" }. "fieldType": "CHAR" }. "fieldType": "STR255" }. { "fieldName": "CREATED_SOURCE_IP_". "fieldType": "STR50" }. { "fieldName": "POSTAL_STREET_2_". "fieldType": "TIMESTAMP" } ] }. "fields": [ { "fieldName": "RIID_". { "fieldName": "EMAIL_SHA256_HASH_". { "fieldName": "EMAIL_PERMISSION_STATUS_". "fieldType": "STR25" }. { "fieldName": "POSTAL_STREET_2_". { "fieldName": "EMAIL_DOMAIN_". "fieldType": "STR255" }. "fieldType": "STR50" }. { "fieldName": "EMAIL_ISP_". "fieldType": "STR255" }. { "fieldName": "MOBILE_PERMISSION_REASON_". { "fieldName": "EMAIL_DELIVERABILITY_STATUS_". "fieldType": "STR500" }. "fieldType": "CHAR" }. { "fieldName": "MOBILE_DELIVERABILITY_STATUS_". "fieldType": "CHAR" }. { "fieldName": "EMAIL_PERMISSION_REASON_". "fieldType": "STR50" }. "fieldType": "STR255" }. "fieldType": "CHAR" }. { "fieldName": "EMAIL_ADDRESS_". { "fieldName": "POSTAL_STREET_1_". { "fieldName": "EMAIL_MD5_HASH_". { "fieldName": "EMAIL_FORMAT_". "fieldType": "CHAR" }. "fieldType": "STR255" }. Oracle Responsys REST API Developer’s Guide © 2016 Page 8 . { "fieldName": "MOBILE_NUMBER_". { "fieldName": "MOBILE_COUNTRY_".}. { "fieldName": "MOBILE_PERMISSION_STATUS_". "fieldType": "STR100" }. "fieldType": "STR255" }. "fieldType": "CHAR" }. "fieldType": "STR25" }. "fieldType": "CHAR" }. { "fieldName": "STATE_". { "fieldName": "MODIFIED_DATE_". "errorDetails": [] } Oracle Responsys REST API Developer’s Guide © 2016 Page 9 . "fieldType": "STR100" } ] } ] Sample Response in case of failure: { "type": "". "fieldType": "STR50" }. "title": "List not found". { "fieldName": "FIRST_NAME". { "fieldName": "POSTAL_PERMISSION_REASON_". "fieldType": "CHAR" }."fieldType": "STR255" }. { "fieldName": "COUNTRY_". "fieldType": "STR50" }. "fieldType": "STR255" }. { "fieldName": "POSTAL_DELIVERABILITY_STATUS_". { "fieldName": "POSTAL_PERMISSION_STATUS_".". "errorCode": "LIST_NOT_FOUND". { "fieldName": "CREATED_DATE_". "fieldType": "TIMESTAMP" }. { "fieldName": "LAST_NAME". { "fieldName": "CITY_". "fieldType": "STR50" }. { "fieldName": "POSTAL_CODE_". "fieldType": "TIMESTAMP" }. "fieldType": "STR100" }. "detail": "Account : datateam : does not have any profile lists. Furthermore. "insertOnNoMatch" : true. "9844444444".Merge or update members in a profile list table New members can be added to an existing profile list and existing members in a profile list can be updated.com"]. "matchColumnName1" : "RIID_". an array of record data that contain field names and their corresponding field values are specified. "textValue" : "T". "updateOnMatch" : "REPLACE_ALL". "rejectRecordIfChannelEmpty" : null. "matchColumnName2" : null.cd@gmail. For a given list in a specific folder. "defaultPermissionStatus" : "OPTIN" } } Sample response in case of success NOTE: Irrespective of what field names were used to perform the merge. an error message starting with “MERGEFAILED:” is returned. "optinValue" : "I".1/lists/<listName>/members Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: { "recordData" : { "fieldNames" : ["riid_". the response will always contain only ‘RIID_” in the ‘fieldNames” attribute and the corresponding “RIID_” values for the records in the “records” attribute. Service URL: /rest/api/v1. "9844444666". ["4094328". Please see the definition of merge rule parameters provided at the end of this document. In case merge failed for a record. "mobile_number_"."ab. Up to 200 members can be handled per a single request. ["ssdcf".com"]. "9844444444"."unknown@oracle. "email_address_"]. "optoutValue" : "O". "mapTemplateName" : null }. "9845349498". Also note that the order of records in the response matches the order of records specified in the request payload. "matchOperator" : "NONE". other attributes in the response like Oracle Responsys REST API Developer’s Guide © 2016 Page 10 . the “RIID_” of the record is not present in the response."xyz"] ]. "mergeRule" : { "htmlValue" : "H"."abc@gmail. ["4094327". "records" : [ ["4094326". Instead.com"]. Client developers can look for the string “MERGEFAILED:” in the response for a particular row to determine whether that recipient was merged successfully or not. "detail": "matchColumnName1 in ListMergeRule is null or empty". "matchColumnName3": null. "mapTemplateName": null }. "optoutValue": "O". "insertOnNoMatch": true. "updateOnMatch": "REPLACE_ALL". "method": "GET" } ] } Sample response in case of failure { "type": "". CUSTOMER_ID_ EMAIL_ADDRESS_ MOBILE_NUMBER_ Oracle Responsys REST API Developer’s Guide © 2016 Page 11 . "href": "/rest/api/v1. ["4094327"]. { "rel": "retrieveListRecipientsRIID". "matchColumnName1": "RIID_". "errorDetails": [] } The matchColumn attributes can have the following possible values: RIID_. "matchColumnName2": null. "href": "/rest/api/v1. "optinValue": "I". "matchOperator": "NONE". "records": [ ["4094326"].1/lists/DemoNewsLetterList/members". "mergeRule": { "textValue": "T". "rejectRecordIfChannelEmpty": null. "htmlValue": "H".mapTemplateName and mergeRule will mirror the valid values specified in the request payload or default to null/false in case of invalid values. "errorCode": "INVALID_PARAMETER".1/lists/DemoNewsLetterList/members/<riid>". ["MERGEFAILED: Record 3 = INVALID_PARAMETER: The value ssdcf is not valid for an integer field\n\n\r\n"] ]. "defaultPermissionStatus": "OPTIN" }. "method": "POST" }. { "recordData": { "fieldNames": ["RIID_"]. "title": "Invalid request parameters". ["4094328"]. "links": [ { "rel": "self". you can specify only one field with value set to ‘all’ (if you have a column called ‘all’. you should use two or more specific column names to avoid getting all of the columns). "matchColumnName1": null. "mergeRule": { "textValue": null. To retrieve values of all columns.com". { "recordData": { "fieldNames": [ "RIID_". Service URL: /rest/api/v1. "records": [ [ "4094326".1/lists/<listName>/members/<riid> Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Request parameters: fs . "matchOperator": null. "ab.cd@gmail. "9845349498" ]]. "updateOnMatch": null. Retrieve a member of a profile list using RIID Existing members of a profile list can be retrieved one at a time by using the Responsys ID (RIID). Please note that the total length of the string passed in for the fs parameter (containing the comma separated field names) cannot exceed 150 characters.comma separated list of fields to retrieve or ‘all’ Sample Response in case of success: NOTE: Other attributes in the response like mapTemplateName and mergeRule will have default values of null/false. Oracle Responsys REST API Developer’s Guide © 2016 Page 12 . "EMAIL_ADDRESS_". Also when either of the HASH_ keys exists as a match column. then only updates are possible. "MOBILE_NUMBER_" ]. "insertOnNoMatch": false. "mapTemplateName": null }. "matchColumnName3": null.EMAIL_MD5_HASH_ EMAIL_SHA256_HASH_ Also note that a combination of either of the HASH keys or a combination of EMAIL_ADDRESS_ with either of the HASH_ keys cannot be given as matchColumns at the same time. thus the corresponding value in insertOnNoMatch should be set to false when using these columns as matchColumns. "links": [ { "rel": "self". ‘e’. you can specify only one field with value set to ‘all’ (if you have a column called ‘all’.1/lists/<listName>/members Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Request parameters: qa – Query Attribute.1/lists/DemoNewsLetterList/members". "optoutValue": null. To retrieve values of all columns. "method": "GET" }. "errorDetails": [] } Retrieve a member of a profile list based on query attribute Existing members of a profile list can be retrieved one at a time by using a query attribute if the Responsys ID (RIID) for the member is not available.email_address_. Can be either ‘r’. "detail": "No records found in the list for given ids". Service URL: /rest/api/v1. "title": "Record not found". "method": "POST" } ] } Sample Response in case of failure: { "type": "". "href": "/rest/api/v1. "href": "/rest/api/v1. "rejectRecordIfChannelEmpty": null. "defaultPermissionStatus": null }."matchColumnName2": null. "optinValue": null. Please note that the total length of the string passed in for the fs parameter (containing the comma separated field names) cannot exceed 150 characters. "errorCode": "RECORD_NOT_FOUND". ‘c’ or ‘m’ id – ID corresponding to the query attribute fs – Comma separated field list or ‘all’ Sample Response in case of success: Oracle Responsys REST API Developer’s Guide © 2016 Page 13 . you should use two or more specific column names to avoid getting all of the columns). { "rel": "mergeListRecipients". mobile_number_".1/lists/DemoNewsLetterList/members/4094326?fs=riid_. "htmlValue": null. "detail": "Column(s) [CUSTOMER_ID] not found in the list". "optinValue": null. { "rel": "mergeListRecipients". "htmlValue": null. "title": "Invalid field name". "CUSTOMER_ID_" ]. "optoutValue": null. "EMAIL_ADDRESS_".cus tomer_id_&id=9845349498". "insertOnNoMatch": false. { "recordData": { "fieldNames": [ "RIID_".email_address_.1/lists/DemoNewsLetterList/members". "errorDetails": [] } Oracle Responsys REST API Developer’s Guide © 2016 Page 14 . "href": "/rest/api/v1. "ab.com". "method": "GET" }. "matchColumnName1": null. "mergeRule": { "textValue": null. "links": [ { "rel": "self". null ] ][email protected]@gmail. "href": "/rest/api/v1.com". "records": [ [ "4094330". "mapTemplateName": null }. [ "4094326". "rejectRecordIfChannelEmpty": null. "updateOnMatch": null. null ]. "matchOperator": null. "matchColumnName3": null. "method": "POST" } ] } Sample Response in case of failure: { "type": "".1/lists/DemoNewsLetterList/members?qa=m&fs=riid_. "defaultPermissionStatus": null }. "ab. "errorCode": "INVALID_FIELD_NAME".NOTE: Other attributes in the response like mapTemplateName and mergeRule will have default values of null/false. "matchColumnName2": null. "optinValue": null. "insertOnNoMatch": false }. "mergeRule": { "textValue": null. Oracle Responsys REST API Developer’s Guide © 2016 Page 15 . an error message starting with “DELETEFAILED:” is returned. "href": "/rest/api/v1.1/lists/DemoProfileList/members". In case delete failed for a record for some reason.Delete Profile List Recipients based on RIID This API is used to delete a profile list member by specifying the RIID for that member. {{ "recordData": { "fieldNames": ["RIID_"]. "matchColumnName3": null. the “RIID_” of the record is not present in the response. "updateOnMatch": null. Client developers can look for the string “DELETEFAILED:” in the response for a particular row to determine whether that recipient was deleted successfully or not. "matchColumnName1": null. "matchColumnName2": null. "defaultPermissionStatus": null. "links": [ { "rel": "self". "method": "DELETE" }. Instead. "matchOperator": null. "optoutValue": null. "method": "POST" }. "href": "/rest/api/v1. "records": [["1561"]]. Also note that other attributes in the response (mapTemplateName. "rejectRecordIfChannelEmpty": null. Service URL: /rest/api/v1. { "rel": "mergeListRecipients". "mapTemplateName": null }.1/lists/DemoProfileList/members/1561".1/lists/<listName>/members/<riid> Request Method: DELETE Request Header: Authorization=<AUTH_TOKEN> Sample Response in case of success: Note: The response will always contain only ‘RIID_” in the ‘fieldNames” attribute and the corresponding “RIID_” values for the records in the “records” attribute in case the deletion of that record is successful. "htmlValue": null. mergeRule will have default values (null/false)). "errorCode": "NO_RECIPIENT_FOUND". "href": "/rest/api/v1. "rejectRecordIfChannelEmpty": null. "href": "/rest/api/v1. "detail": "Record not Found in the List. "href": "/rest/api/v1. "matchColumnName1": null. "updateOnMatch": null. "href": "/rest/api/v1.1/lists/DemoProfileList/members".1/lists/DemoProfileList/members/abcde". "defaultPermissionStatus": null. "htmlValue": null. "records": [["DELETEFAILED: ERROR: The value abdce is not valid for an integer field"]]. "matchColumnName2": null. "links": [ { "rel": "self". "errorDetails": [] } Sample Response in case of failure: { "recordData": { "fieldNames": ["RIID_"]. "optoutValue": null. "method": "POST" }. "title": "No recipient found". "method": "GET" } ] } Sample Response in case recipient is not found: { "type": "". "mergeRule": { "textValue": null. "mapTemplateName": null }. "method": "DELETE" }. "insertOnNoMatch": false }.1/lists/DemoProfileList/members/<riid>".".{ "rel": "retrieveListRecipientsRIID".1/lists/DemoProfileList/members/<riid>". "matchOperator": null. { "rel": "mergeListRecipients". "matchColumnName3": null. { "rel": "retrieveListRecipientsRIID". "optinValue": null. "method": "GET" } ] } Oracle Responsys REST API Developer’s Guide © 2016 Page 16 . "fieldType": "STR500" }. "fieldType": "INTEGER" }. { "fieldName": "ENAME". retrieved. { "fieldName": "CREATED_DATE_". its profile extension tables can be retrieved. "fieldType": "STR500" }. updated. "fieldType": "INTEGER" }. Retrieve all profile extensions of a profile list This interface is to retrieve all profile extension tables (PETs) associated with a given profile list table.1/lists/<listName>/listExtensions Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Request Parameters: None Sample Response in case of success: Note: The response is a collection of all PETs for the specified Profile List. [{ "profileExtension": { "objectName": "WS_Auto_RIPET". Service URL: /rest/api/v1.Managing Profile Extension Tables For a given profile list table. and for an existing profile extension table. { "fieldName": "LAST_MOD_BY_LOAD_JOB_ID_". "fieldType": "INTEGER" }. { "fieldName": "CREATED_BY_LOAD_JOB_ID_". its members can be added. "fields": [ { "fieldName": "RIID_". "fieldType": "TIMESTAMP" Oracle Responsys REST API Developer’s Guide © 2016 Page 17 . "folderName": "WS_Auto_RIFolder" }. or deleted. Each of the individual objects in the collection represents a Profile Extension Object with a link ‘Create a Profile Extension’ for the Profile List. Also new profile extension tables can be created. { "fieldName": "EMPID". "fieldType": "STR255" } ]. "detail": "WS_Auto_RILISTs is an invalid list. "fieldType": "STR50" }. { "fieldName": "MODIFIED_DATE_". "fieldType": "TIMESTAMP" }. { "fieldName": "EMAIL_SHA256_HASH_". { "fieldName": "LAST_BULK_LOAD_ID_". "errorCode": "LIST_NOT_FOUND".". "fieldType": "INTEGER" }.1/lists/WS_Auto_RILIST/listExtensions". "fieldType": "CHAR" }.}. { "fieldName": "EMAIL_PERMISSION_STATUS_". { "fieldName": "EMAIL_DOMAIN_". { "fieldName": "CUSTOMER_ID_". { "fieldName": "EMAIL_ADDRESS_". { "fieldName": "EMAIL_DELIVERABILITY_STATUS_". "title": "List not found". "errorDetails": [] } Oracle Responsys REST API Developer’s Guide © 2016 Page 18 . { "fieldName": "EMAIL_MD5_HASH_". "href": "/rest/api/v1. { "fieldName": "EMAIL_FORMAT_". "fieldType": "CHAR" }. { "fieldName": "EMAIL_ISP_". "fieldType": "STR255" }. "fieldType": "STR500" }. "fieldType": "STR100" }. "method": "POST" }] }] Sample Response in case of failure: { "type": "". "fieldType": "CHAR" }. "fieldType": "STR255" }. "links": [ { "rel": "createProfileExtensionTable". "detail": "WS_REST_SAMPLESS Folder Not Found". an array of record data that contain field names and their corresponding field values are specified. "errorCode": "FOLDER_NOT_FOUND". "fields":[{"fieldName":"edu". For a given profile extension table. new members can be added or data for existing members can be updated. Service URL: /rest/api/v1.1/lists/<listName>/listExtensions/<petName>/members Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: Oracle Responsys REST API Developer’s Guide © 2016 Page 19 . Up to two match columns can be used for merging records into a profile extension table. If only one match column is specified. Up to 200 members can be processed in a single request.1/lists/<listName>/listExtensions Request Method: POST Request JSON Body: { "profileExtension" : { "objectName":"ws_rest_petx". "folderName":"WS_REST_SAMPLE"}. Service URL: /rest/api/v1. Please see the definition of merge rule parameters provided at the end of this document. "title": "Folder not found". "fieldType" : "STR500"}] } Request Header: Authorization=<AUTH_TOKEN> Response if successful: true Sample Response if failed: { "type": "".Create a new profile extension table A new profile extension table can be created for a given profile list by providing the schema of the profile extension table. the other match column can be set to null. "errorDetails": [] } Merge or update members in a profile extension table For an existing profile extension table. "23423".{ "recordData" : { "fieldNames" : ["riid_". MOBILE_NUMBER. "records": [ ["1761408"].com”. Oracle Responsys REST API Developer’s Guide © 2016 Page 20 . insertOnNoMatch. "records" : [ ["1761408". Instead. "mapTemplateName": null }. "salary"]. CUSTOMER_ID."23423"]. even if matching records are not found in the table.com”. an error message starting with “MERGEFAILED:” is returned. EMAIL_MD5_HASH and EMAIL_SHA256_HASH. ["MERGEFAILED: Record 3 = Field Names length.com”. "updateOnMatch" : "REPLACE_ALL". EMAIL_ADDRESS. updateOnMatch and matchColumn will mirror the valid values specified in the request payload or default to null/false in case of invalid values. “email_address_”. doesn't match with Field Values length\r\n"]. “foo@baz. "298909"]. Also note that the order of records in the response matches the order of records specified in the request payload. “bar@baz. "mapTemplateName" : null }. The email hash attributes (EMAIL_MD5_HASH or EMAIL_SHA256_HASH) are only used for updating existing records. MatchColumn attribute can have the following possible values: RIID. other attributes in the response like mapTemplateName. "10000"]. ["xyz". "matchColumn": "RIID". Please note that new records will not be inserted for ‘insertOnNoMatch’ if matchColumn is either EMAIL_MD5_HASH or EMAIL_SHA256_HASH. “bar@foo. In case merge failed for a record. ["98798". “foo@bar. ["1761409". ["1761409"] ]. the response will always contain only ‘RIID_” in the ‘fieldNames” attribute and the corresponding “RIID_” values for the records in the “records” attribute. { "recordData": { "fieldNames": ["RIID_"].com”. "updateOnMatch": "REPLACE_ALL". Furthermore. "wedrfwe"]. ["MERGEFAILED: Record 2 = ERROR: The value xyz is not valid for an integer field\n\n\r\n"]. "239482734"] ]. "matchColumnName2" : "EMAIL_ADDRESS" } Sample Response in case of success: NOTE: Irrespective of what field names were used to perform the merge. Client developers can look for the string “MERGEFAILED:” in the response for a particular row to determine whether that recipient was merged successfully or not. ["MERGEFAILED: Record 1 = RECORD DOES NOT MATCH ANY CONTACTS IN THE LIST DemoNewsLetterList\r\n"]. ["12312". the “RIID_” of the record is not present in the response.com”. "insertOnNoMatch": true. "matchColumnName1" : "RIID". “baz@foo. "insertOnNoMatch" : true. "href": "/rest/api/v1. you should use two or more specific column names to avoid getting all of the columns). "errorCode": "INVALID_PARAMETER". Please note that the total length of the string passed in for the fs parameter (containing the comma separated field names) cannot exceed 150 characters. "method": "DELETE" } ] } Sample Response in case of failure: { "type": "". To retrieve values of all columns.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/member s/1761408?fs=salary. "detail": "Match Column is null".riid_ Oracle Responsys REST API Developer’s Guide © 2016 Page 21 . { "rel": "deleteProfileExtensionRecipientsRIID"."links": [ { "rel": "self". "href": "/rest/api/v1. Service URL: /rest/api/v1. you can specify only one field with value set to ‘all’ (if you have a column called ‘all’.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members /<riid>".1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members /<riid>". "method": "POST" }. "title": "Invalid request parameters".comma separated list of fields to retrieve or ‘all’ Sample Request: /rest/api/v1. "href": "/rest/api/v1. "errorDetails": [] } Retrieve a member of a profile extension table based on RIID Existing members of a profile extension table can be retrieved one at a time by specifying the member’s Responsys ID (RIID). "method": "GET" }.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members ".1/lists/<listName>/listExtensions/<petName>/members/<riid> Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Request parameters: fs . { "rel": "retrieveProfileExtensionRecipientsRIID". insertOnNoMatch. "method": "GET" }. "method": "DELETE" } ] } Sample Response in case of failure: { "type": "". "title": "Record not found". "errorCode": "RECORD_NOT_FOUND". Please note that the total length of the string passed in for the fs parameter (containing the comma separated field names) cannot exceed 150 characters. "matchColumn": null. "mapTemplateName": null }. "href": "/rest/api/v1. you can specify Oracle Responsys REST API Developer’s Guide © 2016 Page 22 . "errorDetails": [] } Retrieve a member of a profile extension table based on a query attribute Existing members of a profile extension table can be retrieved one at a time by specifying a unique identifier other than the member’s Responsys ID (RIID) through the query attribute of the interface.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members /1761408?fs=salary.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members ". "links": [ { "rel": "self". "detail": "No records found in the table for the given ids". { "rel": "mergeProfileExtensionRecipients".riid_". "updateOnMatch": null.Sample Response in case of success: NOTE: Other attributes in the response like mapTemplateName. "RIID_" ]. "href": "/rest/api/v1. "href": "/rest/api/v1. updateOnMatch and matchColumn will have default values (null/false). { "rel": "deleteProfileExtensionRecipientsRIID". { "recordData": { "fieldNames": [ "SALARY". "method": "POST" }.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members /<riid>". "records": [ [ "10000". "insertOnNoMatch": false. To retrieve values of all columns. "1761408" ]]. "SALARY" ]. "matchColumn": null. "239482734" ]]. Sample Response in case of success: NOTE: Other attributes in the response like mapTemplateName.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members ?qa=e&fs=riid_. Oracle Responsys REST API Developer’s Guide © 2016 Page 23 . "method": "POST" }. "insertOnNoMatch": false. "href": "/rest/api/v1. "links": [ { "rel": "self".com". { "rel": "mergeProfileExtensionRecipients". Service URL: /rest/api/v1. updateOnMatch and matchColumn will have default values (null/false). "records": [ [ "1761409". you should use two or more specific column names to avoid getting all of the columns). ‘e’. insertOnNoMatch. Can be either ‘r’. { "rel": "deleteProfileExtensionRecipientsRIID".1/lists/<listName>/listExtensions/<petName>/members Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Request Parameters: qa – Query Attribute.only one field with value set to ‘all’ (if you have a column called ‘all’. fs – Comma separated list of field names or ‘all’ id – ID corresponding to the query attribute.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members ". "method": "GET" }. "href": "/rest/api/v1. { "recordData": { "fieldNames": [ "RIID_". ‘c’ or ‘m’. "mapTemplateName": null }. "updateOnMatch": null.salary&id=responsysblr@gmail. insertOnNoMatch. Instead. Service URL: /rest/api/v1. "errorCode": "RECORD_NOT_FOUND". "updateOnMatch": null.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members /<riid>". "mapTemplateName": null }. { "recordData": { "fieldNames": ["RIID_"]. the “RIID_” of the record is not present in the response. an error message starting with “DELETEFAILED:” is returned."href": "/rest/api/v1.1/lists/<listName>/listExtensions/<petName>/members/<riid> Request Method: DELETE Request Header: Authorization=<AUTH_TOKEN> Request parameters: None. "method": "DELETE" } ] } Sample Response in case of failure: { "type": "". "insertOnNoMatch": false. "title": "Record not found". updateOnMatch and matchColumn will have default values (null/false). "matchColumn": null. Sample Response in case of success: Note: The response will always contain only ‘RIID_” in the ‘fieldNames” attribute and the corresponding “RIID_” values for the records in the “records” attribute in case the deletion of that record is successful. "detail": "No records found in the table for the given ids". "records": [["1761409"]]. "errorDetails": [] } Delete a member of a profile extension table based on RIID Existing members of a profile extension table can be deleted one at a time by specifying the Responsys ID (RIID). Client developers can look for the string “DELETEFAILED:” in the response for a particular row to determine whether that recipient was deleted successfully or not. In case delete failed for a record. Furthermore. "links": [ { "rel": "self". Oracle Responsys REST API Developer’s Guide © 2016 Page 24 . other attributes in the response like mapTemplateName. { "rel": "mergeProfileExtensionRecipients". "method": "POST" }.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members /1761409".1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members ". "href": "/rest/api/v1. "href": "/rest/api/v1.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members ". "links": [ { "rel": "self".1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members /1761409". "href": "/rest/api/v1. "updateOnMatch": null. "href": "/rest/api/v1. "insertOnNoMatch": false. { "rel": "mergeProfileExtensionRecipients". "matchColumn": null.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members /<riid>". "mapTemplateName": null }. "records": [["DELETEFAILED: NO records found for id\n"]]. "method": "GET" } ] } Sample Response in case of failure: { "recordData": { "fieldNames": ["RIID_"]. "method": "POST" }. "method": "DELETE" }.1/lists/DemoNewsLetterList/listExtensions/DemoNewsLetterPet/members /<riid>". "method": "DELETE" }. "href": "/rest/api/v1. { "rel": "retrieveProfileExtensionRecipientsRIID"."href": "/rest/api/v1. "method": "GET" } ] } Oracle Responsys REST API Developer’s Guide © 2016 Page 25 . { "rel": "retrieveProfileExtensionRecipientsRIID". Managing Supplemental Tables New supplemental tables can be created. or deleted.1/folders/<folderName>/suppData Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: { "table" : {"objectName": "WS_REST_SUPPDATA_NEW"}. "primaryKeys" : ["edu"] } Response if successful: true Sample Response if failed: { "type": "". its members can be added. retrieved. updated. { "fieldName":"grade". Service URL: /rest/api/v1. "errorDetails": [] } Merge supplemental table records using primary key For an existing supplemental table. "dataExtractionKey" : false }]. "dataExtractionKey" : false }. "fieldType" : "STR500". Create a new supplemental table A new supplemental table can be created by providing its schema. "fieldType" : "STR500". "dataExtractionKey" : false}. new members can be added or data for existing members can be updated. For a given supplemental table in a specific folder. and for an existing supplemental table.". "fieldType" : "STR500". "fields" : [{ "fieldName":"edu". an array of record data that contains field names and their corresponding field values are specified along with ALL primary keys to identify the Oracle Responsys REST API Developer’s Guide © 2016 Page 26 . "title": "Invalid request parameters". { "fieldName":"uni". Please include Primary Key. "detail": "Create Table Without PK is not supported. "errorCode": "INVALID_PARAMETER". "insertOnNoMatch" : true. Also note that the order of records in the response matches the order of records specified in the request payload. "threerec". "F2".desired record. "threecol". updateOnMatch and matchColumn will mirror the valid values specified in the request payload or default to null/false in case of invalid values. "2"]. In case merge failed. Client developers can look for the string “MERGEFAILED:” in the response for a particular row to determine whether that recipient was merged successfully or not. "3"]. "1". "1". "records" : [ ["1". "fiverec". . "2". "mapTemplateName" : null }. "2"]. "PK2". "fivecol". "F1". ["1". ["1". "tworec". Also note that other attributes in the response like mapTemplateName. ["1". ""] ]. Merging supplemental table records for a table without primary keys is not available. "1"]. "PK2". "fourcol". "PK3"]. "PK3" [ Oracle Responsys REST API Developer’s Guide © 2016 Page 27 . "2". "twocol".1/folders/<folderName>/suppData/<tableName>/members Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Request JSON body: Note: All the Primary Key Fields of the table must be specified in the “fieldnames” attribute along with their corresponding values in the “records” attribute. the record in the response mirrors the record in the request payload. insertOnNoMatch. "fourrec". "F1". "1". ["1". Service URL: /rest/api/v1. "updateOnMatch" : "REPLACE_ALL" } Sample Response in case of success: NOTE: In case a record was merged successfully. "1". A maximum of 200 records can be merged in one request. { "recordData" : { "fieldNames" : ["PK1". the other elements in the record in the response are empty strings. "onerec". "F2". the first element of the record contains an error message starting with “MERGEFAILED:” and depending on the number of elements present in the record in the request. { "recordData": { "fieldNames": "PK1". "onecol". "insertOnNoMatch": true. "1". "href": "/rest/api/v1. "F1". "1". "threerec". "onecol". "fourrec". "links": [ { "rel": "self". "F2" ].1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/members". "". "threecol". [ "1". "" ] ]. "2" ]. "". "onerec". [ "1". "mapTemplateName": null }. "twocol". "2". doesn't match with Field Values length\r\n". "". "fourcol". "PK2". "1" ]. "2". "tworec". "2" ].]. "method": "POST" }] } Sample Response in case all primary key fields are not specified in the request payload: { "recordData": { "fieldNames": "PK1". "records": [ [ [ Oracle Responsys REST API Developer’s Guide © 2016 Page 28 . [ "1". [ "MERGEFAILED: Record 4 = Field Names length. "updateOnMatch": "REPLACE_ALL". "records": [ [ "1". "3" ]. an array of record data that contains field names and their corresponding field values are specified using a matchColumnNames attribute in the payload. new members can be added or data for existing members can be updated. MATCH FIELD CANNOT BE EMPTY\r\n". [ "MERGEFAILED: Record 1 = NOT UPDATED PER MERGE RULE. A maximum of 200 records can be merged in one request. "insertOnNoMatch": true. [ "MERGEFAILED: Record 2 = NOT UPDATED PER MERGE RULE. "". "method": "POST" }] } Sample Response in case of failure: { "type": "". For a given supplemental table in a specific folder. "" ]. "". "errorCode": "INVALID_PARAMETER". Service URL: /rest/api/v1. "". "href": "/rest/api/v1. "detail": "Invalid template mapping xuy".1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/members".1/folders/<folderName>/suppData/<tableName>/members Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Oracle Responsys REST API Developer’s Guide © 2016 Page 29 . "updateOnMatch": "REPLACE_ALL". "" ] ]. "title": "Invalid request parameters". "" ]. MATCH FIELD CANNOT BE EMPTY\r\n". MATCH FIELD CANNOT BE EMPTY\r\n". "links": [ { "rel": "self". "errorDetails": [] } Merge supplemental table records without primary key For an existing supplemental table. "". "". "". "mapTemplateName": null }."MERGEFAILED: Record 0 = NOT UPDATED PER MERGE RULE. "insertOnNoMatch" : true. Furthermore. Also note that the order of records in the response matches the order of records specified in the request payload. the other elements in the record in the response are empty strings. the record in the response mirrors the record in the request payload. "insertOnNoMatch": true.Request JSON body: Note: the “matchColumnNames” attribute in the payload is used to identify the column to use to match to a record in the supplemental table without a primary key. "updatedvalues" ]]. "records" : [ ["onerec". "matchColumnNames": ["F1"]. "updatedvalues"] ]. this interface enforces that ‘insertOnNoMatch’ is ‘true’ and ‘updateOnNoMatch’ is ‘REPLACE_ALL’ in the request payload. "mapTemplateName" : null }. "updateOnMatch": "REPLACE_ALL". In case merge failed for a record for some reason. Client developers can look for the string “MERGEFAILED:” in the response for a particular row to determine whether that recipient was merged successfully or not. "method": "POST" }] } Oracle Responsys REST API Developer’s Guide © 2016 Page 30 . the first element of the record contains an error message starting with “MERGEFAILED:” and depending on the number of elements present in the record in the request. "href": "/rest/api/v1. "matchColumnNames" : ["F1"] } Sample Response in case of success: Note: In case a record was merged successfully. "records": [[ "onerec". "updateOnMatch" : "REPLACE_ALL". "F2" ]. { "recordData": { "fieldNames": [ "F1". "F2"]. "links": [ { "rel": "self".1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/members". other attributes in the response (mapTemplateName. Furthermore. insertOnNoMatch. updateOnMatch and matchColumnNames) will mirror the valid values specified in the request payload or default to null/false in case of invalid values. { "recordData" : { "fieldNames" : ["F1". "mapTemplateName": null }. Sample Response in case matchColumnNames and fieldNames specified cannot be used to identify records to merge: Sample Payload: { "recordData" : { "fieldNames" : ["PK1". "links": [ { Oracle Responsys REST API Developer’s Guide © 2016 Page 31 . "". "1". "". "onerec". "records": [ [ "MERGEFAILED: Unable to identify record to Merge from the Match Columns and FieldNames Specified. "matchColumnNames": ["F1"]. "onecol". "". "insertOnNoMatch" : true.". "PK3" ]. "1". "onecol". "" ] ]. "". ["1". "mapTemplateName": null }. "3"] ]. "" ]. "F2". "onerec". "F1". "2"]. "F2". "updateOnMatch" : "REPLACE_ALL".". "insertOnNoMatch": true. "PK3"]. "". "PK2". "mapTemplateName" : null }. "". "updateOnMatch": "REPLACE_ALL". "matchColumnNames" : ["F1"] } Response: { "recordData": { "fieldNames": [ "PK1". "1"]. [ "MERGEFAILED: Unable to identify record to Merge from the Match Columns and FieldNames Specified. "". ["1". "". [ "MERGEFAILED: Unable to identify record to Merge from the Match Columns and FieldNames Specified. "records" : [ ["1". "1". "onecol".". "" ]. "F1". "onerec". "PK2". "". "insertOnNoMatch" : false."rel": "self". "records" : [ ["onerec". "updateOnMatch" : "REPLACE_ALL". "F2"]. "updatedvalues"] ].1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/members". "updatedvalues"] ]. "errorDetails": [] Oracle Responsys REST API Developer’s Guide © 2016 Page 32 . "mapTemplateName" : null }. "records" : [ ["onerec". "errorCode": "INVALID_PARAMETER". "insertOnNoMatch" : false. "errorCode": "INVALID_PARAMETER". "method": "POST" }] } Sample Response in case insertOnMatch or updateOnNoMatch are invalid Sample Payload: { "recordData" : { "fieldNames" : ["F1". "matchColumnNames" : ["F1"] } Response: { "type": "". "errorDetails": [] } Sample Response in case matchColumnNames is not specified: Sample Payload: { "recordData" : { "fieldNames" : ["F1". "detail": "MatchColumnNames must be specified to merge into a table that does not have any primary keys". "detail": "insertOnNoMatch must be true and updateOnMatch must be REPLACE_ALL if matchColumnNames is specified". "mapTemplateName" : null }. "title": "Invalid request parameters". "href": "/rest/api/v1. "F2"]. "updateOnMatch" : "REPLACE_ALL". "title": "Invalid request parameters". "matchColumnNames" : null } Response: { "type": "". F2&id=1&id=1&id=1 Sample Response in case of success: NOTE: Other attributes in the response like mapTemplateName. To retrieve values of all columns. "F2" ]. insertOnNoMatch. you should use two or more specific column names to avoid getting all of the columns).PK2. "F1". Service URL: /rest/api/v1 /folders/<folderName>/suppData/<tableName>/members Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Request Parameters: qa – Query Attribute.1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/members?qa= PK1&qa=PK2&qa=PK3&fs=PK1. All of the Primary Key values of the Supplemental Table must be specified by repeating this parameter. fs – Comma separated list of field names or ‘all’ id – IDs corresponding to the query attribute. { "recordData":{ "fieldNames":[ "PK1". Please note that the total length of the string passed in for the fs parameter (containing the comma separated field names) cannot exceed 150 characters. "PK3". "records":[ [ "1".PK3.F1.} Retrieve supplemental table records with primary key This interface is to retrieve Supplemental Table Records by specifying the primary key values using the request parameters. you can specify only one field with value set to ‘all’ (if you have a column called ‘all’. "onerec". The order of the values must match the order of the Primary Keys specified in the ‘qa’ parameter. All the Primary Key Values of the Supplemental Table must be specified by repeating this parameter. "1". "onecol" ] ]. updateOnMatch and matchColumn will have default values (null/false). "PK2". "1". Sample Request: /rest/api/v1. Oracle Responsys REST API Developer’s Guide © 2016 Page 33 . "errorCode": "INVALID_PARAMETER". Service URL: /rest/api/v1.F1. PK3] must be specified as Query Columns. "updateOnMatch":null.PK3.1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/membe rs".PK2. "title": "Invalid field name". "title": "Invalid request parameters". "errorCode": "INVALID_FIELD_NAME"."mapTemplateName":null }.1/lists /folders/<folderName>/suppData/<tableName>/members Request Method: DELETE Request Header: Authorization=<AUTH_TOKEN> Request Parameters: Oracle Responsys REST API Developer’s Guide © 2016 Page 34 . "insertOnNoMatch":false.F2&id=1&id=1&id=1". "method":"GET" }. "errorDetails": [] } Delete supplemental table records This interface is to delete a Supplemental Table Records by specifying the primary key using request parameters. PK2. { "rel":"mergeTableMembers".1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/membe rs?qa=PK1&qa=PK2&qa=PK3&fs=PK1. "errorDetails": [] } Sample Response in case ALL Primary Key Columns are not specified in the ‘qa’ request parameter: { "type": "". "links":[ { "rel":"self".". "method":"POST" } ] } Sample Response in case of failure: { "type": "". "detail": "Column(s) [F1] is not indexed". "href":"/rest/api/v1. "detail": "All and Only the Primary Keys in the Table [PK1. "href":"/rest/api/v1. F1. "href":"/rest/api/v1. insertOnNoMatch. "updateOnMatch":null. the record in the response contains an error message starting with “DELETEFAILED:”. other attributes in the response like mapTemplateName. "method":"DELETE" }. Furthermore.F2&id=1&id=1&id=1". All the Primary Keys of the Supplemental Table must be specified by repeating this parameter.F2&id=1&id=1&id=1 Sample Response in case of success: NOTE: The response will always contain all the query attributes specified in the request parameter in the ‘fieldNames” attribute and the corresponding values for the records in the “records” attribute in case the deletion of that record is successful. All the Primary Key Values of the Supplemental Table must be specified by repeating this parameter. an error response saying “No Records found for the Id” is returned. In case a record is found and delete failed for some reason. The order of the values must match the order of the Primary Keys specified in the ‘qa’ parameter. "method":"POST" } Oracle Responsys REST API Developer’s Guide © 2016 Page 35 . "PK2".PK3. "mapTemplateName":null }. Sample Request: rest/api/v1. "PK3" ]. "records":[ [ "1".PK3. { "rel":"mergeTableMembers".PK2.1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/members?qa=P K1&qa=PK2&qa=PK3&fs=PK1. In case a record is not found for the given id. id – IDs corresponding to the query attribute.PK2. "1". "href":"/rest/api/v1. "1" ] ]. Client developers can look for the string “DELETEFAILED:” in the response for a particular row to determine whether that record was deleted successfully or not. updateOnMatch and matchColumn will have default values (null/false). { "recordData":{ "fieldNames":[ "PK1". "links":[ { "rel":"self".1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/membe rs?qa=PK1&qa=PK2&qa=PK3&fs=PK1. "insertOnNoMatch":false.qa – Query Attribute.F1.1/folders/DemoNewsLetter/suppData/CompositePKSuppTable/membe rs". For the list associated with the specified email campaign. "errorCode": "RECORD_NOT_FOUND". Please see the definition of merge rule parameters provided at the end of this document. "errorDetails": [] } Sample Response in case ALL Primary Key Columns are not specified in the ‘qa’ request parameter: { "type": "". "concord" Oracle Responsys REST API Developer’s Guide © 2016 Page 36 . Merge members into a profile list and trigger email messages to them Responsys email campaigns that already exist can be sent to up to 200 members of a profile list. "errorCode": "INVALID_PARAMETER". PK2. Service URL: /rest/api/v1. "martiness" ] }.com". "title": "Invalid request parameters".com". The following allows merging members into a profile list and subsequently sending them an email message.1234@foobarcorp.] } Sample Response in case of failure: { "type": "".". "detail": "All and Only the Primary Keys in the Table [PK1. "detail": "No records found in the table for the given ids". an array of record data that contain field names and their corresponding field values are specified. "errorDetails": [] } Triggering Email Messages Responsys can send personalized email messages to email addresses. PK3] must be specified as Query Columns.1/campaigns/<campaignName>/email Request Method: POST Request JSON Body: { "recordData": { "records": [ { "fieldValues": [ "mdi1234@foobar. "title": "Record not found". { "fieldValues": [ "mdi. "rejectRecordIfChannelEmpty": "E". "triggerData": [ { "optionalData": [ { "name": "FIRST_NAME". "value": "jim_2" }. "mergeRule": { "htmlValue": "H". Oracle Responsys REST API Developer’s Guide © 2016 Page 37 . "value": "smith_2" } ] } ] } Request Header: Authorization=<AUTH_TOKEN> Sample Response: [ { "errorMessage" : null. "value": "smith_1" } ] }. "defaultPermissionStatus": "OPTIN". { "name": "LAST_NAME". "value": "jim_1" }. "fieldNames": [ "EMAIL_ADDRESS_". "updateOnMatch": "REPLACE_ALL". "textValue": "T". "matchColumnName1": "EMAIL_ADDRESS_". "recipientId" : 72067 }.] } ]. "insertOnNoMatch": true. "optinValue": "I". { "optionalData": [ { "name": "FIRST_NAME". "matchColumnName2": null. "optoutValue": "O". "success" : true. { "name": "LAST_NAME". "CITY_" ] }. "matchOperator": "NONE" }. "matchColumnName3": null. { "errorMessage" : null. "objectName" : "wsrest" }. "mobileNumber" : null.com". "emailFormat" : "HTML_FORMAT" }."success" : true. { "name" : "CUSTOM2".com". "recipientId" : -1 } ] Trigger email message The following allows triggering email messages to existing members of a profile list. "mobileNumber" : null. "recipientId" : 72087 }. "value" : "c1b_value_new" }. "listName" : { "folderName" : "WS_REST_SAMPLE". "recipientId" : null. "emailAddress" : "foo. Service URL: /rest/api/v1.1/campaigns/<campaignName>/email Request Method: POST Request JSON Body: { "recipientData" : [{ "recipient" : { "customerId" : "1". "success" : false. { "name" : "CUSTOM2". "emailAddress" : "baz. "value" : "c1a_value_new" }.bar@oracle. "value" : "c2b_value_new" Oracle Responsys REST API Developer’s Guide © 2016 Page 38 . { "errorMessage" :” RECIPIENT_STATUS_UNDELIVERABLE: Recipient deliverability status is undeliverable”. "objectName" : "wsrest" }. "listName" : { "folderName" : "WS_REST_SAMPLE". "recipientId" : null. "value" : "c2a_value_new" } ] }. "optionalData" : [{ "name" : "CUSTOM1". { "recipient" : { "customerId" : "2".foo@oracle. "optionalData" : [{ "name" : "CUSTOM1". "emailFormat" : "TEXT_FORMAT" }. "baz. “US”] } ] }. "EMAIL_ADDRESS_".foo@oracle. "updateOnMatch" : "NO_UPDATE". “US”] }.com". an array of record data that contain field names and their corresponding field values are specified. "recipientId" : 72067 }. "recipientId" : -1 } ] Triggering SMS Messages Responsys can send personalized SMS messages to mobile phone numbers. Oracle Responsys REST API Developer’s Guide © 2016 Page 39 .} ] } ] } Request Header: Authorization=<AUTH_TOKEN> Sample Response: [{ "errorMessage" : null. For the list associated with the specified SMS campaign. "6505551212". { "errorMessage" :” RECIPIENT_STATUS_UNDELIVERABLE: Recipient deliverability status is undeliverable ”. "success" : false. "records" : [{ "fieldValues" : ["1001". The following allows merging members into a profile list and subsequently sending them an SMS message. “MOBILE_COUNTRY_”]. { "fieldValues" : ["1002". "matchColumnName1" : "CUSTOMER_ID_".1/campaigns/<campaignName>/sms Request Method: POST Request JSON Body: { "recordData" : { "fieldNames" : ["CUSTOMER_ID_". "success" : true.bar@oracle. "foo. "mergeRule" : { "insertOnNoMatch" : true. "6505551212". Service URL: /rest/api/v1. "MOBILE_NUMBER_". "matchColumnName2" : null.com". Please see the definition of merge rule parameters provided at the end of this document. Merge members into a profile list and trigger SMS messages to them Responsys SMS campaigns that already exist can be sent to up to 200 members of a profile list. "success" : true. "rejectRecordIfChannelEmpty" : "E"."matchOperator" : "NONE". emailSHA256Hash or emailMD5Hash. The profile list members selected using these attributes are matched against the App Channel list to find the device ids of all devices to trigger push messages. Trigger Push Messages The following API allows triggering push messages to existing members of a profile list and its app channel list. Oracle Responsys REST API Developer’s Guide © 2016 Page 40 . { "errorMessage" : null. "defaultPermissionStatus" : "OPTIN" }. "textValue" : "T". "recipientId" : 72067 }. emailAddress. "success" : false. "htmlValue" : "H". the apiKey attribute can restrict the push message to trigger for one of those apps. "triggerData" : [{ "optionalData" : [{ "name" : "CITY_". "value" : "San Bruno" } ] } ] } Request Header: Authorization=<AUTH_TOKEN> Sample Response: [{ "errorMessage" : null. "success" : true. The profile list attributes that can be specified are one of recipientId. customerId. The listType attribute is “PROFILE” when recipients need to be matched from Profile List. "optinValue" : "I". An optional “apiKey” attribute can be specified so that push message will only be triggered for devices which match the apiKey. This means that if an end user has a single entry in a profile list but multiple entries in its app channel list for different apps. "optoutValue" : "O".{ "errorMessage" :” RECIPIENT_STATUS_UNDELIVERABLE: Recipient deliverability status is undeliverable ”. "recipientId" : -1 } ] Triggering Mobile Push Messages Responsys can deliver personalized messages to mobile apps using push messaging. mobileNumber. "recipientId" : 72087 }. The request payload allows specifying one of the available profile list attributes on the basis of which recipients are selected. "mobileNumber": null.com". "value": "c1a_value_new" }. "optionalData": [ { "name": "CUSTOM1". The “optionalData” attribute as part of the payload is used for customizing the push message. "apiKey": "API Key"[email protected] request payload also allows specifying a list of app channel attributes on the basis of which recipients are selected. { "name": "CUSTOM2". "mobileNumber": null. "optionalData": [ { "name": "CUSTOM1". "emailAddress": null. "emailMD5Hash": null. Service URL: /rest/api/v1. "deviceId": null. "recipientId": null. { "name": "CUSTOM2". "emailAddress": "foo. "emailSHA256Hash": null. "listType": "PUSH". "value": "c2a_value_new" } ] Oracle Responsys REST API Developer’s Guide © 2016 Page 41 . "deviceId": "device Id". { "customerId": null. "value": "c2a_value_new" } ] }. "value": "c1a_value_new" }. "recipientId": null. "apiKey": "API Key". The listType attribute is “PUSH” when recipients need to be matched from app channel List. The app channel attributes that can be specified are both deviceId and apiKey.1/campaigns/<campaignName>/push Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Sample Request: { "receipientData": [ { "customerId": null. "listType": "PROFILE". "title": "Campaign not found". "eventStringDataMapping" : null }. The following API is used to trigger a specific custom event.{ "errorMessage" :” RECIPIENT_STATUS_UNDELIVERABLE: Recipient deliverability status is undeliverable ”.1/events/<eventName> Request Method: POST Request JSON Body: { "customEvent" : { "eventNumberDataMapping" : null. "recipientId" : -1 } ] Sample Response in case of failure: { "type": "". "errorDetails": [] } Raising Custom Events for Cross-channel Marketing Programs You can set up a Program to listen for one or more custom events. "recipientId" : 72067 }. "errorCode": "CAMPAIGN_NOT_FOUND". Trigger a custom event Service URL: /rest/api/v1. which in turn can start a program or be used in a program event switch. "detail": "Campaign not found with name [campaignName]" . "recipientData" : [{ Oracle Responsys REST API Developer’s Guide © 2016 Page 42 . "success" : true. "eventDateDataMapping" : null. The Program will use the existing members of a profile list that are specified in the API request.} ] } Sample Response in case of success: [{ "errorMessage" : null. "success" : false. "proofLaunchType": "LAUNCH_TO_EMAIL". "recipientId" : null. Oracle Responsys REST API Developer’s Guide © 2016 Page 43 .com". "proofLaunchEmail": "someemail@a. "samplingNthSelection": 1. Service URL: /rest/api/v1. "emailAddress" : null.1/campaigns/{campaignName}/schedule Request Method: POST Required Attributes: scheduleType (ONCE or NOW) Request JSON Body: { "scheduleType": "ONCE". "value" : "value1" } ] } ] } Request Header: Authorization=<AUTH_TOKEN> Sample Response: [{ "errorMessage" : null. "mobileNumber" : null. "recipientLimit": 3. "listName" : { "folderName" : "WS_REST_SAMPLE". "recipientId" : 72067 } ] Managing Email Campaigns The following interfaces are for managing existing Responsys EMD email campaign objects. "scheduledTime": "2015-05-25 06:00 AM". "launchOptions": { "proofLaunch": true. "success" : true. Schedule email campaign This API is for scheduling an existing EMD email campaign for immediate or future launch. "optionalData" : [{ "name" : "CUSTOM1"."recipient" : { "customerId" : 1. "emailFormat" : "HTML_FORMAT" }. "objectName" : "wsrest" }. "scheduleType": "ONCE". "progressChunk": "CHUNK_10K". "method": "DELETE" } ] } Oracle Responsys REST API Developer’s Guide © 2016 Page 44 .1/campaigns/<campaign_name>/schedule/<id>". "samplingNthOffset": 1. "progressEmailAddresses": [ "email1@a. "recipientLimit": 3. "href": "rest/api/v1. "links": [ { "rel": "self". "[email protected]/campaigns/<campaign_name>/schedule/<id>". "href": "rest/api/v1. "samplingNthSelection": 1. "method": "GET" }."samplingNthOffset": 1.com" ]. "email2@a. { "rel": "getSchedule". "samplingNthInterval": 1. "method": "POST" }. "proofLaunchType": "LAUNCH_TO_EMAIL". "launchOptions": { "proofLaunch": true. "href": "/rest/api/v1. "scheduledTime": "2015-05-25 06:00 AM".com".com".1/campaigns/<campaign_name>/schedule/<id>".1/campaigns/<campaignName>/schedule".com". { "rel": "updateSchedule". "samplingNthInterval": 1. "method": "PUT" }. "progressChunk": "CHUNK_10K" } } Request Header: Authorization=<AUTH_TOKEN> Response: { "id": 1.com" ]. "progressEmailAddresses": [ "email1@a. "href": "/rest/api/v1. { "rel": "deleteSchedule". "proofLaunchEmail": "someemail@a. "proofLaunchType": "LAUNCH_TO_EMAIL". "progressChunk": "CHUNK_10K".1/campaigns/<campaign_name>/schedule/<id>". "samplingNthOffset": 1.1/campaigns/<campaign_name>/schedule". "method": "GET" }. "method": "PUT" }.com" ]. "launchOptions": { "proofLaunch": true. "[email protected]". "samplingNthSelection": 1.com". "scheduledTime": "2015-05-25 06:00 AM". "recipientLimit": 3.Get email campaign schedule This API is for getting the schedule of an EMD campaign using the campaign schedule ID that was returned from the schedule campaign API.1/campaigns/{campaignName}/schedule/{scheduleId} Request Method: GET Required Attributes: campaignName scheduleId Request: None Request Header: Authorization=<AUTH_TOKEN> Response: { "id": 1. "href": "rest/api/v1. { Oracle Responsys REST API Developer’s Guide © 2016 Page 45 . "method": "POST" }. "scheduleType": "ONCE". { "rel": "updateSchedule". "links": [ { "rel": "self". "proofLaunchEmail": "someemail@a. Service URL: /rest/api/v1. "samplingNthInterval": 1. "href": "/rest/api/v1. "progressEmailAddresses": [ "email1@a. { "rel": "createSchedule". "href": "/rest/api/v1.1/campaigns/<campaignName>/schedule/<scheduleId>". "method": "DELETE" } ] } } Get All Campaign Schedules This API returns all the schedules for an email campaign.1/campaigns/test/schedule". Oracle Responsys REST API Developer’s Guide © 2016 Page 46 . "href": "/rest/api/v1. "scheduledTime": "2015-11-30 01:00 AM". "href": "rest/api/v1. "scheduleType": "ONCE". Service URL: /rest/api/v1."rel": "deleteSchedule". { "rel": "updateSchedule". "href": "/rest/api/v1.1/campaigns/<campaign_name>/schedule/<id>".1/campaigns/test/schedule/1491". "links": [{ "rel": "self". "launchOptions": { "proofLaunch": false }.1/campaigns/{campaignName}/schedule Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Request Parameters: offset: starts at 0 and indicates the record number for the response result set limit: number of campaigns to return in the response (defaults to 200 and cannot exceed 200) Sample Response in case of success: { "schedules": [{ "id": 1491. "method": "GET" }. "method": "PUT" }, { "rel": "createSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule", "method": "POST" }, { "rel": "deleteSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule/1491", "method": "DELETE" }] }, { "id": 1492, "scheduleType": "ONCE", "scheduledTime": "2015-11-30 01:01 AM", "launchOptions": { "proofLaunch": false }, "links": [{ "rel": "self", "href": "/rest/api/v1.1/campaigns/test/schedule", "method": "GET" }, { "rel": "updateSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule/1492", "method": "PUT" }, { "rel": "createSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule", "method": "POST" }, { "rel": "deleteSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule/1492", "method": "DELETE" }] Oracle Responsys REST API Developer’s Guide © 2016 Page 47 }] } Sample Response in case of failure: { "title": "Campaign not found", "errorCode": "CAMPAIGN_NOT_FOUND", "detail": "Campaign not found with name [campaignName]" } Update email campaign schedule This API is for updating the schedule of an existing EMD email campaign using the schedule ID that was returned from schedule campaign API. Service URL: /rest/api/v1.1/campaigns/{campaignName}/schedule/{scheduleID} Request Method: PUT Required Attributes: campaignName scheduleId Request: { “scheduleType": "ONCE", "scheduledTime": "2015-11-30 1:00 AM" } Request Header: Authorization=<AUTH_TOKEN> Response: { "id": 1491, "scheduleType": "ONCE", "scheduledTime": "2015-11-30 01:00 AM", "launchOptions": { "proofLaunch": false }, "links": [ { "rel": "self", "href": "/rest/api/v1.1/campaigns/test/schedule/1491", "method": "PUT" }, { "rel": "deleteSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule/1491", "method": "DELETE" }, { "rel": "getSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule/1491", Oracle Responsys REST API Developer’s Guide © 2016 Page 48 "method": "GET" }, { "rel": "createSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule", "method": "POST" } ] } Delete email campaign schedule This API is for deleting the schedule of an existing EMD email campaign by using the schedule ID returned from the campaign schedule. Service URL: /rest/api/v1.1/campaigns/{campaignName}/schedule/{scheduleId} Request Method: DELETE Required Attributes: campaignName scheduleId Request: None Request Header: Authorization=<AUTH_TOKEN> Response: { "id": 1491, "scheduleType": "ONCE", "scheduledTime": "2015-11-30 01:00 AM", "launchOptions": { "proofLaunch": false }, "links": [ { "rel": "self", "href": "/rest/api/v1.1/campaigns/test/schedule/1491", "method": "DELETE" }, { "rel": "updateSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule/1491", "method": "PUT" }, { "rel": "getSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule/1491", "method": "GET" }, { "rel": "createSchedule", "href": "/rest/api/v1.1/campaigns/test/schedule", Oracle Responsys REST API Developer’s Guide © 2016 Page 49 "method": "POST" } ] } Managing Content Library Folders The following interfaces are available to create a content library folder, delete a content library folder and list the contents of a content library folder. Create content library folder This interface is used to create a content library folder. Service URL: /rest/api/v1.1/clFolders Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: { "folderPath" : "<folderPath>" } Sample Response in case of success: { "folderPath": "/contentlibrary/abn/f1/f2/f3", "links": [ { "rel": "self", "href": "/rest/api/v1.1/clFolders", "method": "POST" }, { "rel": "listContentLibraryFolders", "href": "/rest/api/v1.1/clFolders/contentlibrary/abn/f1/f2/f3", "method": "GET" }, { "rel": "deleteContentLibraryFolder", "href": "/rest/api/v1.1/clFolders/contentlibrary/abn/f1/f2/f3", "method": "DELETE" } ] } Sample Response in case of failure: Oracle Responsys REST API Developer’s Guide © 2016 Page 50 Service URL: /rest/api/v1. "links": [ { "rel": "self".{ "type": "". "errorDetails": [] } List contents of a content library folder This interface is used to list the contents of a content library folder. "href": "/rest/api/v1. for the entire account. "errorCode": "FOLDER_NOT_FOUND". replace the folderPath parameter with the value ‘contentlibrary’. i. "title": "Folder not found". "detail": "/contentlibrary/abn/f1/f2/f3".e. "errorDetails": [] } Delete content library folder This interface is used to delete a content library folder. To get the objects at the root level. Service URL: Oracle Responsys REST API Developer’s Guide © 2016 Page 51 . "href": "/rest/api/v1. { "rel": "createContentLibraryFolder".1/clFolders". "method": "POST" } ] } Sample Response in case of failure: { "type": "". "method": "DELETE" }. "title": "Folder already exists".1/clFolders/<folderPath> Request Method: DELETE Request Header: Authorization=<AUTH_TOKEN> Sample Response in case of success: { "folderPath": "/contentlibrary/abn/f1/f2/f3".1/clFolders/contentlibrary/abn/f1/f2/f3".. "errorCode": "FOLDER_ALREADY_EXISTS". "detail": "/contentlibrary/abn/f1/f2/f3". Determines what content of a folder needs to be listed.1/clDocs/contentlibrary/f1/doc2. Sample Response in case of success: { "folders": [ { "folderPath": "/contentlibrary/f1/sublevel-1". "documents": [ { "documentPath": "/contentlibrary/f1/doc2. "method": "POST" }. "method": "POST" } ] }wsrest_clwsrest_clwsrest_clwsrest_clwsrest_clwsrest_cl ]. "href": "/rest/api/v1. { "rel": "createDocument". "href": "/rest/api/v1.1/clFolders/<folderPath>?type=<objecttype> Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Request parameters: type .1/clDocs".1/clFolders". "href": "/rest/api/v1.1/clFolders/contentlibrary/f1/sublevel-1".1/clFolders/contentlibrary/f1/sublevel-1". { "rel": "setDocumentContent". ‘docs’ or ‘items’. "href": "/rest/api/v1./rest/api/v1. "method": "DELETE" }. so all contents of a folder need to be listed.htm". "links": [ { "rel": "listContentLibraryFolders". Allowed values are ‘all’. { "rel": "createContentLibraryFolder".htm". "content": null. "links": [ { "rel": "deleteDocument". "href": "/rest/api/v1. { "rel": "deleteContentLibraryFolder". "method": "DELETE" }.htm". { Oracle Responsys REST API Developer’s Guide © 2016 Page 52 . Value defaults to ‘all’. ‘folders’. "method": "POST" }. "method": "GET" }. "href": "/rest/api/v1.1/clDocs/contentlibrary/f1/doc2. 1/clItems/contentlibrary/f1/testcreate2050.png".1/clFolders/contentlibrary/f1". "href": "/rest/api/v1. "errorDetails": [] } Oracle Responsys REST API Developer’s Guide © 2016 Page 53 . "href": "/rest/api/v1. "items": [ { "itemPath": "/contentlibrary/f1/testcreate2050. "method": "POST" }. "href": "/rest/api/v1. "itemData": null.png". "title": "Invalid request parameters". "method": "GET" }. "method": "DELETE" } ] } Sample Response in case of failure: { "type": "".1/clDocs/contentlibrary/f1/doc2. "method": "GET" } ] }wsrest_clwsrest_clwsrest_clwsrest_clwsrest_clwsrest_clwsrest_clwsrest_cl ]. "method": "DELETE" }. "errorCode": "INVALID_PARAMETER". "href": "/rest/api/v1. { "rel": "createContentLibraryItem". "method": "GET" }. { "rel": "deleteContentLibraryItem".png". "links": [ { "rel": "self". "method": "POST" } ] } ]. "href": "/rest/api/v1.1/clFolders/contentlibrary/f1"."rel": "getDocumentContent". { "rel": "deleteContentLibraryFolder".1/clItems".1/clItems/contentlibrary/f1/testcreate2050.htm". "href": "/rest/api/v1. "href": "/rest/api/v1.png".1/clItems/contentlibrary/f1/testcreate2050. "links": [ { "rel": "getContentLibraryItem". items or docs". "detail": "Type should be either folders. { "rel": "setContentLibraryItem". "method": "POST" }. If that is not the case.html” extension with a “. retrieve the contents of a content library document and delete a content library document.htm” extension. an error response is given. Oracle Responsys REST API Developer’s Guide © 2016 Page 54 .htm".htm". update a content library document. Please note that ONLY UTF-8 character encoding will be supported by the REST API.images/testcreate-1. { "documentPath": "/contentlibrary/abn/wsrest_cl. Therefore the response will have links to the document with a “. "content": null. { "rel": "deleteDocument". "method": "GET" }.htm” extension.1/clDocs".htm". "content": "<html dir=\"ltr\">\r\n <head>\r\n <title><\/title>\r\n <\/head>\r\n <body>\r\n <p>test document<\/p>\r\n <p><img src=\"wsrest_cl. Sample Response in case of success: NOTE: Content Library saves files with “. "href": "/rest/api/v1. Service URL: /rest/api/v1.1/clDocs Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: { "documentPath": "/contentlibrary/abn/wsrest_cl.Managing Content Library Documents The following interfaces are available to create a content library document. "href": "/rest/api/v1.1/clDocs/contentlibrary/abn/wsrest_cl. { "rel": "getDocumentContent".png\" alt=\"\" /><\/p>\r\n <\/body>\r\n<\/html>\n\n" } NOTE: Special characters in the document content need to be UTF-8 encoded. Create content library document This interface is used to create a content library document. "links": [ { "rel": "self". "title": "Document already exists". "method": "POST" } ] } Sample Response in case of failure: { "type": "". "detail": "/contentlibrary/abn/wsrest_cl. "method": "GET" }. "href": "/rest/api/v1.1/clDocs/contentlibrary/abn/wsrest_cl. "method": "DELETE" }.images/testcreate-1.1/clDocs/contentlibrary/abn/wsrest_cl.1/clDocs/contentlibrary/abn/wsrest_cl. { "rel": "setDocumentContent"."href": "/rest/api/v1.1/clDocs/contentlibrary/abn/wsrest_cl. "href": "/rest/api/v1. { "documentPath": "/contentlibrary/abn/wsrest_cl.htm".htm". "links": [ { "rel": "self". Service URL: /rest/api/v1.htm".png\" alt=\"\" /><\/p>\r\n <\/body>\r\n<\/html>\n\n\n". "href": "/rest/api/v1. "content": "<html dir=\"ltr\">\r\n <head>\r\n <title><\/title>\r\n <\/head>\r\n <body>\r\n <p>test document<\/p>\r\n <p><img src=\"wsrest_cl. WSAPI does not decode the content of the document before returning the response.htm".htm".htm". Oracle Responsys REST API Developer’s Guide © 2016 Page 55 .1/clDocs/<documentPath> Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Sample Response in case of success: NOTE: Response contains the content of the document as it is saved in the content library. "errorDetails": [] } Retrieve contents of a content library document This interface is used to retrieve the contents of a content library document. "method": "DELETE" }. { "rel": "deleteDocument". "errorCode": "DOCUMENT_ALREADY_EXISTS". "links": [ Oracle Responsys REST API Developer’s Guide © 2016 Page 56 .htm". { "documentPath": "/contentlibrary/abn/wsrest_cl. "title": "Document not found".htm". { "rel": "createDocument".1/clDocs/<documentPath> Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: { "documentPath" : "/contentlibrary/abn/wsrest_cl. "errorCode": "DOCUMENT_NOT_FOUND". "href": "/rest/api/v1.htm". Service URL: /rest/api/v1. This is done to avoid returning large contents in the response. "content": "test documentersasefgwdfgsdfg" } Sample Response in case of success: Note: The “content” attribute in the response is returned as null always. "content": null. "errorDetails": [] } Update contents of a content library document This interface is used to update the contents of a content library document. "method": "POST" }. "detail": "/contentlibrary/abn/wsrest_cl.1/clDocs". "method": "POST" } ] } Sample Response in case of failure: { "type": "".htm".{ "rel": "setDocumentContent". "href": "/rest/api/v1.1/clDocs/contentlibrary/abn/wsrest_cl. 1/clDocs/contentlibrary/abn/wsrest_cl. "content": null. Service URL: /rest/api/v1.htm".htm".htm". { "rel": "getDocumentContent".htm". Oracle Responsys REST API Developer’s Guide © 2016 Page 57 .1/clDocs/contentlibrary/abn/wsrest_cl. "detail": "Document Path in the URI does not match Document Path in the request payload". "href": "/rest/api/v1. "href": "/rest/api/v1. "method": "GET" }. { "rel": "deleteDocument". "method": "DELETE" }.1/clDocs/contentlibrary/abn/wsrest_cl. "href": "/rest/api/v1.{ "rel": "self".1/clDocs". "method": "POST" }. "errorDetails": [] } Delete a content library document This interface is used to delete a content library document. "links": [ { "rel": "self".htm". "href": "/rest/api/v1. "href": "/rest/api/v1.1/clDocs/contentlibrary/abn/wsrest_cl. { "rel": "createDocument". "errorCode": "INVALID_PARAMETER".1/clDocs/<documentPath> Request Method: DELETE Request Header: Authorization=<AUTH_TOKEN> Sample Response in case of success: { "documentPath": "/contentlibrary/abn/wsrest_cl. "title": "Invalid request parameters". "method": "POST" } ] } Sample Response in case of failure: { "type": "". "content": null. { "rel": "createDocument". "links": [ { "rel": "self". This is done to avoid returning large contents in the response.1/clDocs". "method": "POST" } ] } Sample Response in case of failure: { "type": "". { "documentPath": "/contentlibrary/abn/doc22.1/clDocs/<destinationDocumentPath> Request Method: PUT Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: { "documentPath": "<sourceDocumentPath>" } Sample Response in case of success: Note: The “content” attribute in the response is returned as null always. "errorDetails": [] } Create a copy of a content library document This interface is used to create a copy of a content library document. "title": "Document not found". "errorCode": "DOCUMENT_NOT_FOUND"."method": "DELETE" }. Oracle Responsys REST API Developer’s Guide © 2016 Page 58 .htm". Service URL: /rest/api/v1.htm". "detail": "/contentlibrary/abn/wsrest_cl. "href": "/rest/api/v1. { "rel": "getDocumentContent". "errorDetails": [] } Managing Content Library Media Files The following interfaces are available to create a content library media file in a folder. "href": "/rest/api/v1.1/clDocs/contentlibrary/abn/doc22. Service URL: /rest/api/v1.htm". "itemData": "<base64 encoded binary string>" } Oracle Responsys REST API Developer’s Guide © 2016 Page 59 . "detail": "Document not found:/contentlibrary/abn/wsrest_cl. "method": "GET" }.1/clDocs/contentlibrary/abn/doc22. "method": "DELETE" } ] } Sample Response in case of failure: { "type": "".png"."href": "/rest/api/v1. "errorCode": "DOCUMENT_NOT_FOUND".1/clItems Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: { "itemPath": "/contentlibrary/abn/testcreate_50. { "rel": "deleteDocument".1/clDocs/contentlibrary/abn/doc22. retrieve the contents of a content library media file and delete a content library media file.htm". Create content library media file This interface is used to create a content library media file in a content library folder. update a content library media file.htm". "href": "/rest/api/v1. "title": "Document not found".htm". "method": "PUT" }. 1/clItems/contentlibrary/abn/testcreate_50. This is done to avoid returning large binary content in the response.png". "method": "POST" }. "href": "/rest/api/v1.1/clItems/contentlibrary/abn/testcreate_50.png". "href": "/rest/api/v1. "detail": "/contentlibrary/abn/testcreate_50. "method": "DELETE" }.png". { "itemPath": "/contentlibrary/abn/testcreate_50. { "rel": "getContentLibraryItem". { "rel": "deleteContentLibraryItem". "href": "/rest/api/v1.1/clItems".Sample Response in case of success: Note: The “itemData” attribute in the response is returned as null always. "links": [ { "rel": "self".png". "errorDetails": [] } Retrieve contents of a content library media file This interface is used to retrieve the contents of a content library media file. { "rel": "setContentLibraryItem". "itemData": null. "method": "POST" } ] } Sample Response in case of failure: { "type": "". Service URL: /rest/api/v1. "errorCode": "DOCUMENT_ALREADY_EXISTS".1/clItems/contentlibrary/abn/testcreate_50. "method": "GET" }. "title": "Document already exists".1/clItems/<itemPath> Request Method: GET Request Header: Oracle Responsys REST API Developer’s Guide © 2016 Page 60 . "href": "/rest/api/v1.png". Authorization=<AUTH_TOKEN> Sample Response in case of success: Note: “itemData” attribute in the response is a BASE64 encoded binary string representation of the media file content.png". "itemData": "iVBORw0KGgoAAAANSUhEUgAAAdwAAAFUCAIAAAABIhoXAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAA6XSURBVHhe7d0vVBtLG8BhZCQyEhmJRCKRkUgkEhkXiYy8M hKJREYiI5GRkZHIfnO60zn7hT9N20z2TfZ5xD3NLoWEc/tjmMzOnv0AIAxRBghElAECEWWAQEQZIBBRBg hElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBgh ElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghE lAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghEl AECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghElAECEWWAQEQZIBBRBghElA ECEWWAQEQZIBBR7sDLy8v19fV8Ps+PAX4R5Q4Mh8Ozs7PBYJAfA/wiyh1IOU5RTqbTaT4E8JMod+Dh4aG JcqLLQJsod+D9/f3m5iZX+exssVjkE/uz2WweHx8vLi7y1ziU9BXv7+9rvCLoCVHuRury9fV1CVl6mE/8 s9VqlbJYZkg6l17df//9l58c8Dui3Jn1en1+ft6UK2U0H/0HaXw6Ho+bTxiNNMOORLlL8/k8R+vsbLlc5 qN/Ln2ey8vL/Il+SSPx5+fn/BGHkl7Fw8PDV9MmJtDht0S5Y2VyOQ1y86GdNQVsFti13d3d/Uvi9+j9/T 09mfy0fjFqhm+IcsdSPXOrdh4sfzUaPT8/n0wm6/U6f1wYW29sFuklpBcS8AlDh0S5e2Ui+PvB8lctTpq x5x7fLdy7T4fMbYbP0BDl7v12sPzV4rbhcHh068++r7NJZxDlEL4aLL+9vV1dXTWnimNs8aeen58/vj+Z fgLl09BLohxCe7BcNipKeWovNz6ZFn/UnnS2JQg9J8pR3N7eliqlIWR7gJyOnPz4MXU5v9oz/0/Sa/4BR LHZbD6dOE51fnt7yx900vILFmX6zT+AQF5fX9vzFX0YIBfT6TS/bFGm3/wDCKQdpqSfRb69vc1HoZdEOY qtIidppNyHiYvJZJJf8NnZzc1N5NXWcACiHEK7yClMZXJ5NBqdcKS2FvwpMiSi3L2tIqcwtSeX7+7u8se dlvl83p5AV2RoiHLHPha5OT6bzfLRs7PTu/64vT1er97PhN8S5S6l2uYyfTZULJf5pWylsXM+evzaRe7P gj/YkSh3qcwdf/rLezpSrkIeDoensZtau8imLOAjUe5MimzTpvPz86/atFqtyt1J0qDy2BOmyPBbotyZ5 +fnJk/X19f50GcWi0X7Tb/jDZkiwy5EuTPlLb6Hh4d86AvtN/1Go9Exzi8rMuxIlDtT3sd7enrKh752f3 /ffHBjMpnkE8eg/UNFkeF7otyZMlm84/KDNNgsfyW5vr7ebDb5XGDp94D8jBUZdiDK3SgbKKfO5kM7WK/ XqWvNX0wuLi4+vVNJEKm/ZT/SJP1moMjwW6LcjfIb/V9csNe+3iQ1/fn5OZ+IJI3i01g+P8uzs/v7+3wC +JYod6MMeOe/7jPyR1KI21MZk8kk1CB0tVq17/Pkgj3YnSh3IAW0rHJL/cpH/9Db29toNGo+SXJxcRFky LxcLstFMell/t1PHegtUe7AYrFompXilQ/9lc1mU5ZwNNIAvNurltNLK0P49IeXl5d8AtiNKHegTArvZa b16elpOBw2n7DRyWxG+oqPrTu9pqcU+U1ICEuUO1DmW/c14ZCGzO2t4pMDX2Myn8/bPxjSV//raRnoOVE +tBTQnK6zs/0uNH57e2sveEgOMGReLBbt9/SSq6ur/b4u6BVRPrSy5UVqWT60V1vXmNQbMqefAe1F00ka LJ/e1s9wYKJ8aHd3d03C6l0qvXWNSXJ7e5tyua/3ANPn37rsezAYTKfTUMvy4EiJ8qGV5WLpF/98qI6tI XM9KdCnsdczRCDKB7VarZqQpaHlAcaVH4fM+5U+uSUWsF+ifFDl/k/f76G8X6mbs9lsPB7vceB8eXlpDT LUIMoHVa71mE6n+RBAiygfzvv7exmr+q0f+JQoH05ZDDccDvMhgP8nyodTNheutxgOOHaifCCbzabsC2H uAviKKB/I/NedQ0ejUT4E8IEoH0jZlcKO78A3RPkQ1ut1U+TE9mnAN0T5ENLouCnyIa8ZAY6RKB9C2dzS JmrA90S5ure3t6bIg8HARsPA90S5unJPkPF4nA8BfEGUqyt7dQa52zQQmSjXVW5cfX5+bg944LdEua5yh 4693LgaOHmiXNfB7jMCnAZRrqvceD8/BviWWNTVFDnJjwG+JRZ1NUW+uLjIjwG+JcoVldukivLfmc/n19 fX6b/5MfSAKFdUonx5eZkPsbPpdNp89w5z528IQpQrWi6XTVbsQ/Snym2/k9vb23wUekCUKypXjtzc3OR D7GC9Xpe7tKRvnWEyvSLKFb28vDRlubu7y4fYwcPDQ/N9u7y8VGT6RpQrKreAEuXdtYfJdguhh0S5ohJl t6/eXfoB1nzTvDtKP4lyReWGI9PpNB/iay8vL6PRqPmOJYbJ9JMoV1QWdc1ms3yIzyyXy3Jj2Ya3RuktU a6ovGHl8oevrNfrspFeYzgcumkWfSbKFZXpUVH+1OPj4/n5efMtSgaDwWQycccsek6UKypRtm/nlre3t6 urq+ab0xiPx6vVKp+GHhPliso8qSi3pQFyWfSWXF5e+v5AIcoVlSingWE+1G/r9bo9QE5pToHO54CfRLm issDLL+bJfD5vzyCnOvtZBR+JckXlXlBphJgP9VJ6+Tc3N823IjFAhm+IckWlQflxL81mMwNk2J0o11I2 Ux6NRvlQz2xdoWeADLsQ5Vr6vG9nGgu35ysSA2TYkSjXUnYjur+/z4d6YLPZlOsYG67Qgz8iyrWUjS/68 zv71vTxwBV68OdEuZZyOd/T01M+dLq2po8TV+jB3xHlWsqVI6+vr/nQKfo4fewKPfgXolzLyS9SNn0MNY hyLU2nTnWR8tPTk+ljqEGUqzjtRcqpv82ra5g+hj0S5SpOdZHy+/v77e1t89KS9CPH9DHslyhXcZKLlDe bTXuPtzRANl8BeyfKVZzeIuXVatVe9Pbw8JBPAHslylWc2CLl19fX9tt6llhAPaJcxSktUk4/Vwa/bhSS 0vzy8pJPABWIchUns0h5Nps1LyRJL8qmQlCbKFdRopwfH6f2tSFXV1fe1oMDEOUqjj3KW0vfxuNxOpLPA TWJchVHHeU0Ii5z4kmvth6FzolyFccb5dVqdXl52Tz5xL1C4MBEuYojjfJyuSzPfDAYzOfzfAI4FFGu4h ijvFgsymJkS9+gK6JcxdFFeTablcXIw+EwDZnzCeCwRLmKI4ry1k1D0p9t+QYdEuUqjiLKn95z2mJk6JY oVxE8yqm8bhoCMYlyFZGjvHXP6cRNQyAOUa4iZpQ/3nP65ubGdhYQiihXUYai+XHXlsvl1vRxqrNFbxCQ KFeRyxcgyuv1+v7+Pj+bn9IPjNlslk8DwYhyFbl/XUf54/Txw8OD6WOITJSryAnsLsqpvFvzFaaP4SiIc hU5hB1FebFYDIfD/AxMH8NREeUqcg67iPJkMslf+6f7+3tbIcMREeUqchEPG+XVanV1dZW/8M839J6fn/ M54EiIchW5iweM8tPTU/s9vVTnY789IPSTKFeR03iQKL+/v9/d3eWv99N0Os3ngGMjylXkOtaP8nK5bF+ kNxwOX19f8zngCIlyFbmRlaM8n8/LJsjJeDy2BhmOnShXUVpZb+u1l5eX5ksk6cvZ4w1OgyhXUTbGTLms MZ+wXC5L90ejkatC4GSIchXv7+9lddpwONzvQojValWuDbm4uLDKAk6JKNfSTmcK9L6u4NhsNuWdvfPzc 2NkODGiXNFisSiTDHd3d//e5fYAPH3m9PnzCeBUiHJds9msaWiSRrj/OL88Ho/z5zo7c7UenCRRrm5rO+ Oracle Responsys REST API Developer’s Guide © 2016 Page 61 . { "itemPath": "/contentlibrary/abn/testcreate_50. "errorCode": "DOCUMENT_NOT_FOUND". "links": [ { "rel": "self". "errorDetails": [] } Update contents of a content library media file This interface is used to update the contents of a content library media file.png". Service URL: /rest/api/v1.png". "href": "/rest/api/v1. { "rel": "createContentLibraryItem". "href": "/rest/api/v1. "href": "/rest/api/v1. { "rel": "setContentLibraryItem". "method": "DELETE" }.1/clItems/contentlibrary/abn/testcreate_50. "method": "GET" }.PHx8d84g+176pnQ2Q4VaJ8CPP5vH0NdHqYT+xsOp3mv/xzT+R8FDg5onwg6/X6+vq6qepgMPijN+jaRR6 Px/kocIpE+XA2m025oepoNNrxfb92kW9ubva1igOISZQP6vX1tb0eIx/9miJD34jyobXXY3x/QxBFhh4S 5Q6UlW3D4fCrLYQUGfpJlDuwXq/b10lPJpOt5ioy9JYod+Pp6SlH96fmupLVajWfz29vb/NRRYb+EeXOb N3h9CNFhh4S5Y5tXVdSKDL0kyh3b71epwSnEA8Gg/SHx8dHt3SC3hJlgEBEGSAQUQYIRJQBAhFlgEBEGS AQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSA QUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQ UQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQU QYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQ YIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQY IRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYI RJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIR JQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgEBEGSAQUQYIRJQBAhFlgDB+/PgfhFa/3C 47xMoAAAAASUVORK5CYII=". "method": "POST" } ] } Sample Response in case of failure: { "type": "".1/clItems/<itemPath> Request Method: POST Oracle Responsys REST API Developer’s Guide © 2016 Page 62 .1/clItems/contentlibrary/abn/testcreate_50. "detail": "/contentlibrary/abn/testcreate.1/clItems/contentlibrary/abn/testcreate_50. "href": "/rest/api/v1.1/clItems". { "rel": "deleteContentLibraryItem".png". "method": "POST" }. "title": "Document not found".png". png".Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: NOTE: Since the payload accepts binary content. { "itemPath" : "/contentlibrary/abn/testcreate.png". "href": "/rest/api/v1. "method": "GET" }. "errorCode": "INVALID_PARAMETER". { "rel": "getContentLibraryItem". "href": "/rest/api/v1. "href": "/rest/api/v1. "itemData": null.1/clItems/contentlibrary/abn/testcreate_50. the entire content of the existing media file will be replaced with the content provided in the request payload. { "rel": "deleteContentLibraryItem". This is done to avoid returning large binary content in the response. { "itemPath": "/contentlibrary/abn/testcreate_50. "method": "DELETE" }. "itemData": "<base64 encoded binary string>” } Sample Response in case of success: Note: The “itemData” attribute in the response is returned as null always. "title": "Invalid request parameters". "method": "POST" } ] } Sample Response in case of failure: { "type": "". "errorDetails": [] } Oracle Responsys REST API Developer’s Guide © 2016 Page 63 . { "rel": "createContentLibraryItem". "links": [ { "rel": "self".1/clItems".png".1/clItems/contentlibrary/abn/testcreate_50.png". "detail": "Item Path in the URI does not match Item Path in the request payload".1/clItems/contentlibrary/abn/testcreate_50. "href": "/rest/api/v1. "method": "POST" }.png". "itemData": null.1/clItems/<itemPath> Request Method: DELETE Request Header: Authorization=<AUTH_TOKEN> Sample Response in case of success: { "itemPath": "/contentlibrary/abn/testcreate_50.Delete a content library media file This interface is used to delete a content library media. Service URL: /rest/api/v1.png".1/clItems".1/clItems/<destinationItemPath> Request Method: Oracle Responsys REST API Developer’s Guide © 2016 Page 64 . "errorDetails": [] } Create a copy of a content library media file This interface is used to create a copy of a content library media file.png". "href": "/rest/api/v1. "method": "POST" } ] } Sample Response in case of failure: { "type": "". Service URL: /rest/api/v1. "title": "Document not found".png". "detail": "Document not found:/contentlibrary/abn/testcreate_50. "links": [ { "rel": "self". "method": "DELETE" }. "href": "/rest/api/v1. "errorCode": "DOCUMENT_NOT_FOUND".1/clItems/contentlibrary/abn/testcreate_50. { "rel": "createContentLibraryItem". { "rel": "deleteContentLibraryItem".png". "errorDetails": [] } Managing Images of Content Library Documents The following interfaces are to get images and set images in a content library document. "links": [ { "rel": "self". "href": "/rest/api/v1. "method": "PUT" }.1/clItems/contentlibrary/abn/copiedimage. "href": "/rest/api/v1.PUT Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: { "itemPath" : "<sourceItemPath>" } Sample Response in case of success: Note: The “itemData” attribute in the response is returned as null always. "errorCode": "DOCUMENT_NOT_FOUND". { "itemPath": "/contentlibrary/abn/copiedimage.1/clItems/contentlibrary/abn/copiedimage.1/clItems/contentlibrary/abn/copiedimage. "title": "Document not found". "method": "DELETE" } ] } Sample Response in case of failure: { "type": "".png". { "rel": "getContentLibraryItem". "detail": "Document not found:/contentlibrary/abn/testcreate_50.png".png". "itemData": null. "href": "/rest/api/v1.png". "method": "GET" }. This is done to avoid returning large binary content in the response. Oracle Responsys REST API Developer’s Guide © 2016 Page 65 . "method": "GET" } ] } Sample Response in case of failure: { "type": "". "href": "/rest/api/v1.1/clDocImages/<documentPath> Request Method: POST Request Header: Authorization=<AUTH_TOKEN> Request JSON Body: { "documentPath" : "/contentlibrary/abn/wsrest_cl. "content": null.png". "errorCode": "INVALID_PARAMETER". "title": "Invalid request parameters". "method": "POST" }. "errorDetails": [] } Oracle Responsys REST API Developer’s Guide © 2016 Page 66 . "detail": "Document Path in the URI does not match Document Path in the request payload". "href": "/rest/api/v1.Set images in a content library document This interface is used to set images in a content library document. Service URL: /rest/api/v1.1/clDocImages/contentlibrary/abn/wsrest_cl. "itemData": "<base64 encoded binary string>” } ] } Sample Response in case of success: { "documentPath": "/contentlibrary/abn/wsrest_cl.htm". "imageData": [ { "itemPath": "testcreate. { "rel": "getDocumentImages".htm".htm". "links": [ { "rel": "self".htm".1/clDocImages/contentlibrary/abn/wsrest_cl. "method": "GET" }.1/clDocImages/contentlibrary/abn/wsrest_cl. "method": "POST" } ] } Oracle Responsys REST API Developer’s Guide © 2016 Page 67 .htm". "href": "/rest/api/v1.png". Service URL: /rest/api/v1. "href": "/rest/api/v1. "method": "GET" }.1/clItems/contentlibrary/abn/testcreate.1/clItems/contentlibrary/abn/testcreate. "href": "/rest/api/v1.htm". { "rel": "setContentLibraryItem". "links": [ { "rel": "self". "href": "/rest/api/v1.1/clItems". "href": "/rest/api/v1. "itemData": "<base64 encoded binary string>”.1/clDocImages/<documentPath> Request Method: GET Request Header: Authorization=<AUTH_TOKEN> Sample Response in case of success: { "documentPath": "/contentlibrary/abn/wsrest_cl.1/clDocImages/contentlibrary/abn/wsrest_cl. "links": [ { "rel": "getContentLibraryItem". { "rel": "deleteContentLibraryItem".1/clItems/contentlibrary/abn/testcreate. "imageData": [ { "itemPath": "/contentlibrary/abn/testcreate. { "rel": "setDocumentImages".png". "method": "POST" } ] }]. "method": "DELETE" }.Get images in a content library document This interface is used to get images in a content library document.png".png".htm". "href": "/rest/api/v1. { "rel": "createContentLibraryItem". "method": "POST" }. "title": "Images not found". "errorDetails": [] } Oracle Responsys REST API Developer’s Guide © 2016 Page 68 . "errorCode": "IMAGES_NOT_FOUND".htm". "detail": "There are no images in wsrest_cl.Sample Response in case of failure: { "type": "". the following error information is returned instead of the response described in previous sections.NOT_FOUND Campaign not found CAMPAIGN_ALREADY_EXISTS HttpStatus. "errorCode" : "<ERROR_CODE>".BAD_REQUEST Recipient limit exceeded MAX_ATTACHMENT_SIZE_EXCEEDED HttpStatus.BAD_REQUEST Campaign already exists RECIPIENT_LIMIT_EXCEEDED HttpStatus.BAD_REQUEST INVALID_NUMBER HttpStatus.BAD_REQUEST INVALID_SOAP_HEADER HttpStatus.UNAUTHORIZED Password expired REQUEST_LIMIT_EXCEEDED HttpStatus.UNAUTHORIZED Password locked PASSWORD_EXPIRED HttpStatus.UNAUTHORIZED Insufficient access INVALID_USER_NAME_PASSWORD HttpStatus.BAD_REQUEST Request limit exceeded CAMPAIGN_NOT_FOUND HttpStatus. "errorDetails" : <FOR_FUTURE_USE> } Error codes: ERROR_CODE HTTP response code Title DUPLICATE_API_REQUEST HttpStatus.BAD_REQUEST Invalid number INVALID_DATE HttpStatus.BAD_REQUEST Invalid date INVALID_PARAMETER HttpStatus.BAD_REQUEST Invalid username or password INVALID_SESSION_ID HttpStatus.UNAUTHORIZED API disabled for user INSUFFICIENT_ACCESS HttpStatus. Error returned: { "type" : "<JSON_SCHEMA_LINK_FOR_THIS_ERROR_FOR_FUTURE>".Handling Errors If a REST API request fails.BAD_REQUEST Invalid Request JSON Body INVALID_FIELD_NAME HttpStatus. "title" : "<ERROR_TITLE>".BAD_REQUEST Invalid object PASSWORD_LOCKOUT HttpStatus. "detail" : "<DETAIL_MESSAGE>". The format and description of the error codes are shown below.BAD_REQUEST Duplicate API request API_DISABLED_FOR_USER HttpStatus.BAD_REQUEST Attachment size exceeded Oracle Responsys REST API Developer’s Guide © 2016 Page 69 .BAD_REQUEST Invalid field name INVALID_OBJECT HttpStatus. NOT_FOUND Document not found DOCUMENT_ALREADY_EXISTS HttpStatus.NOT_FOUND Custom event not found RECORD_LIMIT_EXCEEDED HttpStatus.BAD_REQUEST Document already exists IMAGES_NOT_FOUND HttpStatus.BAD_REQUEST Record limit exceeded RECORD_NOT_FOUND HttpStatus.NOT_FOUND List not found LIST_ALREADY_EXISTS HttpStatus.BAD_REQUEST Invalid authentication option AUTHENTICATION_FAILED HttpStatus.BAD_REQUEST List already exists TABLE_NOT_FOUND HttpStatus.ERROR_CODE HTTP response code Title CAMPAIGN_NOT_LISTENING HttpStatus.BAD_REQUEST Multiple objects found DOCUMENT_NOT_FOUND HttpStatus.BAD_REQUEST Object already exists OPERATION_NOT_SUPPORTED HttpStatus.NOT_FOUND Folder not found FOLDER_ALREADY_EXISTS HttpStatus.BAD_REQUEST Campaign not listening CAMPAIGN_IS_INVALID HttpStatus.UNAUTHORIZED Authentication failed Oracle Responsys REST API Developer’s Guide © 2016 Page 70 .NOT_FOUND Object not found OBJECT_ALREADY_EXISTS HttpStatus.NOT_FOUND Images not found UNEXPECTED_EXCEPTION HttpStatus.BAD_REQUEST Folder already exists NO_CAMPAIGNS_IN_THIS_FOLDER HttpStatus.BAD_REQUEST No campaigns for this folder NO_OBJECTS_IN_THIS_FOLDER HttpStatus.NOT_FOUND Table not found CUSTOM_EVENT_NOT_FOUND HttpStatus.INTERNAL_SERVER_ERROR Unexpected exception UNRECOVERABLE_EXCEPTION HttpStatus.FORBIDDEN Operation not supported MULTIPLE_OBJECTS_FOUND HttpStatus.NOT_FOUND Record not found OBJECT_NOT_FOUND HttpStatus.BAD_REQUEST Campaign disabled for user FOLDER_NOT_FOUND HttpStatus.INTERNAL_SERVER_ERROR Unrecoverable exception INVALID_AUTHENTICATION_OPTION HttpStatus.BAD_REQUEST Not a valid campaign MOBILE_CAMPAIGN_DISABLED_FOR_USER HttpStatus.BAD_REQUEST No objects in this folder LIST_NOT_FOUND HttpStatus. UNAUTHORIZED Account is not active Oracle Responsys REST API Developer’s Guide © 2016 list not Page 71 .NOT_FOUND Resource not found INVALID_REQUEST_CONTENT HttpStatus.NOT_FOUND No recipient found MULTIPLE_RECIPIENTS_FOUND HttpStatus.UNAUTHORIZED Not a valid authentication option SERVER_CHALLENGES_DO_NOT_MATCH HttpStatus.OK Recipient status undeliverable PROFILE_LIST_NOT_FOUND HttpStatus.BAD_REQUEST Multiple recipients found RECIPIENT_STATUS_UNDELIVERABLE HttpStatus.NOT_FOUND Profile found PROFILE_LIST_NOT_FOUND_IN_FOLDER HttpStatus.NOT_FOUND Profile list not found in folder USER_BLOCKED HttpStatus.UNAUTHORIZED Client certificate not valid CLIENT_CERTIFICATE_NOT_FOUND HttpStatus.UNAUTHORIZED Server certificate expired SERVER_CERTIFICATE_NOT_YET_VALID HttpStatus.UNAUTHORIZED Server certificate not found SERVICE_UNAVAILABLE HttpStatus.UNAUTHORIZED Login is disabled INVALID_AUTH_OPTION HttpStatus.METHOD_NOT_ALLOWED Method not supported RESOURCE_NOT_FOUND HttpStatus.BAD_REQUEST Invalid request content INVALID_TOKEN HttpStatus.UNAUTHORIZED Server certificate not valid yet SERVER_CERTIFICATE_NOT_FOUND HttpStatus.UNAUTHORIZED Server challenge did not match INACTIVE_ACCOUNT HttpStatus.UNAUTHORIZED User is blocked LOGINS_DISABLED HttpStatus.UNAUTHORIZED Not a valid token PRIVATE_KEY_NOT_FOUND HttpStatus.UNAUTHORIZED Authentication token expired METHOD_NOT_SUPPORTED HttpStatus.UNAUTHORIZED Private key not found NO_RECIPIENT_FOUND HttpStatus.SERVICE_UNAVAILABLE Service unavailable TOKEN_EXPIRED HttpStatus.UNAUTHORIZED Client certificate not found SERVER_CERTIFICATE_EXPIRED HttpStatus.UNAUTHORIZED Client certificate expired CLIENT_CERTIFICATE_NOT_YET_VALID HttpStatus.ERROR_CODE HTTP response code Title CLIENT_CERTIFICATE_EXPIRED HttpStatus. UNAUTHORIZED Web service ARG disabled CAMPAIGN_IS_INVALID HttpStatus.BAD_REQUEST Campaign already exists PATH_NOT_VALID HttpStatus.UNAUTHORIZED Maximum concurrent sessions exceeded MAX_LOGIN_FAILURES_EXCEEDED HttpStatus.BAD_REQUEST Campaign Schedule Type cannot be changed Oracle Responsys REST API Developer’s Guide © 2016 Page 72 .ERROR_CODE HTTP response code Title MAX_CONCURRENT_SESSIONS_EXCEEDED HttpStatus.BAD_REQUEST Campaign name is invalid CAMPAIGN_NOT_FOUND HttpStatus.BAD_REQUEST Campaign is already scheduled for launch CURRENT_CAMPAIGN_SCHEDULE_AT_SAME_ TIME HttpStatus.BAD_REQUEST Object path not valid.BAD_REQUEST Campaign launch date is past INVALID_CAMPAIGN_SCHEDULE_TYPE_CHA NGE HttpStatus. CAMPAIGN_SCHEDULE_DUPLICATE HttpStatus.UNAUTHORIZED Not a valid client IP range WS_ARG_DISABLED HttpStatus.UNAUTHORIZED Login is blocked temporarily ACCOUNT_SUSPENDED HttpStatus.INTERNAL_SERVER_ERROR Unable to create campaign MOBILE_CAMPAIGN_DISABLED_FOR_USER HttpStatus.BAD_REQUEST This Schedule is already scheduled to run at specified time CAMPAIGN_LAUNCH_SCHEDULE_DATE_PAST HttpStatus.UNAUTHORIZED Maximum login failure exceeded LOGIN_BLOCKED_TEMPORARILY HttpStatus.NOT_FOUND Campaign not found UNABLE_TO_CREATE_CAMPAIGN HttpStatus.UNAUTHORIZED Account is in suspended state LOGIN_BLOCKED_INVALID_IPRANGE HttpStatus.BAD_REQUEST Campaign disabled for user CAMPAIGN_ALREADY_EXISTS HttpStatus. NOT_FOUND Data source not found SALESFORCE_CAMPAIGN_ID_NOT_FOUND OFFSET_NOT_VALID LIMIT_NOT_VALID INVALID_PROOF_LAUNCH_TYPE PUSH_LIST_NOT_FOUND DUPLICATE_DATA_SOURCE DATA_SOURCE_NOT_FOUND CAMPAIGN_IS_INVALID HttpStatus.BAD_REQUEST Offset is not valid.ERROR_CODE HTTP response code Title CAMPAIGN_SCHEDULE_NOT_FOUND HttpStatus.BAD_REQUEST Campaign launch has already occurred. INVALID_CAMPAIGN_SCHEDULE_TIME HttpStatus. HttpStatus.NOT_FOUND Salesforce campaign id not found.UNAUTHORIZED API is not allowed in secondary.BAD_REQUEST Campaign Schedule Type cannot be changed INVALID_CAMPAIGN_SCHEDULE_TYPE HttpStatus.BAD_REQUEST Duplicate data source HttpStatus.BAD_REQUEST Campaign Schedule not found CAMPAIGN_NAME_NOT_VALID HttpStatus.BAD_REQUEST Oracle Responsys REST API Developer’s Guide © 2016 Campaign name is invalid.BAD_REQUEST Campaign Name is not valid INVALID_CAMPAIGN_SCHEDULE_TYPE_CHA NGE HttpStatus. HttpStatus.BAD_REQUEST Invalid Proof Launch Type.BAD_REQUEST Limit is not valid. HttpStatus. Page 73 . API_NOT_ALLOWED_IN_SECONDARY HttpStatus.NOT_FOUND Push list not found HttpStatus. Non HATM endpoint should be used HttpStatus.BAD_REQUEST Invalid Schedule Time. HttpStatus.BAD_REQUEST Invalid Campaign Schedule Type CAMPAIGN_LAUNCH_ALREADY_HAPPENED HttpStatus. BAD_REQUEST Invalid Schedule Time Oracle Responsys REST API Developer’s Guide © 2016 Page 74 .BAD_REQUEST Campaign Name is not valid INVALID_CAMPAIGN_SCHEDULE_TYPE_CHA NGE HttpStatus. CAMPAIGN_SCHEDULE_DUPLICATE HttpStatus.BAD_REQUEST Campaign disabled for user CAMPAIGN_ALREADY_EXISTS HttpStatus.CAMPAIGN_NOT_FOUND HttpStatus.BAD_REQUEST Campaign Schedule not found CAMPAIGN_NAME_NOT_VALID HttpStatus.BAD_REQUEST Campaign launch date is past INVALID_CAMPAIGN_SCHEDULE_TYPE_CHA NGE HttpStatus.NOT_FOUND Campaign not found UNABLE_TO_CREATE_CAMPAIGN HttpStatus.BAD_REQUEST Campaign already exists PATH_NOT_VALID HttpStatus.BAD_REQUEST Campaign Schedule Type cannot be changed INVALID_CAMPAIGN_SCHEDULE_TYPE HttpStatus. INVALID_CAMPAIGN_SCHEDULE_TIME HttpStatus.BAD_REQUEST Object path not valid.INTERNAL_SERVER_ERROR Unable to create campaign MOBILE_CAMPAIGN_DISABLED_FOR_USER HttpStatus.BAD_REQUEST Campaign is already scheduled for launch CURRENT_CAMPAIGN_SCHEDULE_AT_SAME_ TIME HttpStatus.BAD_REQUEST Invalid Campaign Schedule Type CAMPAIGN_LAUNCH_ALREADY_HAPPENED HttpStatus.BAD_REQUEST This Schedule is already scheduled to run at specified time CAMPAIGN_LAUNCH_SCHEDULE_DATE_PAST HttpStatus.BAD_REQUEST Campaign Schedule Type cannot be changed CAMPAIGN_SCHEDULE_NOT_FOUND HttpStatus.BAD_REQUEST Campaign launch has already occurred. “1” may represent an opt-in status. “H” may represent a preference for HTML formatted email. defaultPermissionStatus enum This value must be specified as either OPTIN or OPTOUT and would be applied to all of the records contained in the API call. If this value is not explicitly specified. For example. then it is set to OPTOUT. matchColumnName1 string First match column for determining whether an insert or update should occur. “0” may represent an opt-out status. M.Definitions of Rule Parameters for Merging Members into a Profile List Name Type Description insertOnNoMatch boolean Indicates what should be done for records where a match is not found (true = insert / false = no insert). For example. htmlValue string Value of incoming preferred email format data.M” would indicate that a record that has a null for Email or Mobile Number value should be rejected. For example “E. rejectRecordIfChannelEmpty string String containing comma-separated channel codes that if specified will result in record rejection when the channel address field is null. OPTOUT Oracle Responsys REST API Developer’s Guide © 2016 Page 75 . AND Controls how the Boolean expression involving the match columns is constructed to determine a match between the incoming records and existing records. For example. Channel codes are E. textValue string Value of incoming preferred email format data. matchColumnName2 string Second match column for determining whether an insert or update should occur. optinValue string Value of incoming opt-in status data that represents an opt-in status. defaultPermissionStatus enum OPTIN. updateOnMatch NO_UPDATE REPLACE_ALL Controls how the existing record should be updated. (optional) matchOperator NONE. For example. P. optoutValue string Value of incoming opt-out status data that represents an optout status. “T” may represent a preference for Text formatted email.
Copyright © 2024 DOKUMEN.SITE Inc.