(POST) Tonnes API

Add tonnes data

Version 4: (V4) 

URL

https://apiprod.pdsglobal.com/V2/api/integration/tonnes/V4

Description

This URL will allow a customer to add their tonnes data into the PDS software in real-time.

An “areaId” is used to define the functional location (or Area) in the PDS software for which the tonnes information will be assigned. For a detailed list of these Id’s please contact PDS support.

The “tonnesDate” field defines the date and time in which the Tonnes data was recorded in the user’s local datetime. The format is:

yyyy-MM-dd HH:mm:ss.SSS

Type

POST

URL Parameters

(2)

(key)      api_key

(value)   Provided separately to this document

(key)     tonnesType

(value)  Cumulative or Incremental

Headers (1)

(key)     Content-Type

(value)  application/json

Request Data

(single record)

[

{

“areaId”: ”1”,

"tonnesDate": "2017-01-01 00:00:00.000",

"timeZoneOffset": "+1100",

"tonnes": "40000"

}

]

Request Data

(multiple records)

[

{

“areaId”: ”1”,

"tonnesDate": "2017-01-01 00:00:00.000",

"timeZoneOffset": "+1100",

"tonnes": "40000"

},

 

{

“areaId”: ”1”,

"tonnesDate": "2017-01-01 01:00:00.000",

"timeZoneOffset": "+1100",

"tonnes": "50000"

}

]

Response Data

HTTP Response OK (200)

HTTP Response Bad Request (400)

-          Missing api_key parameter

-          Missing tonnesType parameter

-          Incorrect tonnesType value

-          Incorrect areaId value

-          Invalid areaId, and tonnes value

-          Invalid JSON syntax

HTTP Response Forbidden (403)

-          Invalid/Incorrect API Key

-          Non “API User” role

HTTP Response Unsupported Media Type (415)

-          Missing Content-Type header

HTTP Response Internal Server Error (500)

-          Invalid tonnesDate value

 

prev next
Was this article helpful?
0 out of 0 found this helpful

Articles in this section

prev next

Related sections