{ "protocol" : "Account", "namespace" : "Switchboard", "types" : [ { "type" : "record", "name" : "AccountAddress", "fields" : [ { "name" : "address_line1", "type" : "string" }, { "name" : "address_line2", "type" : [ "null", "string" ] }, { "name" : "city", "type" : "string" }, { "name" : "county", "type" : [ "null", "string" ] }, { "name" : "postal_code", "type" : "string" } ] }, { "type" : "record", "name" : "UpsertParams", "fields" : [ { "name" : "id", "type" : "int", "doc" : "Account id field in sales force" }, { "name" : "address", "type" : "AccountAddress" }, { "name" : "contact_email", "type" : "string" }, { "name" : "contact_name", "type" : [ "null", "string" ] }, { "name" : "phone_number", "type" : [ "null", "string" ] } ] }, { "type" : "record", "name" : "Account", "doc" : "The main account record data type", "fields" : [ { "name" : "id", "type" : "int", "doc" : "Account id field in sales force" }, { "name" : "customer_id", "type" : "int", "doc" : "Avvo's internal customer id" }, { "name" : "address", "type" : "AccountAddress" }, { "name" : "contact_email", "type" : "string" }, { "name" : "contact_name", "type" : [ "null", "string" ] }, { "name" : "phone_number", "type" : [ "null", "string" ] }, { "name" : "start_date", "type" : [ "null", "string" ], "doc" : "Date of first invoice for the customer, YYYY-mm-dd" } ] }, { "type" : "record", "name" : "UpsertRequest", "doc" : "REQUEST DATA TYPES", "fields" : [ { "name" : "account", "type" : "UpsertParams" } ] } ], "messages" : { "update" : { "doc" : "Procedures", "request" : [ { "name" : "params", "type" : "UpsertParams" } ], "response" : { "type" : "array", "items" : "Account" } } } }