# Products and services API ###### tags: `api` `products and servces` ## API Specification ### Get all packages and redeem tickets ``` GET /api/transactions/feed/{:home_id} ``` #### Response ##### Response - `Success 200` | Name | Type | Description | | ------------------------------- | ---------- | -------------------------------------- | | my_transactions(Redeem tickets) | `Array` | List of my redeem tickets | | - id | `String` | | | - name | `String` | | | - cover_url | `String` | | | - services | `Array` | | | - delivery_items | `Array` | | | - type | `String` | | | - label | `String` | | | - redeem_at | `String` | | | my_transactions(Packages) | `Array` | List of my packages | | - id | `String` | | | - package_id | `String` | | | - description | `String` | | | - cover_url | `String` | | | - expired_at | `String` | | | - services | `Array` | | | - services.id | `String` | | | - services.title | `String` | | | - services.subtitle | `String` | | | - services.maximum_appointment_slot | `Number` | | | - services.appointments | `Array` | | | - services.appointments.id | `String` | | | - services.appointments.subscription_id | `String` | | | - services.appointments.title | `String` | | | - services.appointments.rating | `Object` | | | - services.appointments.rating.form_submission_id | `String` | | | - services.appointments.rating.score | `Number` | | | - services.appointments.planned_appointment_date | `String` | | | - services.appointments.appointment_date | `DateTime` | | | - services.appointments.date | `DateTime` | | | - services.appointments.changed_appointment_reason | `String` | | | - services.appointments.duration | `Object` | | | - services.appointments.duration.start_at | `DateTime` | | | - services.appointments.duration.end_at | `DateTime` | | | - services.appointments.status | `String` | | | - services.appointments.label | `String` | | | - services.appointments.hint | `String` | | | - services.appointments.constraint | `Object` | | | - services.appointments.constraint.can_make_appointment | `Boolean` | | | - services.appointments.constraint.can_make_appointment | `Boolean` | | | - services.appointments.constraint.can_rate | `Boolean` | | | - services.appointments.constraint.is_rating_visible | `Boolean` | | | - services.appointments.constraint.can_make_appointment_before | `DateTime` | | | - services.appointments.constraint.after_appointment_id | `String` | | | - services.appointments.service | `Object` | | | - services.appointments.id | `String` | | | - services.appointments.name | `String` | | | - services.appointments.additional_information | `String` | | | - services.is_view_all_appointment | `String` | | | - services.note | `String` | | | - services.option | `Object` | | | - services.option.main_option_title | `String` | | | - services.option.extra_option_titles | `Array[String]` | | | - delivery_items | `Array` | | | - type | `String` | | | - label | `String` | | | - period | `Object` | | | - can_repeat_purchase | `Boolean` | | | - is_owner | `Boolean` | | | - is_hidden | `Boolean` | | | - menu_list | `Array` | | | home_transactions | `Array` | List of packages that bought by others | | recommended_packages | `Array[Object]` | charging station detail | | recommended_packages.id | `String` | | | recommended_packages.thumbnail_url | `String` | | | recommended_packages.cover_url | `String` | | | recommended_packages.name | `String` | | | recommended_packages.description | `String` | | | recommended_packages.target | `String` | | | recommended_packages.title | `String` | | | recommended_packages.subtitle | `String` | | | recommended_packages.price | `Number` | | | recommended_packages.billing_cycle | `Number` | | | recommended_packages.active_purchased_count | `Number` | | | recommended_packages.is_available | `Boolean` | | | recommended_packages.is_purchased | `Boolean` | | | recommended_packages.is_supported_home_health_tracker | `Boolean` | | | recommended_packages.has_option | `Boolean` | | | recommended_packages.original_price | `Number` | | | recommended_packages.subpackages | `Array[Object]` | | | home | `Object` | | | - home.id | `String` | | | - home.project | `Object` | | | - home.address | `String` | | ##### Response example Example : Success ```json= { "result": { "my_transactions": [ { "id": "40665bd5-7f53-41f9-995a-f6864fb45a11", "name": "RJAPP-144 RJAPP-527 RJAPP-526 - Android - รับสิทธิ์ทันที - TEST-L", "cover_url": "https://storage.googleapis.com/sca-dev-brj-article-upload/article/article-1615300991916-18c37edb-ef3b-4450-89ff-2811cc85b31a?GoogleAccessId=sca-storage-dev%40baanruejai-1749.iam.gserviceaccount.com&Expires=1622348964&Signature=qg3EVSCpkJcTYJ%2BKulpBYUwq%2B%2BAlKYKSKB7ItUoCnRy5WN1lipFt0sMenlbkTAjT3kl4htCdj2LMk1TjwCO0FgWnjHIo3PBn9%2FrIq%2BZcxvsz0XtZmDhlBAX4LAd0kyhvOBcZrmJxhyjX848U9vRAZjaOPePEqVn%2BwO2i%2Fo%2FSJtRBuURNcRERIiU13FexeoF5fN7V%2FwWVzSHUQ7QwtN7xMcqa%2B34vkak6dSXGYXW2ickf96%2BiWrVjajCoHDV2bdeAHQHji%2FbEL1olfcdqcMKmnf%2FDoXzrmlSL8N2XdJkBoOQWR05Ut1tY6dUVz%2B5P71tbzZEh%2FJzwgcgDIWGP0CENww%3D%3D", "services": [], "delivery_items": [], "type": "MY_TICKET", "label": "EXPIRED", "redeem_at": "2021-03-09T21:44:48.781+07:00" } { "id": "02852a20-bd10-11eb-b848-976a18a43f75", "package_id": "468", "name": "[นิก] ทดสอบ options มีหลายแบบ", "description": "Total 2", "cover_url": "https://storage.googleapis.com/sca-dev-brj-article-upload/article/article-1621914856192-6538a2e1-e20a-4fd0-871c-e753be832885", "expired_at": "2021-06-24T23:59:59.999+07:00", "services": [ { "id": "249", "title": "[นิก] ทดสอบ options เก็บชื่อใส item", "subtitle": "[นิก] ทดสอบ options เก็บชื่อใส item", "maximum_appointment_slot": 2, "appointments": [ { "id": "2fb97efe-adae-4568-909c-28d479a6401d", "subscription_id": "65252320-b788-11eb-b9fc-1d676eb5bd7c", "title": "Appointment 1/5", "rating": null, "planned_appointment_date": null, "appointment_date": "2021-05-18T09:00:00.000+07:00", "date": "2021-05-18T09:00:00.000+07:00", "changed_appointment_reason": null, "duration": { "start_at": "2021-05-18T02:00:00.000Z", "end_at": "2021-05-18T05:00:00.000Z" }, "status": "COMPLETED", "label": "COMPLETED", "hint": null, "constraint": { "can_make_appointment": true, "can_confirm_service_complete": false, "can_rate": true, "is_rating_visible": true, "can_make_appointment_before": "2021-06-17T16:59:59.999Z", "after_appointment_id": null }, "service": { "id": "246", "name": "แพ็กแรกพบ ล้างสระ 150ตารางเมตร", "maximum_appointment_slot": 5 }, "additional_information": [] } ], "is_view_all_appointment": false, "note": "", "option": { "main_option_title": "151 - 200", "extra_option_titles": [ "ใส่ปุ๋ย", "ใส่ยา" ] } } ], "delivery_items": [], "type": "SUBSCRIPTION", "label": "ACTIVE", "period": { "start_date": "2021-05-25T11:16:42.339+07:00", "end_date": "2021-06-24T23:59:59.999+07:00", "status": "BILLING_CYCLE" }, "can_repeat_purchase": true, "is_owner": true, "is_hidden": false, "menu_list": [ "HIDDEN_FROM_OTHER", "UNSUBSCRIBE" ] }, ], "recommended_packages": [ { "id": "309", "thumbnail_url": "https://storage.googleapis.com/sca-dev-brj-article-upload/article/article-1595244586921-645208fe-9bfc-4f5b-a6bb-ebb0b0fb7bef", "cover_url": "https://storage.googleapis.com/sca-dev-brj-article-upload/article/article-1595244586095-3e1200d0-5768-4078-a788-4643c80595ef", "name": "TEST - Package สร้างใหม่ แล้วจับเข้า Package Group ทั้ง 2 ตัว", "description": "J'appris de la sorte 'que l'île de Serendib avait quatre-vingts parasanges de longueur et quatre-vingts de largeur;\nqu'elle avait une montagne, qui était la plus haute de la terre.\n(I learned this way that the island of Serendib is eighty parasangs in length, and as many in breadth;\nthat it had a mountain, which was the highest in the world.)\n", "target": "สำหรับทดสอบ", "title": "TEST - Package สร้างใหม่ แล้วจับเข้า Package Group ทั้ง 2 ตัว", "subtitle": "สำหรับทดสอบ", "price": 760000, "billing_cycle": 1, "active_purchased_count": 0, "is_available": true, "is_purchased": true, "is_supported_home_health_tracker": false, "has_option": false, "original_price": 990000, "subpackages": [] }, ], "home": { "id": "789103", "project": { "id": "789001", "name": "Tester - Transfer", "icon_url": "https://firebasestorage.googleapis.com/v0/b/sccloud-200/o/stg%2Fproject%2FGBB-PR9-2%2FGBBPR9-2-01.jpg?alt=media&token=a4436576-5e2d-409a-bf93-5b964b1eadd3", "type": "HOME" }, "address": "102/789" } } }