Delete Product

Credentials

No credentials are documented for this endpoint.

The delete-product endpoint is a critical component of the product management system. It allows clients to remove products from the available products list based on specific identifiers. This operation is essential for maintaining an up-to-date and accurate product catalog, ensuring that obsolete or discontinued items are no longer available in the inventory.

Parameters

Name In Type Required Description
Authorization header string yes Bearer <ACCESS_TOKEN>
guid path string yes

Request body

Content type: application/json

Request example

{
  "payme_client_key": "360_project_client_key",
  "seller_payme_id": "seller_identifier",
  "guid": "guid value"
}

Code samples

curl

curl -X DELETE 'https://sandbox.payme.io/api/products/<guid>' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: <Authorization>' \
  --data-raw '{
  "payme_client_key": "360_project_client_key",
  "seller_payme_id": "seller_identifier",
  "guid": "guid value"
}'

Node.js

const response = await fetch("https://sandbox.payme.io/api/products/<guid>", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "<Authorization>",
  },
  body: JSON.stringify({
    "payme_client_key": "360_project_client_key",
    "seller_payme_id": "seller_identifier",
    "guid": "guid value"
  }),
});

console.log(await response.text());

Python

import requests

response = requests.delete(
    "https://sandbox.payme.io/api/products/<guid>",
    headers={
        "Authorization": "<Authorization>",
    },
    json={
        "payme_client_key": "360_project_client_key",
        "seller_payme_id": "seller_identifier",
        "guid": "guid value",
    },
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{
  "payme_client_key": "360_project_client_key",
  "seller_payme_id": "seller_identifier",
  "guid": "guid value"
}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/products/<guid>');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: <Authorization>',
    ],
    CURLOPT_POSTFIELDS => $body,
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Responses

200 — OK (success)

Field Type Description
message string The text indicator of the action requested to delete the product.
guid string The unique PayMe Product identifier.
{
  "status_code": 0,
  "message": "Product deleted successfully",
  "guid": "PRDCT123-123-123"
}

400 — Bad Request (error)

Field Type Description
status_code integer 1 = Failure, 0 = Sucess
message string The error text message.
status_error_code integer The error code.
{
  "status_code": 1,
  "message": "Bad Request",
  "status_error_code": 400
}

401 — Unauthorized (error)

Field Type Description
status_code integer 1 = Failure, 0 = Sucess
message string The error text message.
status_error_code integer The error code.
{
  "status_code": 1,
  "message": "Unauthorized request",
  "status_error_code": 401
}

500 — Internal Server Error (error)

Field Type Description
status_code integer 1 = Failure, 0 = Sucess
message string The error text message.
status_error_code integer The error code.
{
  "status_code": 1,
  "message": "Internal Server Error",
  "status_error_code": 500
}