The Sales API is designed specifically for handling sales activities on public facing websites. The endpoint functionality is highly scalable and secure preventing access to non public Wisenet data.
The best way to test the Sales API is to use Postman. Once the API is tested, you can generate example code by selecting Code below the Save/Send options.
The following steps outline how to get started.
Sales Api Postman Collection
A Postman Collection allows you to import an API schema with example API calls to fast track testing.
- Download the SalesApi Postman Collection
- this may open in a new window as json. It needs to be downloaded as a json file.
Import Postman Collection
- Open Postman
- Click Import (top left)
- On the Import Popup Window, Click File
- Drag and Drop the previously downloaded collection
- You should now see the collection on the left
- Choose the WisenetSalesApi Collection and expand to see folders and the example methods and endpoints. There are folders for:
- Add the x-api-key into the header
- NOTE: This will be the SalesApiKey that is provided from LRM (NOT the public APIKey)
Each endpoint has different requirements. The Postman collection should demonstrate how each endpoint functions. There is also extra information below.
- The enquiry payload is a set of key value pairs. The minimum required keys are FirstName, LastName and Email. This can be seen in the min fields example
- Add as many additional key value pairs as desired
- Then SEND when ready. This will send the Enquiry to the Sales section
- You will be able to find the Sales Contact and Enquiry Task
- The opportunity payload is a set of key value pairs. The minimum required keys are FirstName, LastName, Email and OpportunityName. This can be seen in the min fields example
- Add as many additional key value pairs as desired in the OpportunityDetails section
- You can also reference already uploaded Documents by DocumentId
- Documents need to be uploaded first in order to obtain a DocumentId
- See POST documents for how to do this
- Then SEND when ready. This will send the Opportunity to the Sales section
- You will be able to find the Sales Contact, Opportunity and Opportunity Task
- The document endpoint is slightly different to the other endpoints. Please note the following differences:
- The body payload is binary. Hence upload the file via Postman.
- There is an additional header File-Name which requires your desired filename that will be used when saving the file to Wisenet
- The Postman example demonstrates both of these items
- Select SEND when ready. The successful response 201 will also return a generated DocumentId.
- This can then be used in POST opportunities to reference a document.