Πισtoποίηση

Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Αυτό το τελικό σημείο δεν ορίζει μια συγκεκριμένη άδεια στην προδιαγραφή, οπότε δώστε στο κλειδί σας τα ελάχιστα δυνατά δικαιώματα και ελέγξτε την απόκριση αντί να κάνετε υποθέσεις.

Αυτό το τελικό σημείο δεν δέχεται αναγνωριστικό οργανισμού. Το κλειδί σας προσδιορίζει ήδη τον οργανισμό στον οποίο ανήκει, και η απάντηση περιορίζεται σε αυτόν.

Δοκιμάστε το

Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.

curl -X POST https://api.zinndigital.com/v1/carts/{cartId}/lines \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "kind": <SellableLineKind> }'

Συνδεθήκατε; Η κονσόλα API στον πίνακα ελέγχου σας συμπληρώνει το πραγματικό αναγνωριστικό του οργανισμού σας και το δικό σας κλειδί, και εκτελεί το αίτημα στο ζωντανό API, ώστε να μπορείτε να δείτε την πραγματική απόκριση. Ανοίξτε αυτό το τελικό σημείο στην κονσόλα API

Λεπτομέρειες

Adds a priced line. A hosting_plan line needs a plan_version_id; a domain_register/domain_transfer/domain_renew line needs a domain_name, tld and period_years. The line shape and price are validated + stamped by the server; a bad shape (or a plan version with no price) is a 422.

Παράμετροι

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
cartId (path)UuidΝαιThe cart's id.

Σώμα αίτησης

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
kindSellableLineKindΝαιThe line kinds a cart will accept today — the write-side subset of LineKind. Narrower than LineKind on purpose. LineKind is what a line can be (a read shape, including…
domain_namestringΌχιRequired for a domain line.
tldstringΌχιRequired for a domain line.
period_yearsintegerΌχιRequired for a register/transfer/renew line.
privacybooleanΌχι
auto_renewbooleanΌχι
availability_tokenstringΌχιThe signed token from searchDomains for this exact name. Optional: an ordinary name prices from the TLD catalogue without one. It is required to buy a premium name, because…
auth_codestringΌχιThe EPP/authorization code issued by the registrar the domain is currently held at. Required for a domain_transfer line — no registry will initiate a transfer without it, so…
registrar_routeRegistrationRouteKeyΌχιWhich registrar buys the name, on a domain_register or domain_transfer line. Omit it for the organisation's own registrar, which is the behaviour every caller had before this…
plan_version_idUuid | nullΌχιRequired for a hosting_plan line — the immutable plan version to bill.
extra_codestringΌχιThe catalogue code of the service an extra line buys. Required for that kind and meaningless on any other. Which addons a cart may buy is validated against…
listing_package_idUuid | nullΌχιRequired for a marketplace_package line — the package on a live listing being bought. The price is the seller's and is re-read on every basket read, so a client-sent amount…
intervalBillingIntervalΌχιThe recurrence a price is quoted for.
regionstringΌχιThe data centre this hosting is bought for — carried onto the resulting subscription and used as the default region for sites created against it (docs/370). Blank or omitted means…
computeComputeLineConfigΌχιHow one machine on a compute_server cart line is built. The values are not trusted from here: the engine re-resolves the whole order against the live vendor before the line…
databaseDatabaseLineConfigΌχιThe managed database a managed_database cart line buys (docs/497 §8). The values are not trusted from here: the engine re-resolves the whole purchase through the same…

Απάντηση

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
idUuidΝαιUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidΝαιUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusstring<open, checking_out, converted, abandoned, expired>Ναι
currencyCurrencyCode | nullΌχιFixed when the cart is opened, from CartCreate.currency or the X-Zinn-Currency header, and then locked — every line must match it. Null only on a legacy cart created before…
product_lineobjectΌχι
linesCartLine[]Ναι
subtotalMoneyAmountΝαιA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
discountMoneyAmountΝαιA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
totalMoneyAmountΝαιA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
created_atstringΝαι
updated_atstringΌχι

Σφάλματα που μπορεί να επιστρέψει αυτό το τελικό σημείο

401 · 403 · 404 · 422 · 429