Get a product
- Sandbox:
GET https://payme-store-staging.payme.io/api/products/{guid}
- Production:
GET https://payme-store.payme.io/api/products/{guid}
Credentials
- Header
Authorization: Bearer <token>
Returns one of the seller's products by its guid. A product that doesn't exist, was deleted or belongs to another seller returns 404.
Send Authorization: Bearer <auth_token>, the token from POST /auth-tokens. Hosts, tokens and the error format: Hosts, authentication and errors. Prices are decimal amounts in major units (99.99), not minor units.
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 GET '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: "GET",
headers: {
"Authorization": "Bearer <YOUR_TOKEN>",
},
});
console.log(await response.text());
Python
import requests
response = requests.get(
"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 => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <YOUR_TOKEN>',
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Responses
200 — The product. (success)
| Field |
Type |
Description |
guid |
string |
Product id (a UUID) assigned by PayMe. Use it in /products/{guid}. |
product_remote_id |
string |
Your own product id. Left out when not set. |
name |
string |
Product name. |
status |
integer |
1 – available, 0 – unavailable, -1 – draft. |
description |
string |
Product description. |
store_configuration |
object |
Selling price. You send it as store_prices when you create or update the product. The currency and price[min]/price[max] filters of GET /products match its price_include_vat. |
store_configuration.is_vat_free |
boolean |
true if the product is exempt from VAT. |
store_configuration.price_without_vat |
object |
Price before VAT. null when not set. |
store_configuration.price_without_vat.amount |
number |
Decimal amount in major units, e.g. 99.99. |
store_configuration.price_without_vat.currency |
string |
ISO 4217 currency code, e.g. ILS. |
store_configuration.price_include_vat |
object |
Price including VAT. null when not set. |
store_configuration.price_include_vat.amount |
number |
Decimal amount in major units, e.g. 99.99. |
store_configuration.price_include_vat.currency |
string |
ISO 4217 currency code, e.g. ILS. |
costs_details |
object |
Your cost for the product, same shape as store_configuration. You send it as costs. Left out when not set. |
costs_details.is_vat_free |
boolean |
true if the product is exempt from VAT. |
costs_details.price_without_vat |
object |
Price before VAT. null when not set. |
costs_details.price_without_vat.amount |
number |
Decimal amount in major units, e.g. 99.99. |
costs_details.price_without_vat.currency |
string |
ISO 4217 currency code, e.g. ILS. |
costs_details.price_include_vat |
object |
Price including VAT. null when not set. |
costs_details.price_include_vat.amount |
number |
Decimal amount in major units, e.g. 99.99. |
costs_details.price_include_vat.currency |
string |
ISO 4217 currency code, e.g. ILS. |
{
"guid": "3f2b8f0e-5d7c-4a1e-9b8a-2c4d6e8f0a1b",
"product_remote_id": "PROD001",
"name": "Example product",
"status": 1,
"description": "Example description",
"store_configuration": {
"is_vat_free": false,
"price_without_vat": {
"amount": 99.99,
"currency": "ILS"
},
"price_include_vat": {
"amount": 117.99,
"currency": "ILS"
}
},
"costs_details": {
"is_vat_free": false,
"price_without_vat": {
"amount": 50,
"currency": "ILS"
},
"price_include_vat": {
"amount": 59,
"currency": "ILS"
}
}
}
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. |