Get product sharing
/products/get_product_sharing
Target audience: Developers
Get product sharing option
Introduction
This endpoint returns the sharing option for a product.
URI
Requirements
Parameters
Curl Example
Get by id
curl --request GET \
--url https://payway-api.stage.adeprimo.se/external/api/v1/products/get_product_sharing?id= 52a781d6400e06897c00000f \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>' \
Get by product code
curl --request GET \
--url https://payway-api.stage.adeprimo.se/external/api/v1/products/get_product_sharing?code= adeprimo_digital \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>' \
Response
Successful response
HTTP 200
{
"item" : [
{
"shareable" : true ,
"limit" : 2 ,
"sharing_text" : "Description of the sharing" ,
"sharing_title" : "Title of the sharing" ,
"received_product_text" : "Description of the product" ,
"received_product_title" : "Title of the product"
}
]
}
Not shareable response
HTTP 200
{
"item" : [
{
"shareable" : false ,
"limit" : 0 ,
"sharing_text" : null ,
"sharing_title" : null ,
"received_product_text" : null ,
"received_product_title" : null
}
]
}
Errors
Example error response
HTTP 400 Bad Reques t
{
"code" : "invalid_parameter" ,
"field" : "account_id" ,
"message" : "Parameter must match format (/^[a-f\d]{24}$/)"
}
HTTP 400 Bad Request
HTTP 500 Internal Server Error