Introduction: Difference between revisions

From Planfix
Jump to: navigation, search
 
(7 intermediate revisions by the same user not shown)
Line 13: Line 13:
Access to the interface is established through a single entry point located at:
Access to the interface is established through a single entry point located at:


https://api.planfix.com/xml/  
'''https://api.planfix.com/xml/''' - for accounts located in Europe 
 
'''https://api-sg.planfix.com/xml/''' - for accounts located in Asia 
 
'''https://api-us.planfix.com/xml/''' - for accounts located in US 
 


Please note that the interface is accessed over HTTPS. All API calls using an unsecured connection will be automatically ignored, so we recommend establishing a test secure connection with an access point to Planfix interfaces before sending data.
Please note that the interface is accessed over HTTPS. All API calls using an unsecured connection will be automatically ignored, so we recommend establishing a test secure connection with an access point to Planfix interfaces before sending data.


All API calls are executed through POST requests.
All API calls are executed through POST requests.
== Limitations on requests ==
== Limitations on requests ==
By default, all accounts are limited based on their plan (20/50/100,000 requests per day) and are limited to one request per second. Additionally, all methods that return lists of values are limited to 100 results per request. The approximate number of remaining requests per day is returned in the X-RateLimit-Remaining header (this value is updated approximately every 10 minutes).
By default, all accounts are limited based on their plan (20/50/100,000 requests per day) and are limited to one request per second. Additionally, all methods that return lists of values are limited to 100 results per request. The approximate number of remaining requests per day is returned in the X-RateLimit-Remaining header (this value is updated approximately every 10 minutes).
Line 40: Line 46:


== Authentication ==
== Authentication ==
There are two possible authentication methods: by [[Planfix API: Authentication by token
There are two possible authentication methods: by [[Planfix API:Authentication by token|authorization token]] or by [[Planfix API: Authentication using username and password|username and password]]. The preferred method of authentication uses a token; authentication with username and password is used for reverse compatibility, so as not to disrupt existing client applications.
|authorization token]] or by [[Planfix API: Authentication using username and password|username and password]]. The preferred method of authentication uses a token; authentication with username and password is used for reverse compatibility, so as not to disrupt existing client applications.


== Response format ==
== Response format ==
Line 52: Line 57:
</response>
</response>
</source>
</source>
All responses to requests for lists contain two attributes in the root element. totalCount is the total number of elements that meet the condition, and count is the number of elements returned in the result. Example:
All responses to requests for lists contain two attributes in the root element. '''totalCount''' is the total number of elements that meet the condition, and '''count''' is the number of elements returned in the result. Example:
<source lang="xml">
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
Line 68: Line 73:
</response>
</response>
</source>
</source>


== Go To ==
== Go To ==
*[[XML API v1]]
*[[XML API v1]]

Latest revision as of 08:45, 12 December 2024

Application registration

For the application to be able to start working, you need to generate an authentication key and signature key. Account managers can do this in the section Account management / Access to API.

Important:The API can only be used with paid and premium accounts.

Access to interfaces

Access to the interface is established through a single entry point located at:

https://api.planfix.com/xml/ - for accounts located in Europe

https://api-sg.planfix.com/xml/ - for accounts located in Asia

https://api-us.planfix.com/xml/ - for accounts located in US


Please note that the interface is accessed over HTTPS. All API calls using an unsecured connection will be automatically ignored, so we recommend establishing a test secure connection with an access point to Planfix interfaces before sending data.

All API calls are executed through POST requests.

Limitations on requests

By default, all accounts are limited based on their plan (20/50/100,000 requests per day) and are limited to one request per second. Additionally, all methods that return lists of values are limited to 100 results per request. The approximate number of remaining requests per day is returned in the X-RateLimit-Remaining header (this value is updated approximately every 10 minutes).

Request format

The request packet has the following structure

<?xml version="1.0" encoding="UTF-8"?>
<request method="{Name_of requested function}">}">
  <account></account> 
  <sid></sid> 
  <!-- ... -->
</request>
Name Type Value Notes
account string account where the function will be executed required field; found in all requests
sid string(32) session key received from executing the auth function auth if a user is authenticated using username/password

Authentication

There are two possible authentication methods: by authorization token or by username and password. The preferred method of authentication uses a token; authentication with username and password is used for reverse compatibility, so as not to disrupt existing client applications.

Response format

The response format has the following structure:

<?xml version="1.0" encoding="UTF-8"?>
<response status="{ok|error}">
  <code>xxxx</code> <!-- present if error status is error -->
  <!-- response body -->
</response>

All responses to requests for lists contain two attributes in the root element. totalCount is the total number of elements that meet the condition, and count is the number of elements returned in the result. Example:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <actions count="5" totalCount="23">
  </actions>
</response>

Response with error:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>

Go To