Back to top

Рокет Ворк | API

Термины

Для начала объясним несколько терминов, которые встретите далее:

  • Исполнитель — физическое лицо, работающее на основании Федерального закона и являющееся клиентом платформы

  • Задача — запрос на оказание услуг, доступный для акцепта либо неограниченному, либо ограниченному кругу исполнителей (в том числе, единственным исполнителем).

  • Компания — компания-клиент платформы, которая выступает заказчиком услуг самозанятых.

  • Сервис (или Платформа) — программный продукт Рокет Ворк.

  • Профиль — учетные данные компании.

Задачи и договоры

Задачи

Задачи — это готовые к заключению и/или заключенные договоры об оказании услуг с самозанятыми-исполнителями. Компания, работающая с самозанятыми по такой системе через Рокет Ворк, может:

  • создавать задачи;

  • изменять уже созданные задачи:

    • передавать в работу исполнителю;
    • подтверждать полное и корректное выполнение задачи;
  • поручать оплату по выполненной задаче;

  • получать информацию о существующей задаче.

Структура задания:

  • id — уникальный идентификатор;

  • agreement_signing_uri - ссылка для подписания договора исполнителем;

  • acceptance_signing_uri — ссылка для подписания акта выполненных работ;

  • agreement_type_id — идентификатор шаблона договора;

  • agreement_uri — ссылка на договор с исполнителем;

  • acceptance_uri — ссылка на акт выполненных работ;

  • period_from — дата начала выполнения работы или действия договора;

  • period_to — дата окончания выполнения задания или действия договора;

  • period_duration — срок выполнения задания или действия договора. Значение по умолчанию: 30.

  • category — категория (тип) задачи;

  • created_at — дата и время создания;

  • date — дата запланированного выполнения задачи;

  • description — описание задания;

  • additional_info — дополнительные указания к заданию;

  • fee / amount_gross — предлагаемая стоимость исполнения (в рублях РФ);

  • metadata — дополнительные данные о задаче (например, номер договора, он он подписан на бумаге);

  • paid_at — дата и время оплаты задачи;

  • payment_errors — ошибки, которые возникли во время последней неудачной попытки оплаты по задаче;

  • receipt_uri — ссылка на чек на сайте nalog.ru;

  • employment_kind — тип занятости исполнителя: СМЗ, ГПХ или ИП. Может принимать значения: selfemployed, civil_contract и entrepreneur;

  • act_required — требуется ли акт выполненных работ. Значение по умолчанию — false;

  • executor_signed_at — дата подписания договора со стороны исполнителя;

  • signed_at — дата подписания договора со стороны заказчика;

  • signature_form — вариант подписания договора: на платформе или вручную. Возможные значения: online и manual. Значение manual определяется автоматически при создании задания, если переданы document_number и document_date;

  • status — статус задания, один из:

    • draft— «Черновик» — задание создано, ожидает подписания со стороны исполнителя;
    • inwork — «В работе» — договор подписан, исполнитель выполняет порученную работу;
    • accepting — «На подпись» — у задания есть акт выполненных работ, ожидающий подписания со стороны заказчика;
    • completed — «На оплату» — работа выполнена, задание можно отправлять на оплату;
    • paying — «В процессе» — сформирован платеж исполнителю;
    • paid — «Завершённое» — платеж проведен, сформирован чек;
    • canceled — «Неактивное» — задание было отменено для подписания договора и выполнения работы;
    • error — «Ошибка оплаты» — в процессе оплаты возникли ошибки;
  • title — название задачи;

  • executor — данные об исполнителе задания.

Параметры для создания задания:

Параметр Тип Обязательное? Описание
description str/dict Да Описание задания
executor_inn / executor str Да ИНН исполнителя или его номер телефона, или оба параметра
title str Да Заголовок задания
category / document_name str Да Категория задания. Параметр document_name — альтернатива category, использутеся для выбора шаблона договора
amount_gross / fee float Да Сумма гросс
period_from str Нет Дата начала действия договора (при подписании договора на платформе)
period_to str Нет Дата окончания действия договора (при подписании договора на платформе)
period_duration int Нет Период действия договора. По умолчанию — 30 дней с даты создания задания
additional_info str Нет Дополнительные указания к заданию
metadata json Нет Дополнительные данные для задания
type_of_executor str Нет Вариант работы с исполнителем: СМЗ, ГПХ или ИП
act_required bool Нет Требуется ли акт выполненных работ. По умолчанию — false
autocomplete bool Нет Формирование задания в статусе completed. По умолчанию — false. Статус ставится при условии, если параметр act_required такжке принимает значение false

Применение

Создать задачу (старые параметры)
POST/api/tasks

Example URI

POST /api/tasks
Request
HideShow

POST  /api/tasks

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Body
{
  "category": "development",
  "date": "2021-11-03",
  "description": "Platform development",
  "executor": "+79032702708",
  "title": "Platform development",
  "fee": 2700,
  "metadata": {
    "test": "test"
  },
  "executor_inn": "012345678901"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1986,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": null,
    "act_required": false,
    "additional_info": null,
    "agreement_signing_uri": "https://sign.stg.rocketwork.ru/case/eyJ0YXNrX2lkIjoxOTg2LCJzaWduYXR1cmVfY3JlYXRlX3RpbWUiOjE2MzU5NDUwNjIsImRvY3VtZW50X3R5cGUiOiJhZ3JlZW1lbnQifQ",
    "agreement_uri": "https://localhost:3000/api/tasks/1add9183c03f74938b1b136bf0a8cbc730ca1673beabd0bf0454b7994053a7f9/agreement?state=with_stamp",
    "amount_gross": "2700.0",
    "category": "development",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:02.907Z",
    "description": [
      "Platform development"
    ],
    "executor": {
      "id": 647,
      "email": "alice.lakin@howell.name",
      "employment_kind": "selfemployed",
      "first_name": "Лариса",
      "inn": "012345678901",
      "last_name": "Захарова",
      "phone": "+79032702708",
      "second_name": "Романовна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": null,
    "fee": "2700.0",
    "metadata": {
      "test": "test"
    },
    "paid_at": null,
    "payment_errors": [],
    "period_duration": 30,
    "period_from": null,
    "period_to": null,
    "receipt_uri": null,
    "signature_form": "online",
    "signed_at": "2021-11-03T13:11:02.000Z",
    "status": "draft",
    "title": "Platform development",
    "updated_at": "2021-11-03T13:11:02.935Z"
  }
}
Request
HideShow

