Validate gift receiver
/me/order/validate_gift_receiver
Target audience: Developers
Release version: 4.7.5.1
Validate gift receiver¶
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/me/order/validate_gift_receiver |
Production | https://backend.worldoftulo.com/external/api/v1/me/order/validate_gift_receiver |
Requirements¶
Identity | Scope |
---|---|
Yes | /external/me/order/r |
Parameters¶
Name | Required | Type | Description |
---|---|---|---|
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¶
curl --request POST \
--url https://payway-api.stage.adeprimo.se/external/api/v1/me/order/validate_gift_receiver \
--header 'accept: application/json' \
--header 'authorization: Bearer <token-with-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" }
}'
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