Create a customer alias
Adds another of your IDs for the customer, or for one of its active units when customerUnit is set; usage sent under the value then lands on it, and the value names the customer anywhere the Date Versioned API accepts one. The value must be unique across the account, ignoring case, among aliases, customer external IDs and unit IDs (resource_exists), and can’t be a draft customer’s external ID (alias_held_by_draft_customer). It can’t contain /, \, ?, #, % or a control character, start or end with a space, or start with als_. Signals already held under the value are released to the customer. {customer} takes the customer’s cus_ ID, your externalId, or one of its aliases. {alias} takes the alias’s als_ ID or its value, URL-encoded and matched ignoring letter case, within that customer; a value starting als_ is tried as a Paid ID first.
Authentication
Path parameters
The customer’s cus_ ID, your externalId, or one of its aliases.
Headers
This endpoint is in the customer_aliases=v1 beta. Send this header to use it.
Request
Your other ID for the customer, unique across your account ignoring letter case, among aliases, customer external IDs and unit IDs. Usage sent under it lands on the customer, or on customerUnit. Can’t change. 1 to 255 characters, with no /, \, ?, #, %, control character or space at either end, and not starting with als_.
An active unit of the customer for usage under the alias to land on: its cu_ ID or your externalId. Leave it out, or send null, for the whole customer.
String key-value pairs of your own, up to 500 characters per value. Always updatable.
Response
The type of object. Always customerAlias.
When the alias was archived, or null. Archiving is a label: an archived alias still resolves, and usage sent under it still lands on the customer.
The customer the alias belongs to, by its cus_ ID.
The unit of the customer that usage sent under the alias lands on, by its cu_ ID, or null when the alias is for the whole customer.
When usage was first recorded under this value, or null while none has been. It can be earlier than createdAt: usage sent under the value before this alias existed counts, such as a signal held and then released, or an earlier alias of the same value. It lags as used does; for aliases used before Paid recorded it, the time is approximate.
true for an object on a live account, false on a test account.
String key-value pairs of your own.
Whether Paid made the alias: when a customer’s externalId changed, keeping the old ID working, or from a SalesBricks buyer. A system-managed alias can’t be updated, archived, unarchived or deleted.
Whether usage has been recorded under the alias’s value: true once firstUsedAt is set. Naming the customer by the alias in an API call doesn’t count. It is usually a few minutes behind; usage recorded late (repaired, or released from hold after the alias was created) can take up to a day, and usage recorded more than three days after it happened is counted only when Paid next runs a full catch-up. A used alias can’t be deleted; delete checks recorded usage itself and never waits for used.
Your other ID for the customer, unique across your account ignoring letter case, among aliases, customer external IDs and unit IDs. Usage sent under it lands on the customer, or on customerUnit. Can’t change.