Skip to content

Validate gift receiver

/validate_gift_receiver

Validate gift receiver

Target audience: Developers

Release version: 4.7.5.1

Introduction

This endpoint returns a true/false value whether a gift receiver is eligible to receive the gift subscription. Validates if the receiver has a conflicting subscription in Kayak.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v1/order/validate_gift_receiver
Production https://backend.worldoftulo.com/external/api/v1/order/validate_gift_receiver

Requirements

Identity Scope
No /external/order/r

Parameters

Name Required Type Description
giver_account_id Required String The account id of the giver.
campaign_code Required String The product_code of the campaign should be checked against
delivery_address Required Address object Address object, the delivery address of the gift subscription

Curl Example

Check user eligibility

curl --request POST \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/order/validate_gift_receiver \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <token-without-identity>' \
  --header 'content-type: application/json' \
  --data '{
              "campaign_code": "adeprimo_digital",
              "delivery_address": {
                  "first_name": "Erik",
                  "last_name": "Eriksson",
                  "street": "Ekvägen",
                  "street_number": "12",
                  "zip_code": "120 35",
                  "city": "Tyresö",
                  "country_code": "SE" },
              "giver_account_id": "585a4768edce2c5e6f000001"
          }'

Response

Example response if receiver is eligible

HTTP 200
{
  "item": {
    "receiver_eligible": true
  }
}

Example response if receiver is not eligible for the gift subscription

HTTP 200
{
  "item": {
      "receiver_eligible": false
  }
}

Errors

This API uses the common error conventions of the Payway API

See common error responses