pwrd by

Registration

The registration API allows clients to register new relations in the Procurios CRM. Relations have only a few default fields; most fields are dynamically configured. Not all of those fields are always exposed. For different situations, different combinations of fields may be useful. These configurations are called registration sets and all calls to the registration api must go through one of these sets. Call the schema method in order to figure out which fields are available.

Several different registration sets may be available to you, depending on the allowed scopes and requested scopes. The methods below use example values such as 42, 99 and username42. You can request the set of registration sets that are available to you and use the id of one of the sets for further API calls.

Accept header for requests to Registration

application/vnd.procurios.profile+json; version=1

Registration set

GET /l/profile_api/registrationset

Get the registration sets that are available to your access token

Examples

[]
200
{
    "registrationSet": [
        {
            "id": 42,
            "title": "Demo registration set"
        }
    ]
}

Schema

GET /l/profile_api/registrationset/42/schema

Get the current schema for the API for the requested registration set. The exact fields in the response will change with the configuration of the registration set.

Examples

[]
200
{
    "$schema": "http:\\\/\\\/json-schema.org\\\/draft-07\\\/schema#",
    "title": "Demo registration set",
    "type": "object",
    "properties": {
        "first_name": {
            "title": "First name",
            "type": "string"
        },
        "insertion": {
            "title": "Insertion",
            "type": "string"
        },
        "name": {
            "title": "Name",
            "type": "string"
        },
        "birth_date": {
            "title": "Birth date",
            "type": "date"
        },
        "address": {
            "title": "Address",
            "type": "object",
            "properties": {
                "street": {
                    "type": "string",
                    "title": "Street"
                },
                "number": {
                    "type": "integer",
                    "title": "Number"
                },
                "number_add": {
                    "type": "string",
                    "title": "Addition"
                },
                "postcode": {
                    "type": "string",
                    "title": "ZIP code"
                },
                "town": {
                    "type": "string",
                    "title": "Town"
                },
                "country": {
                    "type": "string",
                    "minimum": 2,
                    "maximum": 2,
                    "title": "Country"
                }
            }
        },
        "action_code": {
            "title": "Entered via action",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "address"
    ]
}

Registration

POST /l/profile_api/registrationset/42/registration

Create a new registration

Examples

{
    "name": "Test name",
    "address": [
        "Fortweg",
        9,
        "",
        "3992LX",
        "Houten",
        "NL"
    ]
}
200
{
    "registrationId": 123
}

Registration

GET /l/profile_api/registrationset/42/registration/99

Get a single registration

Examples

The registration is not yet complete and a relationId is not yet available

[]
404
[]

The registration is complete and the relationId is available

[]
200
{
    "registrationId": 99,
    "relationId": 997234
}

Validate

POST /l/profile_api/registrationset/42/validate

Validate your call without causing changes. Intended for forms with multiple pages.

Examples

{
    "name": "Test name",
    "address": [
        "Fortweg",
        9,
        "",
        "3992LX",
        "Houten",
        "NL"
    ]
}
200
[]
{
    "name": "Test name"
}
400
{
    "page": 1,
    "errors": {
        "address": "Dit veld is verplicht"
    }
}

Is username available

GET /l/profile_api/isusernameavailable/username42

Checks whether a username is available

Examples

[]
200
{
    "isAvailable": true
}