Skip to content

Accept user agreement

/me/accept_user_agreement

Target audience: Developers

Release version: 4.1.4.x

Accept user agreement

Introduction

This endpoint is used for accepting a specific user agreement. The user agreement must be active.

URI

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

Requirements

Identity Scope
Yes /external/me/w

Parameters

Field Required Type Description
user_agreement_id Required String The id of the user agreement to accept
Size range: ..24
Allowed values: "/^[a-f\d]{24}$/i"

Curl Example

curl --request POST \
--url https://payway-api.stage.adeprimo.se/external/api/v1/me/accept_user_agreement \
--header 'accept: application/json' \
--header 'authorization: Bearer token' \
--header 'content-type: application/json' \
--data '{
         "user_agreement_id": "5dd7829315fdca74ce7c94e0"            
       }'

Response

Example Response: Successfully accepted user agreement

HTTP 200
{
  "id": "5dd783066e95521db3365944"
}

HTTP 400 Bad Request

Name Type Description
invalid_parameter Object Validation error on any of the fields in the posted json
invalid_parameter Object The user agreement is not active
json_parser_error Object The request body could not be parsed as valid json
invalid_content_type_error Object The requests Content-Type header isn't set to application/json
unknown_parameter Object One or more of the fields in the posted json was not recognized

HTTP 404 Not Found

Name Type Description
not_found Object The user agreement does not exist

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side