From Bright Pattern Documentation
(Created new topic from branched topic Documentation:ServicePattern:list-management-api-specification:Addanumberofrecords:3.15) |
|||
Line 3: | Line 3: | ||
== URL == | == URL == | ||
− | http[s]:// | + | http[s]://<host>/admin/ws/t/<tenant_url>/callinglist/addAll/<list_name> |
== Method == | == Method == | ||
Line 12: | Line 12: | ||
=== Example === | === Example === | ||
− | + | [ | |
− | + | ||
− | + | { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, | |
− | + | ||
− | + | ... | |
− | + | ||
− | + | ] | |
− | |||
− | |||
− | |||
== Returns == | == Returns == | ||
Line 32: | Line 29: | ||
=== Example === | === Example === | ||
− | { | + | { |
− | + | ||
− | + | "added":1, | |
− | + | ||
− | + | "error":{ | |
− | + | ||
− | + | "missingRequired":[ | |
− | + | ||
− | + | { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, | |
− | + | ||
− | + | ... | |
− | + | ] | |
− | + | ||
− | + | "missingKey": [ | |
− | + | ||
− | + | { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, | |
− | + | ||
− | + | ... | |
− | + | ] | |
− | + | ||
− | + | "duplicateKey": [ | |
− | + | ||
− | + | { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, | |
− | + | ||
− | + | ... | |
− | + | ] | |
− | + | ||
− | + | "formatError": [ | |
− | + | ||
− | + | { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, | |
− | + | ||
− | + | ... | |
− | + | ] | |
− | + | ||
− | + | } | |
− | + | } | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Errors == | == Errors == | ||
Line 89: | Line 78: | ||
− | + | ||
</translate> | </translate> |
Latest revision as of 22:52, 17 September 2018
Contents
- Introduction
- API Specification
- General Information
- Get campaigns
- Add a record
- 1 Add a number of records
- Update a record
- Query a record
- Delete all records
- Get completed records
- Get updated records
- Get all records
- Add records to DNC
- Replace records in DNC
List Management API Specification
Add a number of records
This adds a number of new records to the specified calling list.
URL
http[s]://<host>/admin/ws/t/<tenant_url>/callinglist/addAll/<list_name>
Method
POST
Request body
Names and values of record fields (content type: application/json)
Example
[ { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, ... ]
Returns
204 – Records added; will be returned even if some records were not added due to duplicate or missing keys or other missing mandatory fields
If such errors are identified with respect to some records, they will be reported in the message body. See the example below.
Body
Results of the update, including possible individual errors (content type: application/json)
Example
{ "added":1, "error":{ "missingRequired":[ { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, ... ] "missingKey": [ { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, ... ] "duplicateKey": [ { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, ... ] "formatError": [ { "fieldName_1":"value_1", ..., "fieldName_n":"value_n"}, ... ] } }
Errors
400 – Bad request (incorrect format)
401 – Authentication failed
403 – Authentication succeeded, but authorization failed (no privileges)
404 – Calling list not found