Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@stepun
Created August 30, 2018 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stepun/8772ff8db2341a28974557000a014835 to your computer and use it in GitHub Desktop.
Save stepun/8772ff8db2341a28974557000a014835 to your computer and use it in GitHub Desktop.

API Payment Types

List payment types

Получение списка типов платежей. Если передать параметр timestamp то получим список измененных(добавленных) с момента времени переданного в timestamp. Максимально передается 1000 записей.

Resource URL

https://my2can.com/api/v1_paytypes.json

Resource Information

  • Response formats JSON
  • Requires authentication? Yes

Parameters

Name Require Type Description
timestamp no int(10) default = 0. Получить данные с данной даты (Time Stamp формат - количество миллисекунд с 1 января 1970 года. Необходим для получения обновленных данных).
page no int(10) default = 0. Page.
count no int(10) default = 1000. Count models in page. Limit max 1000 models in one request!

Example Request

GET /api/v1_paytypes.json?page=0&count=2&timestamp=1474247810 HTTP/1.1
Host: my2can.com
token: 15da7169ee5272b97692ff680cab97f5
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded

Example Result

{
  "status": "success",
  "data": {
    "collection": [
      {
        "id": 0,
        "name": "Безналичные",
        "localization_key_name": "PAY_TYPE0",
        "isDel": 0,
        "date": "2017-11-07",
        "time": "14:15:07",
        "timestamp": 1510042507
      }
    ],
    "total": 1,
    "count": 1,
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment