Afya-Health
  1. Products
Afya-Health
  • Auth
    • Login
      POST
    • Signup
      POST
  • ForgotPassword
    • Verify OTP
      POST
    • ForgotPassword
      POST
    • ResetPassword
      POST
  • Profile
    • Get User Profile
      GET
    • Update user profile
      POST
  • Family Members
    • Add Family Member
      POST
    • Update Family Members
      PUT
    • Delete Family Member
      DELETE
  • Address
    • Get User address
      GET
    • Add Address
      POST
    • Update address
      PUT
    • Delete Address
      DELETE
  • Languages
    • List AppLabels
      GET
    • Add/Update Label
      POST
    • List Languages
      GET
  • Products
    • Get Products
      GET
    • Create Product
      POST
    • Update Product
      PUT
    • Delete Product
      DELETE
    • Update product items
      PUT
  • Permissions
    • Get Permissions
  • Config
    • List Practice Config
    • Add Update Config
    • List Master Config
    • Add Update Master Config
  • Appointment Schedule
    • Create Schedule
    • Update Schedule
    • Delete Schedule
    • Get Schedule by ID
    • Get Schedule list
  • Test Tags
    • Get Test Tags
    • Create Test Tag
    • Update Test Tag
    • Delete Test Tag
  • Test Parameters
    • Get Test Parameters
    • Create Test Parameters
    • Update Test Parameters
    • Delete Test Parameters
  • Category
    • Get Category
    • Create Category
    • Update Category
    • Delete Category
  • Device
    • Register Device
  • File
    • Upload File
  • Appointment
    • Create Appointment Order
    • Get Appointments List
    • Update Appointment Status
    • Get Appointment by ID
    • Get Appointment Slots
    • GetStartJourneyDirection
  • Reports
    • Upload Report
    • List All Reports
    • List Reports By Appointment
    • Delete Report
    • Update Report File
  • Staff
    • Add Staff Member
    • List Staff Member
    • Update Staff Member
    • Delete Staff Member
    • Get Staff member by ID
  • Patient
    • List Patients
    • Add Patient
    • Update Patient
    • Delete Patient
    • Get patient by ID
  • Notifications
    • List User Notifications
    • Update Notification read status
  1. Products

Delete Product

Developing
DELETE
/api/service/v1/products/{id}

Request

Path Params
id
string 
required
Header Params
Accept
string 
optional
Example:
application/json
Content-Type
string 
optional
Example:
application/json
practice-code
string 
optional
Example:
DEFAULT
Authorization
string 
optional
Example:
{{token}}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request DELETE 'https://afyahealth.doctodoor.com:5600/api/service/v1/products/' \
--header 'Accept: application/json' \
--header 'practice-code: DEFAULT' \
--header 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjJkZmZlNWJmMjdlMzk1NTUzMjE0MyIsImVtYWlsIjoiZGVlcC5tYXJzb25pYUBwbGVuYXJ0ZWNoLmNvbSIsInN1YiI6IjY3YjJkZmZlNWJmMjdlMzk1NTUzMjE0MyIsImlhdCI6MTc0MTc4MjA4NCwiZXhwIjoxNzQ5NTU4MDg0fQ.KAMsweSbJPDxpLijKdjgp3YEFauw8KYLLumCBpqQfAA' \
--header 'Content-Type: application/json'

Responses

🟢200Success
application/json
Body
error
boolean 
required
status_code
integer 
required
message
string 
required
data
object 
required
items
array [object {19}] 
required
test_parameters
array [object {7}] 
required
sample_requirements
array[string]
required
estimated_report_delivery_time
integer 
required
is_deleted
integer 
required
title
object 
required
subtitle
object 
required
description
object 
required
prerequisites
object 
required
type
string 
required
category
object 
required
price
integer 
required
currency
string 
required
discount_amount
integer 
required
discount_type
string 
required
service_category
object 
required
created_at
string 
required
updated_at
string 
required
id
string 
required
tests
array [object {7}] 
required
Examples
{
    "error": false,
    "status_code": 200,
    "message": "Package deleted successfully.",
    "data": {
        "items": [
            {
                "items": [],
                "test_parameters": [
                    "6788b0121322454d3e643f64"
                ],
                "sample_requirements": [
                    "blood"
                ],
                "estimated_report_delivery_time": 0,
                "is_deleted": 0,
                "title": {
                    "en": "test 1 ##"
                },
                "subtitle": {
                    "en": "Sub ttile"
                },
                "description": {
                    "en": "desriptin "
                },
                "prerequisites": {
                    "en": "prerquu ui"
                },
                "type": "test",
                "category": "6788c93bd798f459e8c8d7cc",
                "price": 420,
                "currency": "INR",
                "discount_amount": 100,
                "discount_type": "flat",
                "service_category": "6790d7c19975d85c7b447c53",
                "created_at": "2025-01-24T10:14:33.704Z",
                "updated_at": "2025-01-24T10:14:33.704Z",
                "id": "6793680981770556165f150d"
            }
        ],
        "test_parameters": [
            {
                "tags": [
                    {
                        "is_deleted": 0,
                        "title": {
                            "en": "en title edit",
                            "ar": "ar title edit"
                        },
                        "created_at": "2025-01-16T06:49:07.666Z",
                        "updated_at": "2025-01-16T06:49:07.666Z",
                        "id": "6788abe33fd2424ae6a4db87"
                    }
                ],
                "is_deleted": 1,
                "title": {
                    "en": "this is en title edited",
                    "ar": "this is ar title"
                },
                "description": {
                    "en": "this is en title edited",
                    "ar": "this is ar title"
                },
                "created_at": "2025-01-16T07:06:58.981Z",
                "updated_at": "2025-01-16T10:04:28.856Z",
                "id": "6788b0121322454d3e643f64"
            }
        ],
        "sample_requirements": [
            "blood"
        ],
        "estimated_report_delivery_time": 0,
        "is_deleted": 1,
        "title": {
            "en": "test 1 ##"
        },
        "subtitle": {
            "en": "Sub ttile"
        },
        "description": {
            "en": "desriptin "
        },
        "prerequisites": {
            "en": "prerquu ui"
        },
        "type": "package",
        "category": {
            "parent": null,
            "is_deleted": 0,
            "title": {
                "en": "english title editred",
                "ar": "ar title"
            },
            "type": "service",
            "color": "#FF7689",
            "created_at": "2025-01-16T08:54:19.769Z",
            "updated_at": "2025-01-16T08:54:19.769Z",
            "id": "6788c93bd798f459e8c8d7cc"
        },
        "price": 420,
        "currency": "INR",
        "discount_amount": 100,
        "discount_type": "flat",
        "service_category": {
            "parent": null,
            "is_deleted": 0,
            "title": {
                "en": "this is title2",
                "ar": "arabic title2"
            },
            "type": "service",
            "color": "#FFAAEE",
            "created_at": "2025-01-22T11:34:25.801Z",
            "updated_at": "2025-01-22T11:34:25.801Z",
            "id": "6790d7c19975d85c7b447c53"
        },
        "created_at": "2025-01-24T10:15:45.887Z",
        "updated_at": "2025-01-24T10:20:27.246Z",
        "id": "6793685181770556165f1518"
    }
}
Previous
Update Product
Next
Update product items
Built with