Skip to content

Change distribution address

/v2/distribution/change_distribution_address

Target audience: Developers

Release version: 4.5.0

Change distribution address

Introduction

This endpoint changes the delivery address for a specific distribution identified by distribution_settings_id.

Note that the distribution address can only be modified for user products containing paper products.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v2/distribution/change_distribution_address
Production https://backend.worldoftulo.com/external/api/v2/distribution/change_distribution_address

Requirements

Identity Scope
No /external/distribution/w

Parameters

Field Required Type Description
requested_by Yes String Who requested the change. Max length: 25
distribution_settings_id Yes String The id of the distribution to update. Max length: 50
distribution_address Yes Object The new delivery address

distribution_address object

Field Required Type Description
first_name Yes String First name
last_name Yes String Last name
street Yes String Street address
zip_code Yes String Zip/postal code
city Yes String City
country_code Yes String Country code (ISO)
care_of No String ℅ field

Curl Example

curl --request PUT \
  --url https://payway-api.stage.adeprimo.se/external/api/v2/distribution/change_distribution_address \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <token>' \
  --header 'content-type: application/json' \
  --data '{
            "requested_by": "my_system",
            "distribution_settings_id": "60f1a2b3c4d5e6f7a8b9c0d1",
            "distribution_address": {
              "first_name": "Kalle",
              "last_name": "Anka",
              "street": "Strandgatan 2",
              "zip_code": "65100",
              "city": "Vasa",
              "country_code": "FI"
            }
          }'

Response

Successful response

HTTP 200
{
  "item": "60f1a2b3c4d5e6f7a8b9c0d1"
}

Errors

This API uses the common error conventions of the Payway API

Code Description
invalid_user_product The user product is not a paper product
not_supported_error Product distribution is not enabled for the organisation

See common error responses