POST  /api/tasks

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Response  422
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "errors": [
    "Исполнитель не найден"
  ]
}

Создать задачу (новые параметры)
POST/api/tasks

Example URI

POST /api/tasks
Request
HideShow

POST  /api/tasks

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjMsInRva2VuIjoiS1VLVVhOQSJ9.CC1YWvha-OUCC-eb1rPB73n2mUgqmwswBNQC8xP2jT4mbmWjMPc0pn8UGe5sY4uiIWLv44up-RzRR-USAX-fQ-SrH4718XM3hZv5czrF7F8Uz3rRjN0OGP85Lc9-1jgDjrCDkpstMUehLiEIra0wTUxX0MfF_HOxsJiZyinHYxwk_Yv1Ouj5ZTf0YyjoFo3GrbQJ_lwG8rWrNBkxzdjGQYdzOpl0aUjOGeXcDIsOAGkmvqBN9-jqQNBWAZtDbXyP4QU-B621jrUVdBzzne6NDfBKadtAIVEv2eRyGZoxezHQ39834aHFkaAz0AeBy5c3iAS9NMVColg60uiHjUqCrg
Content-Type: application/json
Body
{
  "document_name": "name-2",
  "description": "Platform development\nPlatform redevelopment",
  "executor": "+79032702708",
  "title": "Platform development",
  "amount_gross": 100,
  "document_number": "112",
  "document_date": "20.02.2001",
  "period_to": "01.09.2021",
  "act_required": "true",
  "executor_inn": "012345678901",
  "additional_info": "Do something excellent"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1987,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": "https://sign.stg.rocketwork.ru/case/eyJ0YXNrX2lkIjoxOTg3LCJzaWduYXR1cmVfY3JlYXRlX3RpbWUiOjE2MzU5NDUwNjMsImRvY3VtZW50X3R5cGUiOiJhY2NlcHRhbmNlIn0",
    "acceptance_uri": "https://localhost:3000/api/tasks/db8615bab5622f9d64bfa82c7caeed68e8959655a7c5de0b318b2298043104f9/acceptance?state=with_stamp",
    "act_required": true,
    "additional_info": "Do something excellent",
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/db8615bab5622f9d64bfa82c7caeed68e8959655a7c5de0b318b2298043104f9/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "name-2",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:03.216Z",
    "description": [
      "Platform development",
      "Platform redevelopment"
    ],
    "executor": {
      "id": 649,
      "email": "jenelle@luettgen.name",
      "employment_kind": "selfemployed",
      "first_name": "Антонина",
      "inn": "012345678901",
      "last_name": "Дмитриева",
      "phone": "+79032702708",
      "second_name": "Викторовна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": "2001-02-20T00:00:00.000Z",
    "fee": "100.0",
    "metadata": {
      "legal": {
        "id": "112"
      }
    },
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": "2021-09-01",
    "receipt_uri": null,
    "signature_form": "manual",
    "signed_at": "2001-02-20T00:00:00.000Z",
    "status": "inwork",
    "title": "Platform development",
    "updated_at": "2021-11-03T13:11:03.230Z"
  }
}
Request
HideShow

POST  /api/tasks

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjMsInRva2VuIjoiS1VLVVhOQSJ9.CC1YWvha-OUCC-eb1rPB73n2mUgqmwswBNQC8xP2jT4mbmWjMPc0pn8UGe5sY4uiIWLv44up-RzRR-USAX-fQ-SrH4718XM3hZv5czrF7F8Uz3rRjN0OGP85Lc9-1jgDjrCDkpstMUehLiEIra0wTUxX0MfF_HOxsJiZyinHYxwk_Yv1Ouj5ZTf0YyjoFo3GrbQJ_lwG8rWrNBkxzdjGQYdzOpl0aUjOGeXcDIsOAGkmvqBN9-jqQNBWAZtDbXyP4QU-B621jrUVdBzzne6NDfBKadtAIVEv2eRyGZoxezHQ39834aHFkaAz0AeBy5c3iAS9NMVColg60uiHjUqCrg
Content-Type: application/json
Response  422
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "errors": [
    "Исполнитель не найден"
  ]
}

Создать задачу с переходом в статус COMPLETED
POST/api/tasks

Example URI

POST /api/tasks
Request
HideShow

