Skip to content

Get field config

/products/field_config

Target audience: Developers

1
Release version: 4.6.0

Get field configurations

Introduction

Returns the field configurations for a given product. Field configurations can be managed in the PAP, and if a specific field configuration is not found, the default field configuration for the organisation will be used.

URI

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

Requirements

Identity Scope
No /external/product/r

Parameters

Name Type Description
product_id String Id of a product. Cannot be used together with product_code.
Size range: ..24 Allowed values: "/^[a-f\d]{24}$/i"
product_code String The product code for a product/package/campaign. Cannot be used together with product_id.
Size range: 1..50 Allowed values: "/^[a-zA-Z-_0-9]+$/"

Curl Example

Get by product_id

1
2
3
4
curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/products/field_config?product_id=52a781d6400e06897c00000f \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \

Get by product_code

1
2
3
4
curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/products/field_config?product_code=adeprimo_digital \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \

Response

Successful response

1
HTTP 200
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
  "items": [
    {
      "type": "FIRSTNAME",
      "is_required": true,
      "description": "The firstname of the customer"
    },
    {
      "type": "LASTNAME",
      "is_required": true,
      "description": "The lastname of the customer"
    }
  ]
}

Errors

This API uses the common error conventions of the Payway API

See common error responses