= Bulk Portax bulk import REST API == DESCRIPTION Bulk REST API is available at {{{$Portax::WebPath/rest/bulk}}} Bulk REST resource provides single POST method to spawn subscribers. It accepts JSON as input data format. API allows for multiple subscribers to be sent within one request encoded as array of objects. == METHODS === POST Spawn new subscriber. Expects UTF-8 JSON encoded data in the POST body. ==== FIELDS Required attributes. pn:: Subscriber's personal number (eg. account number) unit_id:: Subscriber's unit identifier address_key:: UIR or RUIAN address key ID first_name:: Subscriber's first name last_name:: Subscriber's last_name organization:: Subscriber's organization name house:: Subscriber's house number apartment:: Subscriber's apartment ID street:: Subscriber's street address city:: Subscriber's city name zip:: Subscriber's ZIP code phone:: Subscriber's contact phone number email:: Subscriber's contact email inet_service:: Current Internet service. One of '''disconnect''' or regular data service as per CRM system specification mac:: Endpoint MAC address iptv_service:: Current IPTV service as a base tariff and packages separated by ''';''' and a '''+''' sign. Eg. DRT1;DB90+DB91. Special services as per '''inet_service''' voip_service_1:: Current voice service line 1. '''disconnect''' available voip_service_2:: Current voice service line 2. '''disconnect''' available user_config:: Initial user configuration (eg. bridge mode) note:: Plaintext note == EXAMPLE {{{data.json}}} {{{ { "iptv_service": "disconnect", "unit_id": "127", "street": "Ben Rapid", "pn": "26", "house": "0472", "zip": "49460", "voip_no_1": null, "apartment": null, "email": null, "city": "Klockoton", "inet_service": "TST", "phone": null, "mac": "02:01:01:01:01:01", "voip_service_2": "disconnect", "voip_service_1": "disconnect", "first_name": "German", "last_name": "Schneider", "user_config": { "cam_epc3928_bridge_mode": "bridge" } } }}} {{{ curl -s --cert-type P12 --cert $CERT:$PASS -X POST \ --data @data.json $URL/rest/bulk }}}