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": {
        "class_1_relation_firstname": {
            "title": "First name",
            "type": "string"
        },
        "class_1_relation_insertion": {
            "title": "Insertion",
            "type": "string"
        },
        "class_1_relation_name": {
            "title": "Name",
            "type": "string"
        },
        "class_1_ff_447": {
            "title": "Birth date",
            "type": "date"
        },
        "class_1_relation_address_0": {
            "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": [
        "class_1_relation_name",
        "class_1_relation_address_0"
    ]
}

Registration

POST /l/profile_api/registrationset/42/registration

Create a new registration

Examples

{
    "class_1_relation_name": "Test name",
    "class_1_relation_address_0": [
        "Hoefzijde",
        3,
        "",
        "3961MX",
        "Wijk bij Duurstede",
        "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

{
    "class_1_relation_name": "Test name",
    "class_1_relation_address_0": [
        "Hoefzijde",
        3,
        "",
        "3961MX",
        "Wijk bij Duurstede",
        "NL"
    ]
}
200
[]
{
    "class_1_relation_name": "Test name"
}
400
{
    "page": 1,
    "errors": {
        "class_1_relation_address_0": "Dit veld is verplicht"
    }
}

Is username available

GET /l/profile_api/isusernameavailable/username42

Checks whether a username is available

Examples

[]
200
{
    "isAvailable": true
}