# Create customer Create a new account customer. There are 3 customer types you can create with this endpoint: a `company` customer, a `person` customer, or a person customer with less informational fields (`customer` object). Each account contains at least one customer. You can add multiple customers to an account but only one can be the account owner. Other customers can have their own individual cards, but the balances on those cards must be shared with the account owner. This endpoint generates a [Customer created](https://developers.pismo.io/events/docs/account-customer-creation-1) event. If the `customer.is_owner` property is set to `true`: * The account owner is changed to this new customer, and all existing customers remain active in the account. * This endpoint generates an [Account owner changed](https://developers.pismo.io/events/docs/account-account-owner-change-1) event. If the `customer.is_active` = `true`, and the `Maximum number of card holders` program parameter is set, this customer is counted in the limit of maximum number of card holders for an account. Each customer has an associated entity object. If one isn't passed in the request, a default one is created using their document number. Refer to the [Core objects](doc:setup-overview) guide for more information. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Core platform - Accounts", "version": "1.0.0", "description": "API used to manage accounts domain", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io", "description": "API server for testing" } ], "tags": [ { "name": "Customers", "description": "Endpoints to manage customers" } ], "components": { "schemas": { "IndividualsEmailAddress": { "type": "string", "description": "Email address.", "format": "email", "maxLength": 100, "example": "jenna.flect@email.com" }, "AccountExternalId": { "type": "string", "description": "\nClient-created ID from an external system or application. **REQUIRED** for `VIRTUAL` accounts.\n", "maxLength": 60, "example": "8c8a4dd7-e48f-4c15-85b7-9d12f401057f" }, "AccountID": { "type": "integer", "format": "int64", "description": "Account ID", "example": 1001 }, "Activity": { "type": "string", "description": "Company's general field of activity", "maxLength": 30, "example": "Manufacturing" }, "Assets": { "type": "number", "format": "float", "description": "Assets", "example": 40000 }, "BirthDate": { "type": "string", "description": "Birth date. Format = dd/mm/yyyy.", "example": "31/12/1980" }, "CardholderName": { "type": "string", "description": "Cardholder name", "example": "Sam Smith" }, "CityOfBirth": { "type": "string", "description": "Birth city", "maxLength": 60, "example": "San Diego" }, "Company": { "properties": { "name": { "$ref": "#/components/schemas/CompanyRepresentativeName" }, "nickname": { "$ref": "#/components/schemas/CompanyRepresentativeNickname" }, "printed_name": { "$ref": "#/components/schemas/PrintedName3" }, "social_name": { "$ref": "#/components/schemas/CompanyRepresentativeSocialName" }, "pep": { "$ref": "#/components/schemas/PEP" }, "company_name": { "$ref": "#/components/schemas/CompanyName" }, "registration_number": { "$ref": "#/components/schemas/RegistrationNumber" }, "activity": { "$ref": "#/components/schemas/Activity" }, "company_type": { "$ref": "#/components/schemas/CompanyType" }, "company_format": { "$ref": "#/components/schemas/CompanyFormat" }, "occupation": { "$ref": "#/components/schemas/RepresentativeOccupation" }, "income": { "$ref": "#/components/schemas/CompanyIncome2" }, "net_worth": { "$ref": "#/components/schemas/CompanyNetWorth2" }, "annual_revenues": { "$ref": "#/components/schemas/CompanyAnnualRevenues" }, "type": { "$ref": "#/components/schemas/CompanyBusinessRelationsType" }, "number_of_partners": { "$ref": "#/components/schemas/NumberOfPartners" }, "perc_ownership": { "$ref": "#/components/schemas/PercOwnership" }, "fiscal_situation": { "$ref": "#/components/schemas/FiscalSituation" }, "debt": { "$ref": "#/components/schemas/CompanyDebt2" }, "email": { "$ref": "#/components/schemas/CompanyEmail" }, "partners": { "description": "Company partners", "type": "array", "items": { "$ref": "#/components/schemas/Partner" } } } }, "Company2": { "properties": { "company_name": { "$ref": "#/components/schemas/CompanyName" }, "registration_number": { "$ref": "#/components/schemas/RegistrationNumber" }, "activity": { "$ref": "#/components/schemas/Activity" }, "company_type": { "$ref": "#/components/schemas/CompanyType" }, "company_format": { "$ref": "#/components/schemas/CompanyFormat" }, "company_constitution_date": { "$ref": "#/components/schemas/CompanyConstitutionDate2" }, "occupation": { "$ref": "#/components/schemas/RepresentativeOccupation" }, "annual_revenues": { "$ref": "#/components/schemas/CompanyAnnualRevenues" }, "type": { "$ref": "#/components/schemas/CompanyBusinessRelationsType" }, "number_of_partners": { "$ref": "#/components/schemas/NumberOfPartners" }, "perc_ownership": { "$ref": "#/components/schemas/PercOwnership" }, "fiscal_situation": { "$ref": "#/components/schemas/FiscalSituation" }, "debt": { "$ref": "#/components/schemas/CompanyDebt2" }, "income": { "$ref": "#/components/schemas/CompanyIncome" }, "net_worth": { "$ref": "#/components/schemas/CompanyNetWorth" }, "partners": { "description": "Company partners", "type": "array", "items": { "$ref": "#/components/schemas/Partner" } } } }, "CompanyAnnualRevenues": { "type": "number", "format": "float", "description": "Company annual revenues (monthly billing average)", "example": 33000 }, "CompanyBusinessRelationsType": { "type": "string", "example": "B2C", "description": "Company's business relations type", "maxLength": 60 }, "CompanyConstitutionDate2": { "type": "string", "description": "Company constitution date. Format = dd/MM/yyyy.", "example": "01/01/2019" }, "CompanyDebt2": { "type": "number", "format": "float", "description": "Company's debt", "example": 18000 }, "CompanyEmail": { "type": "string", "description": "Company's registered email", "maxLength": 100, "example": "acme@acmemail.com" }, "CompanyFormat": { "type": "string", "description": "Company social type", "maxLength": 60, "example": "ME" }, "CompanyIncome": { "type": "integer", "format": "int64", "description": "Company's income", "example": 10000 }, "CompanyIncome2": { "type": "number", "format": "float", "description": "Company's income", "example": 10000 }, "CompanyName": { "type": "string", "description": "Company's legal name", "maxLength": 150, "example": "Acme Inc." }, "CompanyNetWorth": { "type": "integer", "format": "int64", "description": "Company's net worth", "example": 20000 }, "CompanyNetWorth2": { "type": "number", "format": "float", "description": "Company's net worth.", "example": 20000 }, "CompanyRepresentativeName": { "type": "string", "description": "Company representative name", "example": "Sam Houston" }, "CompanyRepresentativeNickname": { "type": "string", "description": "Company representative nickname", "example": "Curveball" }, "CompanyRepresentativeSocialName": { "type": "string", "description": "Company representative's social name", "example": "Otter" }, "CompanyType": { "type": "string", "description": "Company type", "maxLength": 60, "example": "Retailer" }, "CountryOfBirth": { "type": "string", "description": "Birth country", "maxLength": 60, "example": "India" }, "CustomerID": { "type": "integer", "format": "int64", "description": "Customer ID", "example": 100211299 }, "CustomerIsActive": { "type": "boolean", "description": "Is customer active or not active? If `is_active` is null in this request, the Pismo platform doesn't overwrite the existing value.", "example": true }, "CustomerV2Request": { "required": [ "account_id", "entity", "customer" ], "properties": { "account_id": { "$ref": "#/components/schemas/AccountID" }, "entity": { "required": [ "name", "document_number" ], "properties": { "name": { "$ref": "#/components/schemas/EntityName" }, "document_number": { "$ref": "#/components/schemas/DocumentNumber" }, "birth_date": { "$ref": "#/components/schemas/EntityBirthDate2" }, "gender": { "$ref": "#/components/schemas/Gender" }, "marital_status": { "$ref": "#/components/schemas/MaritalStatus" }, "mothers_name": { "$ref": "#/components/schemas/MothersName" }, "registration": { "$ref": "#/components/schemas/EntityRegistration" }, "pep": { "$ref": "#/components/schemas/PEP" }, "external_id": { "$ref": "#/components/schemas/AccountExternalId" }, "person": { "$ref": "#/components/schemas/Person2" }, "company": { "$ref": "#/components/schemas/Company2" } } }, "customer": { "required": [ "is_owner" ], "properties": { "is_owner": { "$ref": "#/components/schemas/IsOwner" }, "email": { "$ref": "#/components/schemas/IndividualsEmailAddress" }, "printed_name": { "$ref": "#/components/schemas/PrintedName" }, "social_name": { "$ref": "#/components/schemas/SocialName" }, "nickname": { "$ref": "#/components/schemas/Nickname" } } } } }, "CustomerV2Response": { "type": "object", "properties": { "account_id": { "$ref": "#/components/schemas/AccountID" }, "customer_id": { "$ref": "#/components/schemas/CustomerID" }, "entityd": { "$ref": "#/components/schemas/EntityID" }, "message": { "type": "string", "example": "Customer registration response (201 created)" }, "data": { "properties": { "entity": { "properties": { "name": { "$ref": "#/components/schemas/CardholderName" }, "gender": { "$ref": "#/components/schemas/Gender" }, "registration": { "$ref": "#/components/schemas/EntityRegistration" }, "marital_status": { "$ref": "#/components/schemas/MaritalStatus" }, "mothers_name": { "$ref": "#/components/schemas/MothersName" }, "birth_date": { "$ref": "#/components/schemas/EntityBirthDate2" }, "document_number": { "$ref": "#/components/schemas/DocumentNumber" }, "pep": { "$ref": "#/components/schemas/PEP" }, "person": { "$ref": "#/components/schemas/Person" }, "company": { "$ref": "#/components/schemas/Company" } } }, "external_id": { "$ref": "#/components/schemas/AccountExternalId" } } }, "customer": { "properties": { "nickname": { "$ref": "#/components/schemas/Nickname" }, "email": { "type": "string", "description": "Customer email" }, "printed_name": { "$ref": "#/components/schemas/PrintedName" }, "social_name": { "$ref": "#/components/schemas/SocialName" }, "is_owner": { "$ref": "#/components/schemas/IsOwner" }, "is_active": { "$ref": "#/components/schemas/CustomerIsActive" } } }, "is_migration": { "type": "boolean", "description": "Is this a customer migration?" } } }, "DocumentIssuedAt": { "type": "string", "description": "Document issuer location. This is a free-form field, not an ISO standard.", "maxLength": 30, "example": "Brazil" }, "DocumentIssuedBy": { "type": "string", "description": "Document issuer", "maxLength": 30 }, "DocumentIssuedDate": { "type": "string", "description": "Date document was issued. Format = dd/mm/yyyy.", "example": "01/31/1970" }, "DocumentNumber": { "type": "string", "maxLength": 15, "description": "Document number, such as a government tax ID.", "example": "31457828046" }, "DocumentType": { "type": "string", "description": "Document type. Free-form field, not an enum.", "maxLength": 30 }, "EntityBirthDate2": { "type": "string", "description": "Entity birth date. Format = dd/MM/yyyy.\n\nFor individuals, this is their birth date. For companies, this is the business registration date.\n", "example": "15/01/1990" }, "EntityID": { "type": "integer", "format": "int64", "description": "Entity ID", "minimum": 1, "example": 1234567891 }, "EntityName": { "type": "string", "description": "Entity name", "example": "Sam Smith" }, "EntityRegistration": { "type": "string", "description": "Entity registration", "example": "55555555" }, "FathersName": { "type": "string", "description": "Father's name", "maxLength": 60, "example": "Steven Douglas" }, "FiscalSituation": { "type": "string", "description": "Company's fiscal situation.", "maxLength": 60, "example": "Good" }, "Gender": { "type": "string", "description": "Gender", "maxLength": 1, "enum": [ "F", "M", "" ], "example": "M" }, "IndividualsName": { "type": "string", "description": "Name", "example": "Hyman Roth" }, "IsOwner": { "type": "boolean", "description": "Is the customer the account owner?", "example": false }, "MaritalStatus": { "type": "string", "description": "Marital status", "enum": [ "SINGLE", "MARRIED", "DIVORCED", "WIDOWER" ], "example": "MARRIED" }, "MothersName": { "type": "string", "description": "Mother's name", "maxLength": 60, "example": "Kay Sadilla" }, "Nationality": { "type": "string", "description": "Nationality", "maxLength": 60, "example": "Australian" }, "Nickname": { "type": "string", "description": "Nickname.", "maxLength": 128, "example": "Pinto" }, "NumberOfPartners": { "type": "integer", "format": "int32", "description": "Number of company partners", "example": 3 }, "OtherIdNumber": { "type": "string", "description": "Another ID number", "example": "29000000" }, "Partner": { "type": "object", "description": "Applicant's personal information", "properties": { "name": { "$ref": "#/components/schemas/IndividualsName" }, "nickname": { "$ref": "#/components/schemas/Nickname" }, "printed_name": { "$ref": "#/components/schemas/PrintedName" }, "social_name": { "$ref": "#/components/schemas/SocialName" }, "email": { "$ref": "#/components/schemas/IndividualsEmailAddress" }, "document_number": { "$ref": "#/components/schemas/DocumentNumber" }, "mothers_name": { "$ref": "#/components/schemas/MothersName" }, "gender": { "$ref": "#/components/schemas/Gender" }, "birth_date": { "$ref": "#/components/schemas/BirthDate" }, "city_of_birth": { "$ref": "#/components/schemas/CityOfBirth" }, "state_of_birth": { "$ref": "#/components/schemas/StateOfBirth" }, "country_of_birth": { "$ref": "#/components/schemas/CountryOfBirth" }, "fathers_name": { "$ref": "#/components/schemas/FathersName" }, "marital_status": { "$ref": "#/components/schemas/MaritalStatus" } } }, "PEP": { "type": "boolean", "description": "Is this person a Politically Exposed Person (PEP)? Pismo doesn't do anything differently for a PEP, this is just additional account information. Default is `false`.\n", "example": false }, "PercOwnership": { "type": "number", "format": "float", "description": "Company percentage ownership", "example": 50 }, "Person2": { "type": "object", "description": "Either this or the `company` object is **REQUIRED**. Pass one or the other but not both.", "properties": { "nationality": { "$ref": "#/components/schemas/Nationality" }, "city_of_birth": { "$ref": "#/components/schemas/CityOfBirth" }, "state_of_birth": { "$ref": "#/components/schemas/StateOfBirth" }, "country_of_birth": { "$ref": "#/components/schemas/CountryOfBirth" }, "other_id_number": { "$ref": "#/components/schemas/OtherIdNumber" }, "document_type": { "$ref": "#/components/schemas/DocumentType" }, "document_issued_by": { "$ref": "#/components/schemas/DocumentIssuedBy" }, "document_issued_at": { "$ref": "#/components/schemas/DocumentIssuedAt" }, "document_issued_date": { "$ref": "#/components/schemas/DocumentIssuedDate" }, "fathers_name": { "$ref": "#/components/schemas/FathersName" }, "occupation": { "$ref": "#/components/schemas/PersonOccupation" }, "assets": { "$ref": "#/components/schemas/Assets" }, "income": { "$ref": "#/components/schemas/PersonIncome" }, "net_worth": { "$ref": "#/components/schemas/PersonNetWorth" } } }, "Person": { "properties": { "name": { "$ref": "#/components/schemas/IndividualsName" }, "nickname": { "$ref": "#/components/schemas/Nickname" }, "printed_name": { "$ref": "#/components/schemas/PrintedName3" }, "social_name": { "$ref": "#/components/schemas/SocialName" }, "email": { "$ref": "#/components/schemas/IndividualsEmailAddress" }, "pep": { "$ref": "#/components/schemas/PEP" }, "gender": { "$ref": "#/components/schemas/Gender" }, "marital_status": { "$ref": "#/components/schemas/MaritalStatus" }, "mothers_name": { "$ref": "#/components/schemas/MothersName" }, "nationality": { "$ref": "#/components/schemas/Nationality" }, "city_of_birth": { "$ref": "#/components/schemas/CityOfBirth" }, "state_of_birth": { "$ref": "#/components/schemas/StateOfBirth" }, "country_of_birth": { "$ref": "#/components/schemas/CountryOfBirth" }, "other_id_number": { "$ref": "#/components/schemas/OtherIdNumber" }, "document_type": { "$ref": "#/components/schemas/DocumentType" }, "document_issued_by": { "$ref": "#/components/schemas/DocumentIssuedBy" }, "document_issued_at": { "$ref": "#/components/schemas/DocumentIssuedAt" }, "document_issued_date": { "$ref": "#/components/schemas/DocumentIssuedDate" }, "fathers_name": { "$ref": "#/components/schemas/FathersName" }, "occupation": { "$ref": "#/components/schemas/PersonOccupation" }, "assets": { "$ref": "#/components/schemas/Assets" }, "income": { "$ref": "#/components/schemas/PersonIncome" }, "net_worth": { "$ref": "#/components/schemas/PersonNetWorth" } } }, "PersonIncome": { "type": "number", "format": "float", "description": "Person's income", "example": 2000 }, "PersonNetWorth": { "type": "number", "format": "float", "description": "Person's net worth", "example": 50000 }, "PersonOccupation": { "type": "string", "description": "Person's occupation", "maxLength": 60, "example": "Programmer" }, "PrintedName": { "type": "string", "description": "\nThis field is **DEPRECATED**. \n\nName to be printed on the card. \n\nPunctuation, special characters, and connectors (da/das/de/do/dos/e) are always removed. \n\nThis field's maximum length is 25, but you can set it to a lower value at the program level with the `Max name length on physical card` program parameter.\n\nIf `printed_name` is null, the Pismo platform uses `social_name`. If `social_name` is null, the Pismo platform uses the customer's entity name. For more information on the customer object, refer to [Core objects](https://developers.pismo.io/pismo-docs/docs/setup-overview#customer).\n\nThe Pismo platform gets the name for program parameter `TAMANHO MAX NOME EMBOSSADO` (max size name embossed).\n", "maxLength": 25, "deprecated": true, "example": "Jack Williams" }, "PrintedName3": { "type": "string", "description": "\nThis field is **DEPRECATED**. Cards is now responsible for this field.\n\nPerson's name to be printed on the card. If the field is null, `name` or `social_name` is used.\n\nPunctuation, special characters, and connectors (da/das/de/do/dos/e) are always removed. \n\nThis field's maximum lengh of this field is 25, but you can set it to a lower value on the program level with the `Max name length on physical card` program parameter.\n", "example": "Luce Lyons", "deprecated": true, "maxLength": 25 }, "RegistrationNumber": { "type": "string", "description": "Company's registration number with local authorities", "maxLength": 30, "example": "ACM10004" }, "RepresentativeOccupation": { "type": "string", "description": "Company representative's occupation", "maxLength": 60, "example": "CEO" }, "SocialName": { "type": "string", "description": "Social name.", "maxLength": 64, "example": "Jack" }, "StateOfBirth": { "type": "string", "description": "Birth state", "maxLength": 60, "example": "California" } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "security": [ { "BearerAuth": [] } ], "x-readme": { "explorer-enabled": true, "proxy-enabled": true, "samples-enabled": true }, "paths": { "/accounts/v2/customers": { "post": { "operationId": "customerV2Post", "summary": "Create customer", "description": "Create a new account customer.\n\nThere are 3 customer types you can create with this endpoint: a `company` customer, a `person` customer, or a person customer with less informational fields (`customer` object).\n\nEach account contains at least one customer. You can add multiple customers to an account but only one can be the account owner. Other customers can have their own individual cards, but the balances on those cards must be shared with the account owner.\n\nThis endpoint generates a [Customer created](https://developers.pismo.io/events/docs/account-customer-creation-1) event.\n\nIf the `customer.is_owner` property is set to `true`:\n\n* The account owner is changed to this new customer, and all existing customers remain active in the account.\n* This endpoint generates an [Account owner changed](https://developers.pismo.io/events/docs/account-account-owner-change-1) event.\n\nIf the `customer.is_active` = `true`, and the `Maximum number of card holders` program parameter is set, this customer is counted in the limit of maximum number of card holders for an account.\n\nEach customer has an associated entity object. If one isn't passed in the request, a default one is created using their document number.\n\nRefer to the [Core objects](https://developers.pismo.io/pismo-docs/docs/setup-overview) guide for more information.\n", "tags": [ "Customers" ], "parameters": [], "requestBody": { "description": "Additional customer", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerV2Request" } } } }, "responses": { "201": { "description": "Account additional registration", "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "$ref": "#/components/schemas/CustomerV2Response" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" }, "field": { "type": "string" } } }, "examples": { "Empty is_owner": { "value": { "message": "is_owner must not be empty", "field": "is_owner" } }, "Inactive_owner": { "value": { "message": "New customer owner must not be inactive" } }, "Maximum Additional Customers": { "value": { "message": "Exceeded maximum value of additional customers" } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Customer with accountId=(1001) and documentNumber=(01544455558) exists" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Error trying to register entity" } } } } } } } } } } } ```