@vitrina/api 15.12.2 → 15.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +1637 -121
- package/dist/index.d.ts +1637 -121
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -10496,7 +10496,7 @@ interface paths {
|
|
|
10496
10496
|
name: string;
|
|
10497
10497
|
/** Format: uuid */
|
|
10498
10498
|
tenant_id?: string;
|
|
10499
|
-
scopes: ("ai_agents:read" | "ai_agents:write" | "ai_agents:simulate" | "conversations:read" | "conversations:write" | "contacts:read" | "contacts:write" | "tickets:read" | "tickets:write" | "tickets:claim" | "leads:read" | "leads:write" | "leads:intake" | "pipelines:read" | "pipelines:write" | "stages:read" | "stages:write" | "functions:read" | "functions:write" | "kb:read" | "kb:write" | "messages:read" | "messages:write" | "messages:send" | "tools:read" | "tags:read" | "tags:write" | "api_keys:read" | "api_keys:write" | "personal_tokens:read" | "personal_tokens:write" | "notifications:read" | "notifications:write" | "audit:read" | "analytics:read" | "analytics:write" | "dealer_reports:read" | "tenant:read" | "tenant:write" | "tenant:delete" | "webhooks:read" | "webhooks:write" | "messaging_accounts:read" | "messaging_accounts:write" | "provisioning:read" | "provisioning:write" | "voice_drift:read" | "worker_failures:read" | "worker_failures:write" | "dealer_sites:read" | "dealer_sites:write" | "mcp_servers:read" | "mcp_servers:write" | "memberships:read" | "memberships:write" | "teams:read" | "teams:write" | "help_centers:read" | "help_centers:write" | "labels:read" | "labels:write" | "macros:read" | "macros:write" | "slas:read" | "slas:write" | "routing:read" | "routing:write" | "triggers:read" | "triggers:write" | "followups:read" | "followups:write" | "followups:manage" | "custom_attributes:read" | "custom_attributes:write" | "companies:read" | "companies:write" | "roles:read" | "roles:write" | "integrations:read" | "integrations:write" | "clinic:read" | "clinic:write" | "clinic_patients:read" | "clinic_patients:write" | "clinic_record:read" | "clinic_record:write" | "clinic_money:read" | "clinic_money:write" | "clinic_admin:write" | "clinic_insights:read" | "sandbox:read" | "sandbox:write" | "ads:read" | "ads:write" | "healthatom:read" | "healthatom:write" | "reservo:read" | "reservo:write" | "rexplus:read" | "rexplus:write" | "billing:read" | "billing:write" | "copilot:read" | "copilot:write" | "erp_copilot:use" | "tool_credentials:read" | "tool_credentials:write" | "tool_invocations:read" | "corrections:read" | "corrections:write" | "marketplace:read" | "marketplace:write" | "stock:read" | "storefront_events:write" | "pricing:read" | "pricing:write" | "roi:read" | "appointments:read" | "appointments:write" | "appointments:delete" | "schedule_config:write" | "appointments:intake" | "appointment_types:read" | "appointment_types:write" | "service_lifecycle:read" | "service_lifecycle:write" | "outbound_approvals:read" | "outbound_approvals:write" | "outbound_holds:read" | "outbound_holds:write" | "campaigns:read" | "campaigns:write" | "consignments:read" | "consignments:write" | "stock_dedup:read" | "stock_dedup:write" | "stock_photo_mirror:read" | "stock_photo_mirror:write" | "stock_retirement:read" | "stock_retirement:write" | "dealership_economics:read" | "dealership_economics:write" | "document_templates:read" | "document_templates:write" | "vehicle_registry:read" | "vehicle_registry:write" | "vehicle_pipeline:read" | "vehicle_pipeline:write" | "sale_notes:read" | "sale_notes:write" | "sale_notes:void" | "transfer_cases:read" | "transfer_cases:write" | "credit_applications:read" | "credit_applications:write" | "seller_compensation:read" | "seller_compensation:write" | "sales_leaderboard:read" | "quotes:read" | "quotes:write" | "quotes:void" | "reservations:read" | "reservations:write" | "reservations:void" | "reservations:dispose_abono" | "organization_legal:read" | "organization_legal:write" | "purchase_notes:read" | "purchase_notes:write" | "purchase_notes:void" | "document_payments:read" | "document_payments:write" | "tenant_bank_accounts:read" | "tenant_bank_accounts:write" | "bank_movements:read" | "bank_movements:write" | "payments:read" | "payments:write" | "payments:reverse" | "orders:read" | "orders:write" | "orders:checkout" | "price_approval:read" | "price_approval:request" | "price_approval:approve" | "cotizacion_discount:approve" | "legal:read" | "legal:write")[];
|
|
10499
|
+
scopes: ("ai_agents:read" | "ai_agents:write" | "ai_agents:simulate" | "conversations:read" | "conversations:write" | "contacts:read" | "contacts:write" | "tickets:read" | "tickets:write" | "tickets:claim" | "leads:read" | "leads:write" | "leads:intake" | "pipelines:read" | "pipelines:write" | "stages:read" | "stages:write" | "functions:read" | "functions:write" | "kb:read" | "kb:write" | "messages:read" | "messages:write" | "messages:send" | "tools:read" | "tags:read" | "tags:write" | "api_keys:read" | "api_keys:write" | "personal_tokens:read" | "personal_tokens:write" | "notifications:read" | "notifications:write" | "audit:read" | "analytics:read" | "analytics:write" | "dealer_reports:read" | "tenant:read" | "tenant:write" | "tenant:delete" | "webhooks:read" | "webhooks:write" | "messaging_accounts:read" | "messaging_accounts:write" | "provisioning:read" | "provisioning:write" | "voice_drift:read" | "worker_failures:read" | "worker_failures:write" | "dealer_sites:read" | "dealer_sites:write" | "mcp_servers:read" | "mcp_servers:write" | "memberships:read" | "memberships:write" | "teams:read" | "teams:write" | "help_centers:read" | "help_centers:write" | "labels:read" | "labels:write" | "macros:read" | "macros:write" | "slas:read" | "slas:write" | "routing:read" | "routing:write" | "triggers:read" | "triggers:write" | "followups:read" | "followups:write" | "followups:manage" | "custom_attributes:read" | "custom_attributes:write" | "companies:read" | "companies:write" | "roles:read" | "roles:write" | "integrations:read" | "integrations:write" | "clinic:read" | "clinic:write" | "clinic_patients:read" | "clinic_patients:write" | "clinic_record:read" | "clinic_record:write" | "clinic_money:read" | "clinic_money:write" | "clinic_admin:write" | "clinic_insights:read" | "sandbox:read" | "sandbox:write" | "ads:read" | "ads:write" | "healthatom:read" | "healthatom:write" | "reservo:read" | "reservo:write" | "rexplus:read" | "rexplus:write" | "billing:read" | "billing:write" | "copilot:read" | "copilot:write" | "erp_copilot:use" | "tool_credentials:read" | "tool_credentials:write" | "tool_invocations:read" | "corrections:read" | "corrections:write" | "marketplace:read" | "marketplace:write" | "stock:read" | "storefront_events:write" | "pricing:read" | "pricing:write" | "roi:read" | "appointments:read" | "appointments:write" | "appointments:delete" | "schedule_config:write" | "appointments:intake" | "appointment_types:read" | "appointment_types:write" | "service_lifecycle:read" | "service_lifecycle:write" | "outbound_approvals:read" | "outbound_approvals:write" | "outbound_holds:read" | "outbound_holds:write" | "campaigns:read" | "campaigns:write" | "consignments:read" | "consignments:write" | "stock_dedup:read" | "stock_dedup:write" | "stock_photo_mirror:read" | "stock_photo_mirror:write" | "stock_retirement:read" | "stock_retirement:write" | "dealership_economics:read" | "dealership_economics:write" | "document_templates:read" | "document_templates:write" | "vehicle_registry:read" | "vehicle_registry:write" | "vehicle_pipeline:read" | "vehicle_pipeline:write" | "sale_notes:read" | "sale_notes:write" | "sale_notes:void" | "transfer_cases:read" | "transfer_cases:write" | "credit_applications:read" | "credit_applications:write" | "seller_compensation:read" | "seller_compensation:write" | "sales_leaderboard:read" | "quotes:read" | "quotes:write" | "quotes:void" | "reservations:read" | "reservations:write" | "reservations:void" | "reservations:dispose_abono" | "organization_legal:read" | "organization_legal:write" | "purchase_notes:read" | "purchase_notes:write" | "purchase_notes:void" | "document_payments:read" | "document_payments:write" | "tenant_bank_accounts:read" | "tenant_bank_accounts:write" | "bank_movements:read" | "bank_movements:write" | "payments:read" | "payments:write" | "payments:reverse" | "orders:read" | "orders:write" | "orders:checkout" | "orders:refund" | "price_approval:read" | "price_approval:request" | "price_approval:approve" | "cotizacion_discount:approve" | "legal:read" | "legal:write")[];
|
|
10500
10500
|
/** Format: date-time */
|
|
10501
10501
|
expires_at?: string;
|
|
10502
10502
|
/** @description false mints an `sk_test_` key bound to this workspace's sandbox (409 SANDBOX_NOT_PROVISIONED when it has none yet). Default true. */
|
|
@@ -121002,7 +121002,7 @@ interface paths {
|
|
|
121002
121002
|
*/
|
|
121003
121003
|
"application/json": {
|
|
121004
121004
|
name: string;
|
|
121005
|
-
scopes?: ("ai_agents:read" | "ai_agents:write" | "ai_agents:simulate" | "conversations:read" | "conversations:write" | "contacts:read" | "contacts:write" | "tickets:read" | "tickets:write" | "tickets:claim" | "leads:read" | "leads:write" | "leads:intake" | "pipelines:read" | "pipelines:write" | "stages:read" | "stages:write" | "functions:read" | "functions:write" | "kb:read" | "kb:write" | "messages:read" | "messages:write" | "messages:send" | "tools:read" | "tags:read" | "tags:write" | "api_keys:read" | "api_keys:write" | "personal_tokens:read" | "personal_tokens:write" | "notifications:read" | "notifications:write" | "audit:read" | "analytics:read" | "analytics:write" | "dealer_reports:read" | "tenant:read" | "tenant:write" | "tenant:delete" | "webhooks:read" | "webhooks:write" | "messaging_accounts:read" | "messaging_accounts:write" | "provisioning:read" | "provisioning:write" | "voice_drift:read" | "worker_failures:read" | "worker_failures:write" | "dealer_sites:read" | "dealer_sites:write" | "mcp_servers:read" | "mcp_servers:write" | "memberships:read" | "memberships:write" | "teams:read" | "teams:write" | "help_centers:read" | "help_centers:write" | "labels:read" | "labels:write" | "macros:read" | "macros:write" | "slas:read" | "slas:write" | "routing:read" | "routing:write" | "triggers:read" | "triggers:write" | "followups:read" | "followups:write" | "followups:manage" | "custom_attributes:read" | "custom_attributes:write" | "companies:read" | "companies:write" | "roles:read" | "roles:write" | "integrations:read" | "integrations:write" | "clinic:read" | "clinic:write" | "clinic_patients:read" | "clinic_patients:write" | "clinic_record:read" | "clinic_record:write" | "clinic_money:read" | "clinic_money:write" | "clinic_admin:write" | "clinic_insights:read" | "sandbox:read" | "sandbox:write" | "ads:read" | "ads:write" | "healthatom:read" | "healthatom:write" | "reservo:read" | "reservo:write" | "rexplus:read" | "rexplus:write" | "billing:read" | "billing:write" | "copilot:read" | "copilot:write" | "erp_copilot:use" | "tool_credentials:read" | "tool_credentials:write" | "tool_invocations:read" | "corrections:read" | "corrections:write" | "marketplace:read" | "marketplace:write" | "stock:read" | "storefront_events:write" | "pricing:read" | "pricing:write" | "roi:read" | "appointments:read" | "appointments:write" | "appointments:delete" | "schedule_config:write" | "appointments:intake" | "appointment_types:read" | "appointment_types:write" | "service_lifecycle:read" | "service_lifecycle:write" | "outbound_approvals:read" | "outbound_approvals:write" | "outbound_holds:read" | "outbound_holds:write" | "campaigns:read" | "campaigns:write" | "consignments:read" | "consignments:write" | "stock_dedup:read" | "stock_dedup:write" | "stock_photo_mirror:read" | "stock_photo_mirror:write" | "stock_retirement:read" | "stock_retirement:write" | "dealership_economics:read" | "dealership_economics:write" | "document_templates:read" | "document_templates:write" | "vehicle_registry:read" | "vehicle_registry:write" | "vehicle_pipeline:read" | "vehicle_pipeline:write" | "sale_notes:read" | "sale_notes:write" | "sale_notes:void" | "transfer_cases:read" | "transfer_cases:write" | "credit_applications:read" | "credit_applications:write" | "seller_compensation:read" | "seller_compensation:write" | "sales_leaderboard:read" | "quotes:read" | "quotes:write" | "quotes:void" | "reservations:read" | "reservations:write" | "reservations:void" | "reservations:dispose_abono" | "organization_legal:read" | "organization_legal:write" | "purchase_notes:read" | "purchase_notes:write" | "purchase_notes:void" | "document_payments:read" | "document_payments:write" | "tenant_bank_accounts:read" | "tenant_bank_accounts:write" | "bank_movements:read" | "bank_movements:write" | "payments:read" | "payments:write" | "payments:reverse" | "orders:read" | "orders:write" | "orders:checkout" | "price_approval:read" | "price_approval:request" | "price_approval:approve" | "cotizacion_discount:approve" | "legal:read" | "legal:write")[];
|
|
121005
|
+
scopes?: ("ai_agents:read" | "ai_agents:write" | "ai_agents:simulate" | "conversations:read" | "conversations:write" | "contacts:read" | "contacts:write" | "tickets:read" | "tickets:write" | "tickets:claim" | "leads:read" | "leads:write" | "leads:intake" | "pipelines:read" | "pipelines:write" | "stages:read" | "stages:write" | "functions:read" | "functions:write" | "kb:read" | "kb:write" | "messages:read" | "messages:write" | "messages:send" | "tools:read" | "tags:read" | "tags:write" | "api_keys:read" | "api_keys:write" | "personal_tokens:read" | "personal_tokens:write" | "notifications:read" | "notifications:write" | "audit:read" | "analytics:read" | "analytics:write" | "dealer_reports:read" | "tenant:read" | "tenant:write" | "tenant:delete" | "webhooks:read" | "webhooks:write" | "messaging_accounts:read" | "messaging_accounts:write" | "provisioning:read" | "provisioning:write" | "voice_drift:read" | "worker_failures:read" | "worker_failures:write" | "dealer_sites:read" | "dealer_sites:write" | "mcp_servers:read" | "mcp_servers:write" | "memberships:read" | "memberships:write" | "teams:read" | "teams:write" | "help_centers:read" | "help_centers:write" | "labels:read" | "labels:write" | "macros:read" | "macros:write" | "slas:read" | "slas:write" | "routing:read" | "routing:write" | "triggers:read" | "triggers:write" | "followups:read" | "followups:write" | "followups:manage" | "custom_attributes:read" | "custom_attributes:write" | "companies:read" | "companies:write" | "roles:read" | "roles:write" | "integrations:read" | "integrations:write" | "clinic:read" | "clinic:write" | "clinic_patients:read" | "clinic_patients:write" | "clinic_record:read" | "clinic_record:write" | "clinic_money:read" | "clinic_money:write" | "clinic_admin:write" | "clinic_insights:read" | "sandbox:read" | "sandbox:write" | "ads:read" | "ads:write" | "healthatom:read" | "healthatom:write" | "reservo:read" | "reservo:write" | "rexplus:read" | "rexplus:write" | "billing:read" | "billing:write" | "copilot:read" | "copilot:write" | "erp_copilot:use" | "tool_credentials:read" | "tool_credentials:write" | "tool_invocations:read" | "corrections:read" | "corrections:write" | "marketplace:read" | "marketplace:write" | "stock:read" | "storefront_events:write" | "pricing:read" | "pricing:write" | "roi:read" | "appointments:read" | "appointments:write" | "appointments:delete" | "schedule_config:write" | "appointments:intake" | "appointment_types:read" | "appointment_types:write" | "service_lifecycle:read" | "service_lifecycle:write" | "outbound_approvals:read" | "outbound_approvals:write" | "outbound_holds:read" | "outbound_holds:write" | "campaigns:read" | "campaigns:write" | "consignments:read" | "consignments:write" | "stock_dedup:read" | "stock_dedup:write" | "stock_photo_mirror:read" | "stock_photo_mirror:write" | "stock_retirement:read" | "stock_retirement:write" | "dealership_economics:read" | "dealership_economics:write" | "document_templates:read" | "document_templates:write" | "vehicle_registry:read" | "vehicle_registry:write" | "vehicle_pipeline:read" | "vehicle_pipeline:write" | "sale_notes:read" | "sale_notes:write" | "sale_notes:void" | "transfer_cases:read" | "transfer_cases:write" | "credit_applications:read" | "credit_applications:write" | "seller_compensation:read" | "seller_compensation:write" | "sales_leaderboard:read" | "quotes:read" | "quotes:write" | "quotes:void" | "reservations:read" | "reservations:write" | "reservations:void" | "reservations:dispose_abono" | "organization_legal:read" | "organization_legal:write" | "purchase_notes:read" | "purchase_notes:write" | "purchase_notes:void" | "document_payments:read" | "document_payments:write" | "tenant_bank_accounts:read" | "tenant_bank_accounts:write" | "bank_movements:read" | "bank_movements:write" | "payments:read" | "payments:write" | "payments:reverse" | "orders:read" | "orders:write" | "orders:checkout" | "orders:refund" | "price_approval:read" | "price_approval:request" | "price_approval:approve" | "cotizacion_discount:approve" | "legal:read" | "legal:write")[];
|
|
121006
121006
|
/** Format: date-time */
|
|
121007
121007
|
expires_at?: string | null;
|
|
121008
121008
|
};
|
|
@@ -212434,13 +212434,13 @@ interface paths {
|
|
|
212434
212434
|
put?: never;
|
|
212435
212435
|
/**
|
|
212436
212436
|
* Open a storefront guest checkout
|
|
212437
|
-
* @description A tenant’s own website (server side) sells with one call: the buyer (name, RUT, phone and/or email), the variants
|
|
212437
|
+
* @description A tenant’s own website (server side) sells with one call: the buyer (name, RUT, phone and/or email), the variants, the delivery method and optionally the payment provider in; an order and its payment link out (Mercado Pago by default, or Webpay with `payment_provider: "webpay"` when the tenant connected it: see `GET /orders/checkout/payment-providers`). The buyer is found by email, then phone, or created; their RUT fills the contact’s empty one; an opt-in is recorded; the visit’s ad touch is kept for the Purchase. **Prices come from the catalog** (no price field); only native products.
|
|
212438
212438
|
*
|
|
212439
212439
|
* **Holds.** A variant with inventory policy `deny` («Solo con stock») holds the requested units for 15 minutes: available = on hand − active holds, and the link stops taking money when the hold ends. With fewer units available the call is refused with 409 `insufficient_stock` (`details.available`). Two checkouts for the last unit: exactly one succeeds. A `continue` variant (made to order) never refuses and holds nothing. The hold ends when the payment settles (the sale: on hand goes down by the units), when the order is cancelled, or when it expires (the order is then cancelled and `order.status_changed` fires).
|
|
212440
212440
|
*
|
|
212441
212441
|
* **event_id** is the browser InitiateCheckout `eventID`: the server InitiateCheckout (when the buyer opens `checkout_url`) and the Purchase ship under it, so Meta deduplicates. It is also the idempotency key (200 + `replayed: true`).
|
|
212442
212442
|
*
|
|
212443
|
-
* Refusals (`error.details.reason`): 400 `buyer_contact_required` · `invalid_phone` · `invalid_rut` · `
|
|
212443
|
+
* Refusals (`error.details.reason`): 400 `buyer_contact_required` · `invalid_phone` · `invalid_rut` · `shipping_quote_required` · `shipping_address_required` · `shipping_phone_required` · `shipping_quote_unknown` · `shipping_service_required` · `shipping_service_unavailable` · `unknown_item` · `inactive_item` · `no_price` · `variant_required`; 409 `insufficient_stock` · `store_item` · `event_id_reused` · `checkout_closed` · `already_paid` · `payment_not_connected` · `shipping_quote_expired` · `shipping_quote_used` · `shipping_quote_items_mismatch` · `shipping_quote_destination_mismatch`; 502 `payment_provider_unavailable`. Fires `order.created`. Requires `orders:checkout`.
|
|
212444
212444
|
*/
|
|
212445
212445
|
post: {
|
|
212446
212446
|
parameters: {
|
|
@@ -212517,10 +212517,36 @@ interface paths {
|
|
|
212517
212517
|
}[];
|
|
212518
212518
|
delivery: {
|
|
212519
212519
|
/**
|
|
212520
|
-
* @description `pickup` (the buyer collects it at the store)
|
|
212520
|
+
* @description `pickup` (the buyer collects it at the store) or `shipping` (courier delivery: needs `quote_id` and `address`).
|
|
212521
212521
|
* @enum {string}
|
|
212522
212522
|
*/
|
|
212523
212523
|
method: "pickup" | "shipping";
|
|
212524
|
+
/**
|
|
212525
|
+
* Format: uuid
|
|
212526
|
+
* @description `shipping`: a quote from `POST /orders/checkout/shipping-quotes` for exactly these items, not expired (30 minutes) and not used. Its price is the order’s `shipping_clp`, charged in the same payment.
|
|
212527
|
+
*/
|
|
212528
|
+
quote_id?: string;
|
|
212529
|
+
/** @description `shipping`: which of the quote’s `options` (its `service_code`). Required when the quote has more than one. */
|
|
212530
|
+
service_code?: number;
|
|
212531
|
+
/** @description `shipping`: who receives the parcel. Each field defaults to the buyer’s. A phone is required (the buyer’s or this one). */
|
|
212532
|
+
recipient?: {
|
|
212533
|
+
name?: string | null;
|
|
212534
|
+
phone?: string | null;
|
|
212535
|
+
/** Format: email */
|
|
212536
|
+
email?: string | null;
|
|
212537
|
+
};
|
|
212538
|
+
/** @description `shipping`: street and number in the quote’s commune. */
|
|
212539
|
+
address?: {
|
|
212540
|
+
street: string;
|
|
212541
|
+
number: string;
|
|
212542
|
+
/** @description Depto, oficina, casa, block… */
|
|
212543
|
+
apartment?: string | null;
|
|
212544
|
+
};
|
|
212545
|
+
/** @description `shipping`, optional: the commune the buyer picked (name or code). Refused with `shipping_quote_destination_mismatch` when it is not the quote’s. */
|
|
212546
|
+
commune?: string;
|
|
212547
|
+
region?: string;
|
|
212548
|
+
/** @description `shipping`: instructions for the courier. */
|
|
212549
|
+
notes?: string;
|
|
212524
212550
|
};
|
|
212525
212551
|
/** @description The buyer’s opt-in to marketing messages as the site recorded it (Ley 21.719). Omit when the site asked nothing. */
|
|
212526
212552
|
consent?: {
|
|
@@ -212546,7 +212572,7 @@ interface paths {
|
|
|
212546
212572
|
/** @description Meta’s `_fbc` cookie, as read on the site. */
|
|
212547
212573
|
fbc?: string | null;
|
|
212548
212574
|
};
|
|
212549
|
-
/** @description The site’s own pages
|
|
212575
|
+
/** @description The site’s own pages the buyer returns to (`pending` defaults to `success`). Mercado Pago appends its own query (`collection_status`, `payment_id`, `external_reference` = the checkout id); Webpay returns through Vitrina, which commits the payment and then redirects here with `webpay_result=paid|rejected|cancelled|error` (`paid` → success, `rejected`/`cancelled` → failure, `error` → pending). Show the result from `GET /orders/checkout/{id}`, never from the query string. */
|
|
212550
212576
|
return_urls: {
|
|
212551
212577
|
/** Format: uri */
|
|
212552
212578
|
success: string;
|
|
@@ -212555,6 +212581,11 @@ interface paths {
|
|
|
212555
212581
|
/** Format: uri */
|
|
212556
212582
|
pending?: string;
|
|
212557
212583
|
};
|
|
212584
|
+
/**
|
|
212585
|
+
* @description The provider the buyer chose, one the tenant connected (`GET /orders/checkout/payment-providers`). Absent = Mercado Pago (or the only one connected). Another one is refused with 409 `payment_provider_not_connected`. On a replay of the same `event_id`, a different provider points the same checkout at it.
|
|
212586
|
+
* @enum {string}
|
|
212587
|
+
*/
|
|
212588
|
+
payment_provider?: "mercadopago" | "webpay";
|
|
212558
212589
|
notes?: string;
|
|
212559
212590
|
};
|
|
212560
212591
|
};
|
|
@@ -212592,6 +212623,8 @@ interface paths {
|
|
|
212592
212623
|
* }
|
|
212593
212624
|
* ],
|
|
212594
212625
|
* "delivery_method": "pickup",
|
|
212626
|
+
* "shipping_clp": 0,
|
|
212627
|
+
* "shipping": null,
|
|
212595
212628
|
* "paid_at": null,
|
|
212596
212629
|
* "cancelled_at": null,
|
|
212597
212630
|
* "hold_expires_at": "2026-10-29T15:15:00.000Z",
|
|
@@ -212600,6 +212633,7 @@ interface paths {
|
|
|
212600
212633
|
* "checkout": {
|
|
212601
212634
|
* "checkout_id": "0199e3b0-0000-7000-8000-0000000000b1",
|
|
212602
212635
|
* "checkout_url": "https://api.vitrinadev.com/p/0199e3b0-0000-7000-8000-0000000000b1",
|
|
212636
|
+
* "provider": "mercadopago",
|
|
212603
212637
|
* "amount_clp": 459990,
|
|
212604
212638
|
* "expires_at": "2026-10-29T15:15:00.000Z"
|
|
212605
212639
|
* },
|
|
@@ -212651,6 +212685,8 @@ interface paths {
|
|
|
212651
212685
|
* }
|
|
212652
212686
|
* ],
|
|
212653
212687
|
* "delivery_method": "pickup",
|
|
212688
|
+
* "shipping_clp": 0,
|
|
212689
|
+
* "shipping": null,
|
|
212654
212690
|
* "paid_at": null,
|
|
212655
212691
|
* "cancelled_at": null,
|
|
212656
212692
|
* "hold_expires_at": "2026-10-29T15:15:00.000Z",
|
|
@@ -212659,6 +212695,7 @@ interface paths {
|
|
|
212659
212695
|
* "checkout": {
|
|
212660
212696
|
* "checkout_id": "0199e3b0-0000-7000-8000-0000000000b1",
|
|
212661
212697
|
* "checkout_url": "https://api.vitrinadev.com/p/0199e3b0-0000-7000-8000-0000000000b1",
|
|
212698
|
+
* "provider": "mercadopago",
|
|
212662
212699
|
* "amount_clp": 459990,
|
|
212663
212700
|
* "expires_at": "2026-10-29T15:15:00.000Z"
|
|
212664
212701
|
* },
|
|
@@ -212740,6 +212777,118 @@ interface paths {
|
|
|
212740
212777
|
patch?: never;
|
|
212741
212778
|
trace?: never;
|
|
212742
212779
|
};
|
|
212780
|
+
"/orders/checkout/payment-providers": {
|
|
212781
|
+
parameters: {
|
|
212782
|
+
query?: never;
|
|
212783
|
+
header?: never;
|
|
212784
|
+
path?: never;
|
|
212785
|
+
cookie?: never;
|
|
212786
|
+
};
|
|
212787
|
+
/**
|
|
212788
|
+
* List the payment providers a storefront may offer
|
|
212789
|
+
* @description The providers the tenant connected that a storefront checkout can charge through (`mercadopago`, `webpay`), in the order to offer them, and the `default` used when `POST /orders/checkout` names none. Offer a choice only when there are two; pass the buyer’s pick as `payment_provider`. Requires `orders:checkout`.
|
|
212790
|
+
*/
|
|
212791
|
+
get: {
|
|
212792
|
+
parameters: {
|
|
212793
|
+
query?: never;
|
|
212794
|
+
header?: never;
|
|
212795
|
+
path?: never;
|
|
212796
|
+
cookie?: never;
|
|
212797
|
+
};
|
|
212798
|
+
requestBody?: never;
|
|
212799
|
+
responses: {
|
|
212800
|
+
/** @description The connected providers */
|
|
212801
|
+
200: {
|
|
212802
|
+
headers: {
|
|
212803
|
+
[name: string]: unknown;
|
|
212804
|
+
};
|
|
212805
|
+
content: {
|
|
212806
|
+
/**
|
|
212807
|
+
* @example {
|
|
212808
|
+
* "data": {
|
|
212809
|
+
* "default": "mercadopago",
|
|
212810
|
+
* "providers": [
|
|
212811
|
+
* {
|
|
212812
|
+
* "provider": "mercadopago",
|
|
212813
|
+
* "name": "Mercado Pago"
|
|
212814
|
+
* },
|
|
212815
|
+
* {
|
|
212816
|
+
* "provider": "webpay",
|
|
212817
|
+
* "name": "Webpay"
|
|
212818
|
+
* }
|
|
212819
|
+
* ]
|
|
212820
|
+
* }
|
|
212821
|
+
* }
|
|
212822
|
+
*/
|
|
212823
|
+
"application/json": {
|
|
212824
|
+
data: components["schemas"]["StorefrontPaymentProviders"];
|
|
212825
|
+
};
|
|
212826
|
+
};
|
|
212827
|
+
};
|
|
212828
|
+
/** @description Validation error */
|
|
212829
|
+
400: {
|
|
212830
|
+
headers: {
|
|
212831
|
+
[name: string]: unknown;
|
|
212832
|
+
};
|
|
212833
|
+
content: {
|
|
212834
|
+
"application/json": components["schemas"]["Error"];
|
|
212835
|
+
};
|
|
212836
|
+
};
|
|
212837
|
+
/** @description Unauthorized */
|
|
212838
|
+
401: {
|
|
212839
|
+
headers: {
|
|
212840
|
+
[name: string]: unknown;
|
|
212841
|
+
};
|
|
212842
|
+
content: {
|
|
212843
|
+
"application/json": components["schemas"]["Error"];
|
|
212844
|
+
};
|
|
212845
|
+
};
|
|
212846
|
+
/** @description Forbidden */
|
|
212847
|
+
403: {
|
|
212848
|
+
headers: {
|
|
212849
|
+
[name: string]: unknown;
|
|
212850
|
+
};
|
|
212851
|
+
content: {
|
|
212852
|
+
"application/json": components["schemas"]["Error"];
|
|
212853
|
+
};
|
|
212854
|
+
};
|
|
212855
|
+
/** @description Not found */
|
|
212856
|
+
404: {
|
|
212857
|
+
headers: {
|
|
212858
|
+
[name: string]: unknown;
|
|
212859
|
+
};
|
|
212860
|
+
content: {
|
|
212861
|
+
"application/json": components["schemas"]["Error"];
|
|
212862
|
+
};
|
|
212863
|
+
};
|
|
212864
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
212865
|
+
409: {
|
|
212866
|
+
headers: {
|
|
212867
|
+
[name: string]: unknown;
|
|
212868
|
+
};
|
|
212869
|
+
content: {
|
|
212870
|
+
"application/json": components["schemas"]["Error"];
|
|
212871
|
+
};
|
|
212872
|
+
};
|
|
212873
|
+
/** @description Rate limited */
|
|
212874
|
+
429: {
|
|
212875
|
+
headers: {
|
|
212876
|
+
[name: string]: unknown;
|
|
212877
|
+
};
|
|
212878
|
+
content: {
|
|
212879
|
+
"application/json": components["schemas"]["Error"];
|
|
212880
|
+
};
|
|
212881
|
+
};
|
|
212882
|
+
};
|
|
212883
|
+
};
|
|
212884
|
+
put?: never;
|
|
212885
|
+
post?: never;
|
|
212886
|
+
delete?: never;
|
|
212887
|
+
options?: never;
|
|
212888
|
+
head?: never;
|
|
212889
|
+
patch?: never;
|
|
212890
|
+
trace?: never;
|
|
212891
|
+
};
|
|
212743
212892
|
"/orders/checkout/{id}": {
|
|
212744
212893
|
parameters: {
|
|
212745
212894
|
query?: never;
|
|
@@ -212793,6 +212942,8 @@ interface paths {
|
|
|
212793
212942
|
* }
|
|
212794
212943
|
* ],
|
|
212795
212944
|
* "delivery_method": "pickup",
|
|
212945
|
+
* "shipping_clp": 0,
|
|
212946
|
+
* "shipping": null,
|
|
212796
212947
|
* "paid_at": null,
|
|
212797
212948
|
* "cancelled_at": null,
|
|
212798
212949
|
* "hold_expires_at": "2026-10-29T15:15:00.000Z",
|
|
@@ -212883,7 +213034,7 @@ interface paths {
|
|
|
212883
213034
|
get: {
|
|
212884
213035
|
parameters: {
|
|
212885
213036
|
query?: {
|
|
212886
|
-
status?: ("draft" | "pending_payment" | "paid" | "preparing" | "shipped" | "delivered" | "cancelled")[];
|
|
213037
|
+
status?: ("draft" | "pending_payment" | "paid" | "preparing" | "shipped" | "delivered" | "cancelled" | "refunded")[];
|
|
212887
213038
|
source?: ("native" | "shopify" | "woocommerce")[];
|
|
212888
213039
|
contact_id?: string;
|
|
212889
213040
|
conversation_id?: string;
|
|
@@ -212925,6 +213076,7 @@ interface paths {
|
|
|
212925
213076
|
* "region": "Metropolitana"
|
|
212926
213077
|
* },
|
|
212927
213078
|
* "notes": null,
|
|
213079
|
+
* "shipping_clp": 0,
|
|
212928
213080
|
* "total_clp": 39980,
|
|
212929
213081
|
* "item_count": 2,
|
|
212930
213082
|
* "stock_decremented_at": null,
|
|
@@ -212933,6 +213085,9 @@ interface paths {
|
|
|
212933
213085
|
* "delivered_at": null,
|
|
212934
213086
|
* "cancelled_at": null,
|
|
212935
213087
|
* "cancelled_reason": null,
|
|
213088
|
+
* "refunded_at": null,
|
|
213089
|
+
* "refund_reason": null,
|
|
213090
|
+
* "refund_reference": null,
|
|
212936
213091
|
* "buyer": {},
|
|
212937
213092
|
* "attribution": {},
|
|
212938
213093
|
* "client_event_id": null,
|
|
@@ -213180,6 +213335,7 @@ interface paths {
|
|
|
213180
213335
|
* "region": "Metropolitana"
|
|
213181
213336
|
* },
|
|
213182
213337
|
* "notes": null,
|
|
213338
|
+
* "shipping_clp": 0,
|
|
213183
213339
|
* "total_clp": 39980,
|
|
213184
213340
|
* "item_count": 2,
|
|
213185
213341
|
* "stock_decremented_at": null,
|
|
@@ -213188,6 +213344,9 @@ interface paths {
|
|
|
213188
213344
|
* "delivered_at": null,
|
|
213189
213345
|
* "cancelled_at": null,
|
|
213190
213346
|
* "cancelled_reason": null,
|
|
213347
|
+
* "refunded_at": null,
|
|
213348
|
+
* "refund_reason": null,
|
|
213349
|
+
* "refund_reference": null,
|
|
213191
213350
|
* "buyer": {},
|
|
213192
213351
|
* "attribution": {},
|
|
213193
213352
|
* "client_event_id": null,
|
|
@@ -213362,6 +213521,7 @@ interface paths {
|
|
|
213362
213521
|
* "region": "Metropolitana"
|
|
213363
213522
|
* },
|
|
213364
213523
|
* "notes": null,
|
|
213524
|
+
* "shipping_clp": 0,
|
|
213365
213525
|
* "total_clp": 39980,
|
|
213366
213526
|
* "item_count": 2,
|
|
213367
213527
|
* "stock_decremented_at": null,
|
|
@@ -213370,6 +213530,9 @@ interface paths {
|
|
|
213370
213530
|
* "delivered_at": null,
|
|
213371
213531
|
* "cancelled_at": null,
|
|
213372
213532
|
* "cancelled_reason": null,
|
|
213533
|
+
* "refunded_at": null,
|
|
213534
|
+
* "refund_reason": null,
|
|
213535
|
+
* "refund_reference": null,
|
|
213373
213536
|
* "buyer": {},
|
|
213374
213537
|
* "attribution": {},
|
|
213375
213538
|
* "client_event_id": null,
|
|
@@ -213551,6 +213714,7 @@ interface paths {
|
|
|
213551
213714
|
* "region": "Metropolitana"
|
|
213552
213715
|
* },
|
|
213553
213716
|
* "notes": null,
|
|
213717
|
+
* "shipping_clp": 0,
|
|
213554
213718
|
* "total_clp": 39980,
|
|
213555
213719
|
* "item_count": 2,
|
|
213556
213720
|
* "stock_decremented_at": null,
|
|
@@ -213559,6 +213723,9 @@ interface paths {
|
|
|
213559
213723
|
* "delivered_at": null,
|
|
213560
213724
|
* "cancelled_at": null,
|
|
213561
213725
|
* "cancelled_reason": null,
|
|
213726
|
+
* "refunded_at": null,
|
|
213727
|
+
* "refund_reason": null,
|
|
213728
|
+
* "refund_reference": null,
|
|
213562
213729
|
* "buyer": {},
|
|
213563
213730
|
* "attribution": {},
|
|
213564
213731
|
* "client_event_id": null,
|
|
@@ -213877,6 +214044,7 @@ interface paths {
|
|
|
213877
214044
|
* "region": "Metropolitana"
|
|
213878
214045
|
* },
|
|
213879
214046
|
* "notes": null,
|
|
214047
|
+
* "shipping_clp": 0,
|
|
213880
214048
|
* "total_clp": 39980,
|
|
213881
214049
|
* "item_count": 2,
|
|
213882
214050
|
* "stock_decremented_at": null,
|
|
@@ -213885,6 +214053,212 @@ interface paths {
|
|
|
213885
214053
|
* "delivered_at": null,
|
|
213886
214054
|
* "cancelled_at": null,
|
|
213887
214055
|
* "cancelled_reason": null,
|
|
214056
|
+
* "refunded_at": null,
|
|
214057
|
+
* "refund_reason": null,
|
|
214058
|
+
* "refund_reference": null,
|
|
214059
|
+
* "buyer": {},
|
|
214060
|
+
* "attribution": {},
|
|
214061
|
+
* "client_event_id": null,
|
|
214062
|
+
* "return_urls": null,
|
|
214063
|
+
* "created_by": "0199e3b0-0000-7000-8000-0000000000bb",
|
|
214064
|
+
* "created_at": "2026-10-15T12:00:00.000Z",
|
|
214065
|
+
* "updated_at": "2026-10-15T12:00:00.000Z",
|
|
214066
|
+
* "lines": [
|
|
214067
|
+
* {
|
|
214068
|
+
* "id": "0199e3b0-0000-7000-8000-0000000000d1",
|
|
214069
|
+
* "position": 0,
|
|
214070
|
+
* "product_id": "0199e3b0-0000-7000-8000-0000000000e1",
|
|
214071
|
+
* "variant_id": "0199e3b0-0000-7000-8000-0000000000f1",
|
|
214072
|
+
* "title": "Polera básica",
|
|
214073
|
+
* "variant_title": "M / Negro",
|
|
214074
|
+
* "variant_options": [
|
|
214075
|
+
* {
|
|
214076
|
+
* "name": "Talla",
|
|
214077
|
+
* "value": "M"
|
|
214078
|
+
* },
|
|
214079
|
+
* {
|
|
214080
|
+
* "name": "Color",
|
|
214081
|
+
* "value": "Negro"
|
|
214082
|
+
* }
|
|
214083
|
+
* ],
|
|
214084
|
+
* "sku": "POL-M-NEG",
|
|
214085
|
+
* "unit_price_clp": 9990,
|
|
214086
|
+
* "quantity": 2,
|
|
214087
|
+
* "line_total_clp": 19980,
|
|
214088
|
+
* "obligation_id": "0199e3b0-0000-7000-8000-0000000000a1"
|
|
214089
|
+
* },
|
|
214090
|
+
* {
|
|
214091
|
+
* "id": "0199e3b0-0000-7000-8000-0000000000d2",
|
|
214092
|
+
* "position": 1,
|
|
214093
|
+
* "product_id": "0199e3b0-0000-7000-8000-0000000000e1",
|
|
214094
|
+
* "variant_id": "0199e3b0-0000-7000-8000-0000000000f2",
|
|
214095
|
+
* "title": "Polera básica",
|
|
214096
|
+
* "variant_title": "L / Blanco",
|
|
214097
|
+
* "variant_options": [
|
|
214098
|
+
* {
|
|
214099
|
+
* "name": "Talla",
|
|
214100
|
+
* "value": "L"
|
|
214101
|
+
* },
|
|
214102
|
+
* {
|
|
214103
|
+
* "name": "Color",
|
|
214104
|
+
* "value": "Blanco"
|
|
214105
|
+
* }
|
|
214106
|
+
* ],
|
|
214107
|
+
* "sku": "POL-L-BLA",
|
|
214108
|
+
* "unit_price_clp": 20000,
|
|
214109
|
+
* "quantity": 1,
|
|
214110
|
+
* "line_total_clp": 20000,
|
|
214111
|
+
* "obligation_id": "0199e3b0-0000-7000-8000-0000000000a2"
|
|
214112
|
+
* }
|
|
214113
|
+
* ]
|
|
214114
|
+
* }
|
|
214115
|
+
* }
|
|
214116
|
+
*/
|
|
214117
|
+
"application/json": {
|
|
214118
|
+
data: components["schemas"]["CommerceOrder"];
|
|
214119
|
+
};
|
|
214120
|
+
};
|
|
214121
|
+
};
|
|
214122
|
+
/** @description Validation error */
|
|
214123
|
+
400: {
|
|
214124
|
+
headers: {
|
|
214125
|
+
[name: string]: unknown;
|
|
214126
|
+
};
|
|
214127
|
+
content: {
|
|
214128
|
+
"application/json": components["schemas"]["Error"];
|
|
214129
|
+
};
|
|
214130
|
+
};
|
|
214131
|
+
/** @description Unauthorized */
|
|
214132
|
+
401: {
|
|
214133
|
+
headers: {
|
|
214134
|
+
[name: string]: unknown;
|
|
214135
|
+
};
|
|
214136
|
+
content: {
|
|
214137
|
+
"application/json": components["schemas"]["Error"];
|
|
214138
|
+
};
|
|
214139
|
+
};
|
|
214140
|
+
/** @description Forbidden */
|
|
214141
|
+
403: {
|
|
214142
|
+
headers: {
|
|
214143
|
+
[name: string]: unknown;
|
|
214144
|
+
};
|
|
214145
|
+
content: {
|
|
214146
|
+
"application/json": components["schemas"]["Error"];
|
|
214147
|
+
};
|
|
214148
|
+
};
|
|
214149
|
+
/** @description Not found */
|
|
214150
|
+
404: {
|
|
214151
|
+
headers: {
|
|
214152
|
+
[name: string]: unknown;
|
|
214153
|
+
};
|
|
214154
|
+
content: {
|
|
214155
|
+
"application/json": components["schemas"]["Error"];
|
|
214156
|
+
};
|
|
214157
|
+
};
|
|
214158
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
214159
|
+
409: {
|
|
214160
|
+
headers: {
|
|
214161
|
+
[name: string]: unknown;
|
|
214162
|
+
};
|
|
214163
|
+
content: {
|
|
214164
|
+
"application/json": components["schemas"]["Error"];
|
|
214165
|
+
};
|
|
214166
|
+
};
|
|
214167
|
+
/** @description Rate limited */
|
|
214168
|
+
429: {
|
|
214169
|
+
headers: {
|
|
214170
|
+
[name: string]: unknown;
|
|
214171
|
+
};
|
|
214172
|
+
content: {
|
|
214173
|
+
"application/json": components["schemas"]["Error"];
|
|
214174
|
+
};
|
|
214175
|
+
};
|
|
214176
|
+
};
|
|
214177
|
+
};
|
|
214178
|
+
delete?: never;
|
|
214179
|
+
options?: never;
|
|
214180
|
+
head?: never;
|
|
214181
|
+
patch?: never;
|
|
214182
|
+
trace?: never;
|
|
214183
|
+
};
|
|
214184
|
+
"/orders/{id}/cancel": {
|
|
214185
|
+
parameters: {
|
|
214186
|
+
query?: never;
|
|
214187
|
+
header?: never;
|
|
214188
|
+
path?: never;
|
|
214189
|
+
cookie?: never;
|
|
214190
|
+
};
|
|
214191
|
+
get?: never;
|
|
214192
|
+
put?: never;
|
|
214193
|
+
/**
|
|
214194
|
+
* Cancel an unpaid order
|
|
214195
|
+
* @description Cancels a `draft` or `pending_payment` order: its obligations and its group are cancelled and its Mercado Pago link stops taking money (a payment already in flight is credited to the customer, applied to nothing). An order that already received money answers 409 `order_has_payments`, a paid one 409 `order_paid`: giving money back is a refund on the payments ledger. Cancelling twice returns the cancelled order. Fires `order.status_changed`. Requires `orders:write`.
|
|
214196
|
+
*/
|
|
214197
|
+
post: {
|
|
214198
|
+
parameters: {
|
|
214199
|
+
query?: never;
|
|
214200
|
+
header?: {
|
|
214201
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
214202
|
+
"Idempotency-Key"?: string;
|
|
214203
|
+
};
|
|
214204
|
+
path: {
|
|
214205
|
+
id: string;
|
|
214206
|
+
};
|
|
214207
|
+
cookie?: never;
|
|
214208
|
+
};
|
|
214209
|
+
requestBody?: {
|
|
214210
|
+
content: {
|
|
214211
|
+
/**
|
|
214212
|
+
* @example {
|
|
214213
|
+
* "reason": "El cliente se arrepintió antes de pagar"
|
|
214214
|
+
* }
|
|
214215
|
+
*/
|
|
214216
|
+
"application/json": {
|
|
214217
|
+
/** @example El cliente se arrepintió antes de pagar */
|
|
214218
|
+
reason: string;
|
|
214219
|
+
};
|
|
214220
|
+
};
|
|
214221
|
+
};
|
|
214222
|
+
responses: {
|
|
214223
|
+
/** @description The cancelled order */
|
|
214224
|
+
200: {
|
|
214225
|
+
headers: {
|
|
214226
|
+
[name: string]: unknown;
|
|
214227
|
+
};
|
|
214228
|
+
content: {
|
|
214229
|
+
/**
|
|
214230
|
+
* @example {
|
|
214231
|
+
* "data": {
|
|
214232
|
+
* "id": "0199e3b0-0000-7000-8000-000000000001",
|
|
214233
|
+
* "tenant_id": "0199e3b0-0000-7000-8000-0000000000aa",
|
|
214234
|
+
* "display_id": "O-42",
|
|
214235
|
+
* "source": "native",
|
|
214236
|
+
* "external_id": null,
|
|
214237
|
+
* "status": "cancelled",
|
|
214238
|
+
* "contact_id": "0199e3b0-0000-7000-8000-0000000000c1",
|
|
214239
|
+
* "conversation_id": "0199e3b0-0000-7000-8000-0000000000c2",
|
|
214240
|
+
* "lead_id": "0199e3b0-0000-7000-8000-0000000000c3",
|
|
214241
|
+
* "obligation_group_id": "0199e3b0-0000-7000-8000-000000000002",
|
|
214242
|
+
* "currency": "CLP",
|
|
214243
|
+
* "delivery": {
|
|
214244
|
+
* "recipient_name": "Cliente de ejemplo",
|
|
214245
|
+
* "address": "Av. Ejemplo 123, depto 45",
|
|
214246
|
+
* "comuna": "Providencia",
|
|
214247
|
+
* "region": "Metropolitana"
|
|
214248
|
+
* },
|
|
214249
|
+
* "notes": null,
|
|
214250
|
+
* "shipping_clp": 0,
|
|
214251
|
+
* "total_clp": 39980,
|
|
214252
|
+
* "item_count": 2,
|
|
214253
|
+
* "stock_decremented_at": null,
|
|
214254
|
+
* "paid_at": null,
|
|
214255
|
+
* "shipped_at": null,
|
|
214256
|
+
* "delivered_at": null,
|
|
214257
|
+
* "cancelled_at": "2026-10-15T12:30:00.000Z",
|
|
214258
|
+
* "cancelled_reason": "El cliente se arrepintió antes de pagar",
|
|
214259
|
+
* "refunded_at": null,
|
|
214260
|
+
* "refund_reason": null,
|
|
214261
|
+
* "refund_reference": null,
|
|
213888
214262
|
* "buyer": {},
|
|
213889
214263
|
* "attribution": {},
|
|
213890
214264
|
* "client_event_id": null,
|
|
@@ -214004,52 +214378,977 @@ interface paths {
|
|
|
214004
214378
|
};
|
|
214005
214379
|
};
|
|
214006
214380
|
};
|
|
214007
|
-
delete?: never;
|
|
214008
|
-
options?: never;
|
|
214009
|
-
head?: never;
|
|
214010
|
-
patch?: never;
|
|
214011
|
-
trace?: never;
|
|
214012
|
-
};
|
|
214013
|
-
"/orders/{id}/
|
|
214014
|
-
parameters: {
|
|
214015
|
-
query?: never;
|
|
214016
|
-
header?: never;
|
|
214017
|
-
path?: never;
|
|
214018
|
-
cookie?: never;
|
|
214019
|
-
};
|
|
214020
|
-
get?: never;
|
|
214021
|
-
put?: never;
|
|
214381
|
+
delete?: never;
|
|
214382
|
+
options?: never;
|
|
214383
|
+
head?: never;
|
|
214384
|
+
patch?: never;
|
|
214385
|
+
trace?: never;
|
|
214386
|
+
};
|
|
214387
|
+
"/orders/{id}/refund": {
|
|
214388
|
+
parameters: {
|
|
214389
|
+
query?: never;
|
|
214390
|
+
header?: never;
|
|
214391
|
+
path?: never;
|
|
214392
|
+
cookie?: never;
|
|
214393
|
+
};
|
|
214394
|
+
get?: never;
|
|
214395
|
+
put?: never;
|
|
214396
|
+
/**
|
|
214397
|
+
* Refund a paid order in full
|
|
214398
|
+
* @description Gives a paid native order back in full (`paid`, `preparing`, `shipped` or `delivered`): retracto, a defect, a unit that could not be delivered. The refund runs at the provider the order was paid with, the workspace's own Mercado Pago or Webpay Plus (Webpay: a reversal the same day, an annulment later), against the order's payment (idempotent per order: a retry never refunds twice), the payment is reversed in the ledger and the ads engine nets the Purchase, the order becomes `refunded` and `order.status_changed` fires with `changes.status.to = refunded` (its `data.payment` names the refunded payment and its provider; `data.refunded_at` and `data.refund_reason` are set). The sold units go back on hand only when the workspace's own stock is Vitrina-managed (`restored_units`); when another system writes on-hand counts (a back office syncing absolute stock) nothing is added: that system reacts to the event. Refunding a refunded order answers 200 with `refunded: false`. Errors: 409 `order_not_paid` (draft, pending payment or cancelled), 409 `payment_not_refundable` (not paid through Mercado Pago or Webpay, e.g. a recorded transfer), 409 `refund_not_supported`, 409 `payment_not_connected`, 409 `store_order`; 502 `refund_refused` (the provider said no: past the refund window, a transaction not committed) or `payment_provider_unavailable`. On a 502 the order is unchanged and the call may be retried. Requires `orders:refund` (staff only; it is not part of any agent or storefront key).
|
|
214399
|
+
*/
|
|
214400
|
+
post: {
|
|
214401
|
+
parameters: {
|
|
214402
|
+
query?: never;
|
|
214403
|
+
header?: {
|
|
214404
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
214405
|
+
"Idempotency-Key"?: string;
|
|
214406
|
+
};
|
|
214407
|
+
path: {
|
|
214408
|
+
id: string;
|
|
214409
|
+
};
|
|
214410
|
+
cookie?: never;
|
|
214411
|
+
};
|
|
214412
|
+
requestBody?: {
|
|
214413
|
+
content: {
|
|
214414
|
+
/**
|
|
214415
|
+
* @example {
|
|
214416
|
+
* "reason": "Retracto: el cliente se arrepintió dentro de los 10 días"
|
|
214417
|
+
* }
|
|
214418
|
+
*/
|
|
214419
|
+
"application/json": {
|
|
214420
|
+
/**
|
|
214421
|
+
* @description Why the order is given back (retracto, defect, unit not deliverable). Kept on the order and in the audit log.
|
|
214422
|
+
* @example Retracto: el cliente se arrepintió dentro de los 10 días
|
|
214423
|
+
*/
|
|
214424
|
+
reason: string;
|
|
214425
|
+
};
|
|
214426
|
+
};
|
|
214427
|
+
};
|
|
214428
|
+
responses: {
|
|
214429
|
+
/** @description The refunded order */
|
|
214430
|
+
200: {
|
|
214431
|
+
headers: {
|
|
214432
|
+
[name: string]: unknown;
|
|
214433
|
+
};
|
|
214434
|
+
content: {
|
|
214435
|
+
/**
|
|
214436
|
+
* @example {
|
|
214437
|
+
* "data": {
|
|
214438
|
+
* "order": {
|
|
214439
|
+
* "id": "0199e3b0-0000-7000-8000-000000000001",
|
|
214440
|
+
* "tenant_id": "0199e3b0-0000-7000-8000-0000000000aa",
|
|
214441
|
+
* "display_id": "O-42",
|
|
214442
|
+
* "source": "native",
|
|
214443
|
+
* "external_id": null,
|
|
214444
|
+
* "status": "refunded",
|
|
214445
|
+
* "contact_id": "0199e3b0-0000-7000-8000-0000000000c1",
|
|
214446
|
+
* "conversation_id": "0199e3b0-0000-7000-8000-0000000000c2",
|
|
214447
|
+
* "lead_id": "0199e3b0-0000-7000-8000-0000000000c3",
|
|
214448
|
+
* "obligation_group_id": "0199e3b0-0000-7000-8000-000000000002",
|
|
214449
|
+
* "currency": "CLP",
|
|
214450
|
+
* "delivery": {
|
|
214451
|
+
* "recipient_name": "Cliente de ejemplo",
|
|
214452
|
+
* "address": "Av. Ejemplo 123, depto 45",
|
|
214453
|
+
* "comuna": "Providencia",
|
|
214454
|
+
* "region": "Metropolitana"
|
|
214455
|
+
* },
|
|
214456
|
+
* "notes": null,
|
|
214457
|
+
* "shipping_clp": 0,
|
|
214458
|
+
* "total_clp": 39980,
|
|
214459
|
+
* "item_count": 2,
|
|
214460
|
+
* "stock_decremented_at": null,
|
|
214461
|
+
* "paid_at": "2026-10-15T12:05:00.000Z",
|
|
214462
|
+
* "shipped_at": null,
|
|
214463
|
+
* "delivered_at": null,
|
|
214464
|
+
* "cancelled_at": null,
|
|
214465
|
+
* "cancelled_reason": null,
|
|
214466
|
+
* "refunded_at": "2026-10-16T09:00:00.000Z",
|
|
214467
|
+
* "refund_reason": "Retracto: el cliente se arrepintió dentro de los 10 días",
|
|
214468
|
+
* "refund_reference": "1318847654",
|
|
214469
|
+
* "buyer": {},
|
|
214470
|
+
* "attribution": {},
|
|
214471
|
+
* "client_event_id": null,
|
|
214472
|
+
* "return_urls": null,
|
|
214473
|
+
* "created_by": "0199e3b0-0000-7000-8000-0000000000bb",
|
|
214474
|
+
* "created_at": "2026-10-15T12:00:00.000Z",
|
|
214475
|
+
* "updated_at": "2026-10-15T12:00:00.000Z",
|
|
214476
|
+
* "lines": [
|
|
214477
|
+
* {
|
|
214478
|
+
* "id": "0199e3b0-0000-7000-8000-0000000000d1",
|
|
214479
|
+
* "position": 0,
|
|
214480
|
+
* "product_id": "0199e3b0-0000-7000-8000-0000000000e1",
|
|
214481
|
+
* "variant_id": "0199e3b0-0000-7000-8000-0000000000f1",
|
|
214482
|
+
* "title": "Polera básica",
|
|
214483
|
+
* "variant_title": "M / Negro",
|
|
214484
|
+
* "variant_options": [
|
|
214485
|
+
* {
|
|
214486
|
+
* "name": "Talla",
|
|
214487
|
+
* "value": "M"
|
|
214488
|
+
* },
|
|
214489
|
+
* {
|
|
214490
|
+
* "name": "Color",
|
|
214491
|
+
* "value": "Negro"
|
|
214492
|
+
* }
|
|
214493
|
+
* ],
|
|
214494
|
+
* "sku": "POL-M-NEG",
|
|
214495
|
+
* "unit_price_clp": 9990,
|
|
214496
|
+
* "quantity": 2,
|
|
214497
|
+
* "line_total_clp": 19980,
|
|
214498
|
+
* "obligation_id": "0199e3b0-0000-7000-8000-0000000000a1"
|
|
214499
|
+
* },
|
|
214500
|
+
* {
|
|
214501
|
+
* "id": "0199e3b0-0000-7000-8000-0000000000d2",
|
|
214502
|
+
* "position": 1,
|
|
214503
|
+
* "product_id": "0199e3b0-0000-7000-8000-0000000000e1",
|
|
214504
|
+
* "variant_id": "0199e3b0-0000-7000-8000-0000000000f2",
|
|
214505
|
+
* "title": "Polera básica",
|
|
214506
|
+
* "variant_title": "L / Blanco",
|
|
214507
|
+
* "variant_options": [
|
|
214508
|
+
* {
|
|
214509
|
+
* "name": "Talla",
|
|
214510
|
+
* "value": "L"
|
|
214511
|
+
* },
|
|
214512
|
+
* {
|
|
214513
|
+
* "name": "Color",
|
|
214514
|
+
* "value": "Blanco"
|
|
214515
|
+
* }
|
|
214516
|
+
* ],
|
|
214517
|
+
* "sku": "POL-L-BLA",
|
|
214518
|
+
* "unit_price_clp": 20000,
|
|
214519
|
+
* "quantity": 1,
|
|
214520
|
+
* "line_total_clp": 20000,
|
|
214521
|
+
* "obligation_id": "0199e3b0-0000-7000-8000-0000000000a2"
|
|
214522
|
+
* }
|
|
214523
|
+
* ]
|
|
214524
|
+
* },
|
|
214525
|
+
* "refunded": true,
|
|
214526
|
+
* "restored_units": 1
|
|
214527
|
+
* }
|
|
214528
|
+
* }
|
|
214529
|
+
*/
|
|
214530
|
+
"application/json": {
|
|
214531
|
+
data: components["schemas"]["OrderRefundResult"];
|
|
214532
|
+
};
|
|
214533
|
+
};
|
|
214534
|
+
};
|
|
214535
|
+
/** @description Validation error */
|
|
214536
|
+
400: {
|
|
214537
|
+
headers: {
|
|
214538
|
+
[name: string]: unknown;
|
|
214539
|
+
};
|
|
214540
|
+
content: {
|
|
214541
|
+
"application/json": components["schemas"]["Error"];
|
|
214542
|
+
};
|
|
214543
|
+
};
|
|
214544
|
+
/** @description Unauthorized */
|
|
214545
|
+
401: {
|
|
214546
|
+
headers: {
|
|
214547
|
+
[name: string]: unknown;
|
|
214548
|
+
};
|
|
214549
|
+
content: {
|
|
214550
|
+
"application/json": components["schemas"]["Error"];
|
|
214551
|
+
};
|
|
214552
|
+
};
|
|
214553
|
+
/** @description Forbidden */
|
|
214554
|
+
403: {
|
|
214555
|
+
headers: {
|
|
214556
|
+
[name: string]: unknown;
|
|
214557
|
+
};
|
|
214558
|
+
content: {
|
|
214559
|
+
"application/json": components["schemas"]["Error"];
|
|
214560
|
+
};
|
|
214561
|
+
};
|
|
214562
|
+
/** @description Not found */
|
|
214563
|
+
404: {
|
|
214564
|
+
headers: {
|
|
214565
|
+
[name: string]: unknown;
|
|
214566
|
+
};
|
|
214567
|
+
content: {
|
|
214568
|
+
"application/json": components["schemas"]["Error"];
|
|
214569
|
+
};
|
|
214570
|
+
};
|
|
214571
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
214572
|
+
409: {
|
|
214573
|
+
headers: {
|
|
214574
|
+
[name: string]: unknown;
|
|
214575
|
+
};
|
|
214576
|
+
content: {
|
|
214577
|
+
"application/json": components["schemas"]["Error"];
|
|
214578
|
+
};
|
|
214579
|
+
};
|
|
214580
|
+
/** @description Rate limited */
|
|
214581
|
+
429: {
|
|
214582
|
+
headers: {
|
|
214583
|
+
[name: string]: unknown;
|
|
214584
|
+
};
|
|
214585
|
+
content: {
|
|
214586
|
+
"application/json": components["schemas"]["Error"];
|
|
214587
|
+
};
|
|
214588
|
+
};
|
|
214589
|
+
};
|
|
214590
|
+
};
|
|
214591
|
+
delete?: never;
|
|
214592
|
+
options?: never;
|
|
214593
|
+
head?: never;
|
|
214594
|
+
patch?: never;
|
|
214595
|
+
trace?: never;
|
|
214596
|
+
};
|
|
214597
|
+
"/orders/checkout/shipping-communes": {
|
|
214598
|
+
parameters: {
|
|
214599
|
+
query?: never;
|
|
214600
|
+
header?: never;
|
|
214601
|
+
path?: never;
|
|
214602
|
+
cookie?: never;
|
|
214603
|
+
};
|
|
214604
|
+
/**
|
|
214605
|
+
* List the communes the store ships to
|
|
214606
|
+
* @description Every commune (and locality) the store’s courier (Chilexpress) delivers to, with the `coverage_code` a quote takes. Cached 12 hours. 409 `shipping_not_connected` when the store has no courier connected. Requires `orders:checkout` (a storefront’s key) or `orders:read`.
|
|
214607
|
+
*/
|
|
214608
|
+
get: {
|
|
214609
|
+
parameters: {
|
|
214610
|
+
query?: never;
|
|
214611
|
+
header?: never;
|
|
214612
|
+
path?: never;
|
|
214613
|
+
cookie?: never;
|
|
214614
|
+
};
|
|
214615
|
+
requestBody?: never;
|
|
214616
|
+
responses: {
|
|
214617
|
+
/** @description The communes, by region then name */
|
|
214618
|
+
200: {
|
|
214619
|
+
headers: {
|
|
214620
|
+
[name: string]: unknown;
|
|
214621
|
+
};
|
|
214622
|
+
content: {
|
|
214623
|
+
/**
|
|
214624
|
+
* @example {
|
|
214625
|
+
* "data": [
|
|
214626
|
+
* {
|
|
214627
|
+
* "coverage_code": "CONC",
|
|
214628
|
+
* "name": "Concepcion",
|
|
214629
|
+
* "commune": "Concepcion",
|
|
214630
|
+
* "region_code": "R8",
|
|
214631
|
+
* "region": "Biobio",
|
|
214632
|
+
* "kind": "commune"
|
|
214633
|
+
* }
|
|
214634
|
+
* ]
|
|
214635
|
+
* }
|
|
214636
|
+
*/
|
|
214637
|
+
"application/json": {
|
|
214638
|
+
data: components["schemas"]["ShippingCommune"][];
|
|
214639
|
+
};
|
|
214640
|
+
};
|
|
214641
|
+
};
|
|
214642
|
+
/** @description Validation error */
|
|
214643
|
+
400: {
|
|
214644
|
+
headers: {
|
|
214645
|
+
[name: string]: unknown;
|
|
214646
|
+
};
|
|
214647
|
+
content: {
|
|
214648
|
+
"application/json": components["schemas"]["Error"];
|
|
214649
|
+
};
|
|
214650
|
+
};
|
|
214651
|
+
/** @description Unauthorized */
|
|
214652
|
+
401: {
|
|
214653
|
+
headers: {
|
|
214654
|
+
[name: string]: unknown;
|
|
214655
|
+
};
|
|
214656
|
+
content: {
|
|
214657
|
+
"application/json": components["schemas"]["Error"];
|
|
214658
|
+
};
|
|
214659
|
+
};
|
|
214660
|
+
/** @description Forbidden */
|
|
214661
|
+
403: {
|
|
214662
|
+
headers: {
|
|
214663
|
+
[name: string]: unknown;
|
|
214664
|
+
};
|
|
214665
|
+
content: {
|
|
214666
|
+
"application/json": components["schemas"]["Error"];
|
|
214667
|
+
};
|
|
214668
|
+
};
|
|
214669
|
+
/** @description Not found */
|
|
214670
|
+
404: {
|
|
214671
|
+
headers: {
|
|
214672
|
+
[name: string]: unknown;
|
|
214673
|
+
};
|
|
214674
|
+
content: {
|
|
214675
|
+
"application/json": components["schemas"]["Error"];
|
|
214676
|
+
};
|
|
214677
|
+
};
|
|
214678
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
214679
|
+
409: {
|
|
214680
|
+
headers: {
|
|
214681
|
+
[name: string]: unknown;
|
|
214682
|
+
};
|
|
214683
|
+
content: {
|
|
214684
|
+
"application/json": components["schemas"]["Error"];
|
|
214685
|
+
};
|
|
214686
|
+
};
|
|
214687
|
+
/** @description Rate limited */
|
|
214688
|
+
429: {
|
|
214689
|
+
headers: {
|
|
214690
|
+
[name: string]: unknown;
|
|
214691
|
+
};
|
|
214692
|
+
content: {
|
|
214693
|
+
"application/json": components["schemas"]["Error"];
|
|
214694
|
+
};
|
|
214695
|
+
};
|
|
214696
|
+
};
|
|
214697
|
+
};
|
|
214698
|
+
put?: never;
|
|
214699
|
+
post?: never;
|
|
214700
|
+
delete?: never;
|
|
214701
|
+
options?: never;
|
|
214702
|
+
head?: never;
|
|
214703
|
+
patch?: never;
|
|
214704
|
+
trace?: never;
|
|
214705
|
+
};
|
|
214706
|
+
"/orders/checkout/shipping-quotes": {
|
|
214707
|
+
parameters: {
|
|
214708
|
+
query?: never;
|
|
214709
|
+
header?: never;
|
|
214710
|
+
path?: never;
|
|
214711
|
+
cookie?: never;
|
|
214712
|
+
};
|
|
214713
|
+
get?: never;
|
|
214714
|
+
put?: never;
|
|
214715
|
+
/**
|
|
214716
|
+
* Quote courier delivery for a checkout
|
|
214717
|
+
* @description The price (and an estimated transit in business days) of delivering these items to a commune, per service the store offers, cheapest first. The package is the store’s unit box × the quantity; the declared value is the items’ catalog price. The quote is kept **30 minutes**: send its `quote_id` (and a `service_code` when there are several options) in `POST /orders/checkout` with `delivery.method = shipping`; the price is charged with the products in the same payment. The caller never states a price.
|
|
214718
|
+
*
|
|
214719
|
+
* Refusals (`error.details.reason`): 400 `unknown_commune` · `commune_required` · `unknown_item` · `inactive_item` · `no_price`; 409 `shipping_not_connected` · `no_shipping_service` · `insufficient_stock` · `shipping_key_rejected`; 502 `shipping_provider_unavailable`. Requires `orders:checkout` (a storefront’s key) or `orders:read`.
|
|
214720
|
+
*/
|
|
214721
|
+
post: {
|
|
214722
|
+
parameters: {
|
|
214723
|
+
query?: never;
|
|
214724
|
+
header?: {
|
|
214725
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
214726
|
+
"Idempotency-Key"?: string;
|
|
214727
|
+
};
|
|
214728
|
+
path?: never;
|
|
214729
|
+
cookie?: never;
|
|
214730
|
+
};
|
|
214731
|
+
requestBody?: {
|
|
214732
|
+
content: {
|
|
214733
|
+
/**
|
|
214734
|
+
* @example {
|
|
214735
|
+
* "items": [
|
|
214736
|
+
* {
|
|
214737
|
+
* "variant_id": "0199e3b0-0000-7000-8000-0000000000f1",
|
|
214738
|
+
* "quantity": 1
|
|
214739
|
+
* }
|
|
214740
|
+
* ],
|
|
214741
|
+
* "destination": {
|
|
214742
|
+
* "coverage_code": "CONC"
|
|
214743
|
+
* }
|
|
214744
|
+
* }
|
|
214745
|
+
*/
|
|
214746
|
+
"application/json": {
|
|
214747
|
+
/** @description The items the buyer is about to check out (the same list the checkout will send). */
|
|
214748
|
+
items: {
|
|
214749
|
+
/** Format: uuid */
|
|
214750
|
+
variant_id: string;
|
|
214751
|
+
/** @default 1 */
|
|
214752
|
+
quantity?: number;
|
|
214753
|
+
}[];
|
|
214754
|
+
destination: {
|
|
214755
|
+
/** @description A code from `GET /orders/checkout/shipping-communes` (preferred). */
|
|
214756
|
+
coverage_code?: string;
|
|
214757
|
+
/** @description Or the commune name (accents ignored). */
|
|
214758
|
+
commune?: string;
|
|
214759
|
+
region_code?: string;
|
|
214760
|
+
};
|
|
214761
|
+
};
|
|
214762
|
+
};
|
|
214763
|
+
};
|
|
214764
|
+
responses: {
|
|
214765
|
+
/** @description The quote */
|
|
214766
|
+
201: {
|
|
214767
|
+
headers: {
|
|
214768
|
+
[name: string]: unknown;
|
|
214769
|
+
};
|
|
214770
|
+
content: {
|
|
214771
|
+
/**
|
|
214772
|
+
* @example {
|
|
214773
|
+
* "data": {
|
|
214774
|
+
* "quote_id": "0199e3b0-0000-7000-8000-0000000000a9",
|
|
214775
|
+
* "carrier": "chilexpress",
|
|
214776
|
+
* "destination": {
|
|
214777
|
+
* "coverage_code": "CONC",
|
|
214778
|
+
* "commune": "Concepcion",
|
|
214779
|
+
* "region_code": "R8",
|
|
214780
|
+
* "region": "Biobio"
|
|
214781
|
+
* },
|
|
214782
|
+
* "options": [
|
|
214783
|
+
* {
|
|
214784
|
+
* "service_code": 3,
|
|
214785
|
+
* "service_name": "Express",
|
|
214786
|
+
* "price_clp": 6424,
|
|
214787
|
+
* "estimated_business_days": 2
|
|
214788
|
+
* }
|
|
214789
|
+
* ],
|
|
214790
|
+
* "expires_at": "2026-10-29T15:30:00.000Z"
|
|
214791
|
+
* }
|
|
214792
|
+
* }
|
|
214793
|
+
*/
|
|
214794
|
+
"application/json": {
|
|
214795
|
+
data: components["schemas"]["ShippingQuote"];
|
|
214796
|
+
};
|
|
214797
|
+
};
|
|
214798
|
+
};
|
|
214799
|
+
/** @description Validation error */
|
|
214800
|
+
400: {
|
|
214801
|
+
headers: {
|
|
214802
|
+
[name: string]: unknown;
|
|
214803
|
+
};
|
|
214804
|
+
content: {
|
|
214805
|
+
"application/json": components["schemas"]["Error"];
|
|
214806
|
+
};
|
|
214807
|
+
};
|
|
214808
|
+
/** @description Unauthorized */
|
|
214809
|
+
401: {
|
|
214810
|
+
headers: {
|
|
214811
|
+
[name: string]: unknown;
|
|
214812
|
+
};
|
|
214813
|
+
content: {
|
|
214814
|
+
"application/json": components["schemas"]["Error"];
|
|
214815
|
+
};
|
|
214816
|
+
};
|
|
214817
|
+
/** @description Forbidden */
|
|
214818
|
+
403: {
|
|
214819
|
+
headers: {
|
|
214820
|
+
[name: string]: unknown;
|
|
214821
|
+
};
|
|
214822
|
+
content: {
|
|
214823
|
+
"application/json": components["schemas"]["Error"];
|
|
214824
|
+
};
|
|
214825
|
+
};
|
|
214826
|
+
/** @description Not found */
|
|
214827
|
+
404: {
|
|
214828
|
+
headers: {
|
|
214829
|
+
[name: string]: unknown;
|
|
214830
|
+
};
|
|
214831
|
+
content: {
|
|
214832
|
+
"application/json": components["schemas"]["Error"];
|
|
214833
|
+
};
|
|
214834
|
+
};
|
|
214835
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
214836
|
+
409: {
|
|
214837
|
+
headers: {
|
|
214838
|
+
[name: string]: unknown;
|
|
214839
|
+
};
|
|
214840
|
+
content: {
|
|
214841
|
+
"application/json": components["schemas"]["Error"];
|
|
214842
|
+
};
|
|
214843
|
+
};
|
|
214844
|
+
/** @description Rate limited */
|
|
214845
|
+
429: {
|
|
214846
|
+
headers: {
|
|
214847
|
+
[name: string]: unknown;
|
|
214848
|
+
};
|
|
214849
|
+
content: {
|
|
214850
|
+
"application/json": components["schemas"]["Error"];
|
|
214851
|
+
};
|
|
214852
|
+
};
|
|
214853
|
+
};
|
|
214854
|
+
};
|
|
214855
|
+
delete?: never;
|
|
214856
|
+
options?: never;
|
|
214857
|
+
head?: never;
|
|
214858
|
+
patch?: never;
|
|
214859
|
+
trace?: never;
|
|
214860
|
+
};
|
|
214861
|
+
"/orders/{id}/shipment": {
|
|
214862
|
+
parameters: {
|
|
214863
|
+
query?: never;
|
|
214864
|
+
header?: never;
|
|
214865
|
+
path?: never;
|
|
214866
|
+
cookie?: never;
|
|
214867
|
+
};
|
|
214868
|
+
/**
|
|
214869
|
+
* Get an order’s shipment and label
|
|
214870
|
+
* @description The courier shipment of an order: number, public tracking link, service, and the label to print (`label.base64`, a JPEG), or null once erased. 404 before dispatch. Requires `orders:read`.
|
|
214871
|
+
*/
|
|
214872
|
+
get: {
|
|
214873
|
+
parameters: {
|
|
214874
|
+
query?: never;
|
|
214875
|
+
header?: never;
|
|
214876
|
+
path: {
|
|
214877
|
+
id: string;
|
|
214878
|
+
};
|
|
214879
|
+
cookie?: never;
|
|
214880
|
+
};
|
|
214881
|
+
requestBody?: never;
|
|
214882
|
+
responses: {
|
|
214883
|
+
/** @description The shipment */
|
|
214884
|
+
200: {
|
|
214885
|
+
headers: {
|
|
214886
|
+
[name: string]: unknown;
|
|
214887
|
+
};
|
|
214888
|
+
content: {
|
|
214889
|
+
/**
|
|
214890
|
+
* @example {
|
|
214891
|
+
* "data": {
|
|
214892
|
+
* "carrier": "chilexpress",
|
|
214893
|
+
* "environment": "test",
|
|
214894
|
+
* "shipment_number": "712678918615",
|
|
214895
|
+
* "tracking_url": "https://centrodeayuda.chilexpress.cl/seguimiento/712678918615",
|
|
214896
|
+
* "service_code": 3,
|
|
214897
|
+
* "service_name": "EXPRESS",
|
|
214898
|
+
* "reference": "O-42",
|
|
214899
|
+
* "has_label": true,
|
|
214900
|
+
* "created_at": "2026-10-30T12:00:00.000Z",
|
|
214901
|
+
* "label": {
|
|
214902
|
+
* "content_type": "image/jpeg",
|
|
214903
|
+
* "base64": "/9j/4AAQSkZJRgABAQ…"
|
|
214904
|
+
* }
|
|
214905
|
+
* }
|
|
214906
|
+
* }
|
|
214907
|
+
*/
|
|
214908
|
+
"application/json": {
|
|
214909
|
+
data: components["schemas"]["CommerceShipment"] & {
|
|
214910
|
+
label: {
|
|
214911
|
+
/** @enum {string} */
|
|
214912
|
+
content_type: "image/jpeg";
|
|
214913
|
+
base64: string;
|
|
214914
|
+
} | null;
|
|
214915
|
+
};
|
|
214916
|
+
};
|
|
214917
|
+
};
|
|
214918
|
+
};
|
|
214919
|
+
/** @description Validation error */
|
|
214920
|
+
400: {
|
|
214921
|
+
headers: {
|
|
214922
|
+
[name: string]: unknown;
|
|
214923
|
+
};
|
|
214924
|
+
content: {
|
|
214925
|
+
"application/json": components["schemas"]["Error"];
|
|
214926
|
+
};
|
|
214927
|
+
};
|
|
214928
|
+
/** @description Unauthorized */
|
|
214929
|
+
401: {
|
|
214930
|
+
headers: {
|
|
214931
|
+
[name: string]: unknown;
|
|
214932
|
+
};
|
|
214933
|
+
content: {
|
|
214934
|
+
"application/json": components["schemas"]["Error"];
|
|
214935
|
+
};
|
|
214936
|
+
};
|
|
214937
|
+
/** @description Forbidden */
|
|
214938
|
+
403: {
|
|
214939
|
+
headers: {
|
|
214940
|
+
[name: string]: unknown;
|
|
214941
|
+
};
|
|
214942
|
+
content: {
|
|
214943
|
+
"application/json": components["schemas"]["Error"];
|
|
214944
|
+
};
|
|
214945
|
+
};
|
|
214946
|
+
/** @description Not found */
|
|
214947
|
+
404: {
|
|
214948
|
+
headers: {
|
|
214949
|
+
[name: string]: unknown;
|
|
214950
|
+
};
|
|
214951
|
+
content: {
|
|
214952
|
+
"application/json": components["schemas"]["Error"];
|
|
214953
|
+
};
|
|
214954
|
+
};
|
|
214955
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
214956
|
+
409: {
|
|
214957
|
+
headers: {
|
|
214958
|
+
[name: string]: unknown;
|
|
214959
|
+
};
|
|
214960
|
+
content: {
|
|
214961
|
+
"application/json": components["schemas"]["Error"];
|
|
214962
|
+
};
|
|
214963
|
+
};
|
|
214964
|
+
/** @description Rate limited */
|
|
214965
|
+
429: {
|
|
214966
|
+
headers: {
|
|
214967
|
+
[name: string]: unknown;
|
|
214968
|
+
};
|
|
214969
|
+
content: {
|
|
214970
|
+
"application/json": components["schemas"]["Error"];
|
|
214971
|
+
};
|
|
214972
|
+
};
|
|
214973
|
+
};
|
|
214974
|
+
};
|
|
214975
|
+
put?: never;
|
|
214976
|
+
/**
|
|
214977
|
+
* Dispatch an order by courier
|
|
214978
|
+
* @description «Despachar»: creates the shipment (transport order) at Chilexpress for a paid order with `delivery.method = shipping`, stores its number, its public tracking link and its label (`GET /orders/{id}/shipment`), writes `delivery.shipment` on the order and moves it to `shipped` (fires `order.status_changed`). Dispatching again returns the existing shipment (200, `created: false`).
|
|
214979
|
+
*
|
|
214980
|
+
* Refusals (`error.details.reason`): 409 `not_a_shipping_order` · `order_not_dispatchable` · `shipping_address_incomplete` · `shipping_not_connected` · `shipping_dispatch_not_configured` · `shipping_key_rejected` · `store_order`; 400 `shipping_rejected` (Chilexpress refused the data; `details.provider_errors`); 502 `shipping_provider_unavailable`. Requires `orders:write`.
|
|
214981
|
+
*/
|
|
214982
|
+
post: {
|
|
214983
|
+
parameters: {
|
|
214984
|
+
query?: never;
|
|
214985
|
+
header?: {
|
|
214986
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
214987
|
+
"Idempotency-Key"?: string;
|
|
214988
|
+
};
|
|
214989
|
+
path: {
|
|
214990
|
+
id: string;
|
|
214991
|
+
};
|
|
214992
|
+
cookie?: never;
|
|
214993
|
+
};
|
|
214994
|
+
requestBody?: {
|
|
214995
|
+
content: {
|
|
214996
|
+
/** @example {} */
|
|
214997
|
+
"application/json": {
|
|
214998
|
+
/** @description Override the service the buyer chose (default: the order’s). */
|
|
214999
|
+
service_code?: number;
|
|
215000
|
+
};
|
|
215001
|
+
};
|
|
215002
|
+
};
|
|
215003
|
+
responses: {
|
|
215004
|
+
/** @description Already dispatched: the existing shipment */
|
|
215005
|
+
200: {
|
|
215006
|
+
headers: {
|
|
215007
|
+
[name: string]: unknown;
|
|
215008
|
+
};
|
|
215009
|
+
content: {
|
|
215010
|
+
/**
|
|
215011
|
+
* @example {
|
|
215012
|
+
* "data": {
|
|
215013
|
+
* "shipment": {
|
|
215014
|
+
* "carrier": "chilexpress",
|
|
215015
|
+
* "environment": "test",
|
|
215016
|
+
* "shipment_number": "712678918615",
|
|
215017
|
+
* "tracking_url": "https://centrodeayuda.chilexpress.cl/seguimiento/712678918615",
|
|
215018
|
+
* "service_code": 3,
|
|
215019
|
+
* "service_name": "EXPRESS",
|
|
215020
|
+
* "reference": "O-42",
|
|
215021
|
+
* "has_label": true,
|
|
215022
|
+
* "created_at": "2026-10-30T12:00:00.000Z"
|
|
215023
|
+
* },
|
|
215024
|
+
* "created": false
|
|
215025
|
+
* }
|
|
215026
|
+
* }
|
|
215027
|
+
*/
|
|
215028
|
+
"application/json": {
|
|
215029
|
+
data: {
|
|
215030
|
+
order: components["schemas"]["CommerceOrder"];
|
|
215031
|
+
shipment: components["schemas"]["CommerceShipment"];
|
|
215032
|
+
created: boolean;
|
|
215033
|
+
};
|
|
215034
|
+
};
|
|
215035
|
+
};
|
|
215036
|
+
};
|
|
215037
|
+
/** @description Dispatched */
|
|
215038
|
+
201: {
|
|
215039
|
+
headers: {
|
|
215040
|
+
[name: string]: unknown;
|
|
215041
|
+
};
|
|
215042
|
+
content: {
|
|
215043
|
+
/**
|
|
215044
|
+
* @example {
|
|
215045
|
+
* "data": {
|
|
215046
|
+
* "shipment": {
|
|
215047
|
+
* "carrier": "chilexpress",
|
|
215048
|
+
* "environment": "test",
|
|
215049
|
+
* "shipment_number": "712678918615",
|
|
215050
|
+
* "tracking_url": "https://centrodeayuda.chilexpress.cl/seguimiento/712678918615",
|
|
215051
|
+
* "service_code": 3,
|
|
215052
|
+
* "service_name": "EXPRESS",
|
|
215053
|
+
* "reference": "O-42",
|
|
215054
|
+
* "has_label": true,
|
|
215055
|
+
* "created_at": "2026-10-30T12:00:00.000Z"
|
|
215056
|
+
* },
|
|
215057
|
+
* "created": true
|
|
215058
|
+
* }
|
|
215059
|
+
* }
|
|
215060
|
+
*/
|
|
215061
|
+
"application/json": {
|
|
215062
|
+
data: {
|
|
215063
|
+
order: components["schemas"]["CommerceOrder"];
|
|
215064
|
+
shipment: components["schemas"]["CommerceShipment"];
|
|
215065
|
+
created: boolean;
|
|
215066
|
+
};
|
|
215067
|
+
};
|
|
215068
|
+
};
|
|
215069
|
+
};
|
|
215070
|
+
/** @description Validation error */
|
|
215071
|
+
400: {
|
|
215072
|
+
headers: {
|
|
215073
|
+
[name: string]: unknown;
|
|
215074
|
+
};
|
|
215075
|
+
content: {
|
|
215076
|
+
"application/json": components["schemas"]["Error"];
|
|
215077
|
+
};
|
|
215078
|
+
};
|
|
215079
|
+
/** @description Unauthorized */
|
|
215080
|
+
401: {
|
|
215081
|
+
headers: {
|
|
215082
|
+
[name: string]: unknown;
|
|
215083
|
+
};
|
|
215084
|
+
content: {
|
|
215085
|
+
"application/json": components["schemas"]["Error"];
|
|
215086
|
+
};
|
|
215087
|
+
};
|
|
215088
|
+
/** @description Forbidden */
|
|
215089
|
+
403: {
|
|
215090
|
+
headers: {
|
|
215091
|
+
[name: string]: unknown;
|
|
215092
|
+
};
|
|
215093
|
+
content: {
|
|
215094
|
+
"application/json": components["schemas"]["Error"];
|
|
215095
|
+
};
|
|
215096
|
+
};
|
|
215097
|
+
/** @description Not found */
|
|
215098
|
+
404: {
|
|
215099
|
+
headers: {
|
|
215100
|
+
[name: string]: unknown;
|
|
215101
|
+
};
|
|
215102
|
+
content: {
|
|
215103
|
+
"application/json": components["schemas"]["Error"];
|
|
215104
|
+
};
|
|
215105
|
+
};
|
|
215106
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
215107
|
+
409: {
|
|
215108
|
+
headers: {
|
|
215109
|
+
[name: string]: unknown;
|
|
215110
|
+
};
|
|
215111
|
+
content: {
|
|
215112
|
+
"application/json": components["schemas"]["Error"];
|
|
215113
|
+
};
|
|
215114
|
+
};
|
|
215115
|
+
/** @description Rate limited */
|
|
215116
|
+
429: {
|
|
215117
|
+
headers: {
|
|
215118
|
+
[name: string]: unknown;
|
|
215119
|
+
};
|
|
215120
|
+
content: {
|
|
215121
|
+
"application/json": components["schemas"]["Error"];
|
|
215122
|
+
};
|
|
215123
|
+
};
|
|
215124
|
+
};
|
|
215125
|
+
};
|
|
215126
|
+
delete?: never;
|
|
215127
|
+
options?: never;
|
|
215128
|
+
head?: never;
|
|
215129
|
+
patch?: never;
|
|
215130
|
+
trace?: never;
|
|
215131
|
+
};
|
|
215132
|
+
"/shipping/chilexpress": {
|
|
215133
|
+
parameters: {
|
|
215134
|
+
query?: never;
|
|
215135
|
+
header?: never;
|
|
215136
|
+
path?: never;
|
|
215137
|
+
cookie?: never;
|
|
215138
|
+
};
|
|
215139
|
+
/**
|
|
215140
|
+
* Get the store’s Chilexpress connection
|
|
215141
|
+
* @description The store’s own Chilexpress account as connected: environment, origin commune, TCC, sender, return address, default package, offered services, and masked key previews (never the keys). `connected: false` when none. Requires `tenant:read`.
|
|
215142
|
+
*/
|
|
215143
|
+
get: {
|
|
215144
|
+
parameters: {
|
|
215145
|
+
query?: never;
|
|
215146
|
+
header?: never;
|
|
215147
|
+
path?: never;
|
|
215148
|
+
cookie?: never;
|
|
215149
|
+
};
|
|
215150
|
+
requestBody?: never;
|
|
215151
|
+
responses: {
|
|
215152
|
+
/** @description The connection */
|
|
215153
|
+
200: {
|
|
215154
|
+
headers: {
|
|
215155
|
+
[name: string]: unknown;
|
|
215156
|
+
};
|
|
215157
|
+
content: {
|
|
215158
|
+
/**
|
|
215159
|
+
* @example {
|
|
215160
|
+
* "data": {
|
|
215161
|
+
* "connected": true,
|
|
215162
|
+
* "environment": "test",
|
|
215163
|
+
* "origin_coverage_code": "PROV",
|
|
215164
|
+
* "origin_commune": "Providencia",
|
|
215165
|
+
* "origin_region_code": "RM",
|
|
215166
|
+
* "customer_card_number": "18578680",
|
|
215167
|
+
* "keys": {
|
|
215168
|
+
* "rating": "a1b2••••9f",
|
|
215169
|
+
* "shipments": "c3d4••••0e",
|
|
215170
|
+
* "coverage": null
|
|
215171
|
+
* },
|
|
215172
|
+
* "can_dispatch": true,
|
|
215173
|
+
* "sender": {
|
|
215174
|
+
* "name": "Tienda Ejemplo",
|
|
215175
|
+
* "phone": "+56912345678",
|
|
215176
|
+
* "email": "ventas@tienda.example.cl"
|
|
215177
|
+
* },
|
|
215178
|
+
* "return_address": {
|
|
215179
|
+
* "street": "Av. Ejemplo",
|
|
215180
|
+
* "number": "123",
|
|
215181
|
+
* "supplement": "Oficina 5"
|
|
215182
|
+
* },
|
|
215183
|
+
* "package": {
|
|
215184
|
+
* "weight_kg": 0.6,
|
|
215185
|
+
* "height_cm": 8,
|
|
215186
|
+
* "width_cm": 12,
|
|
215187
|
+
* "length_cm": 20
|
|
215188
|
+
* },
|
|
215189
|
+
* "services": [
|
|
215190
|
+
* 3
|
|
215191
|
+
* ],
|
|
215192
|
+
* "declared_content": "celular",
|
|
215193
|
+
* "seller_rut": null,
|
|
215194
|
+
* "connected_at": "2026-10-29T15:00:00.000Z"
|
|
215195
|
+
* }
|
|
215196
|
+
* }
|
|
215197
|
+
*/
|
|
215198
|
+
"application/json": {
|
|
215199
|
+
data: components["schemas"]["ChilexpressConnection"];
|
|
215200
|
+
};
|
|
215201
|
+
};
|
|
215202
|
+
};
|
|
215203
|
+
/** @description Validation error */
|
|
215204
|
+
400: {
|
|
215205
|
+
headers: {
|
|
215206
|
+
[name: string]: unknown;
|
|
215207
|
+
};
|
|
215208
|
+
content: {
|
|
215209
|
+
"application/json": components["schemas"]["Error"];
|
|
215210
|
+
};
|
|
215211
|
+
};
|
|
215212
|
+
/** @description Unauthorized */
|
|
215213
|
+
401: {
|
|
215214
|
+
headers: {
|
|
215215
|
+
[name: string]: unknown;
|
|
215216
|
+
};
|
|
215217
|
+
content: {
|
|
215218
|
+
"application/json": components["schemas"]["Error"];
|
|
215219
|
+
};
|
|
215220
|
+
};
|
|
215221
|
+
/** @description Forbidden */
|
|
215222
|
+
403: {
|
|
215223
|
+
headers: {
|
|
215224
|
+
[name: string]: unknown;
|
|
215225
|
+
};
|
|
215226
|
+
content: {
|
|
215227
|
+
"application/json": components["schemas"]["Error"];
|
|
215228
|
+
};
|
|
215229
|
+
};
|
|
215230
|
+
/** @description Not found */
|
|
215231
|
+
404: {
|
|
215232
|
+
headers: {
|
|
215233
|
+
[name: string]: unknown;
|
|
215234
|
+
};
|
|
215235
|
+
content: {
|
|
215236
|
+
"application/json": components["schemas"]["Error"];
|
|
215237
|
+
};
|
|
215238
|
+
};
|
|
215239
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
215240
|
+
409: {
|
|
215241
|
+
headers: {
|
|
215242
|
+
[name: string]: unknown;
|
|
215243
|
+
};
|
|
215244
|
+
content: {
|
|
215245
|
+
"application/json": components["schemas"]["Error"];
|
|
215246
|
+
};
|
|
215247
|
+
};
|
|
215248
|
+
/** @description Rate limited */
|
|
215249
|
+
429: {
|
|
215250
|
+
headers: {
|
|
215251
|
+
[name: string]: unknown;
|
|
215252
|
+
};
|
|
215253
|
+
content: {
|
|
215254
|
+
"application/json": components["schemas"]["Error"];
|
|
215255
|
+
};
|
|
215256
|
+
};
|
|
215257
|
+
};
|
|
215258
|
+
};
|
|
214022
215259
|
/**
|
|
214023
|
-
*
|
|
214024
|
-
* @description
|
|
215260
|
+
* Connect or update the store’s Chilexpress account
|
|
215261
|
+
* @description Saves the store’s own Chilexpress account (developers.wschilexpress.com subscription keys, Tarjeta Cliente Chilexpress, origin commune, sender, return address, default package). The Cotizador key is verified with a real quote first; keys are stored encrypted and never returned. Keys not sent are kept. The Envíos key is proven on the first dispatch. Production keys may need a commercial agreement with Chilexpress.
|
|
215262
|
+
*
|
|
215263
|
+
* Refusals (`error.details.reason`): 400 `invalid_chilexpress_settings` (`details.field`) · `chilexpress_key_rejected` · `unknown_commune`; 502 `shipping_provider_unavailable`. Requires `tenant:write`.
|
|
214025
215264
|
*/
|
|
214026
|
-
|
|
215265
|
+
put: {
|
|
214027
215266
|
parameters: {
|
|
214028
215267
|
query?: never;
|
|
214029
|
-
header?:
|
|
214030
|
-
|
|
214031
|
-
"Idempotency-Key"?: string;
|
|
214032
|
-
};
|
|
214033
|
-
path: {
|
|
214034
|
-
id: string;
|
|
214035
|
-
};
|
|
215268
|
+
header?: never;
|
|
215269
|
+
path?: never;
|
|
214036
215270
|
cookie?: never;
|
|
214037
215271
|
};
|
|
214038
215272
|
requestBody?: {
|
|
214039
215273
|
content: {
|
|
214040
215274
|
/**
|
|
214041
215275
|
* @example {
|
|
214042
|
-
* "
|
|
215276
|
+
* "environment": "test",
|
|
215277
|
+
* "rating_key": "<Cotizador primary key>",
|
|
215278
|
+
* "shipments_key": "<Envíos primary key>",
|
|
215279
|
+
* "customer_card_number": "18578680",
|
|
215280
|
+
* "origin_commune": "Providencia",
|
|
215281
|
+
* "sender": {
|
|
215282
|
+
* "name": "Tienda Ejemplo",
|
|
215283
|
+
* "phone": "+56912345678",
|
|
215284
|
+
* "email": "ventas@tienda.example.cl"
|
|
215285
|
+
* },
|
|
215286
|
+
* "return_address": {
|
|
215287
|
+
* "street": "Av. Ejemplo",
|
|
215288
|
+
* "number": "123",
|
|
215289
|
+
* "supplement": "Oficina 5"
|
|
215290
|
+
* },
|
|
215291
|
+
* "declared_content": "celular"
|
|
214043
215292
|
* }
|
|
214044
215293
|
*/
|
|
214045
215294
|
"application/json": {
|
|
214046
|
-
/**
|
|
214047
|
-
|
|
215295
|
+
/**
|
|
215296
|
+
* @description `test` = testservices.wschilexpress.com (self-service keys), `production` = services.wschilexpress.com.
|
|
215297
|
+
* @enum {string}
|
|
215298
|
+
*/
|
|
215299
|
+
environment: "test" | "production";
|
|
215300
|
+
/** @description Primary key of the «Cotizador» subscription (developers.wschilexpress.com → Perfil). Required on the first connect; omit to keep the stored one. */
|
|
215301
|
+
rating_key?: string;
|
|
215302
|
+
/** @description Primary key of the «Envíos» subscription: needed to dispatch. Omit to keep; null or "" clears it. */
|
|
215303
|
+
shipments_key?: string | null;
|
|
215304
|
+
/** @description Primary key of the «Coberturas» subscription. Optional: the Cotizador key is used when absent. */
|
|
215305
|
+
coverage_key?: string | null;
|
|
215306
|
+
/**
|
|
215307
|
+
* @description Tarjeta Cliente Chilexpress (TCC): the account shipments are billed to. Needed to dispatch. Test: 18578680.
|
|
215308
|
+
* @example 18578680
|
|
215309
|
+
*/
|
|
215310
|
+
customer_card_number?: string | null;
|
|
215311
|
+
/**
|
|
215312
|
+
* @description The commune the store ships from: a name (`Providencia`) or a Chilexpress coverage code (`PROV`).
|
|
215313
|
+
* @example Providencia
|
|
215314
|
+
*/
|
|
215315
|
+
origin_commune: string;
|
|
215316
|
+
/** @description Narrows a commune name to a region (`RM`, `R8`…) when the name exists in two. */
|
|
215317
|
+
origin_region_code?: string;
|
|
215318
|
+
/** @description Printed on the label as the sender. */
|
|
215319
|
+
sender: {
|
|
215320
|
+
name: string;
|
|
215321
|
+
phone: string;
|
|
215322
|
+
/** Format: email */
|
|
215323
|
+
email: string;
|
|
215324
|
+
};
|
|
215325
|
+
/** @description Where Chilexpress returns an undeliverable parcel (in the origin commune). */
|
|
215326
|
+
return_address: {
|
|
215327
|
+
street: string;
|
|
215328
|
+
number: string;
|
|
215329
|
+
supplement?: string | null;
|
|
215330
|
+
};
|
|
215331
|
+
/** @description One unit in its shipping box (default an iPhone box in a mailer: 0.6 kg, 20×12×8 cm). N units stack: weight and height × N. */
|
|
215332
|
+
package?: {
|
|
215333
|
+
weight_kg?: number;
|
|
215334
|
+
height_cm?: number;
|
|
215335
|
+
width_cm?: number;
|
|
215336
|
+
length_cm?: number;
|
|
215337
|
+
};
|
|
215338
|
+
/** @description Services offered to buyers (default `[3]`, Express). Quotes show only these. */
|
|
215339
|
+
services?: number[];
|
|
215340
|
+
/**
|
|
215341
|
+
* @description What the parcel contains, as Chilexpress declares it on the label.
|
|
215342
|
+
* @enum {string}
|
|
215343
|
+
*/
|
|
215344
|
+
declared_content?: "celular" | "tecnologia" | "articulos_personales" | "educacion" | "vestuario" | "otros";
|
|
215345
|
+
/** @description The company RUT without dots or check digit, when Chilexpress asks for it on the account. */
|
|
215346
|
+
seller_rut?: string | null;
|
|
214048
215347
|
};
|
|
214049
215348
|
};
|
|
214050
215349
|
};
|
|
214051
215350
|
responses: {
|
|
214052
|
-
/** @description The
|
|
215351
|
+
/** @description The connection */
|
|
214053
215352
|
200: {
|
|
214054
215353
|
headers: {
|
|
214055
215354
|
[name: string]: unknown;
|
|
@@ -214058,92 +215357,166 @@ interface paths {
|
|
|
214058
215357
|
/**
|
|
214059
215358
|
* @example {
|
|
214060
215359
|
* "data": {
|
|
214061
|
-
* "
|
|
214062
|
-
* "
|
|
214063
|
-
* "
|
|
214064
|
-
* "
|
|
214065
|
-
* "
|
|
214066
|
-
* "
|
|
214067
|
-
* "
|
|
214068
|
-
*
|
|
214069
|
-
*
|
|
214070
|
-
*
|
|
214071
|
-
*
|
|
214072
|
-
* "
|
|
214073
|
-
*
|
|
214074
|
-
* "
|
|
214075
|
-
* "
|
|
214076
|
-
* "
|
|
215360
|
+
* "connected": true,
|
|
215361
|
+
* "environment": "test",
|
|
215362
|
+
* "origin_coverage_code": "PROV",
|
|
215363
|
+
* "origin_commune": "Providencia",
|
|
215364
|
+
* "origin_region_code": "RM",
|
|
215365
|
+
* "customer_card_number": "18578680",
|
|
215366
|
+
* "keys": {
|
|
215367
|
+
* "rating": "a1b2••••9f",
|
|
215368
|
+
* "shipments": "c3d4••••0e",
|
|
215369
|
+
* "coverage": null
|
|
215370
|
+
* },
|
|
215371
|
+
* "can_dispatch": true,
|
|
215372
|
+
* "sender": {
|
|
215373
|
+
* "name": "Tienda Ejemplo",
|
|
215374
|
+
* "phone": "+56912345678",
|
|
215375
|
+
* "email": "ventas@tienda.example.cl"
|
|
214077
215376
|
* },
|
|
214078
|
-
* "
|
|
214079
|
-
*
|
|
214080
|
-
*
|
|
214081
|
-
*
|
|
214082
|
-
*
|
|
214083
|
-
* "
|
|
214084
|
-
*
|
|
214085
|
-
*
|
|
214086
|
-
*
|
|
214087
|
-
*
|
|
214088
|
-
*
|
|
214089
|
-
* "
|
|
214090
|
-
*
|
|
214091
|
-
*
|
|
214092
|
-
* "
|
|
214093
|
-
* "
|
|
214094
|
-
* "
|
|
214095
|
-
* {
|
|
214096
|
-
* "id": "0199e3b0-0000-7000-8000-0000000000d1",
|
|
214097
|
-
* "position": 0,
|
|
214098
|
-
* "product_id": "0199e3b0-0000-7000-8000-0000000000e1",
|
|
214099
|
-
* "variant_id": "0199e3b0-0000-7000-8000-0000000000f1",
|
|
214100
|
-
* "title": "Polera básica",
|
|
214101
|
-
* "variant_title": "M / Negro",
|
|
214102
|
-
* "variant_options": [
|
|
214103
|
-
* {
|
|
214104
|
-
* "name": "Talla",
|
|
214105
|
-
* "value": "M"
|
|
214106
|
-
* },
|
|
214107
|
-
* {
|
|
214108
|
-
* "name": "Color",
|
|
214109
|
-
* "value": "Negro"
|
|
214110
|
-
* }
|
|
214111
|
-
* ],
|
|
214112
|
-
* "sku": "POL-M-NEG",
|
|
214113
|
-
* "unit_price_clp": 9990,
|
|
214114
|
-
* "quantity": 2,
|
|
214115
|
-
* "line_total_clp": 19980,
|
|
214116
|
-
* "obligation_id": "0199e3b0-0000-7000-8000-0000000000a1"
|
|
214117
|
-
* },
|
|
214118
|
-
* {
|
|
214119
|
-
* "id": "0199e3b0-0000-7000-8000-0000000000d2",
|
|
214120
|
-
* "position": 1,
|
|
214121
|
-
* "product_id": "0199e3b0-0000-7000-8000-0000000000e1",
|
|
214122
|
-
* "variant_id": "0199e3b0-0000-7000-8000-0000000000f2",
|
|
214123
|
-
* "title": "Polera básica",
|
|
214124
|
-
* "variant_title": "L / Blanco",
|
|
214125
|
-
* "variant_options": [
|
|
214126
|
-
* {
|
|
214127
|
-
* "name": "Talla",
|
|
214128
|
-
* "value": "L"
|
|
214129
|
-
* },
|
|
214130
|
-
* {
|
|
214131
|
-
* "name": "Color",
|
|
214132
|
-
* "value": "Blanco"
|
|
214133
|
-
* }
|
|
214134
|
-
* ],
|
|
214135
|
-
* "sku": "POL-L-BLA",
|
|
214136
|
-
* "unit_price_clp": 20000,
|
|
214137
|
-
* "quantity": 1,
|
|
214138
|
-
* "line_total_clp": 20000,
|
|
214139
|
-
* "obligation_id": "0199e3b0-0000-7000-8000-0000000000a2"
|
|
214140
|
-
* }
|
|
214141
|
-
* ]
|
|
215377
|
+
* "return_address": {
|
|
215378
|
+
* "street": "Av. Ejemplo",
|
|
215379
|
+
* "number": "123",
|
|
215380
|
+
* "supplement": "Oficina 5"
|
|
215381
|
+
* },
|
|
215382
|
+
* "package": {
|
|
215383
|
+
* "weight_kg": 0.6,
|
|
215384
|
+
* "height_cm": 8,
|
|
215385
|
+
* "width_cm": 12,
|
|
215386
|
+
* "length_cm": 20
|
|
215387
|
+
* },
|
|
215388
|
+
* "services": [
|
|
215389
|
+
* 3
|
|
215390
|
+
* ],
|
|
215391
|
+
* "declared_content": "celular",
|
|
215392
|
+
* "seller_rut": null,
|
|
215393
|
+
* "connected_at": "2026-10-29T15:00:00.000Z"
|
|
214142
215394
|
* }
|
|
214143
215395
|
* }
|
|
214144
215396
|
*/
|
|
214145
215397
|
"application/json": {
|
|
214146
|
-
data: components["schemas"]["
|
|
215398
|
+
data: components["schemas"]["ChilexpressConnection"];
|
|
215399
|
+
};
|
|
215400
|
+
};
|
|
215401
|
+
};
|
|
215402
|
+
/** @description Validation error */
|
|
215403
|
+
400: {
|
|
215404
|
+
headers: {
|
|
215405
|
+
[name: string]: unknown;
|
|
215406
|
+
};
|
|
215407
|
+
content: {
|
|
215408
|
+
"application/json": components["schemas"]["Error"];
|
|
215409
|
+
};
|
|
215410
|
+
};
|
|
215411
|
+
/** @description Unauthorized */
|
|
215412
|
+
401: {
|
|
215413
|
+
headers: {
|
|
215414
|
+
[name: string]: unknown;
|
|
215415
|
+
};
|
|
215416
|
+
content: {
|
|
215417
|
+
"application/json": components["schemas"]["Error"];
|
|
215418
|
+
};
|
|
215419
|
+
};
|
|
215420
|
+
/** @description Forbidden */
|
|
215421
|
+
403: {
|
|
215422
|
+
headers: {
|
|
215423
|
+
[name: string]: unknown;
|
|
215424
|
+
};
|
|
215425
|
+
content: {
|
|
215426
|
+
"application/json": components["schemas"]["Error"];
|
|
215427
|
+
};
|
|
215428
|
+
};
|
|
215429
|
+
/** @description Not found */
|
|
215430
|
+
404: {
|
|
215431
|
+
headers: {
|
|
215432
|
+
[name: string]: unknown;
|
|
215433
|
+
};
|
|
215434
|
+
content: {
|
|
215435
|
+
"application/json": components["schemas"]["Error"];
|
|
215436
|
+
};
|
|
215437
|
+
};
|
|
215438
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
215439
|
+
409: {
|
|
215440
|
+
headers: {
|
|
215441
|
+
[name: string]: unknown;
|
|
215442
|
+
};
|
|
215443
|
+
content: {
|
|
215444
|
+
"application/json": components["schemas"]["Error"];
|
|
215445
|
+
};
|
|
215446
|
+
};
|
|
215447
|
+
/** @description Rate limited */
|
|
215448
|
+
429: {
|
|
215449
|
+
headers: {
|
|
215450
|
+
[name: string]: unknown;
|
|
215451
|
+
};
|
|
215452
|
+
content: {
|
|
215453
|
+
"application/json": components["schemas"]["Error"];
|
|
215454
|
+
};
|
|
215455
|
+
};
|
|
215456
|
+
};
|
|
215457
|
+
};
|
|
215458
|
+
post?: never;
|
|
215459
|
+
/**
|
|
215460
|
+
* Disconnect the store’s Chilexpress account
|
|
215461
|
+
* @description Disables the connection (reversible: connecting again re-enables it). Quotes and dispatches answer 409 `shipping_not_connected` until then; shipments already created keep their tracking links. Requires `tenant:write`.
|
|
215462
|
+
*/
|
|
215463
|
+
delete: {
|
|
215464
|
+
parameters: {
|
|
215465
|
+
query?: never;
|
|
215466
|
+
header?: never;
|
|
215467
|
+
path?: never;
|
|
215468
|
+
cookie?: never;
|
|
215469
|
+
};
|
|
215470
|
+
requestBody?: never;
|
|
215471
|
+
responses: {
|
|
215472
|
+
/** @description The connection, now `connected: false` */
|
|
215473
|
+
200: {
|
|
215474
|
+
headers: {
|
|
215475
|
+
[name: string]: unknown;
|
|
215476
|
+
};
|
|
215477
|
+
content: {
|
|
215478
|
+
/**
|
|
215479
|
+
* @example {
|
|
215480
|
+
* "data": {
|
|
215481
|
+
* "connected": false,
|
|
215482
|
+
* "environment": "test",
|
|
215483
|
+
* "origin_coverage_code": "PROV",
|
|
215484
|
+
* "origin_commune": "Providencia",
|
|
215485
|
+
* "origin_region_code": "RM",
|
|
215486
|
+
* "customer_card_number": "18578680",
|
|
215487
|
+
* "keys": {
|
|
215488
|
+
* "rating": "a1b2••••9f",
|
|
215489
|
+
* "shipments": "c3d4••••0e",
|
|
215490
|
+
* "coverage": null
|
|
215491
|
+
* },
|
|
215492
|
+
* "can_dispatch": true,
|
|
215493
|
+
* "sender": {
|
|
215494
|
+
* "name": "Tienda Ejemplo",
|
|
215495
|
+
* "phone": "+56912345678",
|
|
215496
|
+
* "email": "ventas@tienda.example.cl"
|
|
215497
|
+
* },
|
|
215498
|
+
* "return_address": {
|
|
215499
|
+
* "street": "Av. Ejemplo",
|
|
215500
|
+
* "number": "123",
|
|
215501
|
+
* "supplement": "Oficina 5"
|
|
215502
|
+
* },
|
|
215503
|
+
* "package": {
|
|
215504
|
+
* "weight_kg": 0.6,
|
|
215505
|
+
* "height_cm": 8,
|
|
215506
|
+
* "width_cm": 12,
|
|
215507
|
+
* "length_cm": 20
|
|
215508
|
+
* },
|
|
215509
|
+
* "services": [
|
|
215510
|
+
* 3
|
|
215511
|
+
* ],
|
|
215512
|
+
* "declared_content": "celular",
|
|
215513
|
+
* "seller_rut": null,
|
|
215514
|
+
* "connected_at": "2026-10-29T15:00:00.000Z"
|
|
215515
|
+
* }
|
|
215516
|
+
* }
|
|
215517
|
+
*/
|
|
215518
|
+
"application/json": {
|
|
215519
|
+
data: components["schemas"]["ChilexpressConnection"];
|
|
214147
215520
|
};
|
|
214148
215521
|
};
|
|
214149
215522
|
};
|
|
@@ -214203,7 +215576,6 @@ interface paths {
|
|
|
214203
215576
|
};
|
|
214204
215577
|
};
|
|
214205
215578
|
};
|
|
214206
|
-
delete?: never;
|
|
214207
215579
|
options?: never;
|
|
214208
215580
|
head?: never;
|
|
214209
215581
|
patch?: never;
|
|
@@ -236357,6 +237729,8 @@ interface components {
|
|
|
236357
237729
|
date_format?: "latam" | "us" | "iso";
|
|
236358
237730
|
/** @description The workspace's declared public website. */
|
|
236359
237731
|
website?: string;
|
|
237732
|
+
/** @description Where the store's own product pages live, e.g. `https://macphones.cl/iphone/{slug}`. Placeholders (the product's fields): `{slug}` (title as a URL slug), `{sku}`, `{id}`, `{brand}`. The agent's stock search returns each product's page link when this is set; a product can override it with `attributes.public_url`. Send `null` or an empty string to clear. */
|
|
237733
|
+
product_url_template?: string | null;
|
|
236360
237734
|
/** @description Vitrina Ads workspace choices; absent until first answered. */
|
|
236361
237735
|
ads?: {
|
|
236362
237736
|
/**
|
|
@@ -246805,7 +248179,7 @@ interface components {
|
|
|
246805
248179
|
order_id: string;
|
|
246806
248180
|
display_id: string;
|
|
246807
248181
|
/** @enum {string} */
|
|
246808
|
-
status: "draft" | "pending_payment" | "paid" | "preparing" | "shipped" | "delivered" | "cancelled";
|
|
248182
|
+
status: "draft" | "pending_payment" | "paid" | "preparing" | "shipped" | "delivered" | "cancelled" | "refunded";
|
|
246809
248183
|
total_clp: number;
|
|
246810
248184
|
currency: string;
|
|
246811
248185
|
lines: {
|
|
@@ -246822,6 +248196,20 @@ interface components {
|
|
|
246822
248196
|
unit_price_clp: number;
|
|
246823
248197
|
}[];
|
|
246824
248198
|
delivery_method: string | null;
|
|
248199
|
+
/** @description The delivery charge inside `total_clp` (a courier quote’s price). 0 for pickup. */
|
|
248200
|
+
shipping_clp: number;
|
|
248201
|
+
/** @description Courier delivery facts the buyer may see. Null for pickup. */
|
|
248202
|
+
shipping: {
|
|
248203
|
+
carrier: string;
|
|
248204
|
+
service_name: string | null;
|
|
248205
|
+
commune: string | null;
|
|
248206
|
+
region: string | null;
|
|
248207
|
+
estimated_business_days: number | null;
|
|
248208
|
+
/** @description The courier’s tracking number, once dispatched. */
|
|
248209
|
+
shipment_number: string | null;
|
|
248210
|
+
/** @description The courier’s public tracking page, once dispatched. Link the buyer to it. */
|
|
248211
|
+
tracking_url: string | null;
|
|
248212
|
+
} | null;
|
|
246825
248213
|
paid_at: string | null;
|
|
246826
248214
|
cancelled_at: string | null;
|
|
246827
248215
|
/** @description While unpaid: when the held units are released and the link stops taking money. */
|
|
@@ -246833,8 +248221,13 @@ interface components {
|
|
|
246833
248221
|
checkout: {
|
|
246834
248222
|
/** Format: uuid */
|
|
246835
248223
|
checkout_id: string;
|
|
246836
|
-
/** @description Send the buyer here: Vitrina’s tracked
|
|
248224
|
+
/** @description Send the buyer here (a plain redirect, whatever the provider): Vitrina’s tracked link, which records the server-side InitiateCheckout and then redirects to the Mercado Pago checkout or posts the buyer to the Webpay form. */
|
|
246837
248225
|
checkout_url: string;
|
|
248226
|
+
/**
|
|
248227
|
+
* @description The provider the link charges through.
|
|
248228
|
+
* @enum {string}
|
|
248229
|
+
*/
|
|
248230
|
+
provider: "mercadopago" | "webpay";
|
|
246838
248231
|
amount_clp: number;
|
|
246839
248232
|
expires_at: string | null;
|
|
246840
248233
|
};
|
|
@@ -246846,6 +248239,20 @@ interface components {
|
|
|
246846
248239
|
contact_id: string | null;
|
|
246847
248240
|
replayed: boolean;
|
|
246848
248241
|
};
|
|
248242
|
+
StorefrontPaymentProviders: {
|
|
248243
|
+
/**
|
|
248244
|
+
* @description The provider a checkout without `payment_provider` uses; null when none is connected (checkout answers 409 `payment_not_connected`).
|
|
248245
|
+
* @enum {string|null}
|
|
248246
|
+
*/
|
|
248247
|
+
default: "mercadopago" | "webpay" | null;
|
|
248248
|
+
/** @description The providers the tenant connected, in the order to offer them. */
|
|
248249
|
+
providers: {
|
|
248250
|
+
/** @enum {string} */
|
|
248251
|
+
provider: "mercadopago" | "webpay";
|
|
248252
|
+
/** @example Webpay */
|
|
248253
|
+
name: string;
|
|
248254
|
+
}[];
|
|
248255
|
+
};
|
|
246849
248256
|
CommerceOrder: {
|
|
246850
248257
|
/** Format: uuid */
|
|
246851
248258
|
id: string;
|
|
@@ -246862,7 +248269,7 @@ interface components {
|
|
|
246862
248269
|
/** @description A store order: the store's modification time as of the last applied store event. */
|
|
246863
248270
|
external_updated_at: string | null;
|
|
246864
248271
|
/** @enum {string} */
|
|
246865
|
-
status: "draft" | "pending_payment" | "paid" | "preparing" | "shipped" | "delivered" | "cancelled";
|
|
248272
|
+
status: "draft" | "pending_payment" | "paid" | "preparing" | "shipped" | "delivered" | "cancelled" | "refunded";
|
|
246866
248273
|
/** Format: uuid */
|
|
246867
248274
|
contact_id: string | null;
|
|
246868
248275
|
/** Format: uuid */
|
|
@@ -246876,6 +248283,9 @@ interface components {
|
|
|
246876
248283
|
[key: string]: unknown;
|
|
246877
248284
|
};
|
|
246878
248285
|
notes: string | null;
|
|
248286
|
+
/** @description What the order charges for delivery (a courier quote frozen at checkout, `delivery.method = shipping`). Included in `total_clp`. */
|
|
248287
|
+
shipping_clp: number;
|
|
248288
|
+
/** @description Σ of the lines + `shipping_clp`. */
|
|
246879
248289
|
total_clp: number;
|
|
246880
248290
|
item_count: number;
|
|
246881
248291
|
stock_decremented_at: string | null;
|
|
@@ -246884,6 +248294,11 @@ interface components {
|
|
|
246884
248294
|
delivered_at: string | null;
|
|
246885
248295
|
cancelled_at: string | null;
|
|
246886
248296
|
cancelled_reason: string | null;
|
|
248297
|
+
/** @description When a paid order was refunded in full (`status: refunded`). */
|
|
248298
|
+
refunded_at: string | null;
|
|
248299
|
+
refund_reason: string | null;
|
|
248300
|
+
/** @description The payment provider refund id (Mercado Pago refund id, or the Webpay refund authorization code), when returned. */
|
|
248301
|
+
refund_reference: string | null;
|
|
246887
248302
|
/** @description A storefront checkout’s buyer as declared at purchase (`POST /orders/checkout`). `{}` for orders created by staff or the agent: the contact is the buyer. */
|
|
246888
248303
|
buyer: {
|
|
246889
248304
|
name?: string | null;
|
|
@@ -246930,6 +248345,107 @@ interface components {
|
|
|
246930
248345
|
obligation_id: string | null;
|
|
246931
248346
|
}[];
|
|
246932
248347
|
};
|
|
248348
|
+
OrderRefundResult: {
|
|
248349
|
+
order: components["schemas"]["CommerceOrder"];
|
|
248350
|
+
/** @description `true` when this call refunded the order, `false` when it was already refunded (a replay changes nothing). */
|
|
248351
|
+
refunded: boolean;
|
|
248352
|
+
/** @description Units put back on hand by this refund. 0 when another system owns the workspace on-hand count (it receives `order.status_changed` and writes the count itself) or on a replay. */
|
|
248353
|
+
restored_units: number;
|
|
248354
|
+
};
|
|
248355
|
+
ShippingCommune: {
|
|
248356
|
+
/** @example CONC */
|
|
248357
|
+
coverage_code: string;
|
|
248358
|
+
/** @example Concepcion */
|
|
248359
|
+
name: string;
|
|
248360
|
+
commune: string;
|
|
248361
|
+
/** @example R8 */
|
|
248362
|
+
region_code: string;
|
|
248363
|
+
region: string | null;
|
|
248364
|
+
/** @enum {string} */
|
|
248365
|
+
kind: "commune" | "locality";
|
|
248366
|
+
};
|
|
248367
|
+
ShippingQuote: {
|
|
248368
|
+
/** Format: uuid */
|
|
248369
|
+
quote_id: string;
|
|
248370
|
+
/** @enum {string} */
|
|
248371
|
+
carrier: "chilexpress";
|
|
248372
|
+
destination: {
|
|
248373
|
+
coverage_code: string;
|
|
248374
|
+
commune: string;
|
|
248375
|
+
region_code: string;
|
|
248376
|
+
region: string | null;
|
|
248377
|
+
};
|
|
248378
|
+
/** @description Cheapest first. */
|
|
248379
|
+
options: {
|
|
248380
|
+
/** @description Chilexpress service type: 2 Prioritario, 3 Express (día hábil siguiente), 4 Extendido, 5 Extremos, 41/42 encomiendas grandes. */
|
|
248381
|
+
service_code: number;
|
|
248382
|
+
service_name: string;
|
|
248383
|
+
price_clp: number;
|
|
248384
|
+
/** @description An estimate implied by the service and the region (Chilexpress gives no transit time). */
|
|
248385
|
+
estimated_business_days: number | null;
|
|
248386
|
+
}[];
|
|
248387
|
+
/** @description Send `quote_id` to `POST /orders/checkout` before this. */
|
|
248388
|
+
expires_at: string;
|
|
248389
|
+
};
|
|
248390
|
+
CommerceShipment: {
|
|
248391
|
+
/** @enum {string} */
|
|
248392
|
+
carrier: "chilexpress";
|
|
248393
|
+
environment: string;
|
|
248394
|
+
/**
|
|
248395
|
+
* @description Chilexpress transport order (OT) number.
|
|
248396
|
+
* @example 712678918615
|
|
248397
|
+
*/
|
|
248398
|
+
shipment_number: string;
|
|
248399
|
+
/** @description Chilexpress’s public tracking page for this shipment. */
|
|
248400
|
+
tracking_url: string;
|
|
248401
|
+
service_code: number;
|
|
248402
|
+
service_name: string | null;
|
|
248403
|
+
/** @description The order’s display id, printed as the reference. */
|
|
248404
|
+
reference: string;
|
|
248405
|
+
has_label: boolean;
|
|
248406
|
+
created_at: string;
|
|
248407
|
+
};
|
|
248408
|
+
ChilexpressConnection: {
|
|
248409
|
+
connected: boolean;
|
|
248410
|
+
/** @enum {string|null} */
|
|
248411
|
+
environment: "test" | "production" | null;
|
|
248412
|
+
origin_coverage_code: string | null;
|
|
248413
|
+
origin_commune: string | null;
|
|
248414
|
+
origin_region_code: string | null;
|
|
248415
|
+
customer_card_number: string | null;
|
|
248416
|
+
/** @description Masked previews of the stored keys (never the keys). */
|
|
248417
|
+
keys: {
|
|
248418
|
+
rating: string | null;
|
|
248419
|
+
shipments: string | null;
|
|
248420
|
+
coverage: string | null;
|
|
248421
|
+
};
|
|
248422
|
+
/** @description True once a TCC and the Envíos key are stored. */
|
|
248423
|
+
can_dispatch: boolean;
|
|
248424
|
+
sender: {
|
|
248425
|
+
name: string;
|
|
248426
|
+
phone: string;
|
|
248427
|
+
email: string;
|
|
248428
|
+
} | null;
|
|
248429
|
+
return_address: {
|
|
248430
|
+
street: string;
|
|
248431
|
+
number: string;
|
|
248432
|
+
supplement: string | null;
|
|
248433
|
+
} | null;
|
|
248434
|
+
package: {
|
|
248435
|
+
weight_kg: number;
|
|
248436
|
+
height_cm: number;
|
|
248437
|
+
width_cm: number;
|
|
248438
|
+
length_cm: number;
|
|
248439
|
+
};
|
|
248440
|
+
services: number[];
|
|
248441
|
+
/**
|
|
248442
|
+
* @description What the parcel contains, as Chilexpress declares it on the label.
|
|
248443
|
+
* @enum {string}
|
|
248444
|
+
*/
|
|
248445
|
+
declared_content: "celular" | "tecnologia" | "articulos_personales" | "educacion" | "vestuario" | "otros";
|
|
248446
|
+
seller_rut: string | null;
|
|
248447
|
+
connected_at: string | null;
|
|
248448
|
+
};
|
|
246933
248449
|
WhatsappTemplateAnalytics: {
|
|
246934
248450
|
template: {
|
|
246935
248451
|
/** Format: uuid */
|