DEV Community

Spsoi
Spsoi

Posted on

YClients

Получить детали визита

https://api.yclients.com/api/v1/visit/details/{salon_id}/{record_id}/{visit_id}
Enter fullscreen mode Exit fullscreen mode
{
  "success": true,
  "data": {
    "payment_transactions": [
      {
        "id": 6023813,
        "document_id": 8172806,
        "date": "2018-06-21 17:15:00",
        "type_id": 5,
        "expense_id": 5,
        "account_id": 32299,
        "amount": 10,
        "client_id": 4241492,
        "master_id": 0,
        "supplier_id": 0,
        "comment": "",
        "item_id": 1162679,
        "target_type_id": 1,
        "record_id": 13136569,
        "goods_transaction_id": 0,
        "expense": {
          "id": 5,
          "title": "Оказание услуг"
        },
        "account": {
          "id": 32299,
          "title": "Депозиты (оплата наличными)"
        },
        "client": {
          "id": "4241492",
          "name": "ModulKassaClient",
          "phone": "71001001011"
        },
        "master": [],
        "supplier": []
      }
    ],
    "loyalty_transactions": [
      {
        "id": 10614,
        "status_id": 1,
        "amount": 0.5,
        "type_id": 2,
        "program_id": 145,
        "card_id": 20013,
        "salon_group_id": 646,
        "item_id": 0,
        "item_type_id": 0,
        "item_record_id": 0,
        "goods_transaction_id": 0,
        "is_discount": false,
        "is_loyalty_withdraw": false,
        "type": {
          "id": 2,
          "title": "Начисление по программам лояльности"
        }
      }
    ],
    "kkm_transaction_details_container": {
      "last_operation_type": 0,
      "transactions": [
        {
          "id": 1047,
          "print_date": "2018-06-25 00:45:31",
          "printed_count": 1,
          "sum": 13,
          "type": {
            "id": 0,
            "title": "Операция продажи"
          },
          "status": {
            "id": 1,
            "title": "Успешно"
          },
          "document": {
            "id": 2045,
            "type": 7,
            "type_title": "Визит"
          },
          "cashier": {
            "id": 746310,
            "name": "Андрей Панов"
          }
        }
      ]
    },
    "items": [
      {
        "id": 0,
        "item_id": 1162679,
        "item_type_id": 1,
        "record_id": 13136569,
        "item_title": "Стрижка у ТОП-мастера",
        "amount": 2,
        "first_cost": 20,
        "manual_cost": 10,
        "discount": 50,
        "cost": 10,
        "master_id": 13136569,
        "good_id": 0,
        "service_id": 1162679,
        "event_id": 0,
        "is_service": 1, // это сервис
        "is_event": 0, // это событие ??
        "is_good": 0 // это товар
      }
    ]
  },
  "meta": []
}
Enter fullscreen mode Exit fullscreen mode

Reinvent your career. Join DEV.

It takes one minute and is worth it for your career.

Get started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay