Profile
The profile API allows clients to query and update relations in the Procurios CRM. Relations have only a few default fields; most fields are dynamically set. Not all of those fields are always exposed. For different situations, different combinations of fields may be useful. These configurations are called profile sets and all calls to the Profile API must go through one of these sets. Call the schema method in order to figure out which fields are available. Several different profile sets may be available to you, depending on the allowed scopes and requested scopes. You can request the set of profile sets that are available to you and use the id of one of the sets for further API calls.
Accept header for requests to Profile
application/vnd.procurios.profile+json; version=1
Profile sets GET
Scope:
Request the set of profile sets that are available to your access token and use the id of one of the sets for further API calls. The method example returns the example ID 42.
Schema GET
Scope:
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.
In the example bellow, "image" is a file type field. Files can be provided in a few ways, and each way has a different consequence. As you can see, we expect one of three types of input: an object, a string, or null. To correctly process the request, we expect these types of input as follows:
- object: when a new file is uploaded to our system. New files must contain a file name and content (A data url (RFC 2397) containing the type and contents of the file).
- string: when a file should be kept for the profile. The string is the document key we provide for this specific field in the profile GET call
- null: empty the field.
An example of the several inputs is provided in profile POST
Profile GET
Scope:
Get a user profile, where 42 is a profileSetId and 99 is a relationId
A profile GET response may contain one or more files. An example is field "image". In this case, we provide document key(s) in the endpoint's response. The key can be used to download the file in the Profile document's GET Endpoint or as a signal to keep that specific document when updating a file based field in profile in the Profile POST endpoint.
Profile POST
Scope:
Update a user profile, where 42 is a profileSetId and 99 is a relationId
In the example bellow, "image1" and "image2" are file type fields. Files can be provided in a few ways, and each way has a different consequence. As you can see in the Profile schema example, we expect one of three types of input: an object, a string, or null. To correctly process the request, we expect these types of input as follows:
- object: when a new file is uploaded to our system.
- string: when a file should be kept for the profile. The string is the document key we provide for this specific field in the profile GET call
- null: empty the field.
The different options are displayed in the example below.