1.0.6 • Published 5 years ago

@simpleview/crm-client v1.0.6

Weekly downloads
70
License
MIT
Repository
github
Last release
5 years ago

sv-crm-client

Client and tools for communicating with sv-graphql and crm-graphql-server.

installation

npm install @simpleview/sv-crm-client

crm_query

For all queries, a bearer token must be proved in Authorization header. To acquire your token, you must login first to get the token:

```
{
	auth {
		login(email: String!, password: String!) {
			success
			token
		}
	}
}
```

For all queries, acct_id must be passed at the root.

```
{
	crm(acct_id: String!) {
		...
	}
}
```
  • get_contact - Returns an array of contacts, which can be filtered by recId. - See schema browser for all fields.
    	```
    	query getContact {
    		crm(acct_id: String!) {
    			get_contact(filter: {
    				recId: Int
    			}) {
    				recId
    				FirstName
    				LastName
    				Email {
    					EmailAddress
    				}
    			}
    		}
    	}
    	```

crm_mutation

For all mutations, a bearer token must be proved in Authorization header. To acquire your token, you must login first to get the token:

```
{
	auth {
		login(email: String!, password: String!) {
			success
			token
		}
	}
}
```

For all mutations, acct_id must be passed at the root.

```
{
	crm(acct_id: String!) {
		...
	}
}
```
  • set_contact - Sets a contact, and returns the ID - See schema browser for all possible inputs.
    	```
    	mutation setContact {
    		crm(acct_id: String!) {
    			set_contact(input: {
    				FirstName: "test",
    				LastName: "user",
    				Email: [
    					{
    						type: "contact",
    						EmailAddress: "test@test.com"
    					}
    				]
    			})
    		}
    	}
    	```
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago