Skip to main content
POST
/
v1
/
customers
Create Customer
curl --request POST \
  --url https://api.ecrypt.com/v1/customers \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "firstName": "John",
  "lastName": "Doe",
  "company": "US Oil Supply",
  "merchantIdentifier": "EID-987654-321",
  "phoneNumber": "555-555-555",
  "emailAddress": "email@email.com",
  "shippingAddress": {
    "name": "<string>",
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postalCode": "<string>",
    "country": "<string>"
  },
  "metadata": {},
  "initiatedByUserId": 123
}
'
{
  "requestId": "000000000000000000000",
  "customer": {
    "id": "00000000-0000-0000-0000-000000000000",
    "firstName": "John",
    "lastName": "Doe",
    "company": "US Oil Supply",
    "merchantIdentifier": "EID-987654-321",
    "phoneNumber": "555-555-555",
    "emailAddress": "email@email.com",
    "shippingAddress": {
      "name": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postalCode": "<string>",
      "country": "<string>"
    },
    "metadata": {}
  },
  "errors": [
    {
      "type": "<string>",
      "message": "<unknown>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Authorization by x-api-key inside request's header

Body

firstName
string | null
default:John

Customers first name.

Maximum string length: 100
Pattern: ^[0-9A-Za-z _\-\.,`'()@#!?\/\\:;|+=@%&]*$
lastName
string | null
default:Doe

Customers last name.

Maximum string length: 100
Pattern: ^[0-9A-Za-z _\-\.,`'()@#!?\/\\:;|+=@%&]*$
company
string | null
default:US Oil Supply

Company associated with the customer.

Maximum string length: 100
Pattern: ^[0-9A-Za-z _\-\.,`'()@#!?\/\\:;|+=@%&]*$
merchantIdentifier
string | null
default:EID-987654-321

Merchants customer identifier. This field can be used as a reference back to your internal data system.

Maximum string length: 100
Pattern: ^[0-9A-Za-z _\-\.,`'()@#!?\/\\:;|+=@%&]*$
phoneNumber
string | null
default:555-555-555

Customers phone number. This could be a cellular, land line, or a fax number.

Maximum string length: 100
Pattern: ^[0-9A-Za-z _\-\.,`'()@#!?\/\\:;|+=@%&]*$
emailAddress
string | null
default:email@email.com

Customers email address.

Maximum string length: 100
Pattern: ^[0-9A-Za-z _\-\.,`'()@#!?\/\\:;|+=@%&]*$
shippingAddress
object
metadata
object

Metadata associated with the customer. This is a key value pair.

initiatedByUserId
integer<int64> | null

Response

object | null

OK

requestId
string
default:000000000000000000000
required
Required string length: 1 - 100
customer
object
errors
(object | null)[] | null