Delete a product
- Sandbox:
DELETE https://payme-store-staging.payme.io/api/products/{guid}
- Production:
DELETE https://payme-store.payme.io/api/products/{guid}
Credentials
- Header
Authorization: Bearer <token>
Deletes one of the seller's products. Deleted products no longer appear in lists or reads, and their guid returns 404. The call has no request body and returns 204 No Content.
Send Authorization: Bearer <auth_token>, the token from POST /auth-tokens. Hosts, tokens and the error format: Hosts, authentication and errors.
Parameters
| Name |
In |
Type |
Required |
Description |
guid |
path |
string |
yes |
The product guid (a UUID) that POST /products returned. Any other format returns 400. |
Code samples
curl
curl -X DELETE 'https://payme-store-staging.payme.io/api/products/<guid>' \
-H 'Authorization: Bearer <YOUR_TOKEN>'
Node.js
const response = await fetch("https://payme-store-staging.payme.io/api/products/<guid>", {
method: "DELETE",
headers: {
"Authorization": "Bearer <YOUR_TOKEN>",
},
});
console.log(await response.text());
Python
import requests
response = requests.delete(
"https://payme-store-staging.payme.io/api/products/<guid>",
headers={
"Authorization": "Bearer <YOUR_TOKEN>",
},
)
print(response.text)
PHP
<?php
$ch = curl_init('https://payme-store-staging.payme.io/api/products/<guid>');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <YOUR_TOKEN>',
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Responses
204 — Product deleted. The response has no body. (success)
400 — guid isn't a UUID. (error)
| Field |
Type |
Description |
status_error_details |
string |
What went wrong. |
status_error_code |
integer |
999. |
session |
string |
Trace id of the request. Quote it when you contact PayMe support. |
{
"status_error_details": "Validation failed (uuid is expected)",
"status_error_code": 999,
"session": "f3a1c2b0-9e4d-11ef-8c1a-0242ac120002"
}
| Field |
Type |
Description |
status_error_details |
string |
What went wrong. |
status_error_code |
integer |
999. |
session |
string |
Trace id of the request. Quote it when you contact PayMe support. |
{
"status_error_details": "Unauthorized",
"status_error_code": 999,
"session": "f3a1c2b0-9e4d-11ef-8c1a-0242ac120002"
}
404 — The product doesn't exist, was deleted, or belongs to another seller. (error)
| Field |
Type |
Description |
status_error_details |
string |
What went wrong. |
status_error_code |
integer |
999. |
session |
string |
Trace id of the request. Quote it when you contact PayMe support. |
{
"status_error_details": "Product not found",
"status_error_code": 999,
"session": "f3a1c2b0-9e4d-11ef-8c1a-0242ac120002"
}
| Field |
Type |
Description |
status_error_details |
string |
What went wrong. |
status_error_code |
integer |
999. |
session |
string |
Trace id of the request. Quote it when you contact PayMe support. |