POST  /api/tasks

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjMsInRva2VuIjoiS1VLVVhOQSJ9.CC1YWvha-OUCC-eb1rPB73n2mUgqmwswBNQC8xP2jT4mbmWjMPc0pn8UGe5sY4uiIWLv44up-RzRR-USAX-fQ-SrH4718XM3hZv5czrF7F8Uz3rRjN0OGP85Lc9-1jgDjrCDkpstMUehLiEIra0wTUxX0MfF_HOxsJiZyinHYxwk_Yv1Ouj5ZTf0YyjoFo3GrbQJ_lwG8rWrNBkxzdjGQYdzOpl0aUjOGeXcDIsOAGkmvqBN9-jqQNBWAZtDbXyP4QU-B621jrUVdBzzne6NDfBKadtAIVEv2eRyGZoxezHQ39834aHFkaAz0AeBy5c3iAS9NMVColg60uiHjUqCrg
Content-Type: application/json
Body
{
  "autocomplete": true,
  "document_name": "name-7",
  "description": "Platform development\nPlatform redevelopment",
  "executor": "+79032702708",
  "title": "Platform development",
  "amount_gross": 100,
  "document_number": "RW-000",
  "document_date": "20.02.2001",
  "period_to": "01.09.2021",
  "executor_inn": "012345678901",
  "additional_info": "Do something excellent"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1988,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": null,
    "act_required": false,
    "additional_info": "Do something excellent",
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/70379c746dcf87ad7ae1af33bca9b01d3844e9a10de6e8de7e54c14af9a5e6f9/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "name-7",
    "completed_at": "2021-11-03T13:11:03.532Z",
    "created_at": "2021-11-03T13:11:03.521Z",
    "description": [
      "Platform development",
      "Platform redevelopment"
    ],
    "executor": {
      "id": 651,
      "email": "thurman.gottlieb@botsford.biz",
      "employment_kind": "selfemployed",
      "first_name": "Инна",
      "inn": "012345678901",
      "last_name": "Новикова",
      "phone": "+79032702708",
      "second_name": "Матвеевна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": "2001-02-20T00:00:00.000Z",
    "fee": "100.0",
    "metadata": {
      "legal": {
        "id": "RW-000"
      }
    },
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": "2021-09-01",
    "receipt_uri": null,
    "signature_form": "manual",
    "signed_at": "2001-02-20T00:00:00.000Z",
    "status": "completed",
    "title": "Platform development",
    "updated_at": "2021-11-03T13:11:03.535Z"
  }
}
Request
HideShow

POST  /api/tasks

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjMsInRva2VuIjoiS1VLVVhOQSJ9.CC1YWvha-OUCC-eb1rPB73n2mUgqmwswBNQC8xP2jT4mbmWjMPc0pn8UGe5sY4uiIWLv44up-RzRR-USAX-fQ-SrH4718XM3hZv5czrF7F8Uz3rRjN0OGP85Lc9-1jgDjrCDkpstMUehLiEIra0wTUxX0MfF_HOxsJiZyinHYxwk_Yv1Ouj5ZTf0YyjoFo3GrbQJ_lwG8rWrNBkxzdjGQYdzOpl0aUjOGeXcDIsOAGkmvqBN9-jqQNBWAZtDbXyP4QU-B621jrUVdBzzne6NDfBKadtAIVEv2eRyGZoxezHQ39834aHFkaAz0AeBy5c3iAS9NMVColg60uiHjUqCrg
Content-Type: application/json
Body
{
  "autocomplete": true,
  "document_name": "name-10",
  "description": "Platform development\nPlatform redevelopment",
  "executor": "+79032702708",
  "title": "Platform development",
  "amount_gross": 100,
  "document_number": "RW-000",
  "document_date": "20.02.2001",
  "period_to": "01.09.2021",
  "act_required": "true",
  "executor_inn": "012345678901",
  "additional_info": "Do something excellent"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1989,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": "https://sign.stg.rocketwork.ru/case/eyJ0YXNrX2lkIjoxOTg5LCJzaWduYXR1cmVfY3JlYXRlX3RpbWUiOjE2MzU5NDUwNjMsImRvY3VtZW50X3R5cGUiOiJhY2NlcHRhbmNlIn0",
    "acceptance_uri": "https://localhost:3000/api/tasks/a19451e64bb1d9ea2c956fb673feb839687ef17e143a36a36af25d77b2611091/acceptance?state=with_stamp",
    "act_required": true,
    "additional_info": "Do something excellent",
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/a19451e64bb1d9ea2c956fb673feb839687ef17e143a36a36af25d77b2611091/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "name-10",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:03.686Z",
    "description": [
      "Platform development",
      "Platform redevelopment"
    ],
    "executor": {
      "id": 652,
      "email": "cindi@keelinghahn.ca",
      "employment_kind": "selfemployed",
      "first_name": "Нонна",
      "inn": "012345678901",
      "last_name": "Воробьева",
      "phone": "+79032702708",
      "second_name": "Викторовна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": "2001-02-20T00:00:00.000Z",
    "fee": "100.0",
    "metadata": {
      "legal": {
        "id": "RW-000"
      }
    },
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": "2021-09-01",
    "receipt_uri": null,
    "signature_form": "manual",
    "signed_at": "2001-02-20T00:00:00.000Z",
    "status": "inwork",
    "title": "Platform development",
    "updated_at": "2021-11-03T13:11:03.699Z"
  }
}

Получить информацию о задаче
GET/api/tasks/{id}

Example URI

GET /api/tasks/1990
URI Parameters
HideShow
id
number (required) Example: 1990
Request
HideShow

GET  /api/tasks/1990

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjMsInRva2VuIjoiS1VLVVhOQSJ9.CC1YWvha-OUCC-eb1rPB73n2mUgqmwswBNQC8xP2jT4mbmWjMPc0pn8UGe5sY4uiIWLv44up-RzRR-USAX-fQ-SrH4718XM3hZv5czrF7F8Uz3rRjN0OGP85Lc9-1jgDjrCDkpstMUehLiEIra0wTUxX0MfF_HOxsJiZyinHYxwk_Yv1Ouj5ZTf0YyjoFo3GrbQJ_lwG8rWrNBkxzdjGQYdzOpl0aUjOGeXcDIsOAGkmvqBN9-jqQNBWAZtDbXyP4QU-B621jrUVdBzzne6NDfBKadtAIVEv2eRyGZoxezHQ39834aHFkaAz0AeBy5c3iAS9NMVColg60uiHjUqCrg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1990,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": null,
    "act_required": false,
    "additional_info": null,
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/215e18a50874fc2ef46e9ad00c5abd6e4c2292a04e1793168bae8a7f74a6926b/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "Доставка ЕДЫ",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:03.748Z",
    "description": [],
    "executor": {
      "id": 653,
      "email": "loni@herzog.biz",
      "employment_kind": "selfemployed",
      "first_name": "Пелагея",
      "inn": "1234567890",
      "last_name": "Баранова",
      "phone": "+79955319264",
      "second_name": "Вадимовна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": null,
    "fee": "100.0",
    "metadata": {},
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": null,
    "receipt_uri": null,
    "signature_form": "online",
    "signed_at": "2021-11-03T13:11:03.748Z",
    "status": "draft",
    "title": "Доставить ужин",
    "updated_at": "2021-11-03T13:11:03.748Z"
  }
}

