Contacts
POST /contacts
Creates a new contact for a customer or site.
- firstName is required
- email is optional and must be a valid email address when provided. This will be added as a contact item.
- At least one contact item is required: provide email and/or at least one entry in contactItems.
- contactType is required and must be one of the following: CUSTOMER, SITE.
- When contactType is CUSTOMER:
- customerId is required
- isMain cannot be set to true and is optional. To update the main contact, use the '/customers' endpoint.
- isBilling is optional and defaults to false.
- When contactType is SITE:
- siteId is required
- isMain is optional and defaults to false.
- isBilling is optional and defaults to false.
- When contactType is CUSTOMER:
Request
- Base URLhttps://api.fergus.com
- Auth
- OAuth 2Authorization codehttps://auth.fergus.com/oauth2/authorizeToken URLhttps://auth.fergus.com/oauth2/token
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Resource created successfully
Changes
No recorded changes to this operation across all 18 revisions of this API.