Table of Contents:
Table of Contents minLevel 2
Note: Notice that in each API call you must provide the List ID that you are working on, otherwise the default List ID will be used.
Methods Summary
GET /api/list_fields
Description
This method fetches a collection of list fields.
...
GET URL: https://api.ongage.net/<list_id>/api/listslist_fields
Code Block |
---|
{ "metadata": { "error": false, "total": 2 }, "payload": [ { "id": 1, "account_id": 1, "list_id": 10, "name": "email", "title": "Email", "type": "email", "format": "", "default": null, "mandatory": true, "position": 0, "created": 1436710261, "modified": 1436710261, "deleted": null, "is_sms": false }, { "id": 2, "account_id": 1, "list_id": 10, "name": "address", "title": "Address", "type": "string", "format": "", "default": null, "mandatory": false, "position": 1, "created": 1436710261, "modified": 1436710261, "deleted": null, "is_sms": false } ] } |
POST /api/list_fields
Description
This method creates a new list field.
...
Code Block |
---|
{ "list_id": 1, "name": "birthday", "title": "Birthday", "type": "date", "format": "yyyy-mm-dd", "default": "", "mandatory": true, "position": 4 } |
POST api/list_fields/all_lists
Description
This method creates list field in all lists.
...
Code Block |
---|
{ "metadata":{ "error":false }, "payload":{ "success_list_fields":[ { "name":"birthday", "title":"Birthday", "type":"date", "format":"yyyy-mm-dd", "default":"1986-03-17", "mandatory":true, "position":5, "account_id":12345, "list_id":11112, "id":12345678, "created":1528116138, "modified":1528116138, "deleted":null } ], "failed_lists_errors":{ "11134": "You have reached the maximum number of fields per list (21)", "11156": "You have reached the maximum number of fields per list (21)" } } } |
PUT /api/list_fields/<List Field ID>
Description
This method updates a list field.
...
Code Block |
---|
'dd/mm/yyyy' 'mm/dd/yyyy' 'yyyy/mm/dd' 'dd-mm-yyyy' 'mm-dd-yyyy' 'yyyy-mm-dd' 'dd/mm/yyyy hh24:mi' 'mm/dd/yyyy hh24:mi' 'yyyy/mm/dd hh24:mi' 'dd-mm-yyyy hh24:mi' 'mm-dd-yyyy hh24:mi' 'yyyy-mm-dd hh24:mi' 'dd/mm/yyyy hh24:mi:ss' 'mm/dd/yyyy hh24:mi:ss' 'yyyy/mm/dd hh24:mi:ss' 'dd-mm-yyyy hh24:mi:ss' 'mm-dd-yyyy hh24:mi:ss' 'yyyy-mm-dd hh24:mi:ss' |
DELETE /api/list_fields/<List Field ID>
Description
This method deletes a list field.