Отметить задачу как выполненную
PATCH/api/tasks/{id}/{event}

Example URI

PATCH /api/tasks/1991/complete
URI Parameters
HideShow
id
number (required) Example: 1991
event
string (required) Example: complete
Request
HideShow

PATCH  /api/tasks/1991/complete

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjMsInRva2VuIjoiS1VLVVhOQSJ9.CC1YWvha-OUCC-eb1rPB73n2mUgqmwswBNQC8xP2jT4mbmWjMPc0pn8UGe5sY4uiIWLv44up-RzRR-USAX-fQ-SrH4718XM3hZv5czrF7F8Uz3rRjN0OGP85Lc9-1jgDjrCDkpstMUehLiEIra0wTUxX0MfF_HOxsJiZyinHYxwk_Yv1Ouj5ZTf0YyjoFo3GrbQJ_lwG8rWrNBkxzdjGQYdzOpl0aUjOGeXcDIsOAGkmvqBN9-jqQNBWAZtDbXyP4QU-B621jrUVdBzzne6NDfBKadtAIVEv2eRyGZoxezHQ39834aHFkaAz0AeBy5c3iAS9NMVColg60uiHjUqCrg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1991,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": null,
    "act_required": false,
    "additional_info": null,
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/0804d67b5ab9729e247f25bdc818aeb0b3b168a87c512cd4bc95a9ba02563333/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "Доставка ЕДЫ",
    "completed_at": "2021-11-03T13:11:03.876Z",
    "created_at": "2021-11-03T13:11:03.845Z",
    "description": [],
    "executor": {
      "id": 654,
      "email": "jonathon@mantetreutel.name",
      "employment_kind": "selfemployed",
      "first_name": "Снежана",
      "inn": "1234567890",
      "last_name": "Попова",
      "phone": "+78330377273",
      "second_name": "Ефимовна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": null,
    "fee": "100.0",
    "metadata": {},
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": null,
    "receipt_uri": null,
    "signature_form": "online",
    "signed_at": "2021-11-03T13:11:03.838Z",
    "status": "completed",
    "title": "Доставить ужин",
    "updated_at": "2021-11-03T13:11:03.878Z"
  }
}

[DEPRECATED] Отметить задачу как подписанную
PATCH/api/tasks/{id}/mark_as_signed

Example URI

PATCH /api/tasks/1992/mark_as_signed
URI Parameters
HideShow
id
number (required) Example: 1992
Request
HideShow

PATCH  /api/tasks/1992/mark_as_signed

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjMsInRva2VuIjoiS1VLVVhOQSJ9.CC1YWvha-OUCC-eb1rPB73n2mUgqmwswBNQC8xP2jT4mbmWjMPc0pn8UGe5sY4uiIWLv44up-RzRR-USAX-fQ-SrH4718XM3hZv5czrF7F8Uz3rRjN0OGP85Lc9-1jgDjrCDkpstMUehLiEIra0wTUxX0MfF_HOxsJiZyinHYxwk_Yv1Ouj5ZTf0YyjoFo3GrbQJ_lwG8rWrNBkxzdjGQYdzOpl0aUjOGeXcDIsOAGkmvqBN9-jqQNBWAZtDbXyP4QU-B621jrUVdBzzne6NDfBKadtAIVEv2eRyGZoxezHQ39834aHFkaAz0AeBy5c3iAS9NMVColg60uiHjUqCrg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1992,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": null,
    "act_required": false,
    "additional_info": null,
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/770f92d67d056804b3de09068e03043533c0f73c46dbe7c5e6d8d5fdf2e7147b/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "Доставка ЕДЫ",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:03.895Z",
    "description": [],
    "executor": {
      "id": 655,
      "email": "crystle.volkman@kozeyjacobson.biz",
      "employment_kind": "selfemployed",
      "first_name": "Акулина",
      "inn": "1234567890",
      "last_name": "Никитина",
      "phone": "+79920512600",
      "second_name": "Кирилловна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": "2021-11-03T13:11:03.000Z",
    "fee": "100.0",
    "metadata": {},
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": null,
    "receipt_uri": null,
    "signature_form": "manual",
    "signed_at": "2021-11-03T13:11:03.000Z",
    "status": "inwork",
    "title": "Доставить ужин",
    "updated_at": "2021-11-03T13:11:03.895Z"
  }
}
Request
HideShow

