PrintNowPrintNowDocs

Customers

Create, read, update, transfer and delete customer accounts on your storefronts.

A customer belongs to one storefront. Usernames and email addresses are unique per storefront. Each customer also carries their organization, user groups (which drive pricing and access) and tax-exempt status, all managed in the admin.

Permanent and temporary customers

  • A permanent customer has a username, password and email, and can log in to the storefront.
  • A temporary (guest) customer is created with just a storefront id; PrintNow generates its credentials. Use one to let someone design and save work before they have an account. Temporary customers have is_temporary: true.

Guest workflow

  1. Create a temporary customer: POST /api/v2/customer with storefront_id and is_temporary: true.
  2. The guest browses, designs and saves projects as that customer.
  3. When they're ready to check out, either:
    • create their account: PATCH /api/v2/customer/{tempId} with the full details (username, password, email, first and last name). The temporary customer becomes permanent, keeping its id and saved work; or
    • move the work to an account they already have: PATCH /api/v2/customer/{tempId}/transfer with { "id": <their customer id> }. Albums, saved projects and punchout sessions move to that customer, who must be on the same storefront.

Updating

PATCH /api/v2/customer/{id} changes a permanent customer's password, first name, last name and company. Other fields in the body are ignored.

Webhooks

EventFires when
customer_createdA customer account is created (storefront registration, the admin or the API), or a temporary customer is converted into one.
customer_updatedA customer's profile changes in the storefront, the admin or the API.
customer_deletedA customer is deleted through the API. The payload is the customer's last state.

Creating a temporary customer doesn't fire a webhook.

Get a customer

GET
/api/v2/customer/{customerId}
AuthorizationBasic <token>

Your API token as the username and your API key as the password.

In: header

Path Parameters

customerId*integer

Customer id.

Formatint32

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.printnow.com/api/v2/customer/0"
{
  "storefront": "Demo Store",
  "storefront_id": 1,
  "id": 24,
  "first_name": "Demo",
  "last_name": "User",
  "email": "demo.user@domain.com",
  "username": "demouser",
  "receive_marketing_emails": true,
  "last_logged_in_on": "2023-10-18T13:43:19.15Z",
  "created_on": "2021-08-30T13:34:44.62Z",
  "last_updated_on": "2023-11-22T15:59:38.667Z",
  "company": "Demo Company",
  "organization": null,
  "user_groups": [],
  "tax_exempt": false
}

The key or token is missing, does not match, or the token is inactive or deleted.

{
  "Message": "Invalid key or token."
}

The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.

{
  "Message": "Your license does not include the Orders API."
}
{
  "Message": "Customer not found."
}

Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.

{
  "Message": "Rate limit exceeded: 100 calls per 10 seconds."
}

Update a customer

PATCH
/api/v2/customer/{customerId}
AuthorizationBasic <token>

Your API token as the username and your API key as the password.

In: header

Path Parameters

customerId*integer

Customer id.

Formatint32

Request Body

application/json

The fields to change.

storefront?|

Name of the storefront the customer belongs to.

storefront_id?integer

Id of the storefront the customer belongs to. Required when creating a customer.

Formatint32
id?integer

Customer id. When transferring a temporary customer, the id of the destination customer.

Formatint32
first_name?|

First name. Required when creating a customer.

last_name?|

Last name. Required when creating a customer.

email?|

Email address, unique on the storefront. Required when creating a customer.

username?|

Login username, 3 to 50 characters, unique on the storefront. Required when creating a customer.

password?|

Write-only, never returned. At least 6 characters. Required when creating a customer; on update, sets a new password.

receive_marketing_emails?boolean

True when the customer has opted in to marketing emails. Set on create (defaults to false).

last_logged_in_on?|

When the customer last logged in (UTC). Null if never.

Formatdate-time
created_on?|

When the account was created (UTC).

Formatdate-time
last_updated_on?|

When the profile was last changed (UTC). Null if never.

Formatdate-time
company?|

Company name the customer entered on their profile (not the organization).

organization?|

Name of the organization the customer belongs to, if any. Organizations are managed in the admin.

user_groups?array<>|

Names of the user groups the customer belongs to (the default RETAIL group isn't listed). Groups drive pricing and access.

tax_exempt?boolean

True when the customer is tax-exempt: set on the customer, or inherited from a tax-exempt user group.

is_temporary?boolean

Present and true only for a temporary (guest) customer. Send true on create to make a temporary customer.

[key: string]?never

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.printnow.com/api/v2/customer/0" \  -H "Content-Type: application/json" \  -d '{    "first_name": "John",    "last_name": "Doe",    "password": "Password!123",    "company": "John Doe, Inc."  }'
{
  "storefront": "Demo Store",
  "storefront_id": 1,
  "id": 106670,
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@john-doe-inc.com",
  "username": "john.doe",
  "receive_marketing_emails": false,
  "last_logged_in_on": null,
  "created_on": "2023-11-30T16:25:44.627Z",
  "last_updated_on": "2023-11-30T16:26:57.9851105Z",
  "company": "John Doe, Inc.",
  "organization": null,
  "user_groups": [],
  "tax_exempt": false
}
{
  "Message": "string"
}

The key or token is missing, does not match, or the token is inactive or deleted.

{
  "Message": "Invalid key or token."
}

The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.

{
  "Message": "Your license does not include the Orders API."
}
{
  "Message": "Customer Not found."
}

Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.

{
  "Message": "Rate limit exceeded: 100 calls per 10 seconds."
}

Delete a customer

DELETE
/api/v2/customer/{customerId}
AuthorizationBasic <token>

Your API token as the username and your API key as the password.

In: header

Path Parameters

customerId*integer

Customer id.

Formatint32

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://api.printnow.com/api/v2/customer/0"
Empty

The key or token is missing, does not match, or the token is inactive or deleted.

{
  "Message": "Invalid key or token."
}

The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.

{
  "Message": "Your license does not include the Orders API."
}
{
  "Message": "Customer not found."
}

Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.

{
  "Message": "Rate limit exceeded: 100 calls per 10 seconds."
}

Create a customer

POST
/api/v2/customer
AuthorizationBasic <token>

Your API token as the username and your API key as the password.

In: header

Request Body

application/json

The customer to create.

storefront?|

Name of the storefront the customer belongs to.

storefront_id?integer

Id of the storefront the customer belongs to. Required when creating a customer.

Formatint32
id?integer

Customer id. When transferring a temporary customer, the id of the destination customer.

Formatint32
first_name?|

First name. Required when creating a customer.

last_name?|

Last name. Required when creating a customer.

email?|

Email address, unique on the storefront. Required when creating a customer.

username?|

Login username, 3 to 50 characters, unique on the storefront. Required when creating a customer.

password?|

Write-only, never returned. At least 6 characters. Required when creating a customer; on update, sets a new password.

receive_marketing_emails?boolean

True when the customer has opted in to marketing emails. Set on create (defaults to false).

last_logged_in_on?|

When the customer last logged in (UTC). Null if never.

Formatdate-time
created_on?|

When the account was created (UTC).

Formatdate-time
last_updated_on?|

When the profile was last changed (UTC). Null if never.

Formatdate-time
company?|

Company name the customer entered on their profile (not the organization).

organization?|

Name of the organization the customer belongs to, if any. Organizations are managed in the admin.

user_groups?array<>|

Names of the user groups the customer belongs to (the default RETAIL group isn't listed). Groups drive pricing and access.

tax_exempt?boolean

True when the customer is tax-exempt: set on the customer, or inherited from a tax-exempt user group.

is_temporary?boolean

Present and true only for a temporary (guest) customer. Send true on create to make a temporary customer.

[key: string]?never

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.printnow.com/api/v2/customer" \  -H "Content-Type: application/json" \  -d '{    "storefront_id": 1,    "first_name": "John",    "last_name": "Doe",    "email": "john.doe@john-doe-inc.com",    "username": "john.doe",    "password": "Password!123",    "company": "John Doe, Inc."  }'

{
  "storefront": "Demo Store",
  "storefront_id": 1,
  "id": 106669,
  "first_name": "temporary",
  "last_name": "user",
  "email": "44260566620b47b88ebf9d617af953a3@ca72a72f460c4050a5fa0f96449711e5.com",
  "username": "44260566620b47b88ebf9d617af953a3",
  "receive_marketing_emails": false,
  "last_logged_in_on": null,
  "created_on": "2023-11-30T16:23:59.353Z",
  "last_updated_on": null,
  "company": null,
  "organization": null,
  "user_groups": [],
  "tax_exempt": false,
  "is_temporary": true
}

{
  "Message": "Email address is already in use."
}

The key or token is missing, does not match, or the token is inactive or deleted.

{
  "Message": "Invalid key or token."
}

The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.

{
  "Message": "Your license does not include the Orders API."
}

Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.

{
  "Message": "Rate limit exceeded: 100 calls per 10 seconds."
}

Transfer a temporary customer's work

PATCH
/api/v2/customer/{customerId}/transfer
AuthorizationBasic <token>

Your API token as the username and your API key as the password.

In: header

Path Parameters

customerId*integer

Id of the temporary customer (the source).

Formatint32

Request Body

application/json

The destination customer: only id is used.

storefront?|

Name of the storefront the customer belongs to.

storefront_id?integer

Id of the storefront the customer belongs to. Required when creating a customer.

Formatint32
id?integer

Customer id. When transferring a temporary customer, the id of the destination customer.

Formatint32
first_name?|

First name. Required when creating a customer.

last_name?|

Last name. Required when creating a customer.

email?|

Email address, unique on the storefront. Required when creating a customer.

username?|

Login username, 3 to 50 characters, unique on the storefront. Required when creating a customer.

password?|

Write-only, never returned. At least 6 characters. Required when creating a customer; on update, sets a new password.

receive_marketing_emails?boolean

True when the customer has opted in to marketing emails. Set on create (defaults to false).

last_logged_in_on?|

When the customer last logged in (UTC). Null if never.

Formatdate-time
created_on?|

When the account was created (UTC).

Formatdate-time
last_updated_on?|

When the profile was last changed (UTC). Null if never.

Formatdate-time
company?|

Company name the customer entered on their profile (not the organization).

organization?|

Name of the organization the customer belongs to, if any. Organizations are managed in the admin.

user_groups?array<>|

Names of the user groups the customer belongs to (the default RETAIL group isn't listed). Groups drive pricing and access.

tax_exempt?boolean

True when the customer is tax-exempt: set on the customer, or inherited from a tax-exempt user group.

is_temporary?boolean

Present and true only for a temporary (guest) customer. Send true on create to make a temporary customer.

[key: string]?never

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.printnow.com/api/v2/customer/0/transfer" \  -H "Content-Type: application/json" \  -d '{    "id": 12345  }'
{
  "storefront": "Demo Store",
  "storefront_id": 1,
  "id": 24,
  "first_name": "Demo",
  "last_name": "User",
  "email": "demo.user@domain.com",
  "username": "demouser",
  "receive_marketing_emails": true,
  "last_logged_in_on": "2023-10-18T13:43:19.15Z",
  "created_on": "2021-08-30T13:34:44.62Z",
  "last_updated_on": "2023-11-22T15:59:38.667Z",
  "company": "Demo Company",
  "organization": null,
  "user_groups": [],
  "tax_exempt": false
}
{
  "Message": "string"
}

The key or token is missing, does not match, or the token is inactive or deleted.

{
  "Message": "Invalid key or token."
}

The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.

{
  "Message": "Your license does not include the Orders API."
}
{
  "Message": "string"
}

Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.

{
  "Message": "Rate limit exceeded: 100 calls per 10 seconds."
}

On this page