/rest/api/optin

Provides endpoints for the Opt-In module.

GET v1/optins/flows/{extRefNo}

Returns an overview of Opt-In records for the given external reference number.

Response
application/json; charset=UTF-8

OptInOverviewDTO - JSON representation of a summary of an Opt-In operation.

Request
application/json; charset=UTF-8

Parameter Type
Type
Name
Description
Optional
Default Value
PATH
String  
extRefNo
The external reference number to get the Opt-In records for.
false
 

PUT v1/optins/flows/{extRefNo}

Updates the given Opt-Ins for the given extRefNo.

Response
application/json; charset=UTF-8

OptInDTO - JSON representation of a Opt-In operation outcome.

Request
application/json; charset=UTF-8

Parameter Type
Type
Name
Description
Optional
Default Value
PATH
String  
extRefNo
The external reference number of the Opt-In to update
false
 
FORM
optIns
The detailed Opt-In records values. Can be an empty list, if used in conjunction with query parameter 'approval'.
false
 
QUERY
Boolean  
approval
The flag to signal a positive or negative approval for all given Opt-In records to be used if no approval info is given in the Opt-In record itself.
true
true

Status Codes

Status Code
Description
521
No eligible Opt-Ins found for given extRefNo.
522
Incomplete data given.
525
Error during mail sending.

POST v1/optins/{contactId}

Creates Opt-In records for the given contact id.

Response
application/json; charset=UTF-8

OptInDTO - JSON representation of a Opt-In operation outcome.

Request
application/json; charset=UTF-8

Parameter Type
Type
Name
Description
Optional
Default Value
PATH
String  
contactId
The id of the contact to create the Opt-In records for.
false
 
FORM
optIns
The Opt-In records to create.
false
 
QUERY
Boolean  
approval
The flag to signal a positive or negative approval to be used if no approval info is given in the Opt-In record itself.
true
true

Status Codes

Status Code
Description
520
No contact found for given id.
525
Error during mail sending.

GET v1/optins/{contactId}

Returns an overview of current Opt-In records for the given contact id.

Response
application/json; charset=UTF-8

OptInOverviewDTO - JSON representation of a summary of an Opt-In operation.

Request
application/json; charset=UTF-8

Parameter Type
Type
Name
Description
Optional
Default Value
PATH
String  
contactId
The id of the contact to get the Opt-In records for.
false