Customer API
  1. customers
Customer API
  • common
    • customers
      • customer
        • account
          • transactions
            • transaction
              • Get Transaction
            • List Transactions
          • Get Account
          • Update Account
          • Get account by id
        • Get Customer
        • Get Customer w/Account
        • Update Customer
  • host
    • customers
      • Add Customer
      • Add Customers
      • Search Customers
    • customer-account-defaults
      • Get Account Defaults
      • Set Account Defaults
    • default-customer
      • Get Default Customer
    • frequent-customers
      • List Frequent Customers
  • store
    • customers
      • customer
        • account
          • transactions
            • Add Transaction
        • visibility
          • Get Customer Visibility
          • Set Customer Visibility
        • Get Provisioning
        • Provision For Store
        • Publish State Events
        • get customer by account number
      • Add Customer
        POST
      • Add & Provision Customer
        POST
      • Add Customers
        POST
      • Bulk List Customers
        POST
      • Search Customers
        GET
    • default-customer
      • Get Default Customer
      • Set Default Customer
    • frequent-customers
      • Add Frequent Customer
      • List Frequent Customers
      • Remove Frequent Customer
  1. customers

Add & Provision Customer

Developing
POST
/customers
Adds the customer and also provisions it for the store.
This op is intended to be called only by the ACL.
In order to prevent race conditions with the ACL, it does NOT automatically publish the state of the newly added customer.
The ACL triggers the event publish via a separate publish-customer-state op once the ACL is done adding the legacy customer.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/json

Example
{
    "customer": {
        "name": "string",
        "address": {
            "street1": "string",
            "street2": "string",
            "city": "string",
            "state": "string",
            "countryCode": "string",
            "zipCode": "/regex/"
        },
        "billToAddress": {
            "street1": "string",
            "street2": "string",
            "city": "string",
            "state": "string",
            "countryCode": "string",
            "zipCode": "/regex/"
        },
        "billToCustomerId": 0,
        "phone": "string",
        "email": "string",
        "shipTo": {
            "name": "string",
            "address": {
                "street1": "string",
                "street2": "string",
                "city": "string",
                "state": "string",
                "countryCode": "string",
                "zipCode": "/regex/"
            },
            "phone": "string",
            "email": "string"
        },
        "signatureRequired": true,
        "balanceDue": 0,
        "creditLimit": 0,
        "cashOverDays": true,
        "cashOverLimit": true,
        "maxDays": 0,
        "defaultPayType": "CASH",
        "payTypes": [
            "CASH"
        ],
        "priceCode": 0,
        "taxCode": 0,
        "status": "string"
    },
    "provisioning": {
        "storeCustomerNumber": "string",
        "version": 0
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mock.apidog.com/m1/365924-0-default/customers' \
--header 'add_andProvision;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "customer": {
        "name": "string",
        "address": {
            "street1": "string",
            "street2": "string",
            "city": "string",
            "state": "string",
            "countryCode": "string",
            "zipCode": "/regex/"
        },
        "billToAddress": {
            "street1": "string",
            "street2": "string",
            "city": "string",
            "state": "string",
            "countryCode": "string",
            "zipCode": "/regex/"
        },
        "billToCustomerId": 0,
        "phone": "string",
        "email": "string",
        "shipTo": {
            "name": "string",
            "address": {
                "street1": "string",
                "street2": "string",
                "city": "string",
                "state": "string",
                "countryCode": "string",
                "zipCode": "/regex/"
            },
            "phone": "string",
            "email": "string"
        },
        "signatureRequired": true,
        "balanceDue": 0,
        "creditLimit": 0,
        "cashOverDays": true,
        "cashOverLimit": true,
        "maxDays": 0,
        "defaultPayType": "CASH",
        "payTypes": [
            "CASH"
        ],
        "priceCode": 0,
        "taxCode": 0,
        "status": "string"
    },
    "provisioning": {
        "storeCustomerNumber": "string",
        "version": 0
    }
}'

Responses

🟢201Created
application/json
Body

Example
{
    "data": {
        "customer": {
            "id": 1,
            "franchiseId": 1,
            "name": "string",
            "address": {
                "street1": "string",
                "street2": "string",
                "city": "string",
                "state": "string",
                "countryCode": "string",
                "zipCode": "/regex/"
            },
            "phone": "string",
            "email": "string",
            "billToAccount": {
                "id": 0,
                "status": "ACTIVE",
                "billToAddress": {
                    "street1": "string",
                    "street2": "string",
                    "city": "string",
                    "state": "string",
                    "countryCode": "string",
                    "zipCode": "/regex/"
                },
                "balance": 0,
                "creditLimit": 0,
                "cashOverLimit": false,
                "cashOverDays": false,
                "ageInDays": 0,
                "defaultPayType": "CASH",
                "payTypes": [
                    "CASH"
                ],
                "priceCode": 0,
                "taxCode": "string",
                "maxDays": 0,
                "signatureRequired": false,
                "version": 0
            },
            "shipTo": {
                "name": "string",
                "address": {
                    "street1": "string",
                    "street2": "string",
                    "city": "string",
                    "state": "string",
                    "countryCode": "string",
                    "zipCode": "/regex/"
                },
                "phone": "string",
                "email": "string"
            },
            "version": 0
        },
        "account": {
            "id": 0,
            "status": "ACTIVE",
            "billToAddress": {
                "street1": "string",
                "street2": "string",
                "city": "string",
                "state": "string",
                "countryCode": "string",
                "zipCode": "/regex/"
            },
            "balance": 0,
            "creditLimit": 0,
            "cashOverLimit": false,
            "cashOverDays": false,
            "ageInDays": 0,
            "defaultPayType": "CASH",
            "payTypes": [
                "CASH"
            ],
            "priceCode": 0,
            "taxCode": "string",
            "maxDays": 0,
            "signatureRequired": false,
            "version": 0
        }
    }
}
🟠403Forbidden
🟠400Bad Request
🔴500Server Error
Modified at 2025-05-16 17:11:32
Previous
Add Customer
Next
Add Customers
Built with