Operaion: сервис управления операциями пользователя

1. Добавление операции

Запрос: /operation/commit
Тело:

{
   auth_token: <auth_token>,
   account_id: <account_id>,
   sum: <amount_of_money>,
   category_id: <category_id>
}

Ответ:

{
    error_code: 0,
    op_id: <operation_id>
}

или
{
    error_code: 1,
}

Коды результата (error_code):

2. Добавить тег

Запрос: /operation/add_tag
Тело:

{
   auth_token: <auth_token>,
   op_id: <operation_id>,
   tag: <tag_string>
}

Ответ:

{
    error_code: <error_code>
}

3. Добавить memo

Запрос: /operation/add_memo
Тело:

{
   auth_token: <auth_token>,
   op_id: <operation_id>,
   memo:<memo>
}

Ответ:

{
    error_code: <error_code>
}

4. Добавить notes

Запрос: /operation/add_notes
Тело:

{
   auth_token: <auth_token>,
   op_id: <operation_id>,
   notes: <notes>
}

Ответ:

{
    error_code: <error_code>
}

5. Получить все оперцаии с тегом

Запрос: /operation/with_tag
Тело:

{
   auth_token: <auth_token>,
   tag: <tag>
}

Ответ:

{
    error_code: 1 
}

или

{
    error_code: 0
    operations: [
        {
            op_id: <operations_id>,
            account_id: <account_id>,
            cat_id: <category_id>,
            timestamp: <timestamp>,
            sum: <sum_of_operation>,
            memo: <memo>,
            notes: <notes>
        },
        ..... ]
}