PATCH  /api/tasks/1993/mark_as_signed

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjQsInRva2VuIjoiS1VLVVhOQSJ9.a4tO13tgtNqpZF4v_Osd_Ix9AS-EC7TXdGPXzzW6zBw0s3MkQl0H20_fIPZ56ueNsoBC1w7w8TQXnryaVrHFXvF2OiG9sAyC51tzf0BHtH4hHisdvYtWzyNHeYK519vla4oQp0yekDkCnWT0l6XZW9ednjC0ZQFkJWHQ3pKsxlaFbaNPXcDwzaMVVbRZlwaw9nvr81gzzQWVIaGu2Dmf0dx2tKNITsqZuBwzYeR38StoKOcz0a69Td0tFFLOihbbrybeY9j4Jo0EQ6pfLANV0kGkAtf_pWx3BQmxjHb-jp66I-c17xjwRqQvpOG5A8PxlV8T51HHqfvXxFsRpSXLUg
Content-Type: application/json
Body
{
  "signed_at": "2021-01-12",
  "metadata": {
    "legal": {
      "id": "12345"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1993,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": null,
    "act_required": false,
    "additional_info": null,
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/337079f720d35bb57d5ff3e26ff6abac8cabfdc2ff3250177446a375d414a850/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "Доставка ЕДЫ",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:04.003Z",
    "description": [],
    "executor": {
      "id": 656,
      "email": "alishia.gibson@hicklesenger.us",
      "employment_kind": "selfemployed",
      "first_name": "Мария",
      "inn": "1234567890",
      "last_name": "Щербакова",
      "phone": "+73495245980",
      "second_name": "Олеговна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": "2021-01-12T00:00:00.000Z",
    "fee": "100.0",
    "metadata": {
      "legal": {
        "id": "12345"
      }
    },
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": null,
    "receipt_uri": null,
    "signature_form": "manual",
    "signed_at": "2021-01-12T00:00:00.000Z",
    "status": "inwork",
    "title": "Доставить ужин",
    "updated_at": "2021-11-03T13:11:04.003Z"
  }
}

Подписание акта
PATCH/api/tasks/{id}/sign_act

Example URI

PATCH /api/tasks/1994/sign_act
URI Parameters
HideShow
id
number (required) Example: 1994
Request
HideShow

PATCH  /api/tasks/1994/sign_act

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjQsInRva2VuIjoiS1VLVVhOQSJ9.a4tO13tgtNqpZF4v_Osd_Ix9AS-EC7TXdGPXzzW6zBw0s3MkQl0H20_fIPZ56ueNsoBC1w7w8TQXnryaVrHFXvF2OiG9sAyC51tzf0BHtH4hHisdvYtWzyNHeYK519vla4oQp0yekDkCnWT0l6XZW9ednjC0ZQFkJWHQ3pKsxlaFbaNPXcDwzaMVVbRZlwaw9nvr81gzzQWVIaGu2Dmf0dx2tKNITsqZuBwzYeR38StoKOcz0a69Td0tFFLOihbbrybeY9j4Jo0EQ6pfLANV0kGkAtf_pWx3BQmxjHb-jp66I-c17xjwRqQvpOG5A8PxlV8T51HHqfvXxFsRpSXLUg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1994,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": "https://localhost:3000/api/tasks/90dbbdcec217131deed5cb94a4ef52846ded2ccc1a0179f136bd9ce1b992fc93/acceptance?state=with_stamp",
    "act_required": true,
    "additional_info": null,
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/90dbbdcec217131deed5cb94a4ef52846ded2ccc1a0179f136bd9ce1b992fc93/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "Доставка ЕДЫ",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:04.242Z",
    "description": [],
    "executor": {
      "id": 657,
      "email": "maryann.jacobi@jones.info",
      "employment_kind": "selfemployed",
      "first_name": "Римма",
      "inn": "1234567890",
      "last_name": "Шестакова",
      "phone": "+79022782067",
      "second_name": "Платоновна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": null,
    "fee": "100.0",
    "metadata": {},
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": null,
    "receipt_uri": null,
    "signature_form": "online",
    "signed_at": "2021-11-03T13:11:04.239Z",
    "status": "accepting",
    "title": "Доставить ужин",
    "updated_at": "2021-11-03T13:11:04.242Z"
  }
}
Request
HideShow

PATCH  /api/tasks/1995/sign_act

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjQsInRva2VuIjoiS1VLVVhOQSJ9.a4tO13tgtNqpZF4v_Osd_Ix9AS-EC7TXdGPXzzW6zBw0s3MkQl0H20_fIPZ56ueNsoBC1w7w8TQXnryaVrHFXvF2OiG9sAyC51tzf0BHtH4hHisdvYtWzyNHeYK519vla4oQp0yekDkCnWT0l6XZW9ednjC0ZQFkJWHQ3pKsxlaFbaNPXcDwzaMVVbRZlwaw9nvr81gzzQWVIaGu2Dmf0dx2tKNITsqZuBwzYeR38StoKOcz0a69Td0tFFLOihbbrybeY9j4Jo0EQ6pfLANV0kGkAtf_pWx3BQmxjHb-jp66I-c17xjwRqQvpOG5A8PxlV8T51HHqfvXxFsRpSXLUg
Content-Type: application/json
Response  422
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "errors": [
    "Task is not ready for signing act"
  ]
}
Request
HideShow

PATCH  /api/tasks/1996/sign_act

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjQsInRva2VuIjoiS1VLVVhOQSJ9.a4tO13tgtNqpZF4v_Osd_Ix9AS-EC7TXdGPXzzW6zBw0s3MkQl0H20_fIPZ56ueNsoBC1w7w8TQXnryaVrHFXvF2OiG9sAyC51tzf0BHtH4hHisdvYtWzyNHeYK519vla4oQp0yekDkCnWT0l6XZW9ednjC0ZQFkJWHQ3pKsxlaFbaNPXcDwzaMVVbRZlwaw9nvr81gzzQWVIaGu2Dmf0dx2tKNITsqZuBwzYeR38StoKOcz0a69Td0tFFLOihbbrybeY9j4Jo0EQ6pfLANV0kGkAtf_pWx3BQmxjHb-jp66I-c17xjwRqQvpOG5A8PxlV8T51HHqfvXxFsRpSXLUg
Content-Type: application/json
Response  422
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "errors": [
    "Task is invalid for signing act"
  ]
}
Request
HideShow

PATCH  /api/tasks/1997/sign_act

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjQsInRva2VuIjoiS1VLVVhOQSJ9.a4tO13tgtNqpZF4v_Osd_Ix9AS-EC7TXdGPXzzW6zBw0s3MkQl0H20_fIPZ56ueNsoBC1w7w8TQXnryaVrHFXvF2OiG9sAyC51tzf0BHtH4hHisdvYtWzyNHeYK519vla4oQp0yekDkCnWT0l6XZW9ednjC0ZQFkJWHQ3pKsxlaFbaNPXcDwzaMVVbRZlwaw9nvr81gzzQWVIaGu2Dmf0dx2tKNITsqZuBwzYeR38StoKOcz0a69Td0tFFLOihbbrybeY9j4Jo0EQ6pfLANV0kGkAtf_pWx3BQmxjHb-jp66I-c17xjwRqQvpOG5A8PxlV8T51HHqfvXxFsRpSXLUg
Content-Type: application/json
Response  422
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "errors": [
    "Task does not require act signing"
  ]
}

