1: 3.0.58.

, ( ), . .

:

1, . , , . .

, , . , , .

. .

.

server 1cfresh.https://stage.1cfresh.com/
app .bs
tenant .26
baseURL

API, , :

{{server}}/a/{{app}}/{{tenant}}/hs/api/v1

https://stage.1cfresh.com/a/bs/10420/hs/api/v1

api_authorization


API .
Basic bank.api 123Qwer

, .

1

2

3

4

5

6

GET {{baseURL}}/kpi/
Authorization: {{api_authorization}}

.

:

  • organizations
    • organization
      • inn
      • kpp
      • name
  • last_update ( )
  • kpi
    • id
    • name
    • ref 1
    • indicators
      • indicator
      • value

https://stage.1cfresh.com/a/bs/10420/hs/api/v1/kpi/

200 JSON.

{
"organizations": [{
"organization": {
"inn":"7721049904",
"kpp":"772101001",
"name":" \"\""
},
"last_update":"2017-10-23T11:51:12",
"kpi": [{
"id":"",
"name":"   ( )",
"ref":"e1cib/app/.",
"indicators": [{
"indicator":"123 ",
"value": 0
},
{
"indicator":"1   23 ",
"value": 0
},
{
"indicator":"",
"value": 0
},
{
"indicator":"  ",
"value": 0
}
]
},
{
"id":"",
"name":"  ",
"ref":"e1cib/app/.",
"indicators": [{
"indicator":"123 ",
"value": 0
},
{
"indicator":"1   23 ",
"value": 0
},
{
"indicator":"",
"value": 0
},
{
"indicator":"  ",
"value": 0
}
]
},
{
"id":"",
"name":"   ()",
"ref":"e1cib/app/.",
"indicators": [{
"indicator":"123 ",
"value": 0
},
{
"indicator":"1   23 ",
"value": 0
},
{
"indicator":"",
"value": 0
},
{
"indicator":"  ",
"value": 0
}
]
},
{
"id":"",
"name":"  ",
"ref":"e1cib/app/.",
"indicators": [{
"indicator":"123 ",
"value": 0
},
{
"indicator":"1   23 ",
"value": 200
},
{
"indicator":"",
"value": 200
},
{
"indicator":"  ",
"value": 200
}
]
},
{
"id":"",
"name":"   ()",
"ref":"e1cib/app/.",
"indicators": [{
"indicator":"123 ",
"value": 0
},
{
"indicator":"1   23 ",
"value": 0
},
{
"indicator":"",
"value": 0
},
{
"indicator":"  ",
"value": 0
}
]
},
{
"id":"",
"name":"  ",
"ref":"e1cib/app/.",
"indicators": [{
"indicator":"126 ",
"value": 0
},
{
"indicator":"1   26 ",
"value": 0
},
{
"indicator":"",
"value": 0
},
{
"indicator":"  ",
"value": 0
}
]
},
{
"id":"",
"name":"  ",
"ref":"e1cib/app/.",
"indicators": [{
"indicator":"",
"value":193964.21
},
{
"indicator":" ",
"value": 47080
},
{
"indicator":"  ",
"value":85124.15
},
{
"indicator":"USD",
"value":61760.06
}
]
},
{
"id":"",
"name":" ",
"ref":"e1cib/app/.",
"indicators": [{
"indicator":"",
"value": 1000
},
{
"indicator":"",
"value": 1000
}
]
},
{
"id":"",
"name":" ",
"ref":"e1cib/app/.",
"indicators": [{
"indicator":"",
"value": 453038
},
{
"indicator":" ",
"value": 118000
},
{
"indicator":" \"\"",
"value": 150118
},
{
"indicator":" \"\"",
"value": 176990
}
]
}
]
}]
}

:

POST {{baseURL}}/kpi/update
Authorization: {{api_authorization}}

. . . , 202 .

, 200 .


. .

, POST , , , 1:.

.

.

2 :

  • tasks/taxes-
  • tasks/taxes/last_update/- - , . , 2 .

:

GET {{baseURL}}/tasks/taxes
Authorization: {{api_authorization}}

:

  • tenant- .

.

:

  • organizations
    • organization
      • inn
      • kpp
      • name
  • expired
  • last_update
  • ref-
  • tasks
    • id- 1
    • name
    • deadline

https://stage.1cfresh.com/a/bs/10420/hs/api/v1/tasks/taxes

200 json. , : .

{
"organizations": [{
"organization": {
"inn":"7721049904",
"kpp":"772101001",
"name":" \"\""
},
"expired": 142,
"last_update":"2017-11-01T00:00:00",
"ref":"e1cib/command/.",
"tasks": [{
"id":"7c08d1e0-f912-495d-9a7f-ade9875016f5",
"name":"  ,    3  2017 .",
"deadline":"2017-10-30T00:00:00"
},
{
"id":"a0e51361-e49d-4c9e-ae5b-28c0f9651c84",
"name":"  ,   9  2017 .",
"deadline":"2017-10-30T00:00:00"
},
{
"id":"f2e459b4-a25b-4456-ace0-475e59722e31",
"name":" ,    2017 .",
"deadline":"2017-11-15T00:00:00"
}
]
}]
}


update . .
2 .

, . :

POST {{baseURL}}/tasks/status
Authorization: {{api_authorization}}

JSON :

  • id 1C
  • done , . : true; false.

400. 200.

, :

GET {{baseURL}}/tasks/taxes/last_update/
Authorization: {{api_authorization}}

GET {{baseURL}}/kpi/last_update/
Authorization: {{api_authorization}}

:

  • organizations
    • organization
      • inn
      • kpp
      • name
    • last_update ( )

https://stage.1cfresh.com/a/bs/10420/hs/api/v1/tasks/taxes/last_update/

{
"organizations":[
{
"organization":{
"inn":"7725895602",
"kpp":"772501001",
"name":", "
},
"last_update":"2017-09-20T17:39:49"
}
]
}