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/jsonOnboardingInput
objectsin otras propiedades
-
displayNameobligatoriostringlongitud mín. 1longitud máx. 200 -
companyNameobligatoriostringlongitud mín. 1longitud máx. 200 -
legalEntityNameobligatoriostringlongitud mín. 1longitud máx. 200 -
countryCodeobligatoriostringpatrón ^[A-Z]{2}$ISO 3166-1 alpha-2; descriptive only, no tax setup.
-
branchNameobligatoriostringlongitud mín. 1longitud máx. 200 -
warehouseNameobligatoriostringlongitud mín. 1longitud máx. 200 -
currencyCodeobligatoriostringuno de "USD", "EUR", "MXN", "COP", "PEN", "ARS", "BRL", "GBP", "CAD", "DOP", "GTQ", "CRC", "BOB", "UYU", "CLP", "PYG", "JPY" -
timeZoneobligatoriostringlongitud máx. 64 -
valuationModeobligatoriostringuno de "WEIGHTED_AVERAGE", "FIFO", "BY_PRODUCT" -
startsOnobligatoriostringformato dateExact calendar date, 1900–2100.
-
fiscalStartsOnobligatoriostringformato dateExact calendar date, 1900–2100.
-
fiscalEndsOnobligatoriostringformato dateExact calendar date, 1900–2100.
-
planobligatoriostringuno de "FREE", "BASIC", "PROFESSIONAL", "ENTERPRISE"
Respuestas
201 Success
application/jsonOnboardingReceipt
objectsin otras propiedades
-
tenantIdobligatoriostringformato uuid -
legalEntityIdobligatoriostringformato uuid -
branchIdobligatoriostringformato uuid -
warehouseIdobligatoriostringformato uuid -
priceListIdobligatoriostringformato uuid -
companyNameobligatoriostringlongitud mín. 1longitud máx. 200 -
completedAtobligatoriostringformato date-time -
requestedPlanobligatoriostringuno de "FREE", "BASIC", "PROFESSIONAL", "ENTERPRISE" -
effectivePlanobligatoriostringuno de "FREE", "BASIC", "PROFESSIONAL", "ENTERPRISE" -
subscriptionStatusobligatoriouno de "ACTIVE", "PENDING_PAYMENT"
400 Invalid input, identity, idempotency, limit or availability
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where 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 elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For 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+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where 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 elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For 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+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where 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 elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For 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+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where 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 elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For 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+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where 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 elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For 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+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where 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 elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For 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.
-