api

Atlas API

Methods
API Endpoint: Beställningar
API för beställningar i Tjänsteguiden
Endpoint URL http://www.example.com/admin/edit/services/plain/orders
Note that this API requires an authenticated user id and IP address Note that this API requires an authenticated user id and IP address

Use the API Credentials module in admin to set up API access for this module
  • Method: customer_info

  • Information

  • Parameters
    1 api_user int green 1234 API User ID with privileges
    2 id int green 12 Customer ID, from orders() or customers()
    Example Query:
    http://www.example.com/admin/edit/services/plain/orders?method=customer_info&api_user=1234&id=12
  • success response


       <customer_info>
          <customer>
             <id>16745</id>
             <socket>65375</socket>
             <serial>197510116952</serial>
             <firstname>Test direktaktivering</firstname>
             <surname>Test direktaktivering</surname>
             <email>jonas@eklundh.com</email>
             <address>Test direktaktivering</address>
             <zip>12345</zip>
             <city>Test direktaktivering</city>
             <member>1234</member>
          </customer>
          <data>
             <message>TESTBESTÄLLNING</message>
             <phone>0703051947</phone>
             <premise>508-004-06-0302</premise>
          </data>
       </customer_info>
  • Method: customers

  • Parameters
    1 api_user int green 1234 API User ID with privileges
    2 date string green 2015-01-01 Date from when to list new or edited customers
    Example Query:
    http://www.example.com/admin/edit/services/plain/orders?method=customers&api_user=1234&date=2015-01-01
  • success response


       <customers>
          <customer>
             <id>16745</id>
             <socket>12345</socket>
             <serial>XXXXXXXXXX</serial>
             <firstname>Kalle</firstname>
             <surname>Testsson</surname>
             <email>test@test.com</email>
          </customer>
          <customer>
             <id>17048</id>
             <serial>XXXXXXXXXXX</serial>
             <firstname>Kalle</firstname>
             <surname>Provsson</surname>
             <email>exempel@exempel.com</email>
          </customer>
       </customers>
  • Method: order_info

  • Parameters
    1 api_user int green 1234 API User ID with privileges
    2 id int green 12 Order ID, obtained by orders()
    Example Query:
    http://www.example.com/admin/edit/services/plain/orders?method=order_info&api_user=1234&id=12
  • success response


       <order_info>
          <orderinfo>
             <date>2015-10-06 12:39</date>
             <type>order</type>
             <status>new</status>
             <delivery>2015-10-06 00:00</delivery>
             <provider>T3</provider>
             <service_id>2440</service_id>
             <service>50/50 Mbit/s</service>
             <category>Privatpersoner: Internet / Via fiber</category>
             <service_uid>12345678</service_uid>
             <citynet>Stadsnätsfabriken DEMO</citynet>
          </orderinfo>
          <customer>
             <id>16745</id>
             <socket>65375</socket>
             <serial>197510116952</serial>
             <firstname>Test direktaktivering</firstname>
             <surname>Test direktaktivering</surname>
             <email>jonas@eklundh.com</email>
             <address>Test direktaktivering</address>
             <zip>12345</zip>
             <city>Test direktaktivering</city>
             <message>TESTBESTÄLLNING</message>
             <phone>0703051947</phone>
             <premise>508-004-06-0302</premise>
          </customer>
          <logs>
             <log>
                <date>2015-10-06 12:39:00</date>
                <message>Saved order</message>
                <type>system</type>
             </log>
             <log>
                <date>2015-10-06 12:39:00</date>
                <message>Attaching order to existing customer (197510116952)</message>
                <type>system</type>
             </log>
             <log>
                <date>2015-10-06 12:39:00</date>
                <message>Attempting to add order to API server</message>
                <type>system</type>
             </log>
             <log>
                <date>2015-10-06 12:39:00</date>
                <message>Service order accepted from API server</message>
                <type>system</type>
             </log>
             <log>
                <date>2015-10-06 12:39:00</date>
                <message>User requested direct activation, checking activation status from API server</message>
                <type>system</type>
             </log>
             <log>
                <date>2015-10-06 12:39:00</date>
                <message>API doesn't report the service as activated</message>
                <type>error</type>
             </log>
             <log>
                <date>2015-10-06 12:39:00</date>
                <message>Found email address for XSP associated with service or company: order@t3.se</message>
             </log>
          </logs>
          <serviceinfo>
             <data>
                <name>invoice type</name>
                <value>Autogiro</value>
             </data>
             <data>
                <name>monthly fee</name>
                <monthly>222</monthly>
             </data>
             <data>
                <name>Just nu! Höstkampanj: HALVA PRISET I 6 MÅNADER! In</name>
             </data>
          </serviceinfo>
       </order_info>
  • Method: orders

  • Information


    Use to fetch new orders from the system. This only returns the order data, and more info about each order is found via order_info()
  • Parameters
    1 api_user int green 1234 API User with privileges
    2 date string green 2015-10-01 Show orders only from this date and later
    Example Query:
    http://www.example.com/admin/edit/services/plain/orders?method=orders&api_user=1234&date=2015-10-01
  • success response


       <orders>
          <response>
             <order>
                <id>19530</id>
                <type>order</type>
                <date>2015-10-06 11:48:00</date>
                <status>new</status>
                <service>2440</service>
                <xsp>31420</xsp>
                <delivery>2015-10-06 00:00:00</delivery>
                <customer>16745</customer>
             </order>
             <order>
                <id>19531</id>
                <type>order</type>
                <date>2015-10-06 11:48:00</date>
                <status>new</status>
                <service>2440</service>
                <xsp>31420</xsp>
                <delivery>2015-10-06 00:00:00</delivery>
                <customer>16746</customer>
             </order>
          </response>
       </orders>
#inlineditbutton