Products
Retrieve a products's prices
- Documentation
- API Reference
- Community
- The Customer object
- POSTCreate a customer
- POSTUpdate a customer
- GETRetrieve a customer
- GETList all customers
- DELDelete a customer
- The Product object
- POSTCreate a product
- POSTUpdate a Product
- GETRetrieve a product
- GETList all products
- DELDelete a product
- GETRetrieve a products's prices
Customers
Products
Products
Retrieve a products's prices
Retrieves all the prices of a product.
GET
/
products
/
{id}
/
prices
Authorization
string
*
Bearer
Authorization
Required
string
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
id
string
id
string
The ID of the product.
per_page
integer
per_page
integer
A numeric value indicating the quantity of prices to be returned with the request, with a minimum value of 1 and a maximum value of 50.
curl --request GET \
--url https://pay.chargily.net/test/api/v2/products/{id}/prices \
--header 'Authorization: Bearer <token>'
{
"livemode": false,
"current_page": 1,
"data": [
{
"id": "01hkfeqh157vnbtv7xrrcgchpr",
"entity": "price",
"amount": 5000,
"currency": "dzd",
"metadata": {
"brand": "apple"
},
"created_at": 1704547042,
"updated_at": 1704547042,
"product_id": "01hkfdv9grv7eyyzxrzqz72596"
},
{
"id": "01hkfekvqyc5tnhw7pyg5yw2vs",
"entity": "price",
"amount": 5000,
"currency": "dzd",
"metadata": {
"color": "red"
},
"created_at": 1704546922,
"updated_at": 1704546922,
"product_id": "01hkfdv9grv7eyyzxrzqz72596"
}
],
"first_page_url": "http://pay.chargily.local/test/api/v2/products/01hkfdv9grv7eyyzxrzqz72596/prices?page=1",
"last_page": 1,
"last_page_url": 1,
"next_page_url": null,
"path": "http://pay.chargily.local/test/api/v2/products/01hkfdv9grv7eyyzxrzqz72596/prices",
"per_page": 10,
"prev_page_url": null,
"total": 2
}
Path parameters
id
string
The ID of the product.
Query parameters
per_page
integer
A numeric value indicating the quantity of prices to be returned with the request, with a minimum value of 1 and a maximum value of 50.
Returns
A key-value array, containing a data property which is an array of all the prices of the product, limited to a maximum of per_page
value.
curl --request GET \
--url https://pay.chargily.net/test/api/v2/products/{id}/prices \
--header 'Authorization: Bearer <token>'
{
"livemode": false,
"current_page": 1,
"data": [
{
"id": "01hkfeqh157vnbtv7xrrcgchpr",
"entity": "price",
"amount": 5000,
"currency": "dzd",
"metadata": {
"brand": "apple"
},
"created_at": 1704547042,
"updated_at": 1704547042,
"product_id": "01hkfdv9grv7eyyzxrzqz72596"
},
{
"id": "01hkfekvqyc5tnhw7pyg5yw2vs",
"entity": "price",
"amount": 5000,
"currency": "dzd",
"metadata": {
"color": "red"
},
"created_at": 1704546922,
"updated_at": 1704546922,
"product_id": "01hkfdv9grv7eyyzxrzqz72596"
}
],
"first_page_url": "http://pay.chargily.local/test/api/v2/products/01hkfdv9grv7eyyzxrzqz72596/prices?page=1",
"last_page": 1,
"last_page_url": 1,
"next_page_url": null,
"path": "http://pay.chargily.local/test/api/v2/products/01hkfdv9grv7eyyzxrzqz72596/prices",
"per_page": 10,
"prev_page_url": null,
"total": 2
}