POST /compare/share

POST /compare/share

Generate a permanent identifier for sharing a product comparison

application/json

Body Required

  • left_product string Required

    id or alias of the left product in the comparison

  • right_product string Required

    id or alias of the right product in the comparison

Responses

POST /compare/share
curl \
 -X POST https://api.cosmily.com/api/v1/compare/share \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"left_product":"string","right_product":"string"}'
Request example
{
  "left_product": "string",
  "right_product": "string"
}
Response examples (201)
{
  "data": {
    "left_product": {
      "id": 42,
      "alias": "string"
    },
    "right_product": {
      "id": 42,
      "alias": "string"
    },
    "share_token": "string"
  },
  "links": {
    "left_product": "string",
    "right_product": "string",
    "left_analysis": "string",
    "right_analysis": "string"
  }
}