Запустить процесс оплаты задачи
PATCH/api/tasks/{id}/pay

Example URI

PATCH /api/tasks/1998/pay
URI Parameters
HideShow
id
number (required) Example: 1998
Request
HideShow

PATCH  /api/tasks/1998/pay

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjQsInRva2VuIjoiS1VLVVhOQSJ9.a4tO13tgtNqpZF4v_Osd_Ix9AS-EC7TXdGPXzzW6zBw0s3MkQl0H20_fIPZ56ueNsoBC1w7w8TQXnryaVrHFXvF2OiG9sAyC51tzf0BHtH4hHisdvYtWzyNHeYK519vla4oQp0yekDkCnWT0l6XZW9ednjC0ZQFkJWHQ3pKsxlaFbaNPXcDwzaMVVbRZlwaw9nvr81gzzQWVIaGu2Dmf0dx2tKNITsqZuBwzYeR38StoKOcz0a69Td0tFFLOihbbrybeY9j4Jo0EQ6pfLANV0kGkAtf_pWx3BQmxjHb-jp66I-c17xjwRqQvpOG5A8PxlV8T51HHqfvXxFsRpSXLUg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 1998,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": null,
    "act_required": false,
    "additional_info": null,
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/5ffb85171afe1366ed253bb4766e3d9823a969c7fe957865ca28cf84954f93ed/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "Доставка ЕДЫ",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:04.815Z",
    "description": [],
    "executor": {
      "id": 661,
      "email": "polly@durgan.info",
      "employment_kind": "selfemployed",
      "first_name": "Марфа",
      "inn": "1234567890",
      "last_name": "Сергеева",
      "phone": "+79127355045",
      "second_name": "Емельяновна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": null,
    "fee": "100.0",
    "metadata": {},
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": null,
    "receipt_uri": null,
    "signature_form": "online",
    "signed_at": "2021-11-03T13:11:04.815Z",
    "status": "paying",
    "title": "Доставить ужин",
    "updated_at": "2021-11-03T13:11:04.815Z"
  }
}
Request
HideShow

PATCH  /api/tasks/1999/pay

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjQsInRva2VuIjoiS1VLVVhOQSJ9.a4tO13tgtNqpZF4v_Osd_Ix9AS-EC7TXdGPXzzW6zBw0s3MkQl0H20_fIPZ56ueNsoBC1w7w8TQXnryaVrHFXvF2OiG9sAyC51tzf0BHtH4hHisdvYtWzyNHeYK519vla4oQp0yekDkCnWT0l6XZW9ednjC0ZQFkJWHQ3pKsxlaFbaNPXcDwzaMVVbRZlwaw9nvr81gzzQWVIaGu2Dmf0dx2tKNITsqZuBwzYeR38StoKOcz0a69Td0tFFLOihbbrybeY9j4Jo0EQ6pfLANV0kGkAtf_pWx3BQmxjHb-jp66I-c17xjwRqQvpOG5A8PxlV8T51HHqfvXxFsRpSXLUg
Content-Type: application/json
Response  422
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "errors": [
    "Task in status inwork can't be paid"
  ]
}
Request
HideShow

PATCH  /api/tasks/2000/pay

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjUsInRva2VuIjoiS1VLVVhOQSJ9.c-_tg4ug402HPlXCXe7RzeEybF-0_ceYprNcRMX7TSNHcbQMk_5ZlnrHKV33FvVLFxRvuGH25Q3yL84r_-1cdpB-OEGO8jCZ8iYZTfF1V_Vx--uDNPyhpyuPYHsHUlOahjPPI3wI6kjXn8COd_UYmieAYPcu4LRa0ITs3k1WBb2T4JnmFNa9cEopchkrI9XSqTPcPkcdcSxMatDbMRBAL60lVlR1vKDShzqxxzdHAa-4FWQFJN9o69HKxcOVcKc-3_lQGEdOIIwAxaDRnlID3w4H5F1dHsEowC2sm9cOtoLvP-mGQWX4cgTsHfSEqun_STlgiROvLoao7HDaOCwjqg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 2000,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": null,
    "act_required": false,
    "additional_info": null,
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/8d0b7f30f43ea986670e6b12a9b34028f3e48b83f97aa072cf953f6e1bb5ecce/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "Доставка ЕДЫ",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:05.009Z",
    "description": [],
    "executor": {
      "id": 663,
      "email": "caroline@terry.name",
      "employment_kind": "selfemployed",
      "first_name": "Серафима",
      "inn": "1234567890",
      "last_name": "Казакова",
      "phone": "+78615945785",
      "second_name": "Антоновна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": null,
    "fee": "100.0",
    "metadata": {},
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": null,
    "receipt_uri": null,
    "signature_form": "online",
    "signed_at": "2021-11-03T13:11:05.009Z",
    "status": "paying",
    "title": "Доставить ужин",
    "updated_at": "2021-11-03T13:11:05.009Z"
  }
}

Отменить задачу
PATCH/api/tasks/{id}/cancel

Example URI

PATCH /api/tasks/2001/cancel
URI Parameters
HideShow
id
number (required) Example: 2001
Request
HideShow

PATCH  /api/tasks/2001/cancel

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjUsInRva2VuIjoiS1VLVVhOQSJ9.c-_tg4ug402HPlXCXe7RzeEybF-0_ceYprNcRMX7TSNHcbQMk_5ZlnrHKV33FvVLFxRvuGH25Q3yL84r_-1cdpB-OEGO8jCZ8iYZTfF1V_Vx--uDNPyhpyuPYHsHUlOahjPPI3wI6kjXn8COd_UYmieAYPcu4LRa0ITs3k1WBb2T4JnmFNa9cEopchkrI9XSqTPcPkcdcSxMatDbMRBAL60lVlR1vKDShzqxxzdHAa-4FWQFJN9o69HKxcOVcKc-3_lQGEdOIIwAxaDRnlID3w4H5F1dHsEowC2sm9cOtoLvP-mGQWX4cgTsHfSEqun_STlgiROvLoao7HDaOCwjqg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "task": {
    "id": 2001,
    "acceptance_signed_at": null,
    "acceptance_signing_uri": null,
    "acceptance_uri": null,
    "act_required": false,
    "additional_info": null,
    "agreement_signing_uri": null,
    "agreement_uri": "https://localhost:3000/api/tasks/dfaf9bc5c8e6518f47a7a8698ba9a29ee0996581a5e2bedc846dfe2100eb1817/agreement?state=with_stamp",
    "amount_gross": "100.0",
    "category": "Доставка ЕДЫ",
    "completed_at": null,
    "created_at": "2021-11-03T13:11:05.173Z",
    "description": [],
    "executor": {
      "id": 664,
      "email": "ernestine@vandervortreichel.biz",
      "employment_kind": "selfemployed",
      "first_name": "Мария",
      "inn": "1234567890",
      "last_name": "Семенова",
      "phone": "+78353520268",
      "second_name": "Егоровна",
      "selfemployed_status": "validated"
    },
    "executor_signed_at": null,
    "fee": "100.0",
    "metadata": {},
    "paid_at": null,
    "payment_errors": [],
    "period_duration": null,
    "period_from": null,
    "period_to": null,
    "receipt_uri": null,
    "signature_form": "online",
    "signed_at": null,
    "status": "canceled",
    "title": "Доставить ужин",
    "updated_at": "2021-11-03T13:11:05.208Z"
  }
}
Request
HideShow

PATCH  /api/tasks/2002/cancel

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjUsInRva2VuIjoiS1VLVVhOQSJ9.c-_tg4ug402HPlXCXe7RzeEybF-0_ceYprNcRMX7TSNHcbQMk_5ZlnrHKV33FvVLFxRvuGH25Q3yL84r_-1cdpB-OEGO8jCZ8iYZTfF1V_Vx--uDNPyhpyuPYHsHUlOahjPPI3wI6kjXn8COd_UYmieAYPcu4LRa0ITs3k1WBb2T4JnmFNa9cEopchkrI9XSqTPcPkcdcSxMatDbMRBAL60lVlR1vKDShzqxxzdHAa-4FWQFJN9o69HKxcOVcKc-3_lQGEdOIIwAxaDRnlID3w4H5F1dHsEowC2sm9cOtoLvP-mGQWX4cgTsHfSEqun_STlgiROvLoao7HDaOCwjqg
Content-Type: application/json
Response  422
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "errors": [
    "Task in status inwork can't become canceled"
  ]
}

Получение данных об исполнителе

Исполнители

При необходимости можно получить данные о самозанятом или зарегистрировать его:

  • first_name — имя

  • second_name — отчество

  • last_name — фамилия

  • phone — номер телефона

  • selfemployed_status — статус самозанятости

  • inn — ИНН самозанятого

  • payment_info - данные о счете самозанятого

    • bank_account - данные о банковском счете
      • bic - Бик банка
      • account_number - номер счета
    • card_number - номер карты

Применение

Завести исполнителя с переданными данными
POST/api/executors

Example URI

POST /api/executors
Request
HideShow

POST  /api/executors

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Body
{
  "executor": {
    "inn": "12312312311",
    "phone": "+79153271212",
    "first_name": "Test",
    "last_name": "Last Name Test",
    "second_name": "Secod Name Test",
    "payment_info": {
      "bank_account": {
        "bic": "31321312321",
        "account_number": "13231231"
      },
      "card_number": "13123213123"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "executor": {
    "id": 642,
    "email": "",
    "employment_kind": "selfemployed",
    "first_name": "Test",
    "inn": "12312312311",
    "last_name": "Last Name Test",
    "phone": "+79153271212",
    "second_name": "Secod Name Test",
    "selfemployed_status": "unknown"
  }
}

Обновить данные исполнителя
PATCH/api/executors/+79151846547

Example URI

PATCH /api/executors/+79151846547
URI Parameters
HideShow
id
string (required) Example: %2B79151846547
Request
HideShow

PATCH  /api/executors/ 79151846547

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Body
{
  "executor": {
    "inn": "12312312311",
    "phone": "+79153271212",
    "first_name": "Test",
    "last_name": "Last Name Test",
    "second_name": "Secod Name Test",
    "payment_info": {
      "bank_account": {
        "bic": "31321312321",
        "account_number": "13231231"
      },
      "card_number": "13123213123"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "executor": {
    "id": 643,
    "email": "pura.brekke@rosenbaumbernier.name",
    "employment_kind": "selfemployed",
    "first_name": "Test",
    "inn": "12312312311",
    "last_name": "Last Name Test",
    "phone": "+79153271212",
    "second_name": "Secod Name Test",
    "selfemployed_status": "validated"
  }
}

Получить данные исполнителя по номеру телефона
GET/api/executors/+79151846547

Example URI

GET /api/executors/+79151846547
URI Parameters
HideShow
id
string (required) Example: %2B79151846547
Request
HideShow

GET  /api/executors/ 79151846547

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "executor": {
    "id": 644,
    "email": "neil@volkmanhodkiewicz.name",
    "employment_kind": "selfemployed",
    "first_name": "Анна",
    "inn": "770100009999",
    "last_name": "Филиппова",
    "phone": "+79151846547",
    "second_name": "Антоновна",
    "selfemployed_status": "validated"
  }
}
Request
HideShow

GET  /api/executors/79101230000

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "errors": [
    "Executor not found"
  ]
}

Получить данные исполнителя по ИНН
GET/api/executors/{id}

Example URI

GET /api/executors/770100009999
URI Parameters
HideShow
id
number (required) Example: 770100009999
Request
HideShow

GET  /api/executors/770100009999

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "executor": {
    "id": 646,
    "email": "karlene@torp.name",
    "employment_kind": "selfemployed",
    "first_name": "Инга",
    "inn": "770100009999",
    "last_name": "Полякова",
    "phone": "+79151846547",
    "second_name": "Робертовна",
    "selfemployed_status": "validated"
  }
}

Постбэки об изменениях задач и Подписки

Подписки

Для более эффективной работы данные о задачах должны быть всегда актуальными. Для этого мы сделали Подписки и Постбэки. Этот вариант показался нам проще и удобнее, потому что работает лучше и быстрее, чем постоянные запросы GET /api/tasks/{id}. Они не подходят для таких ситуаций, так как объем передаваемых данных значителен, из-за чего создаются необоснованные нагрузки на сеть и сервера.

Для решения этой проблемы можно попросить платформу отправлять запросы на определенные URI в случае изменений данных каких-либо задач. Такой запрос называется «постбэком», а «просьба» к платформе о совершении постбэков — «подпиской».

Постбэки

Логика постбэков заключается в обыкновенных GET и/или POST запросах с таким же телом, как и в ответе на GET/api/tasks/{id}. Отсюда вывод: постбэки способны заменить GET и POST при синхронизации или актуализации данных.

Обратите внимание, даже GET запросы будут иметь тело запроса. Подобное может не поддерживаться некоторыми веб-серверами.

Чтобы проблем не возникло, рекомендуем использовать POST-постбэки во всех ситуациях.

Подпиcки

Подписки на постбэки представляют собой указание платформе отправлять запросы при кажом изменении любой из принадлежащих заказчику задач на указанный в подписке URI. Иначе говоря: подписки на постбэки — это трекинг изменений в ваших задачах.

Подписки имеют следующие атрибуты:

  • id — уникальный идентификатор подписки;

  • uri — эндпоинт, на который будут отправляться запросы с информацией о задаче;

  • http_method — HTTP-метод данных запросов.

  • subscribed_on - Вид события, на которое идет подписка. Доступные виды:

    • executor.selfemployed_status - Подписаться на обновление статуса самозанятости

Виды событий. Payload.

executor.selfemployed_status

Отправляется в момент подтверждения статуса самозанятости

Payload:

{
  "inn":"1231412412",
  "phone":"+79153277121",
  "first_name":"Ivan",
  "last_name":"Ivanov",
  "selfemployed_status": "validated"
}

Применение

Получить список подписок
GET/api/postback_subscriptions

Example URI

GET /api/postback_subscriptions
Request
HideShow

GET  /api/postback_subscriptions

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "postback_subscription": {
      "id": 1,
      "http_method": "post",
      "uri": "http://hayes.biz",
      "authorization_credentials": {}
    }
  },
  {
    "postback_subscription": {
      "id": 2,
      "http_method": "post",
      "uri": "http://buckridgepurdy.us",
      "authorization_credentials": {}
    }
  }
]

Оформить подписку
POST/api/postback_subscriptions

Example URI

POST /api/postback_subscriptions
Request
HideShow

POST  /api/postback_subscriptions

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Body
{
  "http_method": "get",
  "uri": "http://example.com",
  "subscribed_on": [
    "tasks",
    "executors.selfemployed_status"
  ],
  "authorization_credentials": {
    "type": "Basic",
    "value": "cm9ja2V0d29yazp3b3Jr\n"
  }
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "postback_subscription": {
    "id": 3,
    "http_method": "get",
    "uri": "http://example.com",
    "authorization_credentials": {
      "type": "Basic",
      "value": "cm9ja2V0d29yazp3b3Jr\n"
    }
  }
}
Request
HideShow

POST  /api/postback_subscriptions

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Body
{
  "http_method": "get",
  "uri": "http://example.com",
  "subscribed_on": [
    "tasks",
    "executors.selfemployed_status"
  ],
  "authorization_credentials": {
    "type": "Bearer",
    "value": "eyJhbGciOiJIUzI1NiJ9.InJvY2tldHdvcmsi.RB6DpWQO4sX_1Ywo67JJ0yctOkSsDnSd-yhmnj2kz5k"
  }
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "postback_subscription": {
    "id": 4,
    "http_method": "get",
    "uri": "http://example.com",
    "authorization_credentials": {
      "type": "Bearer",
      "value": "eyJhbGciOiJIUzI1NiJ9.InJvY2tldHdvcmsi.RB6DpWQO4sX_1Ywo67JJ0yctOkSsDnSd-yhmnj2kz5k"
    }
  }
}

Отменить подписку
DELETE/api/postback_subscriptions/{id}

Example URI

DELETE /api/postback_subscriptions/5
URI Parameters
HideShow
id
number (required) Example: 5
Request
HideShow

DELETE  /api/postback_subscriptions/5

Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MzU5NDUwNjIsInRva2VuIjoiS1VLVVhOQSJ9.V0g_HGjPMl_bJGf9H9hpN_AeyElEQTZpoWP33NiYdjMpgHCUmM98R1xqvDsHDzFSi_AecEJtpAztLLbbcFx8keF5Nq3-Itc9NabovCsdGexyJv0YSX2ZVlpQakxVwMwJEea3DLhSqnA3HJyWVpxxRPjo703oP-vnQ5hNJjWgEsGnNCU5JlJ2JBHmlE_EGmURGGeTWw7hJt6wAsuz25moLx1EnEzRC8_G1WL5qSFxN4za7yaJABSuQJkekRqhR5b30BNGog567wPH2zMUPL__VVS1ELr1E2RHGlWjIMWwgPPPpnhgKWE2pY-x_qTJJB7PypLjKG-k3QqmN1XJqHDZvg
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "postback_subscription": {
    "id": 5,
    "http_method": "post",
    "uri": "http://paucekgrant.ca",
    "authorization_credentials": {}
  }
}

Generated by aglio on 03 Nov 2021