Organisations

  • Updated

REST API Organisations


POST /v1/crm/organisations

Creates or updates an organisation.

If no ‘externalIntegrationId‘ is present, then the organisations’s name is used to match an organisation to an existing organisation in Priava.

A new organisation will be created only if one cannot be matched.

Request:

A JSON POST request body expecting APIToken in the request header which re-authenticates the user with each request.


Parameter
name    string
REQUIRED

The organisation’s name.

externalIntegrationId    string

The organisation’s external integration ID. Hidden from the Priava UI, but can be used to store a foreign integration key.

integrationSrc    string

The source of the integration e.g. name of your application.

externalReferenceNo    string

The organisations’s external reference number – used as a foreign key that is visibile on the Priava UI.

parent    string

The name of the parent organisation. This name must match an existing organisation in Priava. 

type    string

The organisation type – must match the CRM organisation types in the Priava tenant’s system.

marketSector    string

The organisation market sector – must match the CRM organisation market sectors in the Priava tenant’s system. 

website    string

The organisation’s web site address. 

email    string

The organisation’s primary email address. 

emailOther    number

The contact’s external reference number – used as a foreign key that is visibile on the Priava UI. 

debtorNumber    boolean

The contact’s debtor number. 

businessPhone    string
REQUIRED*

The organisation’s business phone number.

otherPhone    string
REQUIRED*

Any other phone number relative to the organisation. 

fax    string

The organisation’s fax number. 

organisationAddress    string

The organisation/site address. See below for address properties required.  

postalAddress    string

The organisation’s postal address. See below for address properties required.

otherAddress    string

Any other address to be stored for the organisation. See below for address properties required.

inactive    boolean

True / False – whether the organisation is inactive or active in the system.   

*Either a business phone or other phone number is required (not both) in order to create an organisation.

All addresses should be formatted as below.  

Parameter
addressLine1    string

Line 1 of the address.

addressLine2    string

Line 2 of the address. 

addressLine3    string

Line 3 of the address. 

suburb    string

The suburb for the address. 

state    string

The state for the address. 

postcode   string

The postcode / zip for the address. 

country    string

The country for the address. A list of valid country entries can be found here.  

 

    {
      "name": "Acme",
      "externalIntegrationId": "acme1",
      "integrationSrc": "PRIAVA",
      "inactive": false,
      "parent": "",
      "website": "http://www.acme.com",
      "externalReferenceNo": "54321",
      "debtorNumber": "AC123",
      "businessPhone": "+44(0)2392561000",
      "otherPhone": "+44(0)2392561000",
      "fax": "+44(0)2392561000",
      "email": "contact@acme.com",
      "emailOther": "support@acme.com",
      "type": "Corporate",
      "marketSector": "Information Technology",
      "organisationAddress": {
         "addressLine1": "ACME - Building 1",
         "addressLine2": "11 Main Street",
         "suburb": "Portsmouth",
         "state": "Hampshire",
         "postcode": "PO64AU",
         "country": "United Kingdom"
      },
      "postalAddress": {
         "addressLine1": "Valencia Apartments",
         "addressLine2": "49 Feather Street",
         "addressLine3": "PO Box 90, Harbour",
         "suburb": "Portsmouth",
         "state": "Hampshire",
         "postcode": "PO64AU",
         "country": "United Kingdom"
      },
      "otherAddress": { 
         "addressLine1": "Valencia Apartments", 
         "addressLine2": "49 Feather Street", 
         "addressLine3": "PO Box 90, Harbour", 
         "suburb": "Portsmouth", 
         "state": "Hampshire", 
         "postcode": "PO63AU", 
         "country": "United Kingdom" 
      }
    }

Response:
      {  
“result”: “true”,
“success”: true
}

Was this article helpful?

Have more questions? Submit a request