Customers and access
Grant access
/ v1 / access / grant Gives a person access to a live product without an order: no payment and no invoice. For example a gift, or a purchase on another platform.
- Creates the customer if needed. A customer created this way counts toward the plan limit of external customers until they buy.
- The person gets an email with the access link, unless
send_emailisfalse. - It does not subscribe the person to the newsletter.
- Not possible for booking, newsletter and external products.
Authorization
-
Authorizationstring header requiredBearer tnt_…· A personal API key (tnt_...). Create it in the Tentary app on the page AI & API. Introduction
Body application/json
-
emailstring requiredThe customer's e-mail address.
min length
3max length255 -
product_idinteger requiredThe id from list_products.
min
1 -
variant_idintegerNeeded for a product with variants (get_product shows them).
min
1 -
first_namestringFor a new customer.
max length
100 -
last_namestringFor a new customer.
max length
100 -
reasonstringShown in the app. Default manual.
Allowed values:
manualcomplimentarypurchased_elsewhere -
send_emailbooleanSend the access e-mail (default true).
Response
Fields of the answer with status 200. Errors always have the same format, see Errors.
-
statusstringexists and purchased: the customer had access already, so no grant was added. A deactivated customer is still reactivated: see customer.reactivated.
Allowed values:
createdreactivatedexistspurchased -
messagestringWhat happened, in words for the seller.
-
grant_idinteger can be nullThe ID of the access grant.
-
customerobjectThe customer.
Show 4 fields Hide fields
-
idintegerThe ID.
-
emailstringE-mail address.
-
createdbooleantrue = a new customer.
-
reactivatedbooleantrue = a deactivated customer was reactivated.
-
-
productobjectThe product.
Show 3 fields Hide fields
-
idintegerThe ID.
-
namestringThe name.
-
variant_idinteger can be nullThe variant ID, if any.
-
-
access_emailstringqueued = the e-mail with the access link goes out in the next minutes. suppressed = the address bounced before.
Allowed values:
queuedsuppressednot_sent