API Endpoints
At the moment Merchant API has 5 endpoints, and they provide full scope of functionality to successfully integrates with our system.
Retrieve a single Product
Endpoint: id = Product ID
js
GET: `/v1/product-sales/products/${id}`
GET: `/v1/product-sales/products/${id}`
Response:
json
{
"data": ProductResponse
}
{
"data": ProductResponse
}
Retrieve list of all Products for Trading Point
Endpoint: id = Trading Point ID
js
GET: `/v1/clients/auth/trading-points/${id}/products`
GET: `/v1/clients/auth/trading-points/${id}/products`
Response:
json
{
"data": [
ProductResponse,
...
ProductResponse,
]
}
{
"data": [
ProductResponse,
...
ProductResponse,
]
}
Create or update Products for Trading Point
Endpoint: id = Trading Point ID
js
POST: `/v1/clients/auth/trading-points/${id}/products`
POST: `/v1/clients/auth/trading-points/${id}/products`
Request:
json
{
"products": [
ProductRequest,
...
ProductRequest,
]
}
{
"products": [
ProductRequest,
...
ProductRequest,
]
}
Response:
json
{
"data": [
ProductResponse,
...
ProductResponse,
]
}
{
"data": [
ProductResponse,
...
ProductResponse,
]
}
Activate Trading Point Product
Endpoints: id = Trading Point ID
, product_id = Product ID
js
PATCH: `/v1/clients/auth/trading-points/${id}/products/${product_id}/activate`
PATCH: `/v1/clients/auth/trading-points/${id}/products/${product_id}/activate`
Response:
json
{
"data": ProductResponse
}
{
"data": ProductResponse
}
Deactivate Trading Point Product
Endpoints: id = Trading Point ID
, product_id = Product ID
js
PATCH: `/v1/clients/auth/trading-points/${id}/products/${product_id}/deactivate`
PATCH: `/v1/clients/auth/trading-points/${id}/products/${product_id}/deactivate`
Response:
json
{
"data": ProductResponse
}
{
"data": ProductResponse
}