1042 строки
30 KiB
JSON
1042 строки
30 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "CDK Drive Customer",
|
|
"version": "1.0",
|
|
"description": "The API will allow you to find, retrieve, and filter service customers in CDK Drive. Within CDK Drive, a customer is an individual who has been sold a vehicle, is a prospect on a vehicle, has bought parts, or has had their vehicle repaired or serviced through the dealership and exists in a CRM system. In addition, this connector will allow you to create a basic customer record. This helps service advisers provide a positive experience by allowing those workflows to be tied to a customer.",
|
|
"contact": {
|
|
"name": "CDK Global",
|
|
"url": "https://serviceconnect.support.cdk.com",
|
|
"email": "mbd_support@cdk.com"
|
|
}
|
|
},
|
|
"host": "cdkapi.azure-api.net",
|
|
"basePath": "/customer",
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"consumes": [],
|
|
"produces": [],
|
|
"paths": {
|
|
"/": {
|
|
"get": {
|
|
"description": "Query customers",
|
|
"operationId": "queryCustomers",
|
|
"summary": "Query customers",
|
|
"tags": [
|
|
"query"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "query",
|
|
"description": "Filters customers by name",
|
|
"type": "string",
|
|
"x-ms-summary": "Name"
|
|
},
|
|
{
|
|
"name": "email",
|
|
"in": "query",
|
|
"description": "Filters customers by email address",
|
|
"type": "string",
|
|
"x-ms-summary": "Email"
|
|
},
|
|
{
|
|
"name": "phone",
|
|
"in": "query",
|
|
"description": "Filters customers by phone number",
|
|
"type": "string",
|
|
"x-ms-summary": "Phone"
|
|
},
|
|
{
|
|
"name": "subscription_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A correlation ID that should be returned back to the caller to indicate the return of the given request.",
|
|
"type": "string",
|
|
"x-ms-summary": "Subscription Id"
|
|
},
|
|
{
|
|
"name": "client_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A client ID that should be unique to developer/solution provider building the solution.",
|
|
"type": "string",
|
|
"x-ms-summary": "Client Id"
|
|
},
|
|
{
|
|
"name": "client_secret",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A client secret that should be unique to developer/solution provider building the solution.",
|
|
"type": "string",
|
|
"x-ms-summary": "Client Secret"
|
|
},
|
|
{
|
|
"name": "Request-Id",
|
|
"in": "header",
|
|
"description": "Format - guid. A correlation ID that should be returned back to the caller to indicate the return of the given request",
|
|
"type": "string",
|
|
"x-ms-summary": "Request Id"
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/CustomerCollection"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "400 - Bad Request",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "401 - Unauthorized",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "403 - Forbidden",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Create a customer",
|
|
"operationId": "createCustomer",
|
|
"summary": "Create a customer",
|
|
"tags": [
|
|
"create"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "client_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A client ID that should be unique to developer/solution provider building the solution.",
|
|
"type": "string",
|
|
"x-ms-summary": "Client Id"
|
|
},
|
|
{
|
|
"name": "client_secret",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A client secret that should be unique to developer/solution provider building the solution.",
|
|
"type": "string",
|
|
"x-ms-summary": "Client Secret"
|
|
},
|
|
{
|
|
"name": "subscription_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A correlation ID that should be returned back to the caller to indicate the return of the given request.",
|
|
"type": "string",
|
|
"x-ms-summary": "Subscription Id"
|
|
},
|
|
{
|
|
"name": "Request-Id",
|
|
"in": "header",
|
|
"description": "Format - guid. A correlation ID that should be returned back to the caller to indicate the return of the given request",
|
|
"type": "string",
|
|
"x-ms-summary": "Request Id"
|
|
},
|
|
{
|
|
"name": "createCustomer",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/CreateCustomer"
|
|
},
|
|
"description": "The customer definition"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
},
|
|
"ETag": {
|
|
"type": "string",
|
|
"description": "The computed checksum of the resource"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/Customer"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "400 - Bad Request",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "401 - Unauthorized",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "403 - Forbidden",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/{customerId}/": {
|
|
"get": {
|
|
"description": "Query a customer",
|
|
"operationId": "queryCustomerById",
|
|
"summary": "Query a customer",
|
|
"tags": [
|
|
"query"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "customerId",
|
|
"in": "path",
|
|
"description": "The customer identifier",
|
|
"required": true,
|
|
"type": "string",
|
|
"x-ms-summary": "Customer Id"
|
|
},
|
|
{
|
|
"name": "subscription_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A correlation ID that should be returned back to the caller to indicate the return of the given request.",
|
|
"type": "string",
|
|
"x-ms-summary": "Subscription Id"
|
|
},
|
|
{
|
|
"name": "client_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A client ID that should be unique to developer/solution provider building the solution.",
|
|
"type": "string",
|
|
"x-ms-summary": "Client Id"
|
|
},
|
|
{
|
|
"name": "client_secret",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A client secret that should be unique to developer/solution provider building the solution.",
|
|
"type": "string",
|
|
"x-ms-summary": "Client Secret"
|
|
},
|
|
{
|
|
"name": "Request-Id",
|
|
"in": "header",
|
|
"description": "Format - guid. A correlation ID that should be returned back to the caller to indicate the return of the given request",
|
|
"type": "string",
|
|
"x-ms-summary": "Request Id"
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
},
|
|
"ETag": {
|
|
"type": "string",
|
|
"description": "The computed checksum of the resource"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/Customer"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "400 - Bad Request",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "401 - Unauthorized",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "403 - Forbidden",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "404 - Not Found",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Update a customer",
|
|
"operationId": "updateCustomer",
|
|
"summary": "Update a customer",
|
|
"tags": [
|
|
"update"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "customerId",
|
|
"in": "path",
|
|
"description": "The customer identifier",
|
|
"required": true,
|
|
"type": "string",
|
|
"x-ms-summary": "Customer Id"
|
|
},
|
|
{
|
|
"name": "subscription_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A correlation ID that should be returned back to the caller to indicate the return of the given request.",
|
|
"type": "string",
|
|
"x-ms-summary": "Subscription Id"
|
|
},
|
|
{
|
|
"name": "client_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A client ID that should be unique to developer/solution provider building the solution.",
|
|
"type": "string",
|
|
"x-ms-summary": "Client Id"
|
|
},
|
|
{
|
|
"name": "client_secret",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "A client secret that should be unique to developer/solution provider building the solution.",
|
|
"type": "string",
|
|
"x-ms-summary": "Client Secret"
|
|
},
|
|
{
|
|
"name": "Request-Id",
|
|
"in": "header",
|
|
"description": "Format - guid. A correlation ID that should be returned back to the caller to indicate the return of the given request",
|
|
"type": "string",
|
|
"x-ms-summary": "Request Id"
|
|
},
|
|
{
|
|
"name": "If-Match",
|
|
"in": "header",
|
|
"description": "Makes the resource update request conditional. The checksum value \npresented with If-Match must match the current ETag value of the \nresource.\n",
|
|
"required": true,
|
|
"type": "string",
|
|
"x-ms-summary": "eTag"
|
|
},
|
|
{
|
|
"name": "createCustomer",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/CreateCustomer"
|
|
},
|
|
"description": "The customer definition"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
},
|
|
"ETag": {
|
|
"type": "string",
|
|
"description": "The computed checksum of the resource"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/Customer"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "400 - Bad Request",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "401 - Unauthorized",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "403 - Forbidden",
|
|
"headers": {
|
|
"Request-Id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-ms-connector-metadata": [
|
|
{
|
|
"propertyName": "Website",
|
|
"propertyValue": "https://fortellis.io"
|
|
},
|
|
{
|
|
"propertyName": "Privacy policy",
|
|
"propertyValue": "https://fortellis.io/privacy"
|
|
},
|
|
{
|
|
"propertyName": "Categories",
|
|
"propertyValue": "Data"
|
|
}
|
|
],
|
|
"definitions": {
|
|
"Customer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"customerId": {
|
|
"type": "string",
|
|
"description": "The identifier of the customer record"
|
|
},
|
|
"name": {
|
|
"$ref": "#/definitions/Name",
|
|
"description": "The name of the customer"
|
|
},
|
|
"contactMethods": {
|
|
"$ref": "#/definitions/ContactMethods",
|
|
"description": "The contact methods for the customer."
|
|
},
|
|
"postalAddress": {
|
|
"$ref": "#/definitions/PostalAddress",
|
|
"description": "The customer postal address"
|
|
},
|
|
"preferredContact": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ANY",
|
|
"WORKFAX",
|
|
"PRIMARYEMAIL",
|
|
"HOMEFAX",
|
|
"MAIL",
|
|
"PAGER",
|
|
"PRIMARYPHONE",
|
|
"DONOTCONTACT"
|
|
],
|
|
"description": "The preferred contact method"
|
|
},
|
|
"links": {
|
|
"$ref": "#/definitions/CustomerLinks",
|
|
"description": "The hypermedia links of the customer resource"
|
|
}
|
|
},
|
|
"required": [
|
|
"customerId",
|
|
"name",
|
|
"contactMethods",
|
|
"postalAddress"
|
|
],
|
|
"example": {
|
|
"customerId": "ABCDEFGH012345678",
|
|
"name": {
|
|
"first": "John",
|
|
"last": "Doe"
|
|
},
|
|
"contactMethods": {
|
|
"primaryPhone": "18475555555",
|
|
"homePhone": "18473971700",
|
|
"mobilePhone": "18475555555",
|
|
"pager": "18475555556",
|
|
"pagerAccessCode": "1234",
|
|
"homeFax": "18475555666",
|
|
"workFax": "18475555777",
|
|
"email1": "john.doe@example.com",
|
|
"emailDesc1": "HOME",
|
|
"email2": "johndoe@example.com",
|
|
"emailDesc2": "WORK",
|
|
"preferredMethod": "PRIMARYEMAIL",
|
|
"blockPhoneFlag": true,
|
|
"blockEmailFlag": true,
|
|
"blockMailFlag": true
|
|
},
|
|
"postalAddress": {
|
|
"street": "110 The example road",
|
|
"city": "This City",
|
|
"county": "Outside The City",
|
|
"state": "IL",
|
|
"postalCode": "12234",
|
|
"country": "US"
|
|
},
|
|
"links": {
|
|
"self": {
|
|
"href": "https://api.fortellis.io/cdkdrive/crm/v1/customers/ABCDEFGH012345678"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ContactMethods": {
|
|
"type": "object",
|
|
"properties": {
|
|
"primaryPhone": {
|
|
"type": "string",
|
|
"description": "The primary phone number of the customer"
|
|
},
|
|
"homePhone": {
|
|
"type": "string",
|
|
"description": "The home phone number of the customer"
|
|
},
|
|
"mobilePhone": {
|
|
"type": "string",
|
|
"description": "The mobile phone number of the customer"
|
|
},
|
|
"pager": {
|
|
"type": "string",
|
|
"description": "The pager number of the customer"
|
|
},
|
|
"pagerAccessCode": {
|
|
"type": "string",
|
|
"description": "The pager access code of the customer"
|
|
},
|
|
"homeFax": {
|
|
"type": "string",
|
|
"description": "The home fax number of the customer"
|
|
},
|
|
"workFax": {
|
|
"type": "string",
|
|
"description": "The work fax number of the customer"
|
|
},
|
|
"email1": {
|
|
"type": "string",
|
|
"description": "Email address 1 of the customer. You can enter NA for Non-Applicable or CD for Customer Declined if no other email address is present"
|
|
},
|
|
"emailDesc1": {
|
|
"type": "string",
|
|
"default": "HOME",
|
|
"enum": [
|
|
"HOME",
|
|
"WORK",
|
|
"OTHER"
|
|
],
|
|
"description": "Email address 1 description. Will contain NA or CD if entered on email1."
|
|
},
|
|
"email2": {
|
|
"type": "string",
|
|
"description": "Email address 2 of the customer"
|
|
},
|
|
"emailDesc2": {
|
|
"type": "string",
|
|
"default": "WORK",
|
|
"enum": [
|
|
"HOME",
|
|
"WORK",
|
|
"OTHER"
|
|
],
|
|
"description": "Email address 2 description"
|
|
},
|
|
"email3": {
|
|
"type": "string",
|
|
"description": "Email address 3 of the customer"
|
|
},
|
|
"emailDesc3": {
|
|
"type": "string",
|
|
"enum": [
|
|
"HOME",
|
|
"WORK",
|
|
"OTHER"
|
|
],
|
|
"description": "Email address 3 description"
|
|
},
|
|
"email4": {
|
|
"type": "string",
|
|
"description": "Email address 4 of the customer"
|
|
},
|
|
"emailDesc4": {
|
|
"type": "string",
|
|
"enum": [
|
|
"HOME",
|
|
"WORK",
|
|
"OTHER"
|
|
],
|
|
"description": "Email address 4 description"
|
|
},
|
|
"email5": {
|
|
"type": "string",
|
|
"description": "Email address 5 of the customer"
|
|
},
|
|
"emailDesc5": {
|
|
"type": "string",
|
|
"enum": [
|
|
"HOME",
|
|
"WORK",
|
|
"OTHER"
|
|
],
|
|
"description": "Email address 5 description"
|
|
},
|
|
"email6": {
|
|
"type": "string",
|
|
"description": "Email address 6 of the customer"
|
|
},
|
|
"emailDesc6": {
|
|
"type": "string",
|
|
"enum": [
|
|
"HOME",
|
|
"WORK",
|
|
"OTHER"
|
|
],
|
|
"description": "Email address 6 description"
|
|
},
|
|
"preferredMethod": {
|
|
"type": "string",
|
|
"enum": [
|
|
"PRIMARYPHONE",
|
|
"PAGER",
|
|
"HOMEFAX",
|
|
"WORKFAX",
|
|
"PRIMARYEMAIL"
|
|
],
|
|
"description": "The preferred method of contact for the customer"
|
|
},
|
|
"blockPhoneFlag": {
|
|
"type": "boolean",
|
|
"description": "Indicates whether or not to phone telephone advertising"
|
|
},
|
|
"blockEmailFlag": {
|
|
"type": "boolean",
|
|
"description": "Indicates whether or not to block e-mail advertising"
|
|
},
|
|
"blockMailFlag": {
|
|
"type": "boolean",
|
|
"description": "Indicates whether or not to block mail advertising"
|
|
}
|
|
},
|
|
"example": {
|
|
"primaryPhone": "18475555555",
|
|
"homePhone": "18473971700",
|
|
"mobilePhone": "18475555555",
|
|
"pager": "18475555556",
|
|
"pagerAccessCode": "1234",
|
|
"homeFax": "18475555666",
|
|
"workFax": "18475555777",
|
|
"email1": "john.doe@example.com",
|
|
"emailDesc1": "HOME",
|
|
"email2": "johndoe@example.com",
|
|
"emailDesc2": "WORK",
|
|
"preferredMethod": "PRIMARYEMAIL",
|
|
"blockPhoneFlag": true,
|
|
"blockEmailFlag": true,
|
|
"blockMailFlag": true
|
|
}
|
|
},
|
|
"PostalAddress": {
|
|
"type": "object",
|
|
"properties": {
|
|
"street": {
|
|
"type": "string",
|
|
"description": "Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "Can be city, village, town, borough, etc. This is the postal town and not necessarily the place of residence or place of business."
|
|
},
|
|
"county": {
|
|
"type": "string",
|
|
"description": "Handles administrative districts such as U.S. or U.K. counties that are not used for mail addressing purposes. Subregion is not intended for delivery addresses."
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "A state, province, county (in Ireland), Land (in Germany), departement (in France), etc."
|
|
},
|
|
"postalCode": {
|
|
"type": "string",
|
|
"description": "Postal code. Usually country-wide, but sometimes specific to the city (e.g. '2' in 'Dublin 2, Ireland' addresses)."
|
|
},
|
|
"country": {
|
|
"type": "string",
|
|
"description": "The ISO country code of the country"
|
|
}
|
|
},
|
|
"example": {
|
|
"street": "110 The example road",
|
|
"city": "This City",
|
|
"county": "Outside The City",
|
|
"state": "IL",
|
|
"postalCode": "12234",
|
|
"country": "US"
|
|
}
|
|
},
|
|
"CustomerLinks": {
|
|
"type": "object",
|
|
"properties": {
|
|
"self": {
|
|
"$ref": "#/definitions/LinkDescriptionObject",
|
|
"description": "The cannonical link to the customer resource"
|
|
}
|
|
},
|
|
"required": [
|
|
"self"
|
|
],
|
|
"example": {
|
|
"self": {
|
|
"href": "https://api.fortellis.io/cdkdrive/crm/v1/customers/ABCDEFGH012345678"
|
|
}
|
|
}
|
|
},
|
|
"CustomerCollection": {
|
|
"type": "object",
|
|
"properties": {
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Customer"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"items": [
|
|
{
|
|
"customerId": "ABCDEFGH012345678",
|
|
"name": {
|
|
"first": "John",
|
|
"last": "Doe"
|
|
},
|
|
"contactMethods": {
|
|
"primaryPhone": "18475555555",
|
|
"homePhone": "18473971700",
|
|
"mobilePhone": "18475555555",
|
|
"pager": "18475555556",
|
|
"pagerAccessCode": "1234",
|
|
"homeFax": "18475555666",
|
|
"workFax": "18475555777",
|
|
"email1": "john.doe@example.com",
|
|
"emailDesc1": "HOME",
|
|
"email2": "johndoe@example.com",
|
|
"emailDesc2": "WORK",
|
|
"preferredMethod": "PRIMARYEMAIL",
|
|
"blockPhoneFlag": true,
|
|
"blockEmailFlag": true,
|
|
"blockMailFlag": true
|
|
},
|
|
"postalAddress": {
|
|
"street": "110 The example road",
|
|
"city": "This City",
|
|
"county": "Outside The City",
|
|
"state": "IL",
|
|
"postalCode": "12234",
|
|
"country": "US"
|
|
},
|
|
"links": {
|
|
"self": {
|
|
"href": "https://api.fortellis.io/cdkdrive/crm/v1/customers/ABCDEFGH012345678"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"customerId": "RSTUVWXYZ98765432",
|
|
"name": null,
|
|
"companyName": "ABC Corp",
|
|
"contactMethods": {
|
|
"primaryPhone": "1-222-333-4444",
|
|
"pager": "1-222-333-6666",
|
|
"pagerAccessCode": "1234",
|
|
"homeFax": "1-222-333-7777",
|
|
"workFax": "1-222-333-8888",
|
|
"email1": "contactus@abccorp.com",
|
|
"email2": "support@abccorp.com",
|
|
"preferredMethod": "PRIMARYEMAIL",
|
|
"blockPhoneFlag": true,
|
|
"blockEmailFlag": true,
|
|
"blockMailFlag": true
|
|
},
|
|
"postalAddress": {
|
|
"street": "123 Shady Lane",
|
|
"city": "This City",
|
|
"county": "Outside The City",
|
|
"state": "IL",
|
|
"postalCode": "12234",
|
|
"country": "US"
|
|
},
|
|
"links": {
|
|
"self": {
|
|
"href": "https://api.fortellis.io/cdkdrive/crm/v1/customers/RSTUVWXYZ98765432"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"CreateCustomer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"$ref": "#/definitions/CreateUpdateName",
|
|
"description": "The primary name associated with the customer."
|
|
},
|
|
"contactMethods": {
|
|
"$ref": "#/definitions/ContactMethods",
|
|
"description": "The contact methods for the customer."
|
|
},
|
|
"postalAddress": {
|
|
"$ref": "#/definitions/PostalAddress",
|
|
"minItems": 1,
|
|
"description": "The customer postal address"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"contactMethods",
|
|
"postalAddress"
|
|
],
|
|
"example": {
|
|
"name": {
|
|
"first": "John",
|
|
"last": "Doe"
|
|
},
|
|
"contactMethods": {
|
|
"primaryPhone": "18475555555",
|
|
"homePhone": "18473971700",
|
|
"mobilePhone": "18475555555",
|
|
"pager": "18475555556",
|
|
"pagerAccessCode": "1234",
|
|
"homeFax": "18475555666",
|
|
"workFax": "18475555777",
|
|
"email1": "john.doe@example.com",
|
|
"emailDesc1": "HOME",
|
|
"email2": "johndoe@example.com",
|
|
"emailDesc2": "WORK",
|
|
"preferredMethod": "PRIMARYEMAIL",
|
|
"blockPhoneFlag": true,
|
|
"blockEmailFlag": true,
|
|
"blockMailFlag": true
|
|
},
|
|
"postalAddress": {
|
|
"street": "110 The example road",
|
|
"city": "This City",
|
|
"county": "Outside The City",
|
|
"state": "IL",
|
|
"postalCode": "12234",
|
|
"country": "US"
|
|
}
|
|
}
|
|
},
|
|
"Name": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first": {
|
|
"type": "string",
|
|
"description": "The first name of the customer"
|
|
},
|
|
"middle": {
|
|
"type": "string",
|
|
"description": "The middle name of the customer"
|
|
},
|
|
"last": {
|
|
"type": "string",
|
|
"description": "The last name of the customer"
|
|
},
|
|
"prefix": {
|
|
"type": "string",
|
|
"description": "The prefix of the customer"
|
|
},
|
|
"suffix": {
|
|
"type": "string",
|
|
"description": "The suffix of the customer"
|
|
},
|
|
"companyName": {
|
|
"type": "string",
|
|
"description": "If the customer represents a company, then company name will be considered"
|
|
}
|
|
},
|
|
"required": [
|
|
"first",
|
|
"last"
|
|
],
|
|
"example": {
|
|
"first": "John",
|
|
"last": "Doe",
|
|
"companyName": "ABC Corp"
|
|
}
|
|
},
|
|
"CreateUpdateName": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first": {
|
|
"type": "string",
|
|
"description": "The first name of the customer"
|
|
},
|
|
"middle": {
|
|
"type": "string",
|
|
"description": "The middle name of the customer"
|
|
},
|
|
"last": {
|
|
"type": "string",
|
|
"description": "The last name of the customer"
|
|
},
|
|
"prefix": {
|
|
"type": "string",
|
|
"description": "The prefix of the customer"
|
|
},
|
|
"suffix": {
|
|
"type": "string",
|
|
"description": "The suffix of the customer"
|
|
}
|
|
},
|
|
"required": [
|
|
"first",
|
|
"last"
|
|
],
|
|
"example": {
|
|
"first": "John",
|
|
"last": "Doe"
|
|
}
|
|
},
|
|
"LinkDescriptionObject": {
|
|
"title": "Details of a link to a resource",
|
|
"type": "object",
|
|
"properties": {
|
|
"href": {
|
|
"type": "string",
|
|
"description": "The target URI"
|
|
},
|
|
"method": {
|
|
"type": "string",
|
|
"description": "The HTTP verb that MUST be used to make a request to the target of the link"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "The title property provides a title for the link and is a helpful documentation tool to facilitate understanding by end clients"
|
|
}
|
|
},
|
|
"required": [
|
|
"href"
|
|
]
|
|
},
|
|
"ErrorResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"code",
|
|
"message"
|
|
],
|
|
"example": {
|
|
"code": 400,
|
|
"message": "Bad Request"
|
|
}
|
|
}
|
|
},
|
|
"parameters": {},
|
|
"responses": {},
|
|
"securityDefinitions": {},
|
|
"security": [
|
|
{
|
|
"apiKeyHeader": []
|
|
},
|
|
{
|
|
"apiKeyQuery": []
|
|
}
|
|
],
|
|
"tags": []
|
|
} |