← Platform API v1.32.0

POST /onboarding

completeOnboarding · Onboarding

Deliberate atomic creation of the account’s first self-service tenant, its local administrator, entity, branch, warehouse, internal list, empty ledger and selected fiscal year. Opening date must be within a fiscal range of at most 366 days; clipped monthly periods cover it exactly. User-bound durable idempotency: same key+input replays; changed input or another key after creation returns 409. Paid selection is PENDING_PAYMENT with FREE entitlements until verified activation; no payment is collected. No caller-supplied identity, IDs, roles, price or entitlement. Other memberships and legacy companies are unchanged.

Autenticación
SupabaseBearer · http bearer

Ejemplo

Los valores entre <> y {} son marcadores: sustitúyelos por los tuyos antes de ejecutarlo.

curl --request POST \
  --url 'https://api.marky.ec/v1/onboarding' \
  --header 'Authorization: Bearer <SupabaseBearer>' \
  --header 'Idempotency-Key: <Idempotency-Key>' \
  --header 'Content-Type: application/json' \
  --data @body.json

Parámetros

Nombre En Tipo Descripción
Idempotency-Keyobligatorio header stringformato uuid

Cuerpo (obligatorio)

application/json
OnboardingInput
objectsin otras propiedades
  • displayNameobligatorio
    stringlongitud mín. 1longitud máx. 200
  • companyNameobligatorio
    stringlongitud mín. 1longitud máx. 200
  • legalEntityNameobligatorio
    stringlongitud mín. 1longitud máx. 200
  • countryCodeobligatorio
    stringpatrón ^[A-Z]{2}$

    ISO 3166-1 alpha-2; descriptive only, no tax setup.

  • branchNameobligatorio
    stringlongitud mín. 1longitud máx. 200
  • warehouseNameobligatorio
    stringlongitud mín. 1longitud máx. 200
  • currencyCodeobligatorio
    stringuno de "USD", "EUR", "MXN", "COP", "PEN", "ARS", "BRL", "GBP", "CAD", "DOP", "GTQ", "CRC", "BOB", "UYU", "CLP", "PYG", "JPY"
  • timeZoneobligatorio
    stringlongitud máx. 64
  • valuationModeobligatorio
    stringuno de "WEIGHTED_AVERAGE", "FIFO", "BY_PRODUCT"
  • startsOnobligatorio
    stringformato date

    Exact calendar date, 1900–2100.

  • fiscalStartsOnobligatorio
    stringformato date

    Exact calendar date, 1900–2100.

  • fiscalEndsOnobligatorio
    stringformato date

    Exact calendar date, 1900–2100.

  • planobligatorio
    stringuno de "FREE", "BASIC", "PROFESSIONAL", "ENTERPRISE"

Respuestas

201 Success
application/json
OnboardingReceipt
objectsin otras propiedades
  • tenantIdobligatorio
    stringformato uuid
  • legalEntityIdobligatorio
    stringformato uuid
  • branchIdobligatorio
    stringformato uuid
  • warehouseIdobligatorio
    stringformato uuid
  • priceListIdobligatorio
    stringformato uuid
  • companyNameobligatorio
    stringlongitud mín. 1longitud máx. 200
  • completedAtobligatorio
    stringformato date-time
  • requestedPlanobligatorio
    stringuno de "FREE", "BASIC", "PROFESSIONAL", "ENTERPRISE"
  • effectivePlanobligatorio
    stringuno de "FREE", "BASIC", "PROFESSIONAL", "ENTERPRISE"
  • subscriptionStatusobligatorio
    uno de "ACTIVE", "PENDING_PAYMENT"
400 Invalid input, identity, idempotency, limit or availability
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

401 Invalid input, identity, idempotency, limit or availability
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

403 Invalid input, identity, idempotency, limit or availability
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

409 Invalid input, identity, idempotency, limit or availability
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

429 Invalid input, identity, idempotency, limit or availability
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

503 Invalid input, identity, idempotency, limit or availability
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.