{"method":"POST","path":"https://api.revcent.com/v2/customers","summary":"Create A Customer","description":"Create a customer prior to any purchase attempts. Useful when wanting to create prospects prior to any purchase attempt. Note: RevCent will automatically create a customer during an initial sale if the customer does not exist. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/CreateCustomer.md for an in-depth overview of this operation.","operationId":"CreateCustomer","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"campaign":{"type":"string","description":"The previously created campaign the customer is to be associated with. This can be either the ID of the campaign or the name of the campaign within RevCent."},"customer":{"description":"The customer object receives first priority as details when creating a new customer.","additionalProperties":false,"properties":{"first_name":{"type":"string","description":"The customer first name."},"last_name":{"type":"string","description":"The customer last name."},"address_line_1":{"type":"string","description":"The customer first address line."},"address_line_2":{"type":"string","description":"The customer second address line."},"city":{"type":"string","description":"The customer city."},"state":{"type":"string","description":"The customer state."},"zip":{"type":"string","description":"The customer ZIP and or postal code."},"country":{"type":"string","description":"The customer country in three letter ISO 3166-1 alpha-3 format."},"company":{"type":"string","description":"The customer company."},"email":{"type":"string","format":"email","description":"The customer email."},"phone":{"type":"string","description":"The customer phone."}},"type":"object","required":["first_name","last_name","email"]},"bill_to":{"description":"To use as the billing information. If not present the customer object will be used. Useful when simultaneously adding a credit card with separate billing information.","additionalProperties":false,"properties":{"first_name":{"type":"string","description":"The bill to first name."},"last_name":{"type":"string","description":"The bill to last name."},"address_line_1":{"type":"string","description":"The bill to first address line."},"address_line_2":{"type":"string","description":"The bill to second address line."},"city":{"type":"string","description":"The bill to city."},"state":{"type":"string","description":"The bill to state."},"zip":{"type":"string","description":"The bill to ZIP and or postal code."},"country":{"type":"string","description":"The bill to country in three letter ISO 3166-1 alpha-3 format."},"company":{"type":"string","description":"The bill to company."},"email":{"type":"string","format":"email","description":"The bill to email."},"phone":{"type":"string","description":"The bill to phone."}},"type":"object","required":["first_name","last_name","email"]},"payment":{"description":"If you wish to add a payment method with the customer upon creation.","additionalProperties":false,"properties":{"credit_card":{"description":"The credit card you wish to create and attach to the customer.","additionalProperties":false,"properties":{"card_number":{"description":"The full credit card number, digits only.","type":"string"},"exp_month":{"description":"The credit card expiration month as a one or two digit integer, i.e. MM.","type":"integer"},"exp_year":{"description":"The credit card expiration year as a two digit integer, i.e. YY.","type":"integer"},"card_code":{"description":"The credit card code as a string, digits only. Depending on the card type this can be different lengths.","type":"string"}},"type":"object"}},"type":"object"},"internal_customer_id":{"description":"An optional internal customer ID, i.e. a third party customer ID. For records purposes only.","type":"string"},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"An array of metadata objects, each metadata object being a name and value pair."}},"type":"object","required":["campaign","customer"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"customer_id":{"title":"Customer ID","type":"string","description":"A 20 character customer ID.","minLength":20,"maxLength":20},"result":{"type":"string"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}