After March 01 of 2023, this application will no longer be maintained by the RPT BR team. Maintenance will be the responsibility of the ecosystem, everyone will be able to make a branch with the changes or improvements they want to make, make a pull request and we will approve it.
This project is a GraphQL API to manage and consume customers informations, it is also possible to list default and custom fields that were configured on Masterdata schema.
The implementation is based on MasterData structure, and manage the documents with acronym "CL".
Table of Contents
| Field | Argument | Type | Description |
|---|---|---|---|
| schema | SchemaResponse! |
Query to get default and custom fields created on masterdata with acronym "CL" |
|
| users | UserPageResponse! |
Query to list customers with pagination and filter |
|
| perPage | Int! | ||
| pageNumber | Int! | ||
| filter | String | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| saveDocument | DocumentPOSTResponse! |
Create a new customer with a list based on key and value. A field with key "email" is required. |
|
| document | DocumentInput! | ||
| updateDocument | Document! |
Update a customer with a list based on key and value. The document id is required. |
|
| id | ID! | ||
| document | DocumentInput! | ||
| deleteDocument | CacheableDocument! |
Delete a customer based on document id |
|
| id | ID! | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| cacheId | ID! |
id is used as cacheId |
|
| id | ID! |
Document id |
|
Custom field in a key/value format
| Field | Argument | Type | Description |
|---|---|---|---|
| key | String! |
Key that identify a custom field |
|
| value | Property! |
Value of custom field |
|
Document with fields that was updated
| Field | Argument | Type | Description |
|---|---|---|---|
| fields | [Field!]! |
Fields were updated |
|
| cacheId | ID! |
id is used as cacheId |
|
| id | ID! |
Document id |
|
Response on create a new customer document
| Field | Argument | Type | Description |
|---|---|---|---|
| href | String! |
A URL to access the created document by API |
|
| documentId | String! |
Document id |
|
| cacheId | ID! |
id is used as cacheId |
|
| id | ID! |
Mutation id |
|
Field in a key/value format
| Field | Argument | Type | Description |
|---|---|---|---|
| key | String! |
Key that identify the field |
|
| value | String! |
Value of field |
|
A pagination structure
| Field | Argument | Type | Description |
|---|---|---|---|
| page | Int! |
Page number |
|
| pageSize | Int! |
Number of items per page |
|
| total | Int! |
Total number of items |
|
Provide the properties about each field
| Field | Argument | Type | Description |
|---|---|---|---|
| id | Property! |
User ID |
|
| firstName | Property! |
First name of customer |
|
| lastName | Property! |
Last name of customer |
|
| Property! |
Email address of customer |
||
| document | Property! |
No. of CPF or CNPJ of customer |
|
| userId | Property! |
ID of customer in CRM |
|
| birthDate | Property! |
User bithdate |
|
| phone | Property! |
Phone no. of customer |
|
| businessPhone | Property! |
Registered phone of the company. |
|
| tradeName | Property! |
Company (PJ) – Trade name |
|
| corporateName | Property! |
Company name |
|
| isCorporate | Property! |
Indicates if it is a company |
|
| gender | Property! |
Gender of customer |
|
| homePhone | Property! |
Registered phone no. of customer |
|
| stateRegistration | Property! |
State registration of Company |
|
| documentType | Property! |
Type of document of customer |
|
| corporateDocument | Property! |
CNPJ number |
|
| isNewsletterOptIn | Property! |
Opted to receive Newsletter |
|
| rcLastCart | Property! |
URl to restock shopping cart with all the products |
|
| rcLastSession | Property! |
ID of browsing script session |
|
| rcLastCartValue | Property! |
Value of last cart |
|
| rcLastSessionDate | Property! |
Date of last browsing session saved |
|
Property contains fields with informations about custom fields
| Field | Argument | Type | Description |
|---|---|---|---|
| type | String |
Type of field like string/boolean/integer |
|
| title | String |
Title of field like a label |
|
| format | String |
Format of field like date-time/email |
|
| maxLength | Int |
Max length of field |
|
CRM Schema
| Field | Argument | Type | Description |
|---|---|---|---|
| properties | Properties! |
Properties of Schema |
|
| required | [String!]! |
Required fields of Schema |
|
| vIndexed | [String!]! |
Indexed fields of Schema |
|
| customFields | [CustomField!] |
Custom fields created by the user |
|
A user contains default properties of masterdata entity
| Field | Argument | Type | Description |
|---|---|---|---|
| id | ID! |
User ID |
|
| isCorporate | Boolean |
Indicates if it is a company |
|
| tradeName | String |
Company (PJ) – Trade name |
|
| homePhone | String |
Registered phone no. of customer |
|
| phone | String |
Phone no. of customer |
|
| stateRegistration | String |
State registration of Company |
|
| String! |
Email address of customer |
||
| userId | ID |
ID of customer in CRM |
|
| firstName | String |
First name of customer |
|
| lastName | String |
Last name of customer |
|
| document | String |
No. of CPF or CNPJ of customer |
|
| isNewsletterOptIn | Boolean |
Opted to receive Newsletter |
|
| birthDate | String |
User bithdate |
|
| businessPhone | String |
Registered phone of the company. |
|
| corporateDocument | String |
CNPJ number |
|
| corporateName | String |
Company name |
|
| documentType | String |
Type of document of customer |
|
| gender | String |
Gender of customer |
|
| rcLastCart | String |
URl to restock shopping cart with all the products |
|
| rcLastCartValue | String |
Value of last cart |
|
| rcLastSession | String |
ID of browsing script session |
|
| rcLastSessionDate | String |
Date of last browsing session saved |
|
A entity that contains a list with users and a pagination properties
| Field | Argument | Type | Description |
|---|---|---|---|
| data | [User!]! |
List with users |
|
| pagination | Pagination! |
Pagination info |
|
Fields to create or update customer document
| Field | Type | Description | |
|---|---|---|---|
| fields | [FieldInput!]! |
Fields in a key/value format |
|
Field in a key/value format
| Field | Type | Description | |
|---|---|---|---|
| key | String |
Key that identify the field |
|
| value | String |
Value of field |
|
The Boolean scalar type represents true or